Timeout on /dev/video3 capture

Hello,
I’m working with orin devkit with R35.4.1 and 4 cameras using the LI-XJAV-ADPT-4CAM:

  • 2 x IMX492 each with 4 lanes as /dev/video0 and 1
  • 2 x IMX415 each with 2 lanes as /dev/video2 and 3

first 3 cameras /dev/video0, 1 and 2 are working with both v4l2 and gstreamer.
last camera /dev/video3 times out waiting for frame:

[   43.474924] imx415 33-001a: imx415_power_on: power on
[   43.511509] bwmgr API not supported
[   48.607130] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 5000 ms
[   48.607546] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[   48.608849] (NULL device *): vi_capture_control_message: NULL VI channel received
[   48.609056] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=4, csi_port=5
[   48.609337] (NULL device *): vi_capture_control_message: NULL VI channel received
[   48.609543] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 4 vc- 0
[   48.610064] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[   48.670045] bwmgr API not supported
[   48.680896] imx415 33-001a: imx415_power_off: power off

I’ve seen this issue many times before and it was always a typo or error in the device tree, but can’t find it this time, and /dev/video2 is working just fine (same sensor).
Capturing the FW loc, I see no interrupt

root@sdj-orindk-01:/home/nvidia# v4l2-ctl --set-fmt-video=width=3864,height=2176,pixelformat=RG10 --set-ctrl sensor_mode=0,bypass_mode=0 --stream-mmap -d3
^C
root@sdj-orindk-01:/home/nvidia# cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 26/26   #P:8
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
     kworker/6:3-506     [006] ....  1027.516683: rtcpu_string: tstamp:32727537958 id:0x04010000 str:"VM0 deactivating."
        v4l2-ctl-2827    [002] ....  1029.394437: tegra_channel_open: vi-output, imx415 33-001a
        v4l2-ctl-2827    [002] ....  1029.412141: tegra_channel_set_power: imx415 33-001a : 0x1
        v4l2-ctl-2827    [002] ....  1029.412153: camera_common_s_power: status : 0x1
        v4l2-ctl-2827    [002] ....  1029.435754: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-2827    [002] ....  1029.435758: csi_s_power: enable : 0x1
        v4l2-ctl-2827    [002] ....  1029.436338: tegra_channel_capture_setup: vnc_id 0 W 3864 H 2176 fmt c4
        v4l2-ctl-2827    [002] ....  1029.443787: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-2827    [002] ....  1029.458134: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-2827    [002] ....  1029.458137: csi_s_stream: enable : 0x1
        v4l2-ctl-2827    [002] ....  1029.462052: tegra_channel_set_stream: imx415 33-001a : 0x1
     kworker/6:3-506     [006] ....  1029.476456: rtcpu_string: tstamp:32788471414 id:0x04010000 str:"VM0 activating."
     kworker/6:3-506     [006] ....  1029.476461: rtcpu_vinotify_event: tstamp:32789143841 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1049235800704 data:0x359e300010000000
     kworker/6:3-506     [006] ....  1029.476461: rtcpu_vinotify_event: tstamp:32789143979 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1049235807264 data:0x0000000031000001
     kworker/6:3-506     [006] ....  1029.476462: rtcpu_vinotify_event: tstamp:32789144136 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1049235853888 data:0x359e2d0010000000
     kworker/6:3-506     [006] ....  1029.476462: rtcpu_vinotify_event: tstamp:32789144269 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1049235860576 data:0x0000000031000002
        v4l2-ctl-2827    [002] ....  1031.912607: tegra_channel_close: vi-output, imx415 33-001a
 vi-output, imx4-2829    [000] ....  1034.744823: tegra_channel_capture_setup: vnc_id 0 W 3864 H 2176 fmt c4
        v4l2-ctl-2827    [002] ....  1034.754490: tegra_channel_set_stream: enable : 0x0
        v4l2-ctl-2827    [002] ....  1034.754532: tegra_channel_set_stream: imx415 33-001a : 0x0
        v4l2-ctl-2827    [002] ....  1034.807349: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x0
        v4l2-ctl-2827    [002] ....  1034.807353: csi_s_stream: enable : 0x0
        v4l2-ctl-2827    [000] ....  1034.824535: tegra_channel_set_power: imx415 33-001a : 0x0
        v4l2-ctl-2827    [000] ....  1034.824543: camera_common_s_power: status : 0x0
        v4l2-ctl-2827    [000] ....  1034.824615: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x0
        v4l2-ctl-2827    [000] ....  1034.824618: csi_s_power: enable : 0x0

