How to enable CSI0+1 and CSI2+3 4 lane imx283 camera in Orin?

I’m trying enable dual imx283 output on orin nx, but can only detect one camera:

My device tree’s setting here:

/*
 * Copyright (c) 2022-2023, 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/>.
 */
#define CAM0_PWDN	TEGRA234_MAIN_GPIO(H, 6)
#define CAM1_PWDN	TEGRA234_MAIN_GPIO(AC, 0)
//#define CAM2_PWDN	TEGRA234_MAIN_GPIO(Q, 6)
#define CAM_I2C_MUX TEGRA234_AON_GPIO(CC, 3)
//#define CAM_SW_A	TEGRA234_MAIN_GPIO(G, 6)

/ {
	tegra-capture-vi  {
		num-channels = <2>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				reg = <0>;
				mipi_cam_vi_in0: endpoint {
					port-index = <0>;
					bus-width = <4>;
					remote-endpoint = <&mipi_cam_csi_out0>;
				};
			};
			port@1 {
				reg = <1>;
				mipi_cam_vi_in1: endpoint {
					port-index = <2>;
					bus-width = <4>;
					remote-endpoint = <&mipi_cam_csi_out1>;
				};
			};
		};
	};

	host1x@13e00000 {
		nvcsi@15a00000 {
			num-channels = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						mipi_cam_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_out0>;
						};
					};
					port@1 {
						reg = <1>;
						mipi_cam_csi_out0: endpoint@1 {
							remote-endpoint = <&mipi_cam_vi_in0>;
						};
					};
				};
			};
			channel@1 {
				reg = <1>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						mipi_cam_csi_in1: endpoint@2 {
							port-index = <2>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_out1>;
						};
					};
					port@1 {
						reg = <1>;
						mipi_cam_csi_out1: endpoint@3 {
							remote-endpoint = <&mipi_cam_vi_in1>;
						};
					};
				};
			};
		};
	};

	cam_i2cmux {
		i2c@0 {
			sw_mipi_cam0: cam_0@1a {
				compatible = "sensing,imx283_0";
				/* I2C device address */
				reg = <0x1a>;

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

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

				sensor_model = "imx283";

				use_sensor_mode_id = "true";

				reset-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
				/* ==== Modes ====*/
				mode0 {
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";
                                        lane_polarity  = "6";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "5740";  
					inherent_gain = "1";
					mclk_multiplier = "20";
					pix_clk_hz = "480000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "20000000";/* 20.0fps */
					step_framerate = "1";
					default_framerate = "20000000"; /* 20.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode1{
					mclk_khz = "24000";
					num_lanes = "4";
 					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";
                                        lane_polarity = "6";

    					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "5740";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "518000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "25000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "25000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode2{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "2748";
					active_h = "1842";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2976";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "50000000";/* 50.0fps */
					step_framerate = "1";
					default_framerate = "50000000"; /* 50.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode3{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1832";
					active_h = "1234";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2200";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";
                                        lane_polarity  = "6";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode4{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";
                                        lane_polarity  = "6";

					active_w = "3872";
					active_h = "2174";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "3968";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "504000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						mipi_cam_out0: endpoint {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_csi_in0>;
						};
				    };
				};
			};
		};
		i2c@1 {
			sw_mipi_cam1: cam_1@1a {
				compatible = "sensing,imx283_1";
				/* I2C device address */
				reg = <0x1a>;

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

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

				sensor_model = "imx283";

				use_sensor_mode_id = "true";

				reset-gpios = <&tegra_main_gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
				/* ==== Modes ====*/
				mode0 {
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "5740";  
					inherent_gain = "1";
					mclk_multiplier = "20";
					pix_clk_hz = "480000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "20000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "20000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */

					/* readout related settings */
					// num_of_exposure = "1";
					// num_of_ignored_lines = "24";
					// num_of_lines_offset_0 = "0";
					// num_of_ignored_pixels = "0";
					// num_of_left_margin_pixels = "108";
					// num_of_right_margin_pixels = "12";
					embedded_metadata_height = "1";
				};
				mode1{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "5592";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "518000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "25000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "25000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode2{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "2748";
					active_h = "1842";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2976";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "50000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "50000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode3{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1832";
					active_h = "1234";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2200";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode4{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "3872";
					active_h = "2174";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "3968";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "504000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						mipi_cam_out1: endpoint {
							port-index = <2>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_csi_in1>;
						};
					};
				};
			};
		};
	};
};

