Can orign nano support mipi csi format yuv422 data?

We need capture sensor yuv422, I have modified devicetree,but it didn’t work, why? I used jetpack5.1.2, my device tree is below:

/*

  • Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 2 of the License, or
  • (at your option) any later version.
  • This program is distributed in the hope that it will be useful, but WITHOUT
  • ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  • FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  • more details.
  • You should have received a copy of the GNU General Public License
  • along with this program. If not, see http://www.gnu.org/licenses/.
    */
    include <dt-bindings/media/camera.h>

/ {
tegra-capture-vi {
num-channels = <3>;
ports {
#address-cells = <1>;
#size-cells = <0>;
vi_port0: port@0 {
reg = <0>;
rbpcv2_imx219_vi_in0: endpoint {
vc-id = <0>;
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&rbpcv2_imx219_csi_out0>;
};
};
vi_port1: port@1 {
reg = <1>;
rbpcv2_imx219_vi_in1: endpoint {
vc-id = <0>;
port-index = <1>;
bus-width = <2>;
remote-endpoint = <&rbpcv2_imx219_csi_out1>;
};
};
vi_port2: port@2 {
reg = <2>;
rbpcv2_imx219_vi_in2: endpoint {
vc-id = <0>;
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&rbpcv2_imx219_csi_out2>;
};
};

		vi_port3: port@3 {
			reg = <3>;
			status = "disabled"; 
			rbpcv2_imx219_vi_in3: endpoint {
				vc-id = <0>;
				port-index = <3>;
				bus-width = <2>;
				remote-endpoint = <&rbpcv2_imx219_csi_out3>;
			};
		};		
	};
};

host1x@13e00000 {
	nvcsi@15a00000 {
		num-channels = <3>;
		#address-cells = <1>;
		#size-cells = <0>;
		csi_chan0: channel@0 {
			reg = <0>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				csi_chan0_port0: port@0 {
					reg = <0>;
					rbpcv2_imx219_csi_in0: endpoint@0 {
						port-index = <0>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx219_out0>;
					};
				};
				csi_chan0_port1: port@1 {
					reg = <1>;
					rbpcv2_imx219_csi_out0: endpoint@1 {
						remote-endpoint = <&rbpcv2_imx219_vi_in0>;
					};
				};
			};
		};
		csi_chan1: channel@1 {
			reg = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				csi_chan1_port0: port@0 {
					reg = <0>;
					rbpcv2_imx219_csi_in1: endpoint@2 {
						port-index = <1>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx219_out1>;
					};
				};
				csi_chan1_port1: port@1 {
					reg = <1>;
					rbpcv2_imx219_csi_out1: endpoint@3 {
						remote-endpoint = <&rbpcv2_imx219_vi_in1>;
					};
				};
			};
		};
		csi_chan2: channel@2 {
			reg = <2>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				csi_chan2_port0: port@0 {
					reg = <0>;
					rbpcv2_imx219_csi_in2: endpoint@4 {
						port-index = <2>;
						bus-width = <4>;
						remote-endpoint = <&rbpcv2_imx219_out2>;
					};
				};
				csi_chan2_port1: port@1 {
					reg = <1>;
					rbpcv2_imx219_csi_out2: endpoint@5 {
						remote-endpoint = <&rbpcv2_imx219_vi_in2>;
					};
				};
			};
		};
		csi_chan3: channel@3 {
			reg = <3>;
			status = "disabled"; 
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				csi_chan3_port0: port@0 {
					reg = <0>;
					rbpcv2_imx219_csi_in3: endpoint@6 {
						port-index = <3>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx219_out3>;
					};
				};
				csi_chan3_port1: port@1 {
					reg = <1>;
					rbpcv2_imx219_csi_out3: endpoint@7 {
						remote-endpoint = <&rbpcv2_imx219_vi_in3>;
					};
				};
			};
		};
	};
};

