Jetson Nano Detects IMX219 Camera on a Custom Board, but No Video Output

Hello,

I am using a Jetson Nano on my custom-designed board and have connected an IMX219 camera module. The camera appears to be detected (ls /dev/video* and dmesg | grep imx219 show it), but I am unable to get any video output using GStreamer or v4l2-ctl.

Steps I have tried so far:

  • Checked the camera connection and ribbon cable.
  • Looked for error messages in dmesg output.
  • Verified that the camera is listed with v4l2-ctl --list-devices.
  • Tested the same camera on a different Jetson Nano, and it worked fine.

However, I still can’t get any video. Could this be a device tree (DTB) configuration issue? Do I need to modify the reset-gpios settings?

I am using a TCA9548 MUX for CSI, so I modified the device tree (DTS) by replacing PCA9544 references with PCA9548.

However, I am unsure if there are other changes I need to make in the DTS file, such as:

  • Where can I check serial_a, serial_e definitions?
  • What do the values in reset-gpios = <0x5b 0x97 0x0>; mean?
  • Is my reset-gpios setting correct, or how should I determine it?

I am not entirely sure about these details. Any suggestions or resources would be greatly appreciated.

I will also attach the relevant device tree files and circuit schematics below.

Thanks!


ls /dev/video*

/dev/video0  /dev/video1

v4l2-ctl --list-devices

vi-output, imx219 7-0010 (platform:54080000.vi:0):
	/dev/video0

vi-output, imx219 8-0010 (platform:54080000.vi:4):
	/dev/video1

dmesg | grep imx219

[    4.113802] imx219 7-0010: tegracam sensor driver:imx219_v2.0.6
[    4.146206] imx219 8-0010: tegracam sensor driver:imx219_v2.0.6
[    5.082121] vi 54080000.vi: subdev imx219 7-0010 bound
[    5.092712] vi 54080000.vi: subdev imx219 8-0010 bound


gst-launch-1.0 nvarguscamerasrc sensor_id=1 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv ! omxh264enc iframeinterval=15 control-rate=constant profile=baseline ! video/x-h264, stream-format=byte-stream ! rtph264pay ! udpsink host=192.168.xx.yyy port=3000

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
H264: Profile = 66, Level = 40
gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv ! omxh264enc iframeinterval=15 control-rate=constant profile=baseline ! video/x-h264, stream-format=byte-stream ! rtph264pay ! udpsink host=192.168.xx.yyy port=3000

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
H264: Profile = 66, Level = 40 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29.999999 
GST_ARGUS: PowerService: requested_clock_Hz=13608000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.

udevadm info --query=all --name=/dev/video0

P: /devices/50000000.host1x/54080000.vi/video4linux/video0
N: video0
L: 0
S: v4l/by-path/platform-54080000.vi-video-index0
E: DEVPATH=/devices/50000000.host1x/54080000.vi/video4linux/video0
E: DEVNAME=/dev/video0
E: MAJOR=81
E: MINOR=0
E: SUBSYSTEM=video4linux
E: USEC_INITIALIZED=6480192
E: ID_V4L_VERSION=2
E: ID_V4L_PRODUCT=vi-output, imx219 8-0010
E: ID_V4L_CAPABILITIES=:capture:
E: ID_PATH=platform-54080000.vi
E: ID_PATH_TAG=platform-54080000_vi
E: ID_FOR_SEAT=video4linux-platform-54080000_vi
E: DEVLINKS=/dev/v4l/by-path/platform-54080000.vi-video-index0
E: TAGS=:seat:uaccess:


udevadm info --query=all --name=/dev/video1

P: /devices/50000000.host1x/54080000.vi/video4linux/video1
N: video1
L: 0
S: v4l/by-path/platform-54080000.vi-video-index3
E: DEVPATH=/devices/50000000.host1x/54080000.vi/video4linux/video1
E: DEVNAME=/dev/video1
E: MAJOR=81
E: MINOR=3
E: SUBSYSTEM=video4linux
E: USEC_INITIALIZED=6257192
E: ID_V4L_VERSION=2
E: ID_V4L_PRODUCT=vi-output, imx219 7-0010
E: ID_V4L_CAPABILITIES=:capture:
E: ID_PATH=platform-54080000.vi
E: ID_PATH_TAG=platform-54080000_vi
E: ID_FOR_SEAT=video4linux-platform-54080000_vi
E: DEVLINKS=/dev/v4l/by-path/platform-54080000.vi-video-index3
E: TAGS=:seat:uaccess:

