can you support yuv422 on camera device tree?

hi

My camera has built in ISP so it outputs YUV422.
my device tree is under and working is good.

XXXXX0000@10 {
            compatible = "nvidia,XXXX0000";
            /* I2C device address */
            reg = <0x10>;
            ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;
                    XXX0000_out0: endpoint {
                        csi-port = <0>;
                        bus-width = <4>;
                        remote-endpoint = <&XXXX0000_csi_in0>;
                    };
                };
            };
};

so i change dtb under. but it is not working

XXXX0000@10 {
            compatible = "nvidia,XXXX0000";
            /* I2C device address */
            reg = <0x10>;

            mode0 { //XXXX0000_MODE_1280X720
                mclk_khz = "24000";
                num_lanes = "4";
                tegra_sinterface = "serial_a";
                discontinuous_clk = "no";
                dpcm_enable = "false";
                cil_settletime = "0";

                active_w = "1280";
                active_h = "720";
                line_length = "1280";
                pixel_t = "uyvy";
                readout_orientation = "0";
                min_framerate = "1.5";
                max_framerate = "30";
                embedded_metadata_height = "4";
            };
                port@0 {
                    reg = <0>;
                    XXX0000_out0: endpoint {
                        csi-port = <0>;
                        bus-width = <4>;
                        remote-endpoint = <&XXXX0000_csi_in0>;
                    };
                };
            };
};

[   36.834554] extract_pixel_format: Need to extend formatuyvy
[   36.840152] XXXX0000 2-0010: Unsupported pixel format
[   36.845254] XXXX0000 2-0010: Failed to read image properties
[   36.851965] extract_pixel_format: Need to extend formatuyvy
[   36.857553] XXXX0000 2-0010: Unsupported pixel format
[   36.862849] XXXX0000 2-0010: Failed to read image properties

The reason I do this test is because I set the embedded_metadata_height value.

is it possible?

Do you mean you add embedded_metadata_height to break it?
If your sensor didn’t output embedded metadata and you report support in DT that could broken the VI to capture.

hi

i don’t know your answer.

can you support pixel_t = “uyvy” ?

I believe the Tegra can support it, However you may need some modify in VI driver to support YUV sensor.
There are some topic talk about the YUV sensor support, I think you can search to get more information.

Hi walterkim,

I think you should apply this patch

diff --git a/drivers/media/platform/tegra/camera/sensor_common.c b/drivers/media/platform/tegra/camera/sensor_common.c
index 62941cf..7bd9fbe 100644
--- a/drivers/media/platform/tegra/camera/sensor_common.c
+++ b/drivers/media/platform/tegra/camera/sensor_common.c
@@ -111,6 +111,8 @@ static int extract_pixel_format(
 		*format = V4L2_PIX_FMT_XBGGR10P;
 	else if (strncmp(pixel_t, "bayer_xrggb10p", size) == 0)
 		*format = V4L2_PIX_FMT_XRGGB10P;
+	else if (strncmp(pixel_t, "uyvy", size) == 0)
+		*format = V4L2_PIX_FMT_UYVY;
 	else {
 		pr_err("%s: Need to extend format%s\n", __func__, pixel_t);
 		return -EINVAL;

Hi,

I modified VI driver to support YUV sensor. But I am getting timeout error.

Could you successfully stream using YUV422 sensor?

My platform is TX2,28.1

Regards,
Rejeesh