/ {
	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";

		/**
		* Physical settings to calculate max ISO BW
		*
		* num_csi_lanes = <>;
		* Total number of CSI lanes when all cameras are active
		*
		* max_lane_speed = <>;
		* Max lane speed in Kbit/s
		*
		* min_bits_per_pixel = <>;
		* Min bits per pixel
		*
		* vi_peak_byte_per_pixel = <>;
		* Max byte per pixel for the VI ISO case
		*
		* vi_bw_margin_pct = <>;
		* Vi bandwidth margin in percentage
		*
		* max_pixel_rate = <>;
		* Max pixel rate in Kpixel/s for the ISP ISO case
		*
		* isp_peak_byte_per_pixel = <>;
		* Max byte per pixel for the ISP ISO case
		*
		* isp_bw_margin_pct = <>;
		* Isp bandwidth margin in percentage
		*/
		num_csi_lanes = <8>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		max_pixel_rate = <7500000>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;

		/**
		 * 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 {
			module0 {
				badge = "imx283_front";
				position = "front";
				orientation = "1";
				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx283 9-001a";
					proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/cam_0@1a";
				};
			};
			module1 {
				badge = "imx283_rear";
				position = "rear";
				orientation = "1";
				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx283 10-001a";
					proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/cam_1@1a";
				};
			};
		};
	};
};

/*
 * 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/>.
 */

//#if defined(SG_MIPI_IMX283)
#include "sg-mipi-imx283.dtsi"
//#elif defined(SG_MIPI_IMX577)
//#include "sg-mipi-imx577.dtsi"
//#endif

/ {
	cam_i2cmux {
		compatible = "i2c-mux-gpio";
		#address-cells = <1>;
		#size-cells = <0>;

		mux-gpios = <&tegra_aon_gpio  CAM_I2C_MUX GPIO_ACTIVE_HIGH>;
		i2c-parent = <&cam_i2c>;
		i2c@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;
		};
		i2c@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};

	gpio@2200000 {
		camera-control-output-low {
			gpio-hog;
			output-low;
			gpios = < CAM1_PWDN 0  CAM0_PWDN 0>;
			label = "cam1-pwdn", "cam0-pwdn";
		};
	};
};


I think I’ve check every related setting, like port index, tegra_sinterface and so on, I have no idea why the camera 0 is good but camera 1 can’t even be detect

hello EmondCai,

is it a customize carrier board?
there’s known issue on developer kit, that 4-lane configure on CAM0 (J20) is NOT working, additional fixes are necessary.

Thank you for your reply JerryChang!!

Yes it’s a customize carrier board, the carrier board is designed based on p3509, it’s amost the
same with xavier nx carrier board. So im using a xavier nx carrier board and Orin nx 8g core board.

Sorry I don’t quite get what you mean. My cam0 is good but cam1 can’t even detect. And in my device tree I have set the lane polarity to 6 in my channel 0 so there won’t be a P/N swizzled issue

it’s suggested to works with Orin NX + Orin Nano carrier board for running camera use-case.

FYI, it’s Cam0 slot (CSI-C), Cam1 slot (CSI-B) for P3768.
it should be expected since we’re not support CSI-B in 4-lane config because of CSI clock limitations.
so, these two camera slots should work with 2-lanes with lane_polarity configuration.

But I can single enable 4-lane CSI-B or 4-lane CSI-C separately, does this make sensing based on your theory