cam_i2cmux {
	i2c_0:i2c@0 {
		imx219_cam0: rbpcv2_imx219_a@1d {
			compatible = "sony,imx219";
			/* I2C device address */
			reg = <0x1d>;

			/* V4L2 device node location */
			devnode = "video0";

			/* Physical dimensions of sensor */
			physical_w = "3.680";
			physical_h = "5.800";

			sensor_model = "imx219";

			use_sensor_mode_id = "true";

			mode0 { /* IMX219_MODE_3280x2464_21FPS */
				mclk_khz = "25000";
				num_lanes = "2";
				tegra_sinterface = "serial_a";
				phy_mode = "DPHY";
				vc_id = "0";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";
				lane_polarity = "3";

				active_w = "3000";
				active_h = "5762";
				mode_type = "yuv";
				pixel_phase = "uyvy" ;//"uyvy";
				csi_pixel_bit_depth = "16";
				readout_orientation = "90";
				line_length = "3840";
				inherent_gain = "1";
				mclk_multiplier = "80"; 
				pix_clk_hz = "200000000";	

				gain_factor = "16";
				framerate_factor = "1000000";
				exposure_factor = "1000000";
				min_gain_val = "16"; /* 1.00x */
				max_gain_val = "170"; /* 10.66x */
				step_gain_val = "1";
				default_gain = "16"; /* 1.00x */
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				min_framerate = "2000000"; /* 2.0 fps */
				max_framerate = "45000000"; /* 21.0 fps */
				step_framerate = "1";
				default_framerate = "45000000"; /* 21.0 fps */
				min_exp_time = "13"; /* us */
				max_exp_time = "683709"; /* us */
				step_exp_time = "1";
				default_exp_time = "2495"; /* us */

				embedded_metadata_height = "0";
			};

			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					rbpcv2_imx219_out0: endpoint {
						vc-id = <0>;
						port-index = <0>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx219_csi_in0>;
					};
				};
			};
		};

		imx219_cam1: rbpcv2_imx219_b@1c {
			compatible = "sony,imx219";
			/* I2C device address */
			reg = <0x1c>;

			/* V4L2 device node location */
			devnode = "video1";

			/* Physical dimensions of sensor */
			physical_w = "3.680";
			physical_h = "5.800";

			sensor_model = "imx219";

			use_sensor_mode_id = "true";

			mode0 { /* IMX219_MODE_3280x2464_21FPS */
				mclk_khz = "25000";
				num_lanes = "2";
				tegra_sinterface = "serial_b";
				phy_mode = "DPHY";
				vc_id = "0";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";
				lane_polarity = "3";

				active_w = "3840";
				active_h = "2160";
				mode_type = "yuv";
				pixel_phase = "uyvy";
				csi_pixel_bit_depth = "16";
				readout_orientation = "90";
				line_length = "3840";
				inherent_gain = "1";
				mclk_multiplier = "80";
				pix_clk_hz = "200000000";	

				gain_factor = "16";
				framerate_factor = "1000000";
				exposure_factor = "1000000";
				min_gain_val = "16"; /* 1.00x */
				max_gain_val = "170"; /* 10.66x */
				step_gain_val = "1";
				default_gain = "16"; /* 1.00x */
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				min_framerate = "2000000"; /* 2.0 fps */
				max_framerate = "45000000"; /* 21.0 fps */
				step_framerate = "1";
				default_framerate = "45000000"; /* 21.0 fps */
				min_exp_time = "13"; /* us */
				max_exp_time = "683709"; /* us */
				step_exp_time = "1";
				default_exp_time = "2495"; /* us */

				embedded_metadata_height = "0";
			};				
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					rbpcv2_imx219_out1: endpoint {
						vc-id = <0>;
						port-index = <1>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx219_csi_in1>;
					};
				};
			};
		};

		imx219_cam2: rbpcv2_imx219_c@1b {
			compatible = "sony,imx219";
			/* I2C device address */
			reg = <0x1b>;

			/* V4L2 device node location */
			devnode = "video2";

			/* Physical dimensions of sensor */
			physical_w = "3.680";
			physical_h = "5.800";

			sensor_model = "imx219";

			use_sensor_mode_id = "true";

			mode0 { /* IMX219_MODE_3280x2464_21FPS */
				mclk_khz = "25000";//24000000
				num_lanes = "4";
				tegra_sinterface = "serial_c";
				phy_mode = "DPHY";
				vc_id = "0";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";
				lane_polarity = "5";

				active_w = "3840";
				active_h = "2160";
				mode_type = "yuv";
				pixel_phase = "uyvy";//"rggb";
				csi_pixel_bit_depth = "16";
				readout_orientation = "90";
				line_length = "3840";
				inherent_gain = "1";
				mclk_multiplier = "80";
				pix_clk_hz = "200000000";
											 
				gain_factor = "16";
				framerate_factor = "1000000";
				exposure_factor = "1000000";
				min_gain_val = "16"; /* 1.00x */
				max_gain_val = "170"; /* 10.66x */
				step_gain_val = "1";
				default_gain = "16"; /* 1.00x */
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				min_framerate = "2000000"; /* 2.0 fps */
				max_framerate = "91000000"; /* 21.0 fps */
				step_framerate = "1";
				default_framerate = "91000000"; /* 21.0 fps */
				min_exp_time = "13"; /* us */
				max_exp_time = "683709"; /* us */
				step_exp_time = "1";
				default_exp_time = "2495"; /* us */

				embedded_metadata_height = "0";
			};
			
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					rbpcv2_imx219_out2: endpoint {
						status = "okay";
						vc-id = <0>;
						port-index = <2>;
						bus-width = <4>;
						remote-endpoint = <&rbpcv2_imx219_csi_in2>;
					};
				};
			};

		};

	imx219_cam3: rbpcv2_imx219_d@1a {
			compatible = "sony,imx219";
			status = "disabled"; 
			/* I2C device address */
			reg = <0x1a>;

			/* V4L2 device node location */
			devnode = "video3";

			/* Physical dimensions of sensor */
			physical_w = "3.680";
			physical_h = "5.800";

			sensor_model = "imx219";

			use_sensor_mode_id = "true";

			mode0 { /* IMX219_MODE_3280x2464_21FPS */
				mclk_khz = "25000";//24000000
				num_lanes = "2";
				tegra_sinterface = "serial_d";
				phy_mode = "DPHY";
				vc_id = "0";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";
				lane_polarity = "5";

				active_w = "3840";
				active_h = "2160";
				mode_type = "bayer";
				pixel_phase = "rggb";
				csi_pixel_bit_depth = "10";
				readout_orientation = "90";
				line_length = "3840";
				inherent_gain = "1";
				mclk_multiplier = "80";
				pix_clk_hz = "200000000";
																			     	
				gain_factor = "16";
				framerate_factor = "1000000";
				exposure_factor = "1000000";
				min_gain_val = "16"; /* 1.00x */
				max_gain_val = "170"; /* 10.66x */
				step_gain_val = "1";
				default_gain = "16"; /* 1.00x */
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				min_framerate = "2000000"; /* 2.0 fps */
				max_framerate = "46000000"; /* 21.0 fps */
				step_framerate = "1";
				default_framerate = "46000000"; /* 21.0 fps */
				min_exp_time = "13"; /* us */
				max_exp_time = "683709"; /* us */
				step_exp_time = "1";
				default_exp_time = "2495"; /* us */

				embedded_metadata_height = "0";
			};

			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					rbpcv2_imx219_out3: endpoint {
						status = "disabled"; 
						vc-id = <0>;
						port-index = <3>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx219_csi_in3>;
					};
				};
			};
		};

	};
};

