Invalid NVCSI Stream ID - GMSL2 Cameras - Jetpack 5.0.2

Hi all,

I’m using a setup with Jetson AGX Orin and 4 cameras AR0820 cameras GMSL2 - MIPI CSI2, i configured the device tree for tegra-capture-vi and NVCSI and sensor modules, but i’m finding an issue related to the nvcsi port, each camera is a 4-lanes camera

I’m using the configuration below

CSI AB (port index 0) ==> VI (port index 0) ==> Working fine
CSI CD (port index 2) ==> VI (port index 2) ==> Working fine
CSI AB (port index 4) ==> VI (port index 4) ==> Working fine
CSI AB (port index 6) ==> VI (port index 5) ==> Invalid NVCSI stream Id

You check the logs below

jetson@jetson-desktop:~$ sudo dmesg | grep tegra-camrtc
[    4.675399] tegra-camrtc-capture-vi tegra-capture-vi: capture_vi_probe: tegra-camrtc-capture-vi probe
[    4.675494] tegra-camrtc-capture-vi tegra-capture-vi: csi_vi_get_mapping_table: csi-stream to vi-instance mapping table size: 6
[    4.675496] tegra-camrtc-capture-vi tegra-capture-vi: csi_vi_get_mapping_table: vi_instance_table[0] = 0
[    4.675498] tegra-camrtc-capture-vi tegra-capture-vi: csi_vi_get_mapping_table: vi_instance_table[1] = 0
[    4.675500] tegra-camrtc-capture-vi tegra-capture-vi: csi_vi_get_mapping_table: vi_instance_table[2] = 1
[    4.675501] tegra-camrtc-capture-vi tegra-capture-vi: csi_vi_get_mapping_table: vi_instance_table[3] = 1
[    4.675503] tegra-camrtc-capture-vi tegra-capture-vi: csi_vi_get_mapping_table: vi_instance_table[4] = 0
[    4.675505] tegra-camrtc-capture-vi tegra-capture-vi: csi_vi_get_mapping_table: vi_instance_table[5] = 1
[    4.677080] tegra-camrtc-capture-vi tegra-capture-vi: stream Id = 0
[    4.683525] tegra-camrtc-capture-vi tegra-capture-vi: stream Id = 2
[    4.689957] tegra-camrtc-capture-vi tegra-capture-vi: stream Id = 4
[    4.696380] tegra-camrtc-capture-vi tegra-capture-vi: stream Id = 255
[    4.702993] tegra-camrtc-capture-vi tegra-capture-vi: Invalid NVCSI stream Id
[    4.710620] tegra-camrtc-capture-vi tegra-capture-vi: cannot find remote port parent
[    8.158159] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e40000.host1x:nvcsi@15a00000- bound
[    8.167404] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e40000.host1x:nvcsi@15a00000- bound
[    8.176639] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e40000.host1x:nvcsi@15a00000- bound
[   11.153461] tegra-camrtc-capture-vi tegra-capture-vi: subdev ar0820 30-0010 bound
[   11.851248] tegra-camrtc-capture-vi tegra-capture-vi: subdev ar0820 31-0010 bound
[   12.763681] tegra-camrtc-capture-vi tegra-capture-vi: subdev ar0820 32-0010 bound

There is the device tree for the tegra-capture vi

	tegra-capture-vi {
		status = "okay";
		num-channels = <4>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				status = "okay";
				reg = <0>;
				ar0820_vi_in0: endpoint {
					status = "okay";
					port-index = <0>;
					bus-width = <4>;
					remote-endpoint = <&ar0820_csi_out0>;
				};
			};

			port@1 {
				status = "okay";
				reg = <1>;
				ar0820_vi_in1: endpoint {
					status = "okay";
					port-index = <2>;
					bus-width = <4>;
					remote-endpoint = <&ar0820_csi_out1>;
				};
			};

			port@2 {
				status = "okay";
				reg = <2>;
				ar0820_vi_in2: endpoint {
					status = "okay";
					port-index = <4>;
					bus-width = <4>;
					remote-endpoint = <&ar0820_csi_out2>;
				};


			port@3 {
				status = "okay";
				reg = <3>;
				ar0820_vi_in3: endpoint {
					status = "okay";
					port-index = <5>;
					bus-width = <4>;
					remote-endpoint = <&ar0820_csi_out3>;
				};
			};
		};
	};
};	