the same log on the working IMX415 (/dev/video2) gives that PHY_INTR0 interrupt:

kworker/6:3-506     [006] ....   962.205044: rtcpu_vinotify_event: tstamp:30686413453 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:981949271552 data:0x359d580010000000
kworker/6:3-506     [006] ....   962.205045: rtcpu_vinotify_event: tstamp:30686413606 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:981949278112 data:0x0000000031000001
kworker/6:3-506     [006] ....   962.205045: rtcpu_vinotify_event: tstamp:30686413779 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:981949324352 data:0x359d550010000000
kworker/6:3-506     [006] ....   962.205045: rtcpu_vinotify_event: tstamp:30686413910 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:981949331040 data:0x0000000031000002
kworker/6:3-506     [006] ....   962.261195: rtcpu_nvcsi_intr: tstamp:30688012512 class:GLOBAL type:PHY_INTR0 phy:2 cil:0 st:0 vc:0 status:0x01c00000
...

for /dev/video3, I’ve tried using:

  • “port-index = <5>;”
  • tegra_sinterface = “serial_f”; or “serial_g”
    and still have a timeout.

This is the device tree I am using:
tegra234-camera-imx492-dual.dtsi.txt (13.0 KB)
tegra234-p3737-0000-camera-imx492-dual.dtsi.txt (4.1 KB)

here’s the decompiled DTB from target:
dts.txt (463.4 KB)

Any hint as to where to look will be greatly appreciated.

Thanks,
Alain

hello alain.gautherot,

please refer to Port Index section.
you cannot have 2x 2-lane camera for using this CSI brick as there’s only single VI block (i.e. VI/steam-4).

Thanks Jerry,
so it was not a typo, just me not understanding a HW limitation.
I have changed the device tree:

	tegra-capture-vi {
		num-channels = <4>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			...
			port@2 {
				reg = <2>;
				vcmipi_vi_in2: endpoint {
					vc-id = <0>;
					port-index = <4>;
					bus-width = <2>;
					remote-endpoint = <&vcmipi_csi_out2>;
				};
			};
			port@3 {
				reg = <3>;
				liimx415_vi_in3: endpoint {
					vc-id = <0>;
					port-index = <5>;       ## FIX HERE: direct to stream 5
					bus-width = <2>;
					remote-endpoint = <&liimx415_csi_out3>;
				};
			};
		};


	host1x@13e00000 {
		nvcsi@15a00000 {
			num-channels = <4>;
			#address-cells = <1>;
			#size-cells = <0>;
			...
			channel@2 {
				reg = <2>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						vcmipi_csi_in2: endpoint@4 {
							port-index = <4>;
							bus-width = <2>;
							remote-endpoint = <&vcmipi_out2>;
						};
					};
					port@1 {
						reg = <1>;
						vcmipi_csi_out2: endpoint@5 {
							remote-endpoint = <&vcmipi_vi_in2>;
						};
					};
				};
			};
			channel@3 {
				reg = <3>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						liimx415_csi_in3: endpoint@6 {
							port-index = <6>;     ## FIX HERE: from VI port 6
							bus-width = <2>;
							remote-endpoint = <&liimx415_out3>;
						};
					};
					port@1 {
						reg = <1>;
						liimx415_csi_out3: endpoint@7 {
							remote-endpoint = <&liimx415_vi_in3>;
						};
					};
				};
			};
		};
	};


	i2c@3180000 {
		tca9546@70 {
			...
			i2c@2 {
				vcmipi_e@1a {
					...
					ports {
						#address-cells = <1>;
						#size-cells = <0>;
						port@0 {
							reg = <0>;
							vcmipi_out2: endpoint {
								vc-id = <0>;
								port-index = <4>;
								bus-width = <2>;
								remote-endpoint = <&vcmipi_csi_in2>;
							};
						};
					};
				};
			};
			i2c@3 {
				imx415_g@1a {
					...
					ports {
						#address-cells = <1>;
						#size-cells = <0>;
						port@0 {
							reg = <0>;
							liimx415_out3: endpoint {
								vc-id = <0>;
								port-index = <6>;     ## FIX HERE: from VI port 6
								bus-width = <2>;
								remote-endpoint = <&liimx415_csi_in3>;
							};
						};
					};
				};
			};
		};
	};