lens_imx219@RBPCV2 {
	min_focus_distance = "0.0";
	hyper_focal = "0.0";
	focal_length = "3.04";
	f_number = "2.0";
	aperture = "0.0";
};

};
/ {
tcp: tegra-camera-platform {
compatible = “nvidia, tegra-camera-platform”;

	num_csi_lanes = <8>;
	max_lane_speed = <2500000>;
	min_bits_per_pixel = <10>;
	vi_peak_byte_per_pixel = <2>;
	vi_bw_margin_pct = <5>;
	max_pixel_rate = <270000>;
	isp_peak_byte_per_pixel = <5>;
	isp_bw_margin_pct = <5>;

	/**
	 * The general guideline for naming badge_info contains 3 parts, and is as follows,
	 * The first part is the camera_board_id for the module; if the module is in a FFD
	 * platform, then use the platform name for this part.
	 * The second part contains the position of the module, ex. "rear" or "front".
	 * The third part contains the last 6 characters of a part number which is found
	 * in the module's specsheet from the vendor.
	 */
	modules {
		cam_module0: module0 {
			badge = "jakku_front_RBP234";
			position = "bottomleft";
			orientation = "1";
			cam_module0_drivernode0: drivernode0 {
				pcl_id = "v4l2_sensor";
				devname = "imx219 9-001d";
				proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/rbpcv2_imx219_a@1d";
			};
			cam_module0_drivernode1: drivernode1 {
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/lens_imx219@RBPCV2/";
			};
		};

		cam_module1: module1 {
			badge = "jakku_front_RBP234";
			position = "bottomright";
			orientation = "1";
			cam_module1_drivernode0: drivernode0 {
				pcl_id = "v4l2_sensor";
				devname = "imx219 9-001c";
				proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/rbpcv2_imx219_b@1c";
			};
			cam_module1_drivernode1: drivernode1 {
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/lens_imx219@RBPCV2/";
			};
		};

		cam_module2: module2 {
			badge = "jakku_front_RBP234";
			position = "centerleft";
			orientation = "1";
			cam_module2_drivernode0: drivernode0 {
				pcl_id = "v4l2_sensor";
				devname = "imx219 9-001b";
				proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/rbpcv2_imx219_c@1b";
			};
			cam_module2_drivernode1: drivernode1 {
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/lens_imx219@RBPCV2/";
			};
		};

		cam_module3: module3 {
			status = "disabled"; 
			badge = "jakku_front_RBP234";
			position = "centerright";
			orientation = "1";
			cam_module3_drivernode0: drivernode0 {
				pcl_id = "v4l2_sensor";
				devname = "imx219 9-001a";
				proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/rbpcv2_imx219_d@1a";
			};
			cam_module3_drivernode1: drivernode1 {
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/lens_imx219@RBPCV2/";
			};
		};
	};
};

};