And there is the device tree for NVCSI

	host1x@13e00000 {
		nvcsi@15a00000 {
			num-channels = <4>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			channel@0 {
				status = "okay";
				reg = <0>;
				ports {
					status = "okay";
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_csi_in0: endpoint@0 {
							status = "okay";
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_ar0820_out0>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						ar0820_csi_out0: endpoint@1 {
							status = "okay";
							remote-endpoint = <&ar0820_vi_in0>;
						};
					};
				};
			};

			channel@1 {
				status = "okay";
				reg = <1>;
				ports {
					status = "okay";
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_csi_in1: endpoint@2 {
							status = "okay";
							port-index = <2>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_ar0820_out1>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						ar0820_csi_out1: endpoint@3 {
							status = "okay";
							remote-endpoint = <&ar0820_vi_in1>;
						};
					};
				};
			};

			channel@2 {
				status = "okay";
				reg = <2>;
				ports {
					status = "okay";
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_csi_in2: endpoint@4 {
							status = "okay";
							port-index = <4>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_ar0820_out2>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						ar0820_csi_out2: endpoint@5 {
							status = "okay";
							remote-endpoint = <&ar0820_vi_in2>;
						};
					};
				};
			};

			channel@3 {
				status = "okay";
				reg = <3>;
				ports {
					status = "okay";
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_csi_in3: endpoint@6 {
							status = "okay";
							port-index = <6>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_ar0820_out3>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						ar0820_csi_out3: endpoint@7 {
							status = "okay";
							remote-endpoint = <&ar0820_vi_in3>;
						};
					};
				};
			};
		};

Can you please tell why the port index is taking the 255 and not 6 ?

[    4.696380] tegra-camrtc-capture-vi tegra-capture-vi: stream Id = 255
[    4.702993] tegra-camrtc-capture-vi tegra-capture-vi: Invalid NVCSI stream Id
[    4.710620] tegra-camrtc-capture-vi tegra-capture-vi: cannot find remote port parent

Also why the MAX_NVCSI is limited to 5 in this function in fact that we can use the port 6 with AGX Orin/Xavier

struct device *vi_csi_stream_to_nvhost_device(
	struct platform_device *pdev,
	uint32_t csi_stream_id)
{
	struct tegra_capture_vi_data *info = platform_get_drvdata(pdev);
	uint32_t vi_inst_id = 0;
	
	dev_info(&pdev->dev, "stream Id = %d\n", csi_stream_id);

	if (csi_stream_id >= MAX_NVCSI_STREAM_IDS) {
		dev_err(&pdev->dev, "Invalid NVCSI stream Id\n");
		return NULL;
	}

	vi_inst_id = info->vi_instance_table[csi_stream_id];
	return &info->vi_pdevices[vi_inst_id]->dev;
}

Thanks

hello chakibdace,

there’s a fix for overrunning array,
could you please check below is included for JP-5.0.2 release version?
for example,

diff --git a/drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c b/drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c

-       if (csi_stream_id > MAX_NVCSI_STREAM_IDS) {
+       if (csi_stream_id >= MAX_NVCSI_STREAM_IDS) {

Yes, it’s inculded in 5.0.2 JP version, but when i use port-index = 6 for the nvcsi, i have port-index = 255 as you can see in the logs above

Thanks

hello chakibdace,

is it possible for moving to latest Jetpack release, i.e. JP-5.1.1, for confirmation?

@JerryChang I didn’t tested yet in JP 5.1.1 but i compared the code of capture-vi.c, and it seems that there is no diff
We agree that for using the CSI GH Port i have to set port-index = 6 in the device tree right ? Can you please check the device tree of the vi and nvcsi above ?

Thanks

hello chakibdace,

actually, there’s following up change to revise maximum number of NVCSI streams supported.
for example,

+ * @brief Maximum number of NVCSI streams supported.
+ */
+#define MAX_NVCSI_STREAM_IDS  U32_C(0x6)

at least I check r35.3.1 code and I saw some update regrading to this.
please moving to the latest Jetpack-5.1.1 release for confirmation if that’s possible for you, thanks

Hi @JerryChang

I tested with the lattest JP 5.1.1 - L4T 35.3.1 and still getting the same issue, the port-index 6 of the NVCSI is invalid as you can see in the logs below

jetson@jetson-desktop:~$ sudo dmesg | grep tegra-camrtc
[sudo] password for jetson: 
[    2.890090] tegra-camrtc-capture-vi tegra-capture-vi: Invalid NVCSI stream Id
[    2.892338] tegra-camrtc-capture-vi tegra-capture-vi: cannot find remote port parent
[    7.193625] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e10000.host1x:nvcsi@15a00000- bound
[    7.202713] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e10000.host1x:nvcsi@15a00000- bound
[    7.211519] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e10000.host1x:nvcsi@15a00000- bound
[    8.254406] tegra-camrtc-capture-vi tegra-capture-vi: subdev ar0820 30-0010 bound
[    8.830291] tegra-camrtc-capture-vi tegra-capture-vi: subdev ar0820 31-0010 bound
[    9.506308] tegra-camrtc-capture-vi tegra-capture-vi: subdev ar0820 32-0010 bound
jetson@jetson-desktop:~$ cat /etc/nv_tegra_release 
# R35 (release), REVISION: 3.1, GCID: 32827747, BOARD: t186ref, EABI: aarch64, DATE: Sun Mar 19 15:19:21 UTC 2023
jetson@jetson-desktop:~$ ls /dev/video*
/dev/video0  /dev/video1  /dev/video2

Can you please suggest other solution for this issue ?

Thanks

hello chakibdace,

I have learn from other camera partner they’re working with AGX Orin, and it’s able to have 4-lane camera to stream via CSI-A, CSI-C, CSI-E and CSI-G.

below errors should related to your port bindings.

please refer to developer guide, To verify the port binding result.
and… you may also share the disassemble device tree to review the settings.

Hi @JerryChang

There is the DT of the sensor

	i2c@3180000 {
		tca9546@70 {
			i2c@0 {
			ar0820_a@10 {
				status = "okay";
				compatible = "onsemi,ar0820";
				/* I2C device address */
				reg = <0x10>;

				/* Physical dimensions of sensor */
				physical_w = "3.674";
				physical_h = "2.738";

				sensor_model = "ar0820";

				post_crop_frame_drop = "0";

				use_sensor_mode_id = "true";
 
				mode0 {/*mode AR0820_MODE_3848X2168_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "3848";
					active_h = "2168";
					readout_orientation = "0";
					line_length = "4440";
					inherent_gain = "1";
					mclk_multiplier = "14.58";
					pix_clk_hz = "74250000";
					serdes_pix_clk_hz = "200000000";

					gain_factor = "1";
					min_gain_val = "1";
					max_gain_val = "15";
					step_gain_val = "1";
					default_gain = "1";
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "30000000";
					max_framerate = "30000000";
					step_framerate = "1";
					default_framerate ="30000000";
					exposure_factor ="1000000";
					min_exp_time = "15";
					max_exp_time = "33333";
					step_exp_time = "1";
					default_exp_time = "33333";

					embedded_metadata_height = "0";
				};

				mode1 {/*mode AR0820_MODE_1920X1080_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "1920";
					active_h = "1080";
					readout_orientation = "0";
					line_length = "4440";
					inherent_gain = "1";
					mclk_multiplier = "14.58";
					pix_clk_hz = "296236800";
					serdes_pix_clk_hz = "833333333";

					gain_factor = "1";
					min_gain_val = "1";
					max_gain_val = "15";
					step_gain_val = "1";
					default_gain = "1";
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "30000000";
					max_framerate = "30000000";
					step_framerate = "1";
					default_framerate ="30000000";
					exposure_factor ="1000000";
					min_exp_time = "15";
					max_exp_time = "33333";
					step_exp_time = "1";
					default_exp_time = "33333";

					embedded_metadata_height = "0";
				};
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					status = "okay";
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_ar0820_out0: endpoint {
							status = "okay";
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_csi_in0>;
							};
						};
					};
				gmsl-link {			
					src-csi-port = "b";
					dst-csi-port = "a";
					serdes-csi-link = "a";
					csi-mode = "1x4";
					st-vc = <0>;
					num-lanes = <4>;
					streams = "ued-u1", "raw12";
					};
				};
				eeprom_a@50 {
					status = "okay";
					compatible = "atmel,24c32";
					reg = <0x50>;
					pagesize = <32>;
				};
			};

		i2c@1 {
			ar0820_c@10 {
				status = "okay";
				compatible = "onsemi,ar0820";
				/* I2C device address */
				reg = <0x10>;

				/* Physical dimensions of sensor */
				physical_w = "3.674";
				physical_h = "2.738";

				sensor_model = "ar0820";

				post_crop_frame_drop = "0";

				use_sensor_mode_id = "true";
 
				mode0 {/*mode AR0820_MODE_3848X2168_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "3848";
					active_h = "2168";
					readout_orientation = "0";
					line_length = "4440";
					inherent_gain = "1";
					mclk_multiplier = "14.58";
					pix_clk_hz = "74250000";
					serdes_pix_clk_hz = "200000000";

					gain_factor = "1";
					min_gain_val = "1";
					max_gain_val = "15";
					step_gain_val = "1";
					default_gain = "1";
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "30000000";
					max_framerate = "30000000";
					step_framerate = "1";
					default_framerate ="30000000";
					exposure_factor ="1000000";
					min_exp_time = "15";
					max_exp_time = "33333";
					step_exp_time = "1";
					default_exp_time = "33333";

					embedded_metadata_height = "0";
				};

				mode1 {/*mode AR0820_MODE_1920X1080_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "1920";
					active_h = "1080";
					readout_orientation = "0";
					line_length = "4440";
					inherent_gain = "1";
					mclk_multiplier = "14.58";
					pix_clk_hz = "296236800";
					serdes_pix_clk_hz = "833333333";

					gain_factor = "1";
					min_gain_val = "1";
					max_gain_val = "15";
					step_gain_val = "1";
					default_gain = "1";
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "30000000";
					max_framerate = "30000000";
					step_framerate = "1";
					default_framerate ="30000000";
					exposure_factor ="1000000";
					min_exp_time = "15";
					max_exp_time = "33333";
					step_exp_time = "1";
					default_exp_time = "33333";

					embedded_metadata_height = "0";
				};
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					status = "okay";
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_ar0820_out1: endpoint {
							status = "okay";
							port-index = <2>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_csi_in1>;
							};
						};
					};
				gmsl-link {			
					src-csi-port = "b";
					dst-csi-port = "a";
					serdes-csi-link = "a";
					csi-mode = "1x4";
					st-vc = <0>;
					num-lanes = <4>;
					streams = "ued-u1", "raw12";
					};
				};
				eeprom_b@50 {
					status = "okay";
					compatible = "atmel,24c32";
					reg = <0x50>;
					pagesize = <32>;
				};
			};

		i2c@2 {
			ar0820_e@10 {
				status = "okay";
				compatible = "onsemi,ar0820";
				/* I2C device address */
				reg = <0x10>;

				/* Physical dimensions of sensor */
				physical_w = "3.674";
				physical_h = "2.738";

				sensor_model = "ar0820";

				post_crop_frame_drop = "0";

				use_sensor_mode_id = "true";
 
				mode0 {/*mode AR0820_MODE_3848X2168_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_e";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "3848";
					active_h = "2168";
					readout_orientation = "0";
					line_length = "4440";
					inherent_gain = "1";
					mclk_multiplier = "14.58";
					pix_clk_hz = "74250000";
					serdes_pix_clk_hz = "200000000";

					gain_factor = "1";
					min_gain_val = "1";
					max_gain_val = "15";
					step_gain_val = "1";
					default_gain = "1";
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "30000000";
					max_framerate = "30000000";
					step_framerate = "1";
					default_framerate ="30000000";
					exposure_factor ="1000000";
					min_exp_time = "15";
					max_exp_time = "33333";
					step_exp_time = "1";
					default_exp_time = "33333";

					embedded_metadata_height = "0";
				};

				mode1 {/*mode AR0820_MODE_1920X1080_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_e";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "1920";
					active_h = "1080";
					readout_orientation = "0";
					line_length = "4440";
					inherent_gain = "1";
					mclk_multiplier = "14.58";
					pix_clk_hz = "296236800";
					serdes_pix_clk_hz = "833333333";

					gain_factor = "1";
					min_gain_val = "1";
					max_gain_val = "15";
					step_gain_val = "1";
					default_gain = "1";
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "30000000";
					max_framerate = "30000000";
					step_framerate = "1";
					default_framerate ="30000000";
					exposure_factor ="1000000";
					min_exp_time = "15";
					max_exp_time = "33333";
					step_exp_time = "1";
					default_exp_time = "33333";

					embedded_metadata_height = "0";
				};
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					status = "okay";
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_ar0820_out2: endpoint {
							status = "okay";
							port-index = <4>;
							bus-width = <2>;
							remote-endpoint = <&ar0820_csi_in2>;
							};
						};
					};
				gmsl-link {			
					src-csi-port = "b";
					dst-csi-port = "a";
					serdes-csi-link = "a";
					csi-mode = "1x4";
					st-vc = <0>;
					num-lanes = <4>;
					streams = "ued-u1", "raw12";
					};
				};
				eeprom_c@50 {
					status = "okay";
					compatible = "atmel,24c32";
					reg = <0x50>;
					pagesize = <32>;
				};
			};

		i2c@3 {
			ar0820_g@10 {
				status = "okay";
				compatible = "onsemi,ar0820";
				/* I2C device address */
				reg = <0x10>;

				/* Physical dimensions of sensor */
				physical_w = "3.674";
				physical_h = "2.738";

				sensor_model = "ar0820";

				post_crop_frame_drop = "0";

				use_sensor_mode_id = "true";
 
				mode0 {/*mode AR0820_MODE_3848X2168_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_g";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "3848";
					active_h = "2168";
					readout_orientation = "0";
					line_length = "4440";
					inherent_gain = "1";
					mclk_multiplier = "14.58";
					pix_clk_hz = "74250000";
					serdes_pix_clk_hz = "200000000";

					gain_factor = "1";
					min_gain_val = "1";
					max_gain_val = "15";
					step_gain_val = "1";
					default_gain = "1";
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "30000000";
					max_framerate = "30000000";
					step_framerate = "1";
					default_framerate ="30000000";
					exposure_factor ="1000000";
					min_exp_time = "15";
					max_exp_time = "33333";
					step_exp_time = "1";
					default_exp_time = "33333";

					embedded_metadata_height = "0";
				};

				mode1 {/*mode AR0820_MODE_1920X1080_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_g";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "1920";
					active_h = "1080";
					readout_orientation = "0";
					line_length = "4440";
					inherent_gain = "1";
					mclk_multiplier = "14.58";
					pix_clk_hz = "296236800";
					serdes_pix_clk_hz = "833333333";

					gain_factor = "1";
					min_gain_val = "1";
					max_gain_val = "15";
					step_gain_val = "1";
					default_gain = "1";
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "30000000";
					max_framerate = "30000000";
					step_framerate = "1";
					default_framerate ="30000000";
					exposure_factor ="1000000";
					min_exp_time = "15";
					max_exp_time = "33333";
					step_exp_time = "1";
					default_exp_time = "33333";

					embedded_metadata_height = "0";
				};
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					status = "okay";
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_ar0820_out3: endpoint {
							status = "okay";
							port-index = <6>;
							bus-width = <2>;
							remote-endpoint = <&ar0820_csi_in3>;
							};
						};
					};
				gmsl-link {			
					src-csi-port = "b";
					dst-csi-port = "a";
					serdes-csi-link = "a";
					csi-mode = "1x4";
					st-vc = <0>;
					num-lanes = <4>;
					streams = "ued-u1", "raw12";
					};
				};
				eeprom_d@50 {
					status = "okay";
					compatible = "atmel,24c32";
					reg = <0x50>;
					pagesize = <32>;
				};
			};

		};

This for the VI

tegra-capture-vi {
		status = "okay";
		num-channels = <4>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				status = "okay";
				reg = <0>;
				ar0820_vi_in0: endpoint {
					status = "okay";
					port-index = <0>;
					bus-width = <4>;
					remote-endpoint = <&ar0820_csi_out0>;
				};
			};

			port@1 {
				status = "okay";
				reg = <1>;
				ar0820_vi_in1: endpoint {
					status = "okay";
					port-index = <2>;
					bus-width = <4>;
					remote-endpoint = <&ar0820_csi_out1>;
				};
			};

			port@2 {
				status = "okay";
				reg = <2>;
				ar0820_vi_in2: endpoint {
					status = "okay";
					port-index = <4>;
					bus-width = <4>;
					remote-endpoint = <&ar0820_csi_out2>;
				};


			port@3 {
				status = "okay";
				reg = <3>;
				ar0820_vi_in3: endpoint {
					status = "okay";
					port-index = <5>;
					bus-width = <4>;
					remote-endpoint = <&ar0820_csi_out3>;
				};
			};
		};
	};
};	

And for NVCSI

	host1x@13e00000 {
		nvcsi@15a00000 {
			num-channels = <4>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			channel@0 {
				status = "okay";
				reg = <0>;
				ports {
					status = "okay";
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_csi_in0: endpoint@0 {
							status = "okay";
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_ar0820_out0>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						ar0820_csi_out0: endpoint@1 {
							status = "okay";
							remote-endpoint = <&ar0820_vi_in0>;
						};
					};
				};
			};

			channel@1 {
				status = "okay";
				reg = <1>;
				ports {
					status = "okay";
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_csi_in1: endpoint@2 {
							status = "okay";
							port-index = <2>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_ar0820_out1>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						ar0820_csi_out1: endpoint@3 {
							status = "okay";
							remote-endpoint = <&ar0820_vi_in1>;
						};
					};
				};
			};

			channel@2 {
				status = "okay";
				reg = <2>;
				ports {
					status = "okay";
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_csi_in2: endpoint@4 {
							status = "okay";
							port-index = <4>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_ar0820_out2>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						ar0820_csi_out2: endpoint@5 {
							status = "okay";
							remote-endpoint = <&ar0820_vi_in2>;
						};
					};
				};
			};

			channel@3 {
				status = "okay";
				reg = <3>;
				ports {
					status = "okay";
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						ar0820_csi_in3: endpoint@6 {
							status = "okay";
							port-index = <6>;
							bus-width = <4>;
							remote-endpoint = <&ar0820_ar0820_out3>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						ar0820_csi_out3: endpoint@7 {
							status = "okay";
							remote-endpoint = <&ar0820_vi_in3>;
						};
					};
				};
			};
		};
	};

Thank you for your support

hello chakibdace,

there’s mismatch for the DT of the sensor.
please update device tree as below accordingly.

		i2c@2 {
			ar0820_e@10 {
				ports {
						ar0820_ar0820_out2: endpoint {
							port-index = <4>;
							bus-width = <2>;  <== please revise as 4
...
		i2c@3 {
			ar0820_g@10 {
					port@0 {
						ar0820_ar0820_out3: endpoint {
							port-index = <6>;
							bus-width = <2>;  <== please revise as 4 

Hi @JerryChang

I could finally know where the issue come from, it was just a bracket which wasn’t in the right place in the tegra-capture-vi node, so it was parsing the incorrect node, i’m finding a new issue related to the pixel clk, i will open a new topic for this latter

Thank you for your support

glad to know the issue resolved, you may also leaving the topic-id here for following-up.

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