v4l2-ctl --stream-mmap --stream-count=100 --set-ctrl bypass_mode=0 -d /dev/video0

<<<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<


v4l2-ctl --stream-mmap --stream-count=100 --set-ctrl bypass_mode=0 -d /dev/video1

nothing

i2cdetect -l

i2c-3	i2c       	7000c700.i2c                    	I2C adapter
i2c-13	i2c       	i2c-6-mux (chan_id 6)           	I2C adapter
i2c-1	i2c       	7000c400.i2c                    	I2C adapter
i2c-11	i2c       	i2c-6-mux (chan_id 4)           	I2C adapter
i2c-8	i2c       	i2c-6-mux (chan_id 1)           	I2C adapter
i2c-6	i2c       	Tegra I2C adapter               	I2C adapter
i2c-4	i2c       	7000d000.i2c                    	I2C adapter
i2c-14	i2c       	i2c-6-mux (chan_id 7)           	I2C adapter
i2c-2	i2c       	7000c500.i2c                    	I2C adapter
i2c-12	i2c       	i2c-6-mux (chan_id 5)           	I2C adapter
i2c-0	i2c       	7000c000.i2c                    	I2C adapter
i2c-9	i2c       	i2c-6-mux (chan_id 2)           	I2C adapter
i2c-10	i2c       	i2c-6-mux (chan_id 3)           	I2C adapter
i2c-7	i2c       	i2c-6-mux (chan_id 0)           	I2C adapter
i2c-5	i2c       	7000d100.i2c                    	I2C adapter


i2cdetect -y -r 7

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 
70: UU -- -- -- -- -- -- --

i2cdetect -y -r 8

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 
70: UU -- -- -- -- -- -- --

v4l2-compliance -d /dev/video0  
v4l2-compliance SHA: not available, 64 bits

Compliance test for device /dev/video0:

Driver Info:
	Driver name      : tegra-video
	Card type        : vi-output, imx219 31-0010
	Bus info         : platform:54080000.vi:0
	Driver version   : 4.9.140
	Capabilities     : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : vi
	Model            : NVIDIA Tegra Video Input Device
	Serial           : 
	Bus info         : 
	Media version    : 0.1.0
	Hardware revision: 0x00000003 (3)
	Driver version   : 0.0.0
Interface Info:
	ID               : 0x03000008
	Type             : V4L Video
Entity Info:
	ID               : 0x00000006 (6)
	Name             : vi-output, imx219 31-0010
	Function         : V4L2 I/O
	Pad 0x01000007   : Sink
	  Link 0x0200000c: from remote pad 0x1000003 of entity 'nvcsi--2': Data, Enabled

Required ioctls:
	test MC information (see 'Media Driver Info' above): OK
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second /dev/video0 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 1 Private Controls: 16

Format ioctls (Input 0):
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
		fail: ../../../v4l-utils-1.16.5/utils/v4l2-compliance/v4l2-test-formats.cpp(1190): ret && node->has_frmintervals
	test VIDIOC_G/S_PARM: FAIL
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
		fail: ../../../v4l-utils-1.16.5/utils/v4l2-compliance/v4l2-test-formats.cpp(1681): node->can_scale && node->frmsizes_count[v4l_format_g_pixelformat(&cur)]
	test Scaling: OK

Codec ioctls (Input 0):
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
		fail: ../../../v4l-utils-1.16.5/utils/v4l2-compliance/v4l2-test-buffers.cpp(522): q.create_bufs(node, 1, &fmt) != EINVAL
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
	test VIDIOC_EXPBUF: OK

Total: 44, Succeeded: 42, Failed: 2, Warnings: 0


dts file: dts_file.txt (310.2 KB)

board circuit:

SCH_PX4-JN_SCHEMATIC_2025-04-09.pdf (337.7 KB)

Looks like video0 is working.
Check the programing guide for the port-index/serial_* …

v4l2-ctl --stream-mmap --stream-count=100 --set-ctrl bypass_mode=0 -d /dev/video0

<<<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<

@ShaneCCC Video0 seems to be working, but when I try to get an image, I get no output. Similarly, when I try video1, there is no output either. What steps should I take to resolve this issue?