hello dukezuo,

IMX219 it’s the bayer sensor driver, it’s the DT property, compatible = "sony,imx219"; for calling its driver.
you may check below for YUV camera sensor, (although it’s for Xavier series) as reference.
for instance,
$public_sources/kernel_src/hardware/nvidia/platform/t19x/galen/kernel-dts/common/e-cam130a_cuxvr_modes.dtsi
$public_sources/kernel_src/hardware/nvidia/platform/t19x/galen/kernel-dts/tegra194-p2822-camera-eCAM130A_CUXVR-overlay.dts

We developed our self sensor driver based the example imx219,just a faked imx219

hello dukezuo,

please refer to above YUV camera driver for development,
BTW, we’ve tested YUV camera (i.e. AR1335) which is working on AGX-Orin /r36.4.4.

we have test ok for yuv420 sensor(with isp),but this time ,we neede received mipi data from fpga,it only support yuv422

hello dukezuo,

it should be YUV422 8-bit, for outputting 16-bpp (bits per pixels) formats.
you should using NV16 to process this camera stream.
from driver side, it should be TEGRA_IMAGE_FORMAT_T_Y8__V8U8_N422 = 44; for using NV16.
here’s sample v4l pipeline for fetching the stream.
for instance, $ v4l2-ctl --device /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=NV16 --set-ctrl bypass_mode=0 --stream-mmap --stream-to=frame.yuv --stream-count=100

thanks,how can i set this format in device tree?this is my code in device tree,but it not work for yuv422:

~~~~~~~~~~~~~~~~~~~

				active_w = "3000";
				active_h = "5762";
				mode_type = "yuv";
				pixel_phase = "yuyv"; //"gbrg";
				csi_pixel_bit_depth = "16";
				readout_orientation = "90";
				line_length = "3840";
				inherent_gain = "1";
				mclk_multiplier = "80"; 
				pix_clk_hz = "200000000";	

hello dukezuo,

you may see-also below for NV16 format definition,
$public_sources/kernel_src/kernel/nvidia-oot/drivers/media/platform/tegra/camera/vi/vi5_formats.h

