My customer is trying to input the RAW data through the MIPI-CSI2 I/F on custom board with i.MX6DQ.
But, they have not operated.
Do you have some sample code or manual to input RAW data?
I never tried to get 12 bit bayer data, but read a few posts from people that tried and I still don't know if any were successful.
In include/linux/mipi_csi2.h, there are MIPI_DT_RAW8/10/12 defined. You need to make sure that you camera driver is setting MIPI_DT_RAW12. Look at the ov5640_mipi.c for reference. Since you're reading in 12 bit data, you have to use a 16 bit pixel format, so you could try using V4L2_PIX_FMT_SBGGR16 and IPU_PIX_FMT_GENERIC_16.
If you sensor can output 8 bit data, you could try starting there, and once you get that working try 12 bit.
I found this post very helpful to get started: i.MX6 OV5647 Bayer sensor driver (ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0)
You could also try posting on this thread. 10-Bit Bayer Capture
Also, be aware the the IMX6 cannot convert the bayer data to usable image data in hardware. If you can switch to an RGB or YUV sensor, I highly recommend doing it.
You may take this for reference.
imx6 MIPI CSI with OV5648 camera
Thank you for your reply.
But, i.MX6Q didn't capture the 12 bit RAW data.
<My customer modified the settings follow the community.>
1. Setting the CSI-MEM
2. Add the "V4L2_PIX_FMT_GREY" and "IPU_PIX_FMT_GREY format cases".
Q1. Do you have the sample code to save RAW data?
Q2. Is there relationship between the "save of the 12 bit raw data" and "vsync_external flag"?
Hi Keita, I think Chris Roed have more experience than me for this.
Hi @Chris Roed, do you have any idea?
Retrieving data ...