In the schematic, CAM0 is connected to CAM1_PWDN, and CAM1 is connected to CAM0_PWDN. Could this connection cause an issue? Also, I have a question about the GPIO addresses in the following DTS file:

i2c@0 {
	#address-cells = <0x1>;
	#size-cells = <0x0>;
	status = "okay";
	reg = <0x0>;
	i2c-mux,deselect-on-exit;

	rbpcv2_imx219_a@10 {
		compatible = "nvidia,imx219";
		reg = <0x10>;
		status = "okay";
		devnode = "video0";
		physical_w = "3.680";
		physical_h = "2.760";
		sensor_model = "imx219";
		use_sensor_mode_id = "true";
		reset-gpios = <0x5b 0x98 0x0>;
	};

.
.
.
                               endpoint {
									port-index = <0x4>;
									bus-width = <0x2>;
									remote-endpoint = <0x79>;
									linux,phandle = <0x7c>;
									phandle = <0x7c>;
								};
}

i2c@1 {
	#address-cells = <0x1>;
	#size-cells = <0x0>;
	status = "okay";
	reg = <0x1>;
	i2c-mux,deselect-on-exit;

	rbpcv2_imx219_e@10 {
		compatible = "nvidia,imx219";
		reg = <0x10>;
		status = "okay";
		devnode = "video1";
		physical_w = "3.680";
		physical_h = "2.760";
		sensor_model = "imx219";
		use_sensor_mode_id = "true";
		reset-gpios = <0x5b 0x97 0x0>;
	};
                                          endpoint {
									port-index = <0x0>;
									bus-width = <0x2>;
									remote-endpoint = <0x78>;
									linux,phandle = <0x7a>;
									phandle = <0x7a>;
								};

}

From different sources, I found that usually 0x97 and 0x98 should be swapped, but when I did that, the cameras started being detected. What exactly do 0x97 and 0x98 correspond to, and how should I interpret them when making such changes?

I feel like I need to adjust the addresses in the endpoint and reset-gpios sections.

Thank you in advance for your response.

Here’s the define.

#define CAM1_PWDN		TEGRA_GPIO(S, 7)
21 #define CAM2_PWDN		TEGRA_GPIO(T, 0)
22 #define CAM_I2C_MUX TEGRA_GPIO(I, 0) // NFC_EN GPIO
23 
24 / {
25 	cam_i2cmux {
26 		compatible = "i2c-mux-gpio";
27 		#address-cells = <1>;
28 		#size-cells = <0>;
29 		mux-gpios = <&gpio CAM_I2C_MUX GPIO_ACTIVE_HIGH>;
30 		i2c-parent = <&i2c7>;
31 		i2c@0 {
32 			reg = <0>;
33 			#address-cells = <1>;
34 			#size-cells = <0>;
35 			rbpcv2_imx219_a@10 {
36 				reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
37 			};
38 		};
39 		i2c@1 {
40 			reg = <1>;
41 			#address-cells = <1>;
42 			#size-cells = <0>;
43 			rbpcv2_imx219_e@10 {
44 				reset-gpios = <&gpio CAM2_PWDN GPIO_ACTIVE_HIGH>;
45 			};
46 		};
47 	};
1 Like

I have started to understand the DTS file a bit, and I appreciate your help, @ShaneCCC . Now, I am facing the following issue: As seen in the circuit above, I am using the CAM1_PWDN outputs and the CSI3 interface. When I check the pin_mux diagram, I see that it corresponds to CSI_F. Based on this, I believe that the port-index values in the endpoint sections of the code need to be adjusted. By default, 0x4 and 0x0 are used. Since video0 uses 0x0, communication can be established, but video1 is not receiving any data. I suspect that the issue is due to the 0x4 value in this section. How should I modify this part?

dts file:

               channel@0 {
				status = "okay";
				reg = <0x0>;
				linux,phandle = <0xfa>;
				phandle = <0xfa>;

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

					port@0 {
						status = "okay";
						reg = <0x0>;
						linux,phandle = <0xfb>;
						phandle = <0xfb>;

						endpoint@0 {
							status = "okay";
							port-index = <0x0>;
							bus-width = <0x2>;
							remote-endpoint = <0x7a>;
							linux,phandle = <0x78>;
							phandle = <0x78>;
						};
					};
				};
			};

			channel@1 {
				reg = <0x1>;
				linux,phandle = <0xfd>;
				phandle = <0xfd>;

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

					port@2 {
						status = "okay";
						reg = <0x0>;
						linux,phandle = <0xfe>;
						phandle = <0xfe>;

						endpoint@2 {
							status = "okay";
							port-index = <0x14>;
							bus-width = <0x2>;
							remote-endpoint = <0x7c>;
							linux,phandle = <0x79>;
							phandle = <0x79>;
						};
					};

				};
			};
