Could AGX Orin CSI support YUV420 video frame?

We plan to implement an FPGA based MIPI CSI-2 video connected to the AGX Orin, and the FPGA will transmit frames in YUV420 format over MIPI to the AGX Orin CSI.
May I to know AGX Orin CSI could support receive the YUV420 video frame?
How to setup AGX Orin CSI video frame for YUV420 in device tree?
How to setup pixel_phase and mode_type for YUV420?

mode1 { // MODE_1920X1080
mclk_khz = “24000”;
num_lanes = CAM_LANES_STRING;
tegra_sinterface = TEGRA_SINTERFACE;
phy_mode = “DPHY”;
discontinuous_clk = “no”;
dpcm_enable = “false”;
cil_settletime = “0”;
dynamic_pixel_bit_depth = “16”;
csi_pixel_bit_depth = “16”;
mode_type = “yuv”;
pixel_phase = “uyvy”;

active_w = “1920”;
active_h = “1080”;
readout_orientation = “0”;
deskew_initial_enable = “false”;
/* pix_clk_hz = “1152000000”; /
pix_clk_hz = “186250000”; /
update for e-CAM22_CUM1_SER(AR0234 sensor) on AGX Orin, 2022-09-08 /
/
Below mode parameter not used for econ UYVY camera sensor */
line_length = “640”;
inherent_gain = “1”;
mclk_multiplier = “6.67”;

min_gain_val = “1”;
max_gain_val = “8”;
min_hdr_ratio = “1”;
max_hdr_ratio = “1”;
min_framerate = “1”;
max_framerate = “45”;
min_exp_time = “10”; /* 1ms /
max_exp_time = “5000”; /
500ms */
};

I check the pixel_phase and mode_type in Jetson Linux Developer Guide.
pixel_phase seem only support uyvy, vyuy, yuyv, yvyu, rggb, bggr, grbg, gbrg
mode_type seem only support yuv, bayer, bayer_wdr_pwl

hello sammyb7qw7,

may I also know the bit depth. you may try running with MMAPI sample, 05_jpeg_encode to process YUV420 images.
and… you may download Orin TRM to check [2.4.9 YUVMemoryFormats].
there’s constraint for capturing YUV420, it’s only Y plane can be captured.

I can’t find the [2.4.9 YUVMemoryFormats] in Orin-TRM_DP10508002_v1.2p.pdf (NVIDIA Orin Series System-on-Chip Technical Reference Manual Version 1.2).
May I to know which Orin TRM version you are using?
May I to confim you mean AGX Orin CSI can’t support to capture YUV420 format?

please check [Table 7.24 YUV Modes] in page-1930.
re-cap as following

May I to know MIPI CSI how to setup the mode_type and pixel_phase for YUV420?

hello sammyb7qw7,

please see-also kernel sources, you may extend the support formats.
for example,

233 static int extract_pixel_format( 
234         const char *pixel_t, u32 *format)
235 {
...
268         else if (strncmp(pixel_t, "yuv_yuyv16", size) == 0)
269                 *format = V4L2_PIX_FMT_YUYV;
270         else if (strncmp(pixel_t, "yuv_yvyu16", size) == 0)
271                 *format = V4L2_PIX_FMT_YVYU;
272         else if (strncmp(pixel_t, "yuv_uyvy16", size) == 0)
273                 *format = V4L2_PIX_FMT_UYVY;
274         else if (strncmp(pixel_t, "yuv_vyuy16", size) == 0)
275                 *format = V4L2_PIX_FMT_VYUY;

please see-also… 2.10.29. V4L2_PIX_FMT_M420 (‘M420’) — The Linux Kernel documentation

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.