the tx1 support YUV422 Sensor

Hi Everyone;
I want to support two cameras on tx1 devboard, and our hardware engineers select two pieces tw9992(which support YUV422 or RGB565 convert to MIPI signal) connect to MIPI_A and MIPI_C.

but I find in /drivers/media/platform/tegra/camera/camera_common.c only defined three fmts

static const struct camera_common_colorfmt camera_common_color_fmts[] = {

I defined “common_data->colorfmt = camera_common_find_datafmt(V4L2_MBUS_FMT_UYVY8_1X16);” in my driver

and in the device tree, the pixel_t defines “pixel_t = “bayer_bggr”;”

and when run the command “v4l2-compliance -d /dev/video0”

is shows: Total: 42, Succeeded: 39, Failed: 3, Warnings: 0

how do I support YUV422 Sensor on tx1 devboard?
thanks a lot!

Have you try change the V4L2_COLORSPACE_DEFAULT to V4L2_COLORSPACE_SRGB and need make sure the output format is V4L2_MBUS_FMT_UYVY8_1X16 or V4L2_MBUS_FMT_UYVY8_2X8.

I have tried the V4L2_COLORSPACE_SRGB and then I changed bayer_bggr to uyvy in the dtsi, it prints Kernel NULL Point.

How to make sure the output format is V4L2_MBUS_FMT_UYVY8_1X16 or V4L2_MBUS_FMT_UYVY8_2X8?


The kernel NULL point during boot time?
The output format need consult with vendor.

when run the command “v4l2-compliance -d /dev/video0”, it prints kernel NULL point.

and when I cat /dev/video0, it prints “tegra_mipi_cal 700e3000.mipical: Mipi cal timeout,val:7bc1, lanes:100000”
I don’t know where to fixed error? can you help me to check the code?

“MIPI Output
 MIPI 1.1 compliant unidirectional output format
 YUV 422 or RGB565 output format”

it describes in the datasheet,but don’t tell V4L2_MBUS_FMT_UYVY8_1X16 or V4L2_MBUS_FMT_UYVY8_2X8 ?

Hi Shane,

Could You Please Let us know what is the difference between V4L2_MBUS_FMT_UYVY8_1X16 or V4L2_MBUS_FMT_UYVY8_2X8 ?

In our case, TX1 receives YUV422 stream from sensor over MIPI… Sensor vendor claims it is YUV422 8bit - YUYV byte order… In TX1 side, while capturing, if we set format as YUYV, then resultant image can be viewed only if I set UYVY format in viewer. Similarly if I set format as UYVY while capturing, then resultant image can be viewed only if I set format in viewer as YUYV.

Seems some Byte order configuration is missing in driver.


Please reference to below link to see the different.