YUV support in V4L2 driver

Hi All,

We will be connecting YUV input to TX1, hence developing V4l2 driver for it. drivers/media/i2c/ov5693.c is taken as reference. But found this driver code does not contain support for YUV. In camera_common_color_fmts array, only Bayer format is available. Our required format is YUV422 8bit. So We added below highlighted piece code, Can someone Let us know if this is fine.

static const struct camera_common_colorfmt camera_common_color_fmts = {
{
V4L2_MBUS_FMT_SRGGB12_1X12,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SRGGB12,
},
{
V4L2_MBUS_FMT_SRGGB10_1X10,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SRGGB10,
},
{
V4L2_MBUS_FMT_SRGGB8_1X8,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SRGGB8,
},
{
V4L2_MBUS_FMT_YUYV8_2X8,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_YUYV,
},

};

Thanks
Pal

If someone has used YUV input with TX1, Can You Please clarify this?

Hi Pal
The modification should be good for the YUV sensor.

Thanks Shane.

We are referring OV5693 Bayer sensor driver as reference for our YUV sensor driver. Is it okay?

Also just for our understanding, We would like to know the need of “modeX” in Device tree. Is it applicable only to Bayer sensor?

Thanks
Pal

I think you can reference to it. The modeX is the same with YUV sensor.

Thanks Shane.

Still there are problems in Receiving frame. Can You please Let us know how to enable test pattern in R24.2. Information given in document are for soc_camera, which has depreciated in R24.2

Now, I am developping the YUV camera driver,too. I suggest that nvidia should provide a reference YUV camera sensor driver program, so that we can save the developping time!

Hi haijun,
Thanks for your feedback and we will look into reference YUV sensor. For now, the major difference of YUV sensor from bayer is the capture format and output the frame should go. YUV frame usually outputs to memory, whereas bayer is output to ISP HW for further processing. In terms of VI module programming, they should be similar.

Other engineer will comment on TPG and hardware debugging to give you some suggestion.

Before SW tuning, there are some hardware related items need be checked first:

  1. The power sequence and voltage level of camera module should be correct based on vendor’s spec.
  2. The reset/enable signal (if have) is correct.
  3. The MCLK of TX1 output is normal.
  4. I2C can correctly w/r registers of camera.

So we(the developping enginers) want to get a reference yuv camera sensor driver,even though the driver is not perfect!

Can nVidia now provide any YUV reference driver?
The beta/alpha version is also fine…

Hi
We’re not ready yet. However you can search in the forum there’s some user get their YUV sensor up.