with this, I get the 4th camera working when using v4l2-ctl.

Follow-up issue is with gstreamer. it works fine with /dev/video2:

nvgstcapture-1.0 --sensor-id=2

but not with

$ nvgstcapture-1.0 --sensor-id=3

I get:

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

I’ve checked media-ctl output:

nvidia@sdj-rogue-03:~$ media-ctl -p
Media controller API version 5.10.120

Media device information
------------------------
driver          tegra-camrtc-ca
model           NVIDIA Tegra Video Input Device
serial          
bus info        
hw revision     0x3
driver version  5.10.120

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

- entity 4: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
	pad0: Sink
		<- "imx492 31-001a":0 [ENABLED]
	pad1: Source
		-> "vi-output, imx492 31-001a":0 [ENABLED]

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

- entity 10: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev3
	pad0: Sink
		<- "imx415 33-001a":0 [ENABLED]
	pad1: Source
		-> "vi-output, imx415 33-001a":0 [ENABLED]

- entity 13: imx492 30-001a (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev4
	pad0: Source
		[fmt:SRGGB12_1X12/8432x5648 field:none colorspace:srgb]
		-> "13e40000.host1x:nvcsi@15a00000-":0 [ENABLED]

- entity 15: vi-output, imx492 30-001a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video0
	pad0: Sink
		<- "13e40000.host1x:nvcsi@15a00000-":1 [ENABLED]

- entity 33: imx492 31-001a (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev5
	pad0: Source
		[fmt:SRGGB12_1X12/8432x5648 field:none colorspace:srgb]
		-> "13e40000.host1x:nvcsi@15a00000-":0 [ENABLED]

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

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

- entity 47: vi-output, vc_mipi 32-001a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video2
	pad0: Sink
		<- "13e40000.host1x:nvcsi@15a00000-":1 [ENABLED]

- entity 57: imx415 33-001a (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev7
	pad0: Source
		[fmt:SRGGB10_1X10/3864x2176 field:none colorspace:srgb]
		-> "13e40000.host1x:nvcsi@15a00000-":0 [ENABLED]

- entity 59: vi-output, imx415 33-001a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video3
	pad0: Sink
		<- "13e40000.host1x:nvcsi@15a00000-":1 [ENABLED]

I also checked tegra-camera-platform (badge, position, devname and proc-device-tree values) and don’t see anything wrong:

/ {
	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 = <12>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		max_pixel_rate = <750000>;
		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 vender.
		 */
		modules {
			module0 {
				badge = "imx492_bottomleft";
				position = "bottomleft";
				orientation = "0";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "imx492 30-001a";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9546@70/i2c@0/imx492_a@1a";
				};
				drivernode1 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/lens_imx492@RBPCV2/";
				};
			};
			module1 {
				badge = "imx492_bottomright";
				position = "bottomright";
				orientation = "0";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "imx492 31-001a";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9546@70/i2c@1/imx492_c@1a";
				};
				drivernode1 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/lens_imx492@RBPCV2/";
				};
			};
			module2 {
				badge = "vcmipi_centerleft";
				position = "centerleft";
				orientation = "0";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "vcmipi 32-001a";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9546@70/i2c@2/vcmipi_e@1a";
				};
				drivernode1 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/lens_imx492@RBPCV2/";
				};
			};
			module3 {
				badge = "imx415_centerright";
				position = "centerright";
				orientation = "0";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "imx415 33-001a";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9546@70/i2c@3/imx415_g@1a";
				};
				drivernode1 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/lens_imx492@RBPCV2/";
				};
			};
		};
	};
};

