Arguscamerasrc cant tell i have multiple cameras

Hello ,

I am trying to get to CSI camera with different drivers to work but keep getting :

Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:561 Invalid camera device specified 1 specified, 0 max index

I have managed to see both of them in ls /dev/video*

sudo media-ctl -p -d /dev/media0
result in :

Media device information
------------------------
driver          tegra194-vi5
model           NVIDIA Tegra Video Input Device
serial          
bus info        
hw revision     0x3
driver version  0.0.0

Device topology
- entity 1: 15a00000.nvcsi--4 (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
	pad0: Sink
		<- "imx477 30-0010":0 [ENABLED]
	pad1: Source
		-> "vi-output, imx477 30-0010":0 [ENABLED]

- entity 4: 15a00000.nvcsi--3 (2 pads, 0 link)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
	pad0: Sink
	pad1: Source

- entity 7: 15a00000.nvcsi--2 (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev2
	pad0: Sink
		<- "imx274 32-001a":0 [ENABLED]
	pad1: Source
		-> "vi-output, imx274 32-001a":0 [ENABLED]

- entity 10: 15a00000.nvcsi--1 (2 pads, 0 link)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev3
	pad0: Sink
	pad1: Source

- entity 13: imx477 30-0010 (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev4
	pad0: Source
		[fmt:SRGGB10_1X10/4056x3040 field:none colorspace:srgb]
		-> "15a00000.nvcsi--4":0 [ENABLED]

- entity 15: vi-output, imx477 30-0010 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video0
	pad0: Sink
		<- "15a00000.nvcsi--4":1 [ENABLED]

- entity 33: imx274 32-001a (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev5
	pad0: Source
		[fmt:SRGGB10_1X10/3840x2160 field:none colorspace:srgb]
		-> "15a00000.nvcsi--2":0 [ENABLED]

- entity 35: vi-output, imx274 32-001a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video1
	pad0: Sink
		<- "15a00000.nvcsi--2":1 [ENABLED]

also the out put of :
v4l2-ctl --list-devices
is:

 vi-output, imx477 30-0010 (platform:15c10000.vi:0):
	/dev/video0
 vi-output, imx274 32-001a (platform:15c10000.vi:2):
    /dev/video1

and

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=10 --stream-to=imx274.raw -d /dev/video#

Works for both sensors

However

gst-launch-1.0 nvarguscamerasrc sensor_id =1 ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxh264enc control-rate=2 bitrate=4000000 ! video/x-h264, stream-format=byte-stream ! rtph264pay mtu=1400 ! udpsink host=192.168.55.100 port=5000 sync=false async=false

Gives the following error only for one of the sensors :

Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:561 Invalid camera device specified 1 specified, 0 max index

It looks to me that for some reason nvarguscamerasrc cant read the correct number of video devices, any leads on the problem might be?

Have a check the context of the tegra-camera-platform.

I solved the problem, not sure what I did but I am sharing my file .dtsi.

tegra194-p3668-p3509-camera-imx477-imx274.dtsi

#include "tegra194-camera-imx477.dtsi"
#include "tegra194-camera-imx274.dtsi"

#define CAM0_PWDN	TEGRA194_MAIN_GPIO(P, 4)
#define CAM1_PWDN	TEGRA194_MAIN_GPIO(P, 5)
#define CAM2_PWDN	TEGRA194_MAIN_GPIO(R, 0)
#define CAM3_PWDN	TEGRA194_MAIN_GPIO(Q, 3)

#define CAM_I2C_MUX 	TEGRA194_AON_GPIO(CC, 3)
#define CAMERA_I2C_MUX_BUS(x) (0x1E + x)

/ {
    i2c@3180000{
        tca9548@70 {
            compatible = "nxp,pca9548";
            reg = <0x70>;
            #address-cells = <1>;
            #size-cells = <0>;
            vcc-supply = <&p3509_vdd_1v8_cvb>;
            vcc_lp = "vcc";
            skip_mux_detect = "yes";
            force_bus_start = <CAMERA_I2C_MUX_BUS(0)>;
            status = "okay";
            i2c@0 {
                reg = <0>;
                i2c-mux,deselect-on-exit;
                #address-cells = <1>;
                #size-cells = <0>;
                status = "okay";
                rbpcv2_imx477_a@10 {
                    status = "okay";
                    clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
                             <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>;
                    clock-names = "extperiph1", "pllp_grtba";
                    mclk = "extperiph1";
                    reset-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
                    vana-supply = <&p3509_avdd_cam_2v8>;
                    vif-supply = <&p3509_vdd_1v8_cvb>;
                    vdig-supply = <&p3509_vdd_sys_en>;
                };
            };
            i2c@1 {
                reg = <1>;
                i2c-mux,deselect-on-exit;
                #address-cells = <1>;
                #size-cells = <0>;
                status = "okay";
                rbpcv2_imx477_e@10 {
                    status = "okay";
                    clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
                             <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>;
                    clock-names = "extperiph1", "pllp_grtba";
                    mclk = "extperiph1";
                    reset-gpios = <&tegra_main_gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
                    vana-supply = <&p3509_avdd_cam_2v8>;
                    vif-supply = <&p3509_vdd_1v8_cvb>;
                    vdig-supply = <&p3509_vdd_sys_en>;
                };
            };

            i2c@2 {
                reg = <2>;
                i2c-mux,deselect-on-exit;
                #address-cells = <1>;
                #size-cells = <0>;
                status = "okay";
                rbpcv2_imx274_c@1a {
                    status = "okay";
                    clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
                             <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>;
                    clock-names = "extperiph1", "pllp_grtba";
                    mclk = "extperiph1";
                    reset-gpios = <&tegra_main_gpio CAM2_PWDN GPIO_ACTIVE_HIGH>;
                    vana-supply = <&p3509_avdd_cam_2v8>;
                    vif-supply = <&p3509_vdd_1v8_cvb>;
                    vdig-supply = <&p3509_vdd_sys_en>;
                };
            };
            i2c@3 {
                reg = <3>;
                i2c-mux,deselect-on-exit;
                #address-cells = <1>;
                #size-cells = <0>;
                status = "okay";
                rbpcv2_imx274_d@1a {
                    status = "okay";
                    clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
                             <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>;
                    clock-names = "extperiph1", "pllp_grtba";
                    mclk = "extperiph1";
                    reset-gpios = <&tegra_main_gpio CAM3_PWDN GPIO_ACTIVE_HIGH>;
                    vana-supply = <&p3509_avdd_cam_2v8>;
                    vif-supply = <&p3509_vdd_1v8_cvb>;
                    vdig-supply = <&p3509_vdd_sys_en>;
                };
            };

        };
    };

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

imx477.dtsi

#include <dt-bindings/media/camera.h>

/ {
	host1x {
		vi@15c10000  {
            num-channels = <2>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				vi_port0: port@0 {
					reg = <0>;
					rbpcv2_imx477_vi_in0: endpoint {
						port-index = <0>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx477_csi_out0>;
					};
				};
				vi_port1: port@1 {
					reg = <1>;
					rbpcv2_imx477_vi_in1: endpoint {
						port-index = <4>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx477_csi_out1>;
					};
				};

			};
		};

		nvcsi@15a00000 {
            num-channels = <2>;
			#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_imx477_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <2>;
							remote-endpoint = <&rbpcv2_imx477_out0>;
						};
					};
					csi_chan0_port1: port@1 {
						reg = <1>;
						rbpcv2_imx477_csi_out0: endpoint@1 {
							remote-endpoint = <&rbpcv2_imx477_vi_in0>;
						};
					};
				};
			};
			csi_chan1: channel@1 {
				reg = <1>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					csi_chan1_port0: port@0 {
						reg = <0>;
						rbpcv2_imx477_csi_in1: endpoint@2 {
							port-index = <4>;
							bus-width = <2>;
							remote-endpoint = <&rbpcv2_imx477_out1>;
						};
					};
					csi_chan1_port1: port@1 {
						reg = <1>;
						rbpcv2_imx477_csi_out1: endpoint@3 {
							remote-endpoint = <&rbpcv2_imx477_vi_in1>;
						};
					};
				};
			};

		};
	};

	i2c@3180000  {
		tca9548@70 {
			i2c@0 {
				imx477_cam0: rbpcv2_imx477_a@10 {
					compatible = "nvidia,imx477";

					reg = <0x10>;
					devnode = "video0";

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

					sensor_model ="imx477";

					/* Define any required hw resources needed by driver */
					/* ie. clocks, io pins, power sources */
					avdd-reg = "vana";
					iovdd-reg = "vif";
					dvdd-reg = "vdig";

					/* Defines number of frames to be dropped by driver internally after applying */
					/* sensor crop settings. Some sensors send corrupt frames after applying */
					/* crop co-ordinates */
					/*post_crop_frame_drop = "0";*/

					/* if true, delay gain setting by one frame to be in sync with exposure */
					delayed_gain = "true";

					has-eeprom;
					fuse_id_start_addr = <91>;
					sensor_operation_mode = "master";
                    mode0 {
						mclk_khz = "24000";
						num_lanes = "2";
						tegra_sinterface = "serial_a";
						discontinuous_clk = "no";
						dpcm_enable = "false";
						cil_settletime = "0";

						active_w = "4032";
						active_h = "3040";
						pixel_t = "bayer_rggb";
						readout_orientation = "0";
						line_length = "9024";
						inherent_gain = "1";
						mclk_multiplier = "80";
						pix_clk_hz = "840000000";

						gain_factor = "1000000";
						min_gain_val = "1000000";
						max_gain_val = "354000000";
						step_gain_val = "1";
						default_gain = "1000000";
						min_hdr_ratio = "1";
						max_hdr_ratio = "64";
						framerate_factor = "1000000";
						min_framerate = "1408000";
						max_framerate = "30000000";
						step_framerate = "1";
						default_framerate= "30000000";
						exposure_factor = "1000000";
						min_exp_time = "16";
						max_exp_time = "710227";
						step_exp_time = "1";
						default_exp_time = "30000";/* us */
						embedded_metadata_height = "2";
					};
                    mode1 {
						mclk_khz = "24000";
						num_lanes = "2";
						tegra_sinterface = "serial_a";
						discontinuous_clk = "no";
						dpcm_enable = "false";
						cil_settletime = "0";

						active_w = "2028";
						active_h = "1520";
						pixel_t = "bayer_rggb";
						readout_orientation = "0";
						line_length = "6524";
						inherent_gain = "1";
						mclk_multiplier = "80";
						pix_clk_hz = "840000000";

						gain_factor = "1000000";
						min_gain_val = "1000000";
						max_gain_val = "354000000";
						step_gain_val = "1";
						default_gain = "1000000";
						min_hdr_ratio = "1";
						max_hdr_ratio = "64";
						framerate_factor = "1000000";
						min_framerate = "1420000";
						max_framerate = "60000000";
						step_framerate = "1";
						default_framerate= "60000000";
						exposure_factor = "1000000";
						min_exp_time = "16";
						max_exp_time = "704225";
						step_exp_time = "1";
						default_exp_time = "8000";/* us */
						embedded_metadata_height = "2";
					};
                    mode2 {
						mclk_khz = "24000";
						num_lanes = "2";
						tegra_sinterface = "serial_a";
						discontinuous_clk = "no";
						dpcm_enable = "false";
						cil_settletime = "0";

						active_w = "1920";
						active_h = "1080";
						pixel_t = "bayer_rggb";
						readout_orientation = "0";
						line_length = "9024";
						inherent_gain = "1";
						mclk_multiplier = "80";
						pix_clk_hz = "840000000";

						gain_factor = "1000000";
						min_gain_val = "1000000";
						max_gain_val = "354000000";
						step_gain_val = "1";
						default_gain = "1000000";
						min_hdr_ratio = "1";
						max_hdr_ratio = "64";
						framerate_factor = "1000000";
						min_framerate = "1420000";
						max_framerate = "60000000";
						step_framerate = "1";
						default_framerate= "60000000";
						exposure_factor = "1000000";
						min_exp_time = "16";
						max_exp_time = "704225";
						step_exp_time = "1";
						default_exp_time = "8000";/* us */
						embedded_metadata_height = "2";
					};						
					ports {
						#address-cells = <1>;
						#size-cells = <0>;
						port@0 {
							reg = <0>;
							rbpcv2_imx477_out0: endpoint {
								port-index = <0>;
								bus-width = <2>;
								remote-endpoint = <&rbpcv2_imx477_csi_in0>;
							};
						};
					};
				};
			};
			i2c@1 {
				imx477_cam1: rbpcv2_imx477_e@10 {
					compatible = "nvidia,imx477";

					reg = <0x10>;
                    devnode = "video0";

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

					sensor_model ="imx477";

					/* Define any required hw resources needed by driver */
					/* ie. clocks, io pins, power sources */
					avdd-reg = "vana";
					iovdd-reg = "vif";
					dvdd-reg = "vdig";

					/* Defines number of frames to be dropped by driver internally after applying */
					/* sensor crop settings. Some sensors send corrupt frames after applying */
					/* crop co-ordinates */
					/*post_crop_frame_drop = "0";*/

					/* if true, delay gain setting by one frame to be in sync with exposure */
					delayed_gain = "true";

					has-eeprom;
					fuse_id_start_addr = <91>;
					sensor_operation_mode = "master";
					mode0 {/*mode IMX477_MODE_1920X1080_CROP_30FPS*/
						mclk_khz = "24000";
						num_lanes = "2";
						tegra_sinterface = "serial_e";
						discontinuous_clk = "no";
						dpcm_enable = "false";
						cil_settletime = "0";

						active_w = "4032";
						active_h = "3040";
						pixel_t = "bayer_rggb";
						readout_orientation = "0";
						line_length = "9024";
						inherent_gain = "1";
						mclk_multiplier = "80";
						pix_clk_hz = "840000000";

						gain_factor = "1000000";
						min_gain_val = "1000000";
						max_gain_val = "354000000";
						step_gain_val = "1";
						default_gain = "1000000";
						min_hdr_ratio = "1";
						max_hdr_ratio = "64";
						framerate_factor = "1000000";
						min_framerate = "1408000";
						max_framerate = "30000000";
						step_framerate = "1";
						default_framerate= "30000000";
						exposure_factor = "1000000";
						min_exp_time = "16";
						max_exp_time = "710227";
						step_exp_time = "1";
						default_exp_time = "30000";/* us */
						embedded_metadata_height = "2";
					};
					mode1 {/*mode IMX477_MODE_1920X1080_CROP_30FPS*/
						mclk_khz = "24000";
						num_lanes = "2";
						tegra_sinterface = "serial_e";
						discontinuous_clk = "no";
						dpcm_enable = "false";
						cil_settletime = "0";

						active_w = "2028";
						active_h = "1520";
						pixel_t = "bayer_rggb";
						readout_orientation = "0";
						line_length = "6524";
						inherent_gain = "1";
						mclk_multiplier = "80";
						pix_clk_hz = "840000000";

						gain_factor = "1000000";
						min_gain_val = "1000000";
						max_gain_val = "354000000";
						step_gain_val = "1";
						default_gain = "1000000";
						min_hdr_ratio = "1";
						max_hdr_ratio = "64";
						framerate_factor = "1000000";
						min_framerate = "1420000";
						max_framerate = "60000000";
						step_framerate = "1";
						default_framerate= "60000000";
						exposure_factor = "1000000";
						min_exp_time = "16";
						max_exp_time = "704225";
						step_exp_time = "1";
						default_exp_time = "8000";/* us */
						embedded_metadata_height = "2";
					};
					mode2 {/*mode IMX477_MODE_1920X1080_CROP_30FPS*/
						mclk_khz = "24000";
						num_lanes = "2";
						tegra_sinterface = "serial_e";
						discontinuous_clk = "no";
						dpcm_enable = "false";
						cil_settletime = "0";

						active_w = "1920";
						active_h = "1080";
						pixel_t = "bayer_rggb";
						readout_orientation = "0";
						line_length = "9024";
						inherent_gain = "1";
						mclk_multiplier = "80";
						pix_clk_hz = "840000000";

						gain_factor = "1000000";
						min_gain_val = "1000000";
						max_gain_val = "354000000";
						step_gain_val = "1";
						default_gain = "1000000";
						min_hdr_ratio = "1";
						max_hdr_ratio = "64";
						framerate_factor = "1000000";
						min_framerate = "1420000";
						max_framerate = "60000000";
						step_framerate = "1";
						default_framerate= "60000000";
						exposure_factor = "1000000";
						min_exp_time = "16";
						max_exp_time = "704225";
						step_exp_time = "1";
						default_exp_time = "8000";/* us */
						embedded_metadata_height = "2";
					};						
					ports {
						#address-cells = <1>;
						#size-cells = <0>;
						port@0 {
							reg = <0>;
							rbpcv2_imx477_out1: endpoint {
								port-index = <4>;
								bus-width = <2>;
								remote-endpoint = <&rbpcv2_imx477_csi_in1>;
							};
						};
					};
				};
			};

        };
	};
	lens_imx477@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";
		/**
		* 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 = <240000>;
		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 {
			cam_module0: module0 {
				badge = "porg_bottomleft_RBPCV2";
				position = "bottomleft";
				orientation = "1";
				cam_module0_drivernode0: drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx477 30-0010";
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@70/i2c@0/rbpcv2_imx477_a@10";
				};
				cam_module0_drivernode1: drivernode1 {
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/lens_imx477@RBPCV2/";
				};
			};
			cam_module1: module1 {
				badge = "porg_bottomright_RBPCV2";
				position = "bottomright";
				orientation = "1";
				cam_module1_drivernode0: drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx477 31-0010";
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@70/i2c@1/rbpcv2_imx477_e@10";
				};
				cam_module1_drivernode1: drivernode1 {
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/lens_imx477@RBPCV2/";
				};
			};

		};
	};
};

imx274.dtsi

#include <dt-bindings/media/camera.h>

/ {
    host1x {
        vi@15c10000  {
            num-channels = <4>;
            ports {
                #address-cells = <1>;
                #size-cells = <0>;

                vi_port2: port@2 {
                    reg = <2>;
                    rbpcv2_imx274_vi_in2: endpoint {
                        port-index = <2>;
                        bus-width = <2>;
                        remote-endpoint = <&rbpcv2_imx274_csi_out2>;
                    };
                };
                vi_port3: port@3 {
                    reg = <3>;
                    rbpcv2_imx274_vi_in3: endpoint {
                        port-index = <3>;
                        bus-width = <2>;
                        remote-endpoint = <&rbpcv2_imx274_csi_out3>;
                    };
                };
            };
        };

        nvcsi@15a00000 {
            num-channels = <4>;
            #address-cells = <1>;
            #size-cells = <0>;

            csi_chan2: channel@2 {
                reg = <2>;
                ports {
                #address-cells = <1>;
                #size-cells = <0>;
                    csi_chan2_port0: port@0 {
                        reg = <0>;
                        rbpcv2_imx274_csi_in2: endpoint@4 {
                            port-index = <2>;
                            bus-width = <2>;
                            remote-endpoint = <&rbpcv2_imx274_out2>;
                        };
                    };
                    csi_chan2_port1: port@1 {
                        reg = <1>;
                        rbpcv2_imx274_csi_out2: endpoint@5 {
                            remote-endpoint = <&rbpcv2_imx274_vi_in2>;
                        };
                    };
                };
            };
            csi_chan3: channel@3 {
                reg = <3>;
                ports {
                #address-cells = <1>;
                #size-cells = <0>;
                    csi_chan3_port0: port@0 {
                        reg = <0>;
                        rbpcv2_imx274_csi_in3: endpoint@6 {
                            port-index = <3>;
                            bus-width = <2>;
                            remote-endpoint = <&rbpcv2_imx274_out3>;
                        };
                    };
                    csi_chan3_port1: port@1 {
                        reg = <1>;
                        rbpcv2_imx274_csi_out3: endpoint@7 {
                            remote-endpoint = <&rbpcv2_imx274_vi_in3>;
                        };
                    };
                };
            };
        };
    };

    i2c@3180000  {
        tca9548@70 {




        i2c@2 {
            imx274_cam2: rbpcv2_imx274_c@1a {
                compatible = "nvidia,imx274";
                /* I2C device address */
                reg = <0x1a>;

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

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

                sensor_model = "imx274";

                /* Define any required hw resources needed by driver */
                /* ie. clocks, io pins, power sources */
                avdd-reg = "vana";
                iovdd-reg = "vif";
                dvdd-reg = "vdig";

                /* Defines number of frames to be dropped by driver internally after applying */
                /* sensor crop settings. Some sensors send corrupt frames after applying */
                /* crop co-ordinates */
                /*post_crop_frame_drop = "0";*/

                /* if true, delay gain setting by one frame to be in sync with exposure */
                delayed_gain = "true";

                has-eeprom;
                fuse_id_start_addr = <91>;



                mode0 { // IMX274_MODE_3840X2160
                    mclk_khz = "24000";
                    num_lanes = "2";
                    tegra_sinterface = "serial_c";
                    phy_mode = "DPHY";
                    discontinuous_clk = "yes";
                    dpcm_enable = "false";
                    cil_settletime = "0";

                    active_w = "3840";
                    active_h = "2160";
                    mode_type = "bayer";
                    pixel_phase = "rggb";
                    csi_pixel_bit_depth = "10";
                    readout_orientation = "90";
                    line_length = "4208";
                    inherent_gain = "1";
                    mclk_multiplier = "24";
                    pix_clk_hz = "576000000";

                    gain_factor = "1000000";
                    min_gain_val = "1000000";
                    max_gain_val = "22000000";
                    step_gain_val = "1";
                    default_gain = "1000000";
                    min_hdr_ratio = "1";
                    max_hdr_ratio = "1";
                    framerate_factor = "1000000";
                    min_framerate = "1500000";
                    max_framerate = "30000000";
                    step_framerate = "1";
                    default_framerate= "30000000";
                    exposure_factor = "1000000";
                    min_exp_time = "8";
                    max_exp_time = "332402";
                    step_exp_time = "1";
                    default_exp_time = "16667";/* us */
                    embedded_metadata_height = "1";
                };
                mode1 { // IMX274_MODE_1920X1080
                    mclk_khz = "24000";
                    num_lanes = "2";
                    tegra_sinterface = "serial_c";
                    phy_mode = "DPHY";
                    discontinuous_clk = "yes";
                    dpcm_enable = "false";
                    cil_settletime = "0";

                    active_w = "1920";
                    active_h = "1080";
                    mode_type = "bayer";
                    pixel_phase = "rggb";
                    csi_pixel_bit_depth = "10";
                    readout_orientation = "90";
                    line_length = "2080";
                    inherent_gain = "1";
                    mclk_multiplier = "24";
                    pix_clk_hz = "576000000";

                    gain_factor = "1000000";
                    min_gain_val = "1000000";
                    max_gain_val = "22000000";
                    step_gain_val = "1";
                    default_gain = "1000000";
                    min_hdr_ratio = "1";
                    max_hdr_ratio = "1";
                    framerate_factor = "1000000";
                    min_framerate = "1500000";
                    max_framerate = "60000000";
                    step_framerate = "1";
                    default_framerate= "60000000";
                    exposure_factor = "1000000";
                    min_exp_time = "8";
                    max_exp_time = "332402";
                    step_exp_time = "1";
                    default_exp_time = "16667";/* us */
                    embedded_metadata_height = "1";
                };
                mode2 { // IMX274_MODE_1280X720
                    mclk_khz = "24000";
                    num_lanes = "2";
                    tegra_sinterface = "serial_c";
                    phy_mode = "DPHY";
                    discontinuous_clk = "yes";
                    dpcm_enable = "false";
                    cil_settletime = "0";

                    active_w = "1280";
                    active_h = "720";
                    mode_type = "bayer";
                    pixel_phase = "rggb";
                    csi_pixel_bit_depth = "10";
                    readout_orientation = "90";
                    line_length = "2080";
                    inherent_gain = "1";
                    mclk_multiplier = "24";
                    pix_clk_hz = "576000000";

                    gain_factor = "1000000";
                    min_gain_val = "1000000";
                    max_gain_val = "22000000";
                    step_gain_val = "1";
                    default_gain = "1000000";
                    min_hdr_ratio = "1";
                    max_hdr_ratio = "1";
                    framerate_factor = "1000000";
                    min_framerate = "1500000";
                    max_framerate = "60000000";
                    step_framerate = "1";
                    default_framerate= "60000000";
                    exposure_factor = "1000000";
                    min_exp_time = "8";
                    max_exp_time = "332402";
                    step_exp_time = "1";
                    default_exp_time = "16667";/* us */
                    embedded_metadata_height = "1";
                };
                mode3 { //	IMX274_MODE_1280X540
                    mclk_khz = "24000";
                    num_lanes = "2";
                    tegra_sinterface = "serial_c";
                    phy_mode = "DPHY";
                    discontinuous_clk = "yes";
                    dpcm_enable = "false";
                    cil_settletime = "0";

                    active_w = "1280";
                    active_h = "540";
                    mode_type = "bayer";
                    pixel_phase = "rggb";
                    csi_pixel_bit_depth = "10";
                    readout_orientation = "90";
                    line_length = "2080";
                    inherent_gain = "1";
                    mclk_multiplier = "24";
                    pix_clk_hz = "576000000";

                    gain_factor = "1000000";
                    min_gain_val = "1000000";
                    max_gain_val = "22000000";
                    step_gain_val = "1";
                    default_gain = "1000000";
                    min_hdr_ratio = "1";
                    max_hdr_ratio = "1";
                    framerate_factor = "1000000";
                    min_framerate = "1500000";
                    max_framerate = "240000000";
                    step_framerate = "1";
                    default_framerate= "240000000";
                    exposure_factor = "1000000";
                    min_exp_time = "8";
                    max_exp_time = "332402";
                    step_exp_time = "1";
                    default_exp_time = "16667";/* us */
                    embedded_metadata_height = "1";
                };
                ports {
                    #address-cells = <1>;
                    #size-cells = <0>;
                    port@0 {
                        reg = <0>;
                        rbpcv2_imx274_out2: endpoint {
                            port-index = <2>;
                            bus-width = <2>;
                            remote-endpoint = <&rbpcv2_imx274_csi_in2>;
                            };
                        };
                    };
                };
            };
        i2c@3 {
            imx274_cam3: rbpcv2_imx274_d@1a {
                compatible = "nvidia,imx274";
                /* I2C device address */
                reg = <0x1a>;

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

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

                sensor_model = "imx274";

                /* Define any required hw resources needed by driver */
                /* ie. clocks, io pins, power sources */
                avdd-reg = "vana";
                iovdd-reg = "vif";
                dvdd-reg = "vdig";

                /* Defines number of frames to be dropped by driver internally after applying */
                /* sensor crop settings. Some sensors send corrupt frames after applying */
                /* crop co-ordinates */
                /*post_crop_frame_drop = "0";*/

                /* if true, delay gain setting by one frame to be in sync with exposure */
                delayed_gain = "true";

                has-eeprom;
                fuse_id_start_addr = <91>;

                mode0 { // IMX274_MODE_3840X2160
                    mclk_khz = "24000";
                    num_lanes = "2";
                    tegra_sinterface = "serial_d";
                    phy_mode = "DPHY";
                    discontinuous_clk = "yes";
                    dpcm_enable = "false";
                    cil_settletime = "0";

                    active_w = "3840";
                    active_h = "2160";
                    mode_type = "bayer";
                    pixel_phase = "rggb";
                    csi_pixel_bit_depth = "10";
                    readout_orientation = "90";
                    line_length = "4208";
                    inherent_gain = "1";
                    mclk_multiplier = "24";
                    pix_clk_hz = "576000000";

                    gain_factor = "1000000";
                    min_gain_val = "1000000";
                    max_gain_val = "22000000";
                    step_gain_val = "1";
                    default_gain = "1000000";
                    min_hdr_ratio = "1";
                    max_hdr_ratio = "1";
                    framerate_factor = "1000000";
                    min_framerate = "1500000";
                    max_framerate = "30000000";
                    step_framerate = "1";
                    default_framerate= "30000000";
                    exposure_factor = "1000000";
                    min_exp_time = "8";
                    max_exp_time = "332402";
                    step_exp_time = "1";
                    default_exp_time = "16667";/* us */
                    embedded_metadata_height = "1";
                };
                mode1 { // IMX274_MODE_1920X1080
                    mclk_khz = "24000";
                    num_lanes = "2";
                    tegra_sinterface = "serial_d";
                    phy_mode = "DPHY";
                    discontinuous_clk = "yes";
                    dpcm_enable = "false";
                    cil_settletime = "0";

                    active_w = "1920";
                    active_h = "1080";
                    mode_type = "bayer";
                    pixel_phase = "rggb";
                    csi_pixel_bit_depth = "10";
                    readout_orientation = "90";
                    line_length = "2080";
                    inherent_gain = "1";
                    mclk_multiplier = "24";
                    pix_clk_hz = "576000000";

                    gain_factor = "1000000";
                    min_gain_val = "1000000";
                    max_gain_val = "22000000";
                    step_gain_val = "1";
                    default_gain = "1000000";
                    min_hdr_ratio = "1";
                    max_hdr_ratio = "1";
                    framerate_factor = "1000000";
                    min_framerate = "1500000";
                    max_framerate = "60000000";
                    step_framerate = "1";
                    default_framerate= "60000000";
                    exposure_factor = "1000000";
                    min_exp_time = "8";
                    max_exp_time = "332402";
                    step_exp_time = "1";
                    default_exp_time = "16667";/* us */
                    embedded_metadata_height = "1";
                };
                mode2 { // IMX274_MODE_1280X720
                    mclk_khz = "24000";
                    num_lanes = "2";
                    tegra_sinterface = "serial_d";
                    phy_mode = "DPHY";
                    discontinuous_clk = "yes";
                    dpcm_enable = "false";
                    cil_settletime = "0";

                    active_w = "1280";
                    active_h = "720";
                    mode_type = "bayer";
                    pixel_phase = "rggb";
                    csi_pixel_bit_depth = "10";
                    readout_orientation = "90";
                    line_length = "2080";
                    inherent_gain = "1";
                    mclk_multiplier = "24";
                    pix_clk_hz = "576000000";

                    gain_factor = "1000000";
                    min_gain_val = "1000000";
                    max_gain_val = "22000000";
                    step_gain_val = "1";
                    default_gain = "1000000";
                    min_hdr_ratio = "1";
                    max_hdr_ratio = "1";
                    framerate_factor = "1000000";
                    min_framerate = "1500000";
                    max_framerate = "60000000";
                    step_framerate = "1";
                    default_framerate= "60000000";
                    exposure_factor = "1000000";
                    min_exp_time = "8";
                    max_exp_time = "332402";
                    step_exp_time = "1";
                    default_exp_time = "16667";/* us */
                    embedded_metadata_height = "1";
                };
                mode3 { //	IMX274_MODE_1280X540
                    mclk_khz = "24000";
                    num_lanes = "2";
                    tegra_sinterface = "serial_d";
                    phy_mode = "DPHY";
                    discontinuous_clk = "yes";
                    dpcm_enable = "false";
                    cil_settletime = "0";

                    active_w = "1280";
                    active_h = "540";
                    mode_type = "bayer";
                    pixel_phase = "rggb";
                    csi_pixel_bit_depth = "10";
                    readout_orientation = "90";
                    line_length = "2080";
                    inherent_gain = "1";
                    mclk_multiplier = "24";
                    pix_clk_hz = "576000000";

                    gain_factor = "1000000";
                    min_gain_val = "1000000";
                    max_gain_val = "22000000";
                    step_gain_val = "1";
                    default_gain = "1000000";
                    min_hdr_ratio = "1";
                    max_hdr_ratio = "1";
                    framerate_factor = "1000000";
                    min_framerate = "1500000";
                    max_framerate = "240000000";
                    step_framerate = "1";
                    default_framerate= "240000000";
                    exposure_factor = "1000000";
                    min_exp_time = "8";
                    max_exp_time = "332402";
                    step_exp_time = "1";
                    default_exp_time = "16667";/* us */
                    embedded_metadata_height = "1";
                };
                ports {
                    #address-cells = <1>;
                    #size-cells = <0>;
                    port@0 {
                        reg = <0>;
                        rbpcv2_imx274_out3: endpoint {
                            port-index = <3>;
                            bus-width = <2>;
                            remote-endpoint = <&rbpcv2_imx274_csi_in3>;
                            };
                        };
                    };
                };
            };
        };
    };
    lens_imx274@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";
        /**
        * 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 = <240000>;
        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 {

            cam_module2: module2 {
                badge = "porg_centerleft_RBPCV2";
                position = "centerleft";
                orientation = "1";
                cam_module2_drivernode0: drivernode0 {
                    pcl_id = "v4l2_sensor";
                    devname = "imx274 32-001a";
                    proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@70/i2c@2/rbpcv2_imx274_c@1a";
                };
                cam_module2_drivernode1: drivernode1 {
                    pcl_id = "v4l2_lens";
                    proc-device-tree = "/proc/device-tree/lens_imx274@RBPCV2/";
                };
            };
            cam_module3: module3 {
                badge = "porg_centerright_RBPCV2";
                position = "centerright";
                orientation = "1";
                cam_module3_drivernode0: drivernode0 {
                    pcl_id = "v4l2_sensor";
                    devname = "imx274 33-001a";
                    proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@70/i2c@3/rbpcv2_imx274_d@1a";
                };
                cam_module3_drivernode1: drivernode1 {
                    pcl_id = "v4l2_lens";
                    proc-device-tree = "/proc/device-tree/lens_imx274@RBPCV2/";
                };
            };
        };
    };
};

A litter confuse, in the tegra-camera-platform is two imx274, does it one imx274 and one imx477?

yes. 4 cameras in total. 2 cameras are imx274 , 2 cameras are imx477