And based on your theory, Can I use 4 lane CSI-C+ 2 lane CSI-B?

BTW, our carrier board can support dual 4-lane output(CSI0+1 and CSI2+3) with Xavier NX core board.

hello EmondCai,

according to your device tree, you’re actually running with CSI-A and CSI-C.

		nvcsi@15a00000 {
			num-channels = <2>;

			channel@0 {
				ports {
					port@0 {
						mipi_cam_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <4>;

			channel@1 {
					port@0 {
						mipi_cam_csi_in1: endpoint@2 {
							port-index = <2>;
							bus-width = <4>;

since you’re using a customize carrier board.
it’s an FYI that you should refer to Orin Nano carrier board to design the board for running camera use-case.
please review the schematic that CSI lane configuration were all correct.

furthermore,
please also review this device tree sources, tegra234-p3768-0000-a0.dtsi
there has default configuration to configure CSI and VI to port-index = <1>;.
for example,

        tegra-capture-vi  {
                ports {
                        port@0 {
                                endpoint {
                                        port-index = <1>;

        host1x@13e00000 {
                nvcsi@15a00000 {
                        channel@0 {
                                ports {
                                        port@0 {
                                                endpoint@0 {
                                                        port-index = <1>;

hence…
you may give it a try to change both port@0 within tegra-capture-vi and nvcsi@15a00000 as port-index = <0>; for your dual 4-lane use-case.

Actually I’m using the device tree source tegra234-p3509-a02.dtsi and I don’t see any default configuration of port-index = <1>

and I have two kind of dtsi which support for CSI-A and CSI-C respectively. For the first one Only CSI-A work. For the second only CSI-C work.

CSI-A

/*
 * Copyright (c) 2022-2023, 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/>.
 */
#define CAM0_PWDN	TEGRA234_MAIN_GPIO(H, 6)
#define CAM1_PWDN	TEGRA234_MAIN_GPIO(AC, 0)
//#define CAM2_PWDN	TEGRA234_MAIN_GPIO(Q, 6)
#define CAM_I2C_MUX TEGRA234_AON_GPIO(CC, 3)
//#define CAM_SW_A	TEGRA234_MAIN_GPIO(G, 6)

/ {
	tegra-capture-vi  {
		num-channels = <2>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				reg = <0>;
				mipi_cam_vi_in0: endpoint {
					port-index = <0>;
					bus-width = <4>;
					remote-endpoint = <&mipi_cam_csi_out0>;
				};
			};
			port@1 {
				reg = <1>;
				mipi_cam_vi_in1: endpoint {
					port-index = <2>;
					bus-width = <4>;
					remote-endpoint = <&mipi_cam_csi_out1>;
				};
			};
		};
	};

	host1x@13e00000 {
		nvcsi@15a00000 {
			num-channels = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						mipi_cam_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_out0>;
						};
					};
					port@1 {
						reg = <1>;
						mipi_cam_csi_out0: endpoint@1 {
							remote-endpoint = <&mipi_cam_vi_in0>;
						};
					};
				};
			};
			channel@1 {
				reg = <1>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						mipi_cam_csi_in1: endpoint@2 {
							port-index = <2>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_out1>;
						};
					};
					port@1 {
						reg = <1>;
						mipi_cam_csi_out1: endpoint@3 {
							remote-endpoint = <&mipi_cam_vi_in1>;
						};
					};
				};
			};
		};
	};

	cam_i2cmux {
		i2c@0 {
			sw_mipi_cam0: cam_0@1a {
				compatible = "sensing,imx283_0";
				/* I2C device address */
				reg = <0x1a>;

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

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

				sensor_model = "imx283";

				use_sensor_mode_id = "true";

				reset-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
				/* ==== Modes ====*/
				mode0 {
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";
                                        lane_polarity  = "6";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "5740";  
					inherent_gain = "1";
					mclk_multiplier = "20";
					pix_clk_hz = "480000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "20000000";/* 20.0fps */
					step_framerate = "1";
					default_framerate = "20000000"; /* 20.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode1{
					mclk_khz = "24000";
					num_lanes = "4";
 					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";
                                        lane_polarity = "6";

    					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "5740";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "518000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "25000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "25000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode2{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "2748";
					active_h = "1842";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2976";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "50000000";/* 50.0fps */
					step_framerate = "1";
					default_framerate = "50000000"; /* 50.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode3{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1832";
					active_h = "1234";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2200";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";
                                        lane_polarity  = "6";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode4{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";
                                        lane_polarity  = "6";

					active_w = "3872";
					active_h = "2174";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "3968";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "504000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						mipi_cam_out0: endpoint {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_csi_in0>;
						};
				    };
				};
			};
		};
		i2c@1 {
			sw_mipi_cam1: cam_1@1a {
				compatible = "sensing,imx283_1";
				/* I2C device address */
				reg = <0x1a>;

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

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

				sensor_model = "imx283";

				use_sensor_mode_id = "true";

				reset-gpios = <&tegra_main_gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
				/* ==== Modes ====*/
				mode0 {
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "5740";  
					inherent_gain = "1";
					mclk_multiplier = "20";
					pix_clk_hz = "480000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "20000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "20000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */

					/* readout related settings */
					// num_of_exposure = "1";
					// num_of_ignored_lines = "24";
					// num_of_lines_offset_0 = "0";
					// num_of_ignored_pixels = "0";
					// num_of_left_margin_pixels = "108";
					// num_of_right_margin_pixels = "12";
					embedded_metadata_height = "1";
				};
				mode1{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "5592";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "518000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "25000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "25000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode2{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "2748";
					active_h = "1842";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2976";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "50000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "50000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode3{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1832";
					active_h = "1234";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2200";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode4{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "3872";
					active_h = "2174";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "3968";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "504000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						mipi_cam_out1: endpoint {
							port-index = <4>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_csi_in1>;
						};
					};
				};
			};
		};
	};
};

/ {
	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";

		/**
		* Physical settings to calculate max ISO BW
		*
		* num_csi_lanes = <>;
		* Total number of CSI lanes when all cameras are active
		*
		* max_lane_speed = <>;
		* Max lane speed in Kbit/s
		*
		* min_bits_per_pixel = <>;
		* Min bits per pixel
		*
		* vi_peak_byte_per_pixel = <>;
		* Max byte per pixel for the VI ISO case
		*
		* vi_bw_margin_pct = <>;
		* Vi bandwidth margin in percentage
		*
		* max_pixel_rate = <>;
		* Max pixel rate in Kpixel/s for the ISP ISO case
		*
		* isp_peak_byte_per_pixel = <>;
		* Max byte per pixel for the ISP ISO case
		*
		* isp_bw_margin_pct = <>;
		* Isp bandwidth margin in percentage
		*/
		num_csi_lanes = <8>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		max_pixel_rate = <7500000>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;

		/**
		 * 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 {
			module0 {
				badge = "imx283_front";
				position = "front";
				orientation = "1";
				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx283 9-001a";
					proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/cam_0@1a";
				};
			};
			module1 {
				badge = "imx283_rear";
				position = "rear";
				orientation = "1";
				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx283 10-001a";
					proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/cam_1@1a";
				};
			};
		};
	};
};

CSI-C

/*
 * Copyright (c) 2022-2023, 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/>.
 */
//#define CAM0_PWDN	TEGRA234_MAIN_GPIO(H, 6)
#define CAM1_PWDN	TEGRA234_MAIN_GPIO(AC, 0)
#define CAM2_PWDN	TEGRA234_MAIN_GPIO(Q, 6)
#define CAM_I2C_MUX TEGRA234_AON_GPIO(CC, 3)
#define CAM_SW_A	TEGRA234_MAIN_GPIO(G, 6)

/ {
	tegra-capture-vi  {
		num-channels = <2>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				reg = <0>;
				mipi_cam_vi_in0: endpoint {
					port-index = <2>;
					bus-width = <4>;
					remote-endpoint = <&mipi_cam_csi_out0>;
				};
			};
			port@1 {
				reg = <1>;
				mipi_cam_vi_in1: endpoint {
					port-index = <4>;
					bus-width = <4>;
					remote-endpoint = <&mipi_cam_csi_out1>;
				};
			};
		};
	};

	host1x@13e00000 {
		nvcsi@15a00000 {
			num-channels = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						mipi_cam_csi_in0: endpoint@0 {
							port-index = <2>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_out0>;
						};
					};
					port@1 {
						reg = <1>;
						mipi_cam_csi_out0: endpoint@1 {
							remote-endpoint = <&mipi_cam_vi_in0>;
						};
					};
				};
			};
			channel@1 {
				reg = <1>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						mipi_cam_csi_in1: endpoint@2 {
							port-index = <4>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_out1>;
						};
					};
					port@1 {
						reg = <1>;
						mipi_cam_csi_out1: endpoint@3 {
							remote-endpoint = <&mipi_cam_vi_in1>;
						};
					};
				};
			};
		};
	};

	cam_i2cmux {
		i2c@2 {
			sw_mipi_cam0: cam_0@1a {
				compatible = "sensing,imx283_0";
				/* I2C device address */
				reg = <0x1a>;

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

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

				sensor_model = "imx283";

				use_sensor_mode_id = "true";

				reset-gpios = <&tegra_main_gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
				/* ==== Modes ====*/
				mode0 {
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "5740";  
					inherent_gain = "1";
					mclk_multiplier = "20";
					pix_clk_hz = "480000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "20000000";/* 20.0fps */
					step_framerate = "1";
					default_framerate = "20000000"; /* 20.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode1{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "5740";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "518000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "25000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "25000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode2{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "2748";
					active_h = "1842";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2976";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "50000000";/* 50.0fps */
					step_framerate = "1";
					default_framerate = "50000000"; /* 50.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode3{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1832";
					active_h = "1234";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2200";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode4{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "3872";
					active_h = "2174";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "3968";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "504000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						mipi_cam_out0: endpoint {
							port-index = <2>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_csi_in0>;
						};
				    };
				};
			};
		};
		i2c@1 {
			sw_mipi_cam1: cam_1@1a {
				compatible = "sensing,imx283_1";
				/* I2C device address */
				reg = <0x1a>;

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

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

				sensor_model = "imx283";

				use_sensor_mode_id = "true";

				reset-gpios = <&tegra_main_gpio CAM2_PWDN GPIO_ACTIVE_HIGH>;
				/* ==== Modes ====*/
				mode0 {
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_e";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "5740";  
					inherent_gain = "1";
					mclk_multiplier = "20";
					pix_clk_hz = "480000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "20000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "20000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */

					/* readout related settings */
					// num_of_exposure = "1";
					// num_of_ignored_lines = "24";
					// num_of_lines_offset_0 = "0";
					// num_of_ignored_pixels = "0";
					// num_of_left_margin_pixels = "108";
					// num_of_right_margin_pixels = "12";
					embedded_metadata_height = "1";
				};
				mode1{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_e";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "5496";
					active_h = "3694";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "5592";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "518000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "25000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "25000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode2{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_e";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "2748";
					active_h = "1842";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2976";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "50000000";/* 25.0fps */
					step_framerate = "1";
					default_framerate = "50000000"; /* 25.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode3{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_e";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1832";
					active_h = "1234";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "12";
					readout_orientation = "90";
					line_length = "2200";
					inherent_gain = "1";
					mclk_multiplier = "12";
					pix_clk_hz = "288000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};
				mode4{
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_e";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "3872";
					active_h = "2174";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "3968";
					inherent_gain = "1";
					mclk_multiplier = "21";
					pix_clk_hz = "504000000";

					gain_factor = "1";
					min_gain_val = "0"; /* 0d 0db*/
					max_gain_val = "1957"; /* 1957d 27db Gain[db]=-20log{(2048)-PGC{10:0]/2048}*/
					step_gain_val = "1";
					default_gain = "0"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					framerate_factor = "1000000";
					min_framerate = "2000000";/* 2.0fps */
					max_framerate = "60000000";/* 60.0fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0fps */
					exposure_factor = "1000000";
					min_exp_time = "52"; /* us */
					max_exp_time = "49865"; /* us */
					step_exp_time = "1";
					default_exp_time = "1000"; /* us */
					embedded_metadata_height = "1";
				};

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						mipi_cam_out1: endpoint {
							port-index = <4>;
							bus-width = <4>;
							remote-endpoint = <&mipi_cam_csi_in1>;
						};
					};
				};
			};
		};
	};
};

/ {
	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";

		/**
		* Physical settings to calculate max ISO BW
		*
		* num_csi_lanes = <>;
		* Total number of CSI lanes when all cameras are active
		*
		* max_lane_speed = <>;
		* Max lane speed in Kbit/s
		*
		* min_bits_per_pixel = <>;
		* Min bits per pixel
		*
		* vi_peak_byte_per_pixel = <>;
		* Max byte per pixel for the VI ISO case
		*
		* vi_bw_margin_pct = <>;
		* Vi bandwidth margin in percentage
		*
		* max_pixel_rate = <>;
		* Max pixel rate in Kpixel/s for the ISP ISO case
		*
		* isp_peak_byte_per_pixel = <>;
		* Max byte per pixel for the ISP ISO case
		*
		* isp_bw_margin_pct = <>;
		* Isp bandwidth margin in percentage
		*/
		num_csi_lanes = <4>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		max_pixel_rate = <7500000>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;

		/**
		 * 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 {
			module0 {
				badge = "imx283_front";
				position = "front";
				orientation = "1";
				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx283 9-001a";
					proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@2/cam_0@1a";
				};
			};
			module1 {
				badge = "imx283_rear";
				position = "rear";
				orientation = "1";
				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx283 10-001a";
					proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/cam_1@1a";
				};
			};
		};
	};
};

I’m very curious why that happen. I can’t find any setting of the gpio reset, prot-index, tegra_sinterface is wrong.

hello EmondCai,

could you please disassembler the dtb file into text file for examination.
for instance, $ dtc -I dtb -O dts -o temp.txt tegra234-xxx.dtb

output_CSIA.txt (418.3 KB)
output_CSIC.txt (418.2 KB)
Please check!

And I use the p3768 carrier board as a test, also use my device tree as well. I can detected both camera(does it mean my CSI setting is correct?) but only cam1 work(as you mention it’s p3768 bugs), can I know how to config and enable the CSI0

as mentioned, p3768 can work with 4-lane camera on Cam0 slot only.

hello EmondCai,

I can see these two all have camera definitions for using CSI-A and CSI-C with 4-lane IMX283.
why there’re two different device tree? what’s the difference with them?

Sorry for confusing you, I was trying to enable both CSI so after debuging I have several versions of the device tree. The output_CSIA.txt device tree only let CSIA work, and ouput_CSIC only let CSIC work, I don’t actually know why, but It’s can be regarded as a solution to use both CSI by switching the device tree

I think It’s related to the setting of CAM_I2C_MUX and CAM_SW_A, is there any doc I can refer to?

you may see-also Topic 192486 for using Cam I2c MUX.

Could you tell me something about the additional fixes on orin developer kit

hello EmondCai,

for the issue on developer kit, it’s due to CSI clock limitations.
it’s not yet done to enable CSI-B to support 4-lane config.

I have a stupid question, dose it mean in Orin Cam0 corresponds to CSI-C(CSI2?) and Cam1 corresponds to CSI-B(CSI1?). Is there a CSI-A in orin?