About input the RAW data through the MIPI-CSI2 I/F in i.MX6DQ.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About input the RAW data through the MIPI-CSI2 I/F in i.MX6DQ.

Jump to solution
4,290 Views
keitanagashima
Senior Contributor I

Dear All,

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?

Best Regards,

Keita

Labels (4)
0 Kudos
1 Solution
1,975 Views
chrisroed
Contributor IV

Hi Keita,

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. 

Good luck!

View solution in original post

0 Kudos
4 Replies
1,975 Views
jimmychan
NXP TechSupport
NXP TechSupport

You may take this for reference.

imx6 MIPI CSI with OV5648 camera

0 Kudos
1,975 Views
keitanagashima
Senior Contributor I

Hi Jimmychan,

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".

[Questions]

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"?

Best Regards,

Keita

0 Kudos
1,976 Views
chrisroed
Contributor IV

Hi Keita,

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. 

Good luck!

0 Kudos
1,974 Views
jimmychan
NXP TechSupport
NXP TechSupport

Hi Keita, I think Chris Roed have more experience than me for this.

Hi @chrisroed, do you have any idea?

0 Kudos