Yes, thank you, i have left that in during experimenting.
After further debugging and realizing the CIF driver was missing from the kconfig, we have now finally also switched to a radxa cm3 v1.3 instead of the 1.1 i was using before. The raspi cm4 io board was also reverted to a pristine one.
CAM1 (lanes 1,2 - csi clock 0) works if it is hooked up via i2c4, because i2c0 is always dead and cannot be probed. Probing it results in timeouts.
However CAM0 still does not work. It is possible to start a stream, which results in an empty output file, but will run endlessly if not manually stopped:
rock@radxa-cm3-io:~$ v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=‘NV12’ --stream-mmap=4 --set-selection=target=crop,flags=0,top=0,left=0,width=1920,height=1080 --stream-to=./out.yuv >> stream.txt
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
[ 1910.163101] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream on, src_sd: 00000000d381617c, sd_name:rockchip-csi2-dphy2
[ 1910.163160] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream ON
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 3110400 ts: 1910.367886 (ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 3110400 ts: 1910.401266 delta: 33.380 ms (ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 3110400 ts: 1910.434649 delta: 33.383 ms (ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 3110400 ts: 1910.468037 delta: 33.388 ms (ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 4 bytesused: 3110400 ts: 1910.501414 delta: 33.377 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 5 bytesused: 3110400 ts: 1910.534798 delta: 33.384 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 6 bytesused: 3110400 ts: 1910.568179 delta: 33.381 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 7 bytesused: 3110400 ts: 1910.601561 delta: 33.382 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 8 bytesused: 3110400 ts: 1910.634940 delta: 33.379 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 9 bytesused: 3110400 ts: 1910.668326 delta: 33.386 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 10 bytesused: 3110400 ts: 1910.701709 delta: 33.383 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 11 bytesused: 3110400 ts: 1910.735093 delta: 33.384 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 12 bytesused: 3110400 ts: 1910.768475 delta: 33.382 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 13 bytesused: 3110400 ts: 1910.801857 delta: 33.382 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 14 bytesused: 3110400 ts: 1910.835240 delta: 33.383 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 15 bytesused: 3110400 ts: 1910.868620 delta: 33.380 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 16 bytesused: 3110400 ts: 1910.902007 delta: 33.387 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 17 bytesused: 3110400 ts: 1910.935389 delta: 33.382 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 18 bytesused: 3110400 ts: 1910.968771 delta: 33.382 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 19 bytesused: 3110400 ts: 1911.002154 delta: 33.383 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 20 bytesused: 3110400 ts: 1911.035536 delta: 33.382 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 21 bytesused: 3110400 ts: 1911.068918 delta: 33.382 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 22 bytesused: 3110400 ts: 1911.102301 delta: 33.383 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 23 bytesused: 3110400 ts: 1911.135684 delta: 33.383 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 24 bytesused: 3110400 ts: 1911.169066 delta: 33.382 ms fps: 29.96 (ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 25 bytesused: 3110400 ts: 1911.202450 delta: 33.384 ms fps: 29.96 (ts-monotonic, ts-src-eof)
^C[ 1911.243653] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream off, src_sd: 00000000d381617c, sd_name:rockchip-csi2-dphy2
[ 1911.243694] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream OFF
If i try to get a single image from the cam afterwards, i get fifo overflows:
[ 1745.655332] rkcif_mipi_lvds: ERROR: csi fifo overflow, intstat:0x30000, lastline:41!!
[ 1745.655352] rkcif_mipi_lvds: ERROR: csi fifo overflow, intstat:0x30000, lastline:41!!
[ 1745.655372] rkcif_mipi_lvds: ERROR: csi fifo overflow, intstat:0x30000, lastline:41!!
[ 1745.655392] rkcif_mipi_lvds: ERROR: csi fifo overflow, intstat:0x30000, lastline:41!!
[ 1745.655412] rkcif_mipi_lvds: ERROR: csi fifo overflow, intstat:0x30000, lastline:41!!
[ 1745.655431] rkcif_mipi_lvds: ERROR: csi fifo overflow, intstat:0x30000, lastline:41!!
[ 1745.684305] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream off, src_sd: 00000000d381617c, sd_name:rockchip-csi2-dphy2
[ 1745.684355] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream OFF
[ 1745.685407] rockchip-csi2-dphy csi2-dphy2: csi2_dphy_s_stream_stop stream stop, dphy2
[ 1745.685417] rockchip-csi2-dphy csi2-dphy2: csi2_dphy_s_stream stream on:0, dphy2
[ 1745.685440] rockchip-csi2-dphy csi2-dphy2: csi2_dphy_s_stream stream on:0, dphy2
[ 1745.688386] rkcif_mipi_lvds: stream[0] stopping finished
This is the device list from v4l2-ctl --list-devices:
rkisp-statistics (platform: rkisp):
/dev/video12
/dev/video13
/dev/video21
/dev/video22
rkcif_mipi_lvds (platform:rkcif):
/dev/media0
rkcif (platform:rkcif_mipi_lvds):
/dev/video0
/dev/video1
/dev/video2
/dev/video3
/dev/video4
rkisp_mainpath (platform:rkisp-vir0):
/dev/video5
/dev/video6
/dev/video7
/dev/video8
/dev/video9
/dev/video10
/dev/video11
/dev/media1
rkisp_mainpath (platform:rkisp-vir1):
/dev/video14
/dev/video15
/dev/video16
/dev/video17
/dev/video18
/dev/video19
/dev/video20
/dev/media2
This is what streamer does when trying to capture a single frame, it locks up until manually cancelled:
rock@radxa-cm3-io:~$ streamer -o 5.jpeg -c /dev/video0 > streamer files / video: JPEG (JFIF) / audio: none
[ 52.666544] rkcif_mipi_lvds: can not find output format: 0x0
[ 52.666598] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream on, src_sd: 00000000c6146c14, sd_name:rockchip-csi2-dphy2
[ 52.666658] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream ON
v4l2: oops: select timeout
^C^C - one moment please
v4l2: oops: select timeout
[ 65.524515] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream off, src_sd: 00000000c6146c14, sd_name:rockchip-csi2-dphy2
[ 65.524551] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream OFF
[ 65.524597] rockchip-mipi-csi2: ERR1: crc errors, reg: 0x1000000, cnt:1
rock@radxa-cm3-io:~$ streamer -o 5.jpeg -c /dev/video0 > streamer
files / video: JPEG (JFIF) / audio: none
[ 70.616525] rkcif_mipi_lvds: can not find output format: 0x0
[ 70.616580] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream on, src_sd: 00000000c6146c14, sd_name:rockchip-csi2-dphy2
[ 70.616642] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream ON
v4l2: oops: select timeout
v4l2: oops: select timeout
^C^C - one moment please
v4l2: oops: select timeout
[ 90.404503] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream off, src_sd: 00000000c6146c14, sd_name:rockchip-csi2-dphy2
[ 90.404539] rockchip-mipi-csi2 fdfb0000.mipi-csi2: stream OFF
[ 90.404585] rockchip-mipi-csi2: ERR1: crc errors, reg: 0x1000000, cnt:1
rock@radxa-cm3-io:~$ 0/0, video 0/16, convert 0/0
Here is an excerpt from dmesg:
[ 0.230854] rockchip-csi2-dphy csi2-dphy2: csi2 dphy2 probe successfully!
[ 0.230995] rockchip-csi2-dphy-hw fe870000.csi2-dphy-hw: csi2 dphy hw probe successfully!
[ 7.580138] imx219 2-0010: driver version: 00.01.02
[ 7.604721] imx219 2-0010: Model ID 0x0219, Lot ID 0x038b40, Chip ID 0x0177
[ 7.606001] rockchip-mipi-csi2: probe success, v4l2_dev:(null)!
[ 7.606699] rkcifhw fdfe0000.rkcif: Linked as a consumer to fdfe0800.iommu
[ 7.607336] rkcifhw fdfe0000.rkcif: can’t request region for resource [mem 0xfdfe0000-0xfdfe7fff]
[ 7.607793] rkcif rkcif_mipi_lvds: rkcif driver version: v00.01.0a
[ 7.607873] rkcif rkcif_mipi_lvds: attach to cif hw node
[ 7.609055] rkcif rkcif_mipi_lvds: Entity type for entity rockchip-mipi-csi2 was not initialized!
[ 7.609086] rockchip-mipi-csi2: Async registered subdev
[ 7.609122] rockchip-csi2-dphy csi2-dphy2: dphy2 matches m01_f_imx219 2-0010:bus
type 4
[ 7.609723] rkcif_mipi_lvds: Async subdev notifier completed
[ 7.611941] rkisp_hw fdff0000.rkisp: Linked as a consumer to fdff1a00.iommu
[ 7.612162] rkisp_hw fdff0000.rkisp: is_thunderboot: 0
[ 7.612192] rkisp_hw fdff0000.rkisp: max input:0x0@0fps
[ 7.612233] rkisp_hw fdff0000.rkisp: can’t request region for resource [mem 0xfdff0000-0xfdffffff]
[ 7.615886] rkisp rkisp-vir1: rkisp driver version: v01.06.01
[ 7.616046] rkisp rkisp-vir1: No memory-region-thunderboot specified
[ 7.616263] rkisp rkisp-vir1: Entity type for entity rkisp-isp-subdev was not initialized!
[ 7.616299] rkisp rkisp-vir1: Entity type for entity rkisp-csi-subdev was not initialized!
[ 7.734875] rkisp-vir1: Async subdev notifier completed
[ 7.734916] rkcif rkcif_mipi_lvds: clear unready subdev num: 0
[ 7.739790] rkisp rkisp-vir1: clear unready subdev num: 0