i2c@0 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					status = "okay";
					reg = <0x0>;
					i2c-mux,deselect-on-exit;

					rbpcv2_imx219_a@10 {
						compatible = "nvidia,imx219";
						reg = <0x10>;
						status = "okay";
						devnode = "video0";
						physical_w = "3.680";
						physical_h = "2.760";
						sensor_model = "imx219";
						use_sensor_mode_id = "true";
						// clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_3>;
						// clock-names = "clk_out_3";
						reset-gpios = <0x5b 0x98 0x0>;
						// pwdn-gpios = <0x5b 0x98 0x0>;


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

							port@0 {
								reg = <0x0>;

								endpoint {
									port-index = <0x4>;
									bus-width = <0x2>;
									remote-endpoint = <0x79>;
									linux,phandle = <0x7c>;
									phandle = <0x7c>;
								};
							};
						};
					};
				};
              i2c@1 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					status = "okay";
					reg = <0x1>;
					i2c-mux,deselect-on-exit;

					rbpcv2_imx219_e@10 {
						compatible = "nvidia,imx219";
						reg = <0x10>;
						status = "okay";
						devnode = "video1";
						physical_w = "3.680";
						physical_h = "2.760";
						sensor_model = "imx219";
						use_sensor_mode_id = "true";
						reset-gpios = <0x5b 0x97 0x0>;
						pwdn-gpios = <0x5b 0x97 0x0>;
                                       ports {
							#address-cells = <0x1>;
							#size-cells = <0x0>;

							port@0 {
								reg = <0x0>;

								endpoint {
									port-index = <0x0>;
									bus-width = <0x2>;
									remote-endpoint = <0x78>;
									linux,phandle = <0x7a>;
									phandle = <0x7a>;
								};
							};
						};

dts file:
dts_file.txt (310.5 KB)

I don’t think so.
CSI0 should be CSI-A and port-index should be 0
CSI3 should be CSI-C and port-index should be 3

@ShaneCCC When I check the pin_mux structure, CSI3 corresponds to F. However, as you suggested, I set the port-index to 3, but nothing changed. How can I diagnose the problem more effectively?

4l2-compliance -d /dev/video0  
-sh: 4l2-compliance: command not found
root@jetson-nano:~# v4l2-compliance -d /dev/video0
v4l2-compliance SHA: not available, 64 bits

Compliance test for device /dev/video0:

Driver Info:
	Driver name      : tegra-video
	Card type        : vi-output, imx219 31-0010
	Bus info         : platform:54080000.vi:0
	Driver version   : 4.9.140
	Capabilities     : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : vi
	Model            : NVIDIA Tegra Video Input Device
	Serial           : 
	Bus info         : 
	Media version    : 0.1.0
	Hardware revision: 0x00000003 (3)
	Driver version   : 0.0.0
Interface Info:
	ID               : 0x03000008
	Type             : V4L Video
Entity Info:
	ID               : 0x00000006 (6)
	Name             : vi-output, imx219 31-0010
	Function         : V4L2 I/O
	Pad 0x01000007   : Sink
	  Link 0x0200000c: from remote pad 0x1000003 of entity 'nvcsi--2': Data, Enabled

Required ioctls:
	test MC information (see 'Media Driver Info' above): OK
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second /dev/video0 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 1 Private Controls: 16

Format ioctls (Input 0):
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
		fail: ../../../v4l-utils-1.16.5/utils/v4l2-compliance/v4l2-test-formats.cpp(1190): ret && node->has_frmintervals
	test VIDIOC_G/S_PARM: FAIL
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
		fail: ../../../v4l-utils-1.16.5/utils/v4l2-compliance/v4l2-test-formats.cpp(1681): node->can_scale && node->frmsizes_count[v4l_format_g_pixelformat(&cur)]
	test Scaling: OK

Codec ioctls (Input 0):
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
		fail: ../../../v4l-utils-1.16.5/utils/v4l2-compliance/v4l2-test-buffers.cpp(522): q.create_bufs(node, 1, &fmt) != EINVAL
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
	test VIDIOC_EXPBUF: OK

Total: 44, Succeeded: 42, Failed: 2, Warnings: 0
root@jetson-nano:~# v4l2-compliance -d /dev/video1
v4l2-compliance SHA: not available, 64 bits

Compliance test for device /dev/video1:

Driver Info:
	Driver name      : tegra-video
	Card type        : vi-output, imx219 30-0010
	Bus info         : platform:54080000.vi:4
	Driver version   : 4.9.140
	Capabilities     : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : vi
	Model            : NVIDIA Tegra Video Input Device
	Serial           : 
	Bus info         : 
	Media version    : 0.1.0
	Hardware revision: 0x00000003 (3)
	Driver version   : 0.0.0
Interface Info:
	ID               : 0x03000019
	Type             : V4L Video
Entity Info:
	ID               : 0x00000017 (23)
	Name             : vi-output, imx219 30-0010
	Function         : V4L2 I/O
	Pad 0x01000018   : Sink
	  Link 0x0200001d: from remote pad 0x1000014 of entity 'nvcsi--1': Data, Enabled

Required ioctls:
	test MC information (see 'Media Driver Info' above): OK
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second /dev/video1 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 1 Private Controls: 16

Format ioctls (Input 0):
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
		fail: ../../../v4l-utils-1.16.5/utils/v4l2-compliance/v4l2-test-formats.cpp(1190): ret && node->has_frmintervals
	test VIDIOC_G/S_PARM: FAIL
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
		fail: ../../../v4l-utils-1.16.5/utils/v4l2-compliance/v4l2-test-formats.cpp(1681): node->can_scale && node->frmsizes_count[v4l_format_g_pixelformat(&cur)]
	test Scaling: OK

Codec ioctls (Input 0):
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
		fail: ../../../v4l-utils-1.16.5/utils/v4l2-compliance/v4l2-test-buffers.cpp(522): q.create_bufs(node, 1, &fmt) != EINVAL
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
	test VIDIOC_EXPBUF: OK

Total: 44, Succeeded: 42, Failed: 2, Warnings: 0

The port-index map to CSI lanes.

port index: 0 1 2 3 4 5
CSI lane: A B C D E F

@ShaneCCC As you suggested, I set the port-index to 3, but there was no change in the result. When I run the command v4l2-ctl --stream-mmap --stream-count=100 --set-ctrl bypass_mode=0 -d /dev/video1, I don’t get any output.

Lines I changed:

vi {
			compatible = "nvidia,tegra210-vi", "simple-bus";
			power-domains = <0x5e>;
			reg = <0x0 0x54080000 0x0 0x40000>;
			interrupts = <0x0 0x45 0x4>;
			iommus = <0x30 0x12>;
			status = "okay";
			clocks = <0x26 0x210 0x26 0x34 0x26 0x90 0x26 0x91 0x26 0x92 0x26 0xd0 0x26 0x51 0x26 0xfa 0x26 0x133>;
			clock-names = "vi", "csi", "cilab", "cilcd", "cile", "vii2c", "i2cslow", "pll_d", "pll_d_dsi_out";
			resets = <0x26 0x14>;
			reset-names = "vi";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			avdd_dsi_csi-supply = <0x3b>;
			num-channels = <0x2>;
			linux,phandle = <0xef>;
			phandle = <0xef>;

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

				port@0 {
					status = "okay";
					reg = <0x0>;
					linux,phandle = <0xf0>;
					phandle = <0xf0>;

					endpoint {
						status = "okay";
						port-index = <0x0>;
						bus-width = <0x2>;
						remote-endpoint = <0x5f>;
						linux,phandle = <0x7b>;
						phandle = <0x7b>;
					};
				};

				port@1 {
					status = "okay";
					reg = <0x1>;
					linux,phandle = <0xf1>;
					phandle = <0xf1>;

					endpoint {
						status = "okay";
						port-index = <0x3>;
						bus-width = <0x2>;
						remote-endpoint = <0x60>;
						linux,phandle = <0x7d>;
						phandle = <0x7d>;
					};
				};
			};
		};