for reference, here are the DT files:
tegra234-camera-imx492-dual.dtsi.txt (13.2 KB)
tegra234-p3737-0000-camera-imx492-dual.dtsi.txt (4.1 KB)

Where could the issue be?

hello alain.gautherot,

please also check with gst pipeline,
for instance,
$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=I420' ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v

yes, I tried that too.
on the /dev/video2, it works fine:

nvidia@sdj-rogue-06:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=2 sensor-mode=0 ! 'video/x-raw(memory:NVMM), framerate=10/1' ! nvvidconv flip-method=0 ! 'video/x-raw, format=(string)I420' ! xvimagesink -e
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3864 x 2176 FR = 44.000001 fps Duration = 22727272 ; Analog Gain range min 1.000000, max 6.309574; Exposure Range min 4000, max 22648000;

GST_ARGUS: Running with following settings:
   Camera index = 2 
   Camera mode  = 0 
   Output Stream W = 3864 H = 2176 
   seconds to Run    = 0 
   Frame Rate = 44.000001 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Pipeline construction is invalid, please add queues.
Additional debug info:
gstbasesink.c(1209): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Not enough buffering available for  the processing deadline of 0:00:00.015000000, add enough queues to buffer  0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was closed
Additional debug info:
xvimagesink.c(554): gst_xv_image_sink_handle_xevents (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0:
streaming stopped, reason error (-5)
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:04.798944698
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...

on /dev/video3, it doesn’t:

nvidia@sdj-rogue-06:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=3 ! 'video/x-raw(memory:NVMM), width=(int)3864,height=(int)2176, framerate=44/1' ! nvvidconv flip-method=0 ! 'video/x-raw, format=(string)I420' ! xvimagesink -e
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:754 Invalid camera device specified 3 specified, 2 max index
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Pipeline construction is invalid, please add queues.
Additional debug info:
gstbasesink.c(1209): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Not enough buffering available for  the processing deadline of 0:00:00.015000000, add enough queues to buffer  0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
Got EOS from element "pipeline0".
Execution ended after 0:00:00.002741108
Setting pipeline to NULL ...
Freeing pipeline ...

But output of “meda-ctl -p” looks fine, and I didn’t find any typo anywhere.
Is there a way to enable more debug with gstreamer?

hello alain.gautherot,

about failure reported due to only 3 camera device has registered to system, (which is incorrect.)

so,
may I know what’s your hardware connections, please keep all those camera connected before system booting.
could you please double check $ ls /dev/video* to confirm all the 4 camera nodes has registered correctly.

yes, all devices are listed:

nvidia@sdj-rogue-03:~$ ls /dev/video*
/dev/video0  /dev/video1  /dev/video2  /dev/video3

and I can stream using V4L2 or dump all on /dev/video2:

nvidia@sdj-rogue-03:~$ v4l2-ctl --set-fmt-video=width=3840,height=2160,pixelformat=RG10 --set-ctrl sensor_mode=0,bypass_mode=0 --stream-mmap -d2
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 29.09 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 29.57 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 29.73 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.06 fps
<<<<<<^C

nvidia@sdj-rogue-03:~$ v4l2-ctl -d 2 --all
Driver Info:
	Driver name      : tegra-video
	Card type        : vi-output, vc_mipi 32-001a
	Bus info         : platform:tegra-capture-vi:4
	Driver version   : 5.10.120
	Capabilities     : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : tegra-camrtc-ca
	Model            : NVIDIA Tegra Video Input Device
	Serial           : 
	Bus info         : 
	Media version    : 5.10.120
	Hardware revision: 0x00000003 (3)
	Driver version   : 5.10.120
Interface Info:
	ID               : 0x03000031
	Type             : V4L Video
Entity Info:
	ID               : 0x0000002f (47)
	Name             : vi-output, vc_mipi 32-001a
	Function         : V4L2 I/O
	Pad 0x01000030   : 0: Sink
	  Link 0x02000035: from remote pad 0x1000009 of entity '13e40000.host1x:nvcsi@15a00000-': Data, Enabled
Priority: 2
Video input : 0 (Camera 4: no power)
Format Video Capture:
	Width/Height      : 3840/2160
	Pixel Format      : 'RG10' (10-bit Bayer RGRG/GBGB)
	Field             : None
	Bytes per Line    : 7680
	Size Image        : 16588800
	Colorspace        : sRGB
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 
Selection Video Capture: crop, Left 0, Top 0, Width 3840, Height 2160, Flags: 
Selection Video Output: crop, Left 0, Top 0, Width 3840, Height 2160, Flags: 

Camera Controls

                     group_hold 0x009a2003 (bool)   : default=0 value=0 flags=execute-on-write
                    sensor_mode 0x009a2008 (int64)  : min=0 max=1 step=1 default=0 value=0 flags=slider
                           gain 0x009a2009 (int64)  : min=0 max=48000 step=100 default=0 value=0 flags=slider
                       exposure 0x009a200a (int64)  : min=1 max=14714540 step=1 default=10000 value=5000 flags=slider
                     frame_rate 0x009a200b (int64)  : min=500 max=31671 step=1 default=30000 value=30000 flags=slider
                   trigger_mode 0x009a200f (int)    : min=0 max=7 step=1 default=0 value=0
                        io_mode 0x009a2010 (int)    : min=0 max=5 step=1 default=0 value=0
                    black_level 0x009a2011 (int)    : min=0 max=100 step=1 default=0 value=50 flags=slider
                 single_trigger 0x009a2013 (button) : flags=write-only, execute-on-write
           sensor_configuration 0x009a2032 (u32)    : min=0 max=4294967295 step=1 default=0 [22] flags=read-only, volatile, has-payload
         sensor_mode_i2c_packet 0x009a2033 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
      sensor_control_i2c_packet 0x009a2034 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
                    bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
				0: 0 (0x0)
				1: 1 (0x1)
                override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=1
				0: 0 (0x0)
				1: 1 (0x1)
                   height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                     size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
				0: 1 (0x1)
				1: 65536 (0x10000)
				2: 131072 (0x20000)
               write_isp_format 0x009a2068 (int)    : min=1 max=1 step=1 default=1 value=1
       sensor_signal_properties 0x009a2069 (u32)    : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
        sensor_image_properties 0x009a206a (u32)    : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
      sensor_control_properties 0x009a206b (u32)    : min=0 max=4294967295 step=1 default=0 [30][36] flags=read-only, has-payload
              sensor_dv_timings 0x009a206c (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
               low_latency_mode 0x009a206d (bool)   : default=0 value=0
               preferred_stride 0x009a206e (int)    : min=0 max=65535 step=1 default=0 value=0
                   sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=1 flags=read-only

and on /dev/video3 as well:

nvidia@sdj-rogue-03:~$ v4l2-ctl --set-fmt-video=width=3864,height=2176,pixelformat=RG10 --set-ctrl sensor_mode=0,bypass_mode=0,frame_rate=44000000 --stream-mmap -d3
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 42.63 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 44.02 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 44.02 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<^C

nvidia@sdj-rogue-03:~$ v4l2-ctl -d 3 --all
Driver Info:
	Driver name      : tegra-video
	Card type        : vi-output, imx415 33-001a
	Bus info         : platform:tegra-capture-vi:5
	Driver version   : 5.10.120
	Capabilities     : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : tegra-camrtc-ca
	Model            : NVIDIA Tegra Video Input Device
	Serial           : 
	Bus info         : 
	Media version    : 5.10.120
	Hardware revision: 0x00000003 (3)
	Driver version   : 5.10.120
Interface Info:
	ID               : 0x0300003d
	Type             : V4L Video
Entity Info:
	ID               : 0x0000003b (59)
	Name             : vi-output, imx415 33-001a
	Function         : V4L2 I/O
	Pad 0x0100003c   : 0: Sink
	  Link 0x02000041: from remote pad 0x100000c of entity '13e40000.host1x:nvcsi@15a00000-': Data, Enabled
Priority: 2
Video input : 0 (Camera 5: ok)
Format Video Capture:
	Width/Height      : 3864/2176
	Pixel Format      : 'RG10' (10-bit Bayer RGRG/GBGB)
	Field             : None
	Bytes per Line    : 7728
	Size Image        : 16816128
	Colorspace        : sRGB
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 
Selection Video Capture: crop, Left 0, Top 0, Width 3864, Height 2176, Flags: 
Selection Video Output: crop, Left 0, Top 0, Width 3864, Height 2176, Flags: 

Camera Controls

                     group_hold 0x009a2003 (bool)   : default=0 value=0 flags=execute-on-write
                    sensor_mode 0x009a2008 (int64)  : min=0 max=1 step=1 default=0 value=0 flags=slider
                           gain 0x009a2009 (int64)  : min=0 max=16000000 step=1 default=0 value=0 flags=slider
                       exposure 0x009a200a (int64)  : min=4 max=22648 step=1 default=3000 value=422 flags=slider
                     frame_rate 0x009a200b (int64)  : min=1000000 max=44000000 step=1 default=44000000 value=44000000 flags=slider
                    black_level 0x009a2011 (int)    : min=0 max=1023 step=1 default=16 value=0 flags=slider
                   test_pattern 0x009a2012 (int)    : min=0 max=15 step=1 default=0 value=15 flags=slider
           sensor_configuration 0x009a2032 (u32)    : min=0 max=4294967295 step=1 default=0 [22] flags=read-only, volatile, has-payload
         sensor_mode_i2c_packet 0x009a2033 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
      sensor_control_i2c_packet 0x009a2034 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
                    bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
				0: 0 (0x0)
				1: 1 (0x1)
                override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=1
				0: 0 (0x0)
				1: 1 (0x1)
                   height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                     size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
				0: 1 (0x1)
				1: 65536 (0x10000)
				2: 131072 (0x20000)
               write_isp_format 0x009a2068 (int)    : min=1 max=1 step=1 default=1 value=1
       sensor_signal_properties 0x009a2069 (u32)    : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
        sensor_image_properties 0x009a206a (u32)    : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
      sensor_control_properties 0x009a206b (u32)    : min=0 max=4294967295 step=1 default=0 [30][36] flags=read-only, has-payload
              sensor_dv_timings 0x009a206c (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
               low_latency_mode 0x009a206d (bool)   : default=0 value=0
               preferred_stride 0x009a206e (int)    : min=0 max=65535 step=1 default=0 value=0
                   sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=1 flags=read-only

hello alain.gautherot,

could you please also share the latest device tree settings for reference, especially the settings within tegra-camera-platform{}

my bad.
Looks like my typo was in:

i2c@3180000 {
tca9546@70 {
i2c@0 {…}
i2c@1 {…}
i2c@2 {
imx415_e@1a { ## <== corrected, was “liimx415_e”
…
}
}