Hi Igor,
Thanks for your reply.
I tried switching to Linux and capturing some RAW8 and RAW10 frames using v4l-utils as follows:
v4l2-ctl -d /dev/video0 --verbose --set-fmt--video=width=2592,height=1944,pixelformat=BA81 --stream-mmap --stream-count=1 --stream-to=raw8_2592x1944.raw
v4l2-ctl -d /dev/video0 --verbose --set-fmt-video=width=2592,height=1944,pixelformat=BG10 --stream-mmap --stream-count=1 --stream-to=raw10_2592x1944.raw
Unfortunately raw images are still not looking right (see screenshots attached, after I converted the raw captures from bayer to rgb). CRC errors like the ones below are reported in the kernel log when the frame is captured, both for 8-bit and 10-bit formats:
6,15197,289730726,-;mxc_mipi-csi.0: CRC Error: 1
6,15198,289730734,-;mxc_mipi-csi.0: Frame Start: 1
6,15199,289730738,-;mxc_mipi-csi.0: status: 01000002
6,15200,289730773,-;mxc_mipi-csi.0: CRC Error: 2
6,15201,289730778,-;mxc_mipi-csi.0: status: 00000002
6,15202,289730795,-;mxc_mipi-csi.0: CRC Error: 3
6,15203,289730799,-;mxc_mipi-csi.0: status: 00000002
6,15204,289730809,-;mxc_mipi-csi.0: CRC Error: 4
...
Do you have any insight on what might be causing these CRC errors on Linux during 8-bit raw capture too?
On the board I'm using, different drivers are selected for ov5640 and MIPI CSI controller than the one for the imx8mm-evk, specifically ov5640_mipi_v2, mx6s_capture and mxc_mipi_csi. Apart from this, configuration for the csi endpoint in the device tree looks pretty much the same as the one in the imx8mm-evk dt.
As for the discussion on the second link, I already modified the register suggested for enabling bayer format (cr18 register).
Are you aware of any specific PLL configuration for 10-bit MIPI mode? Not sure, but I'm guessing that might be a possible cause for the images being corrupted.
Thanks for your help,
Best,
Laura