i2c@0 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					status = "okay";
					reg = <0x0>;
					i2c-mux,deselect-on-exit;

					rbpcv2_imx219_a@10 {
						compatible = "nvidia,imx219";
						reg = <0x10>;
						status = "okay";
						devnode = "video0";
						physical_w = "3.680";
						physical_h = "2.760";
						sensor_model = "imx219";
						use_sensor_mode_id = "true";
						reset-gpios = <0x5b 0x98 0x0>;
						pwdn-gpios = <0x5b 0x98 0x0>;

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

							port@2 {
								reg = <0x0>;

								endpoint {
									port-index = <0x03>;
									bus-width = <0x2>;
									remote-endpoint = <0x79>;
									linux,phandle = <0x7c>;
									phandle = <0x7c>;
								};
							};
						};
					};
nvcsi {
			num-channels = <0x2>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			linux,phandle = <0xf9>;
			phandle = <0xf9>;

			channel@0 {
				status = "okay";
				reg = <0x0>;
				linux,phandle = <0xfa>;
				phandle = <0xfa>;

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

					port@0 {
						status = "okay";
						reg = <0x0>;
						linux,phandle = <0xfb>;
						phandle = <0xfb>;

						endpoint@0 {
							status = "okay";
							port-index = <0x0>;
							bus-width = <0x2>;
							remote-endpoint = <0x7a>;
							linux,phandle = <0x78>;
							phandle = <0x78>;
						};
					};

					port@1 {
						status = "okay";
						reg = <0x1>;
						linux,phandle = <0xfc>;
						phandle = <0xfc>;

						endpoint@1 {
							remote-endpoint = <0x7b>;
							linux,phandle = <0x5f>;
							phandle = <0x5f>;
						};
					};
				};
			};

			channel@1 {
				reg = <0x1>;
				linux,phandle = <0xfd>;
				phandle = <0xfd>;

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

					port@2 {
						status = "okay";
						reg = <0x0>;
						linux,phandle = <0xfe>;
						phandle = <0xfe>;

						endpoint@2 {
							status = "okay";
							port-index = <0x03>;
							bus-width = <0x2>;
							remote-endpoint = <0x7c>;
							linux,phandle = <0x79>;
							phandle = <0x79>;
						};
					};

					port@3 {
						status = "okay";
						reg = <0x1>;
						linux,phandle = <0xff>;
						phandle = <0xff>;

						endpoint@3 {
							remote-endpoint = <0x7d>;
							linux,phandle = <0x60>;
							phandle = <0x60>;
						};
					};
				};
			};
		};