enum tegra_image_format {
...
         TEGRA_VIDEO_FORMAT(YUV422, 16, UYVY8_1X16, 1, 1, T_Y8__V8U8_N422,
                                 YUV422_8, NV16, "NV16"),

according to below.. fourcc should be V4L2_PIX_FMT_UYVY.
$public_sources/kernel_src/kernel/nvidia-oot/drivers/media/platform/tegra/camera/camera_common.c

static const struct camera_common_colorfmt camera_common_color_fmts[] = {
...
         {
                 MEDIA_BUS_FMT_UYVY8_1X16,
                 V4L2_COLORSPACE_SRGB,
                 V4L2_PIX_FMT_UYVY,
         },

as you can see, it’s parsing DT for the mode_type, csi_pixel_bit_depth, pixel_phase to compose the string.
according to below..
$public_sources/kernel_src/kernel/nvidia-oot/drivers/media/platform/tegra/camera/sensor_common.c

static int extract_pixel_format( 
         const char *pixel_t, u32 *format)
{ 
...
         else if (strncmp(pixel_t, "yuv_uyvy16", size) == 0)
                 *format = V4L2_PIX_FMT_UYVY;

so, you may give it a try to configure your device tree settings as below for using NV16.

				mode_type = "yuv";
				pixel_phase = "uyvy"; 
				csi_pixel_bit_depth = "16";

it’s just for testing, you may revise the driver to extend the support formats if you’ve different orders.

thanks a lot,i have edit as you mentioned:

~~~~~~~~~~~~

				mode_type = "yuv";
				pixel_phase = "uyvy"; //"gbrg";
				csi_pixel_bit_depth = "16";
the format is ok by v4l2-ctl :
 v4l2-ctl -d /dev/video0 --list-formats
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'UYVY' (UYVY 4:2:2)
        [1]: 'NV16' (Y/CbCr 4:2:2)
        [2]: 'UYVY' (UYVY 4:2:2)

~~~~~~~~~~~~~~~~~~~~~~~~
but i can't received frame yet,
eyecloud@eyecloud-desktop:~/duke/i2c_test_json$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=3000,height=5762,pixelformat=NV16  --set-ctrl bypass_mode=0 --set-ctrl sensor_mode=0 --stream-mmap --stream-count=-1
^C^C^C
eyecloud@eyecloud-desktop:~/duke/i2c_test_json$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=3000,height=5762,pixelformat=NV16  --set-ctrl bypass_mode=0 --set-ctrl sensor_mode=0 --stream-mmap --stream-count=-1

hello dukezuo,

may I know what’s the error reported from the kernel side?
besides.. is it possible to arrange hardware resources to probe the MIPI signaling on the CSI channel?

from demsg,it seemed no data received,but the mipi data was received ok on another platform,

~~~~~~~~~~~~~~

[ 234.269207] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 234.278355] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 234.288554] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 234.296285] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 234.306945] ===csi5_start_streaming: csi_pt=0, st_id=0, vc_id=0, pg_mode=0x0 num_lanes = 2
[ 234.306947] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 234.314664] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 234.325448] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 237.085193] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 237.094335] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 237.104675] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 237.112401] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 237.123058] ===csi5_start_streaming: csi_pt=0, st_id=0, vc_id=0, pg_mode=0x0 num_lanes = 2
[ 237.123061] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 237.130769] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 237.141541] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 239.901169] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 239.910310] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 239.920685] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 239.928393] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 239.939052] ===csi5_start_streaming: csi_pt=0, st_id=0, vc_id=0, pg_mode=0x0 num_lanes = 2
[ 239.939054] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 239.946760] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 239.957521] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 242.717152] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 242.726287] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 242.736536] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 242.744249] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 242.754903] ===csi5_start_streaming: csi_pt=0, st_id=0, vc_id=0, pg_mode=0x0 num_lanes = 2
[ 242.754907] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 242.762611] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 242.773647] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 245.309136] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 245.318275] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 245.328692] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 245.336427] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 245.347085] ===csi5_start_streaming: csi_pt=0, st_id=0, vc_id=0, pg_mode=0x0 num_lanes = 2
[ 245.347087] (NULL device *): vi_capture_control_message: NULL VI channel received

hello dukezuo,

please share your latest sensor device tree as attachment for quick checking.

may I also know which platform it is?

it was yuv422 (MEDIA_BUS_FMT_YUYV8_2X8) which we use rockip platform(rk3399).

all right, please share your latest sensor device tree as attachment for quick checking.

ok,change name from .dtsi to txt and upload here,btw,we used orign nano+jetpack5.1.2

tegra234-camera-silicon-imx415.txt (14.3 KB)

hello dukezuo,

let me have confirmation, it’s three camera use-case, they were using below connections.
CSI-A ==> 2-lane
CSI-B ==> 2-lane
CSI-C ==> 4-lane

firstly, please try configure lane_polarity = "6"; for your CSI-A/B camera sensors, and using lane_polarity = "0"; for your CSI-C camera sensor.

secondly, do you have three camera nodes register to system? (i.e. /dev/video0, /dev/video1, /dev/video2), do you have all those three camera connected? please also check sensor capability with.. $ v4l2-ctl -d /dev/video<N> --list-formats-ext.

lastly, it looks CSI-A’s active dimension is 3000x5762, its pixel clock at 200Mhz. although CSI-B and CSI-C they’re using the same pixel clock rate, it has different active dimension settings. (i.e. 3840x2160); so, please double check Sensor Pixel Clock section, a clock rate setting must be set correctly to avoid potential issues.

thanks a lot!

1: The lane_polarity is dued to our hardware designed, We can received bayer mode data(raw12) success by this configure,The front-end FPGA will send Bayer pattern data in depth 10, 12, 16 formats according to different scenarios, while the back-end CPU uniformly captures the data in YUV422 format. This is the actual solution used in our old product.

2: yes,we can find 3 nodes(/dev/video0,1,2) as you find we used 2-lanes (CSI-A,CSI-B) and 4-lane(CSI-C) here,it was deceived by our product,we debug these one by one while fpega was connected ok.

3: I’ve noticed that the pixel clock here seems relatively unaffected by the data rate. Even with a constant clock(200Mhz), I can successfully receive data in raw12 format across a wide range of frame rates(10hz,20hz,30hz,45hz,90hz).

Is this still an issue to support? Any result can be shared?

yes,it was ok now ,it was pxel clock issue which didn’t found in bayer mode,but it need change in yuv422

Glad to know issue resolved, thanks for the update.