I have checked the 'expert' hints and can confirm I have the same:
1. the adv7280 should be enabled after mipi_csi2_reset().
2. For MIPI CSI input, the clock mode in IPU_CSI_SENS_CONF must be gated clock mode.
p->u.bt656.clock_curr = 1;
3. For interlaced input, IDMAC 0 should be set to interlaced mode: "params.csi_mem.interlaced = true;" For progressive input, IDMAC 0 shoudl be set to progressive mode: "params.csi_mem.interlaced = false;"
case IPU_CSI_CLK_MODE_GATED_CLK: in file drivers\media\video\mxc\capture\ipu_csi_enc.c, function csi_enc_setup().
4. For device type:
adv7280_data.sen.pix.priv = 1; /* 1 is used to indicate TV in */"
I was having some trouble building the imx-test v4l2 utilities to help me diagnose further, but I have since resolved this [thanks to imx-test : Compile error "linux/mxcfb.h: No such file or directory" ].
Delving straight in, upon running ./mxc_v4l2_capture.out I get the following error:
---- Running < ./mxc_v4l2_capture.out > test ----
in_width = 640, in_height = 480
out_width = 176, out_height = 144
top = 0, left = 0
VIDIOC_DBG_G_CHIP_IDENT failed.
get format failed
It seems I have something fundamentally wrong.
As I have no previous experience of a mipi / csi camera system on a linux platform, so I am not sure what to look for next. Highlighted boot log:
Linux video capture interface: v2.00
MIPI CSI2 driver module loaded
pxp-v4l2 pxp_v4l2_out: initialized
[ADV7280M] Init 1
[ADV7280M] Probe-3a addr = 0x20
[ADV7280M] Probe-3b name = adv7280
[ADV7280M] Probe-6, csi_tx_addr: 0x50
[ADV7280M] Probe-9, vpp_tx_addr: 0x54
[ADV7280M] Probe-11 Rd i2c_dev:0x20 addr:0x11
adv7280_i2c_probe: device found, rev_id 0x42
mxc_mipi-csi 30750000.mipi-csi: mipi csi v4l2 device registered
CSI: Registered sensor subdevice: mxc_mipi-csi.0
mxc_mipi-csi 30750000.mipi-csi: lanes: 1, hs_settle: 13, clk_settle: 2, wclk: 0, freq: 166000000
As seen above, the ADV7280-M is probed at boot without any errors. I have added some extra diags. I am not sure what else I would expect to see on a working system?
find -name video* gives me:
./sys/devices/soc0/pxp_v4l2_out/video4linux
./sys/devices/soc0/pxp_v4l2_out/video4linux/video0
./sys/devices/soc0/soc/30400000.aips-bus/30710000.csi/video4linux
./sys/devices/soc0/soc/30400000.aips-bus/30710000.csi/video4linux/video1
./sys/class/video4linux
./sys/class/video4linux/video1
./sys/class/video4linux/video0
./sys/module/mxc_vout/parameters/video_nr
./sys/module/videobuf2_core
./sys/module/videobuf_core
./sys/module/videobuf2_v4l2
./sys/module/mxc_pxp_v4l2/parameters/video_nr
./sys/module/mxc_v4l2_capture/parameters/video_nr
./usr/lib/modules/4.9.11-cl-som-imx7-5.0/kernel/drivers/video
./dev/video1
./dev/video0
Any further advice / help would be much appreciated.