@ShaneCCC , thank you for your help. I solved one problem, and only one remains. The issue I resolved was achieving data communication over video0. The current problem is that the changes I made to capture images from video0 caused video1 to stop being detected. I will share the dt file below for this part. Here, I can see both cameras on the I2C interface—in fact, the kernel recognizes them as ‘uu’. However, for some reason, /dev/video1 is not being created. What could be the reason for this?

dt file:
jetson.txt (310.4 KB)

image

Please check the kernel message for the sensor probe.

sudo dmesg | grep -i imx219

Thanks

@ShaneCCC Here are the outputs

root@jetson-nano:~# sudo dmesg | grep -i imx219
[    0.227821] DTS File Name: tegra210-nano-cti-NGX004-RPI-IMX219-2CAM.dts
[    0.432193] DTS File Name: tegra210-nano-cti-NGX004-RPI-IMX219-2CAM.dts
[    4.145191] imx219 30-0010: tegracam sensor driver:imx219_v2.0.6
[    4.177642] imx219 31-0010: tegracam sensor driver:imx219_v2.0.6
[    4.953227] vi 54080000.vi: subdev imx219 31-0010 bound
[    4.953230] vi 54080000.vi: subdev imx219 30-0010 bound
root@jetson-nano:~# v4l2-ctl --list-devices
vi-output, imx219 31-0010 (platform:54080000.vi:0):
	/dev/video0

root@jetson-nano:~# udevadm info --query=all --name=/dev/video0
P: /devices/50000000.host1x/54080000.vi/video4linux/video0
N: video0
L: 0
S: v4l/by-path/platform-54080000.vi-video-index0
E: DEVPATH=/devices/50000000.host1x/54080000.vi/video4linux/video0
E: DEVNAME=/dev/video0
E: MAJOR=81
E: MINOR=0
E: SUBSYSTEM=video4linux
E: USEC_INITIALIZED=6833916
E: ID_V4L_VERSION=2
E: ID_V4L_PRODUCT=vi-output, imx219 31-0010
E: ID_V4L_CAPABILITIES=:capture:
E: ID_PATH=platform-54080000.vi
E: ID_PATH_TAG=platform-54080000_vi
E: ID_FOR_SEAT=video4linux-platform-54080000_vi
E: DEVLINKS=/dev/v4l/by-path/platform-54080000.vi-video-index0
E: TAGS=:uaccess:seat:

The reg should be 0 for i2c@0 and should be 1 for i2c@1?

				i2c@0 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					status = "okay";
					reg = <0x1>;
					i2c-mux,deselect-on-exit;

@ShaneCCC I’d like to explain the reason behind this by referring to the schematic. In the schematic, the I2C0 output of the MUX is connected to CAM1, and the I2C1 output is connected to CAM0. Instead of changing every instance of port = 0 to 1, and port = 1 to 0 in the code, I found it more reasonable to simply swap the I2C addresses.

I applied the change you suggested, and now both video0 and video1 are visible. I can get video from video0, but I’m still unable to receive any image from video1.

dts file:
jetson_nano_dts.txt (310.3 KB)

I’m able to exchange data via video0, and video1 has finally started to appear, but I’m not receiving any image or response from video1 Still, having video1 show up is progress. Thank you for your help so far. At this point, is there any way to figure out why I can’t get any data from video1?

Should be the port-index = 3 instead of 4

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

				port@0 {
					status = "okay";
					reg = <0x0>;
					linux,phandle = <0xf0>;
					phandle = <0xf0>;

					endpoint {
						status = "okay";
						port-index = <0x0>;
						bus-width = <0x2>;
						remote-endpoint = <0x5f>;
						linux,phandle = <0x7b>;
						phandle = <0x7b>;
					};
				};

				port@1 {
					status = "okay";
					reg = <0x1>;
					linux,phandle = <0xf1>;
					phandle = <0xf1>;

					endpoint {
						status = "okay";
						port-index = <0x4>;
						bus-width = <0x2>;
						remote-endpoint = <0x60>;
						linux,phandle = <0x7d>;
						phandle = <0x7d>;
					};
				};
			};

@ShaneCCC

root@jetson-nano:~# v4l2-ctl --stream-mmap --stream-count=100 --set-ctrl bypass_mode=0 -d /dev/video0
<<<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.20 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<
root@jetson-nano:~# v4l2-ctl --stream-mmap --stream-count=100 --set-ctrl bypass_mode=0 -d /dev/video1


vi {
			compatible = "nvidia,tegra210-vi", "simple-bus";
			power-domains = <0x5e>;
			reg = <0x0 0x54080000 0x0 0x40000>;
			interrupts = <0x0 0x45 0x4>;
			iommus = <0x30 0x12>;
			status = "okay";
			clocks = <0x26 0x210 0x26 0x34 0x26 0x90 0x26 0x91 0x26 0x92 0x26 0xd0 0x26 0x51 0x26 0xfa 0x26 0x133>;
			clock-names = "vi", "csi", "cilab", "cilcd", "cile", "vii2c", "i2cslow", "pll_d", "pll_d_dsi_out";
			resets = <0x26 0x14>;
			reset-names = "vi";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			avdd_dsi_csi-supply = <0x3b>;
			num-channels = <0x2>;
			linux,phandle = <0xef>;
			phandle = <0xef>;

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

				port@0 {
					status = "okay";
					reg = <0x0>;
					linux,phandle = <0xf0>;
					phandle = <0xf0>;

					endpoint {
						status = "okay";
						port-index = <0x0>;
						bus-width = <0x2>;
						remote-endpoint = <0x5f>;
						linux,phandle = <0x7b>;
						phandle = <0x7b>;
					};
				};

				port@1 {
					status = "okay";
					reg = <0x1>;
					linux,phandle = <0xf1>;
					phandle = <0xf1>;

					endpoint {
						status = "okay";
						port-index = <0x3>;
						bus-width = <0x2>;
						remote-endpoint = <0x60>;
						linux,phandle = <0x7d>;
						phandle = <0x7d>;
					};
				};
			};
		};

I’ve made the correction you mentioned, but I’m still not receiving any data. : (

@ShaneCCC Thank you for your help! After following the steps you provided, I set port-index = 5 and serial = "f", and it worked. I really appreciate your assistance in helping me resolve the issue.

We did it! It’s working perfectly without any issues.

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