2 cameras. sensor-id=1 not working

Hello. I connected two RPv2 cameras to nano A01. CSI-A and CSI-C. Made changes to the device tree, but the camera only works when specifying sensor-id = 0, if you specify sensor-id = 1, then it generates the error “Invalid camera device specified 1 specified, 0 max index”.

modules {
		cam_module0: module {
			status = "okay";
			badge = "porg_center_RBPCV2";
			position = "center";
			orientation = "1";

			cam_module0_drivernode0: drivernode0 {
				status = "okay";
				pcl_id = "v4l2_sensor";
				devname = "imx219 10-0010";
				proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9546@70/i2c@0/rbpcv2_imx219_a@10";
			};

			cam_module0_drivernode1: drivernode1 {
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/lens_imx219@RBPCV2/";
			};

		};
		cam_module1: module1 {
			status = "okay";
			badge = "porg_top_RBPCV2";
			position = "top";
			orientation = "1";

			cam_module1_drivernode0: drivernode0 {
				status = "okay";
				pcl_id = "v4l2_sensor";
				devname = "imx219 9-0010";
				proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9546@70/i2c@1/rbpcv2_imx219_a@10";

			};

			cam_module1_drivernode1: drivernode1 {
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/lens_imx219@RBPCV2/";
			};

		};
	};

atri@atri-desktop:~$ media-ctl -p -d /dev/media0
Media controller API version 0.1.0

Media device information

driver vi
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 0.0.0

Device topology

  • entity 1: nvcsi–2 (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev0
    pad0: Sink
    ← “imx219 10-0010”:0 [ENABLED]
    pad1: Source
    → “vi-output, imx219 10-0010”:0 [ENABLED]

  • entity 4: imx219 10-0010 (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev1
    pad0: Source
    [fmt:SRGGB10_1X10/3264x2464 field:none colorspace:srgb]
    → “nvcsi–2”:0 [ENABLED]

  • entity 6: vi-output, imx219 10-0010 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video0
    pad0: Sink
    ← “nvcsi–2”:1 [ENABLED]

  • entity 18: nvcsi–1 (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev2
    pad0: Sink
    ← “imx219 9-0010”:0 [ENABLED]
    pad1: Source
    → “vi-output, imx219 9-0010”:0 [ENABLED]

  • entity 21: imx219 9-0010 (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev3
    pad0: Source
    [fmt:SRGGB10_1X10/3264x2464 field:none colorspace:srgb]
    → “nvcsi–1”:0 [ENABLED]

  • entity 23: vi-output, imx219 9-0010 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video1
    pad0: Sink
    ← “nvcsi–1”:1 [ENABLED]

atri@atri-desktop:~$ v4l2-ctl --list-devices
vi-output, imx219 9-0010 (platform:54080000.vi:0):
/dev/video1

vi-output, imx219 10-0010 (platform:54080000.vi:2):
/dev/video0

  1. Exchange below. 9-0010 should be 70/i2c@1 ?
    proc-device-tree = “/proc/device-tree/host1x/i2c@546c0000/tca9546@70/i2c@1/rbpcv2_imx219_a@10”;

  2. Change the position to front and rear.

front and rear does not work.
I can see a picture from that sensor which is in module0. If I swap the description of the sensor, then in turn you can get a picture from both sensors. those. string proc-device-tree = “/ proc / device-tree / host1x / i2c @ 546c0000 / tca9546 @ 70 / i2c @ 1 / rbpcv2_imx219_a @ 10”; true.

So exchange the “proc-device-tree= xxxxx” in the moduleX fix the problem?

Hello @ATRI
Are both Camera nodes in the DTS file named rbpcv2_imx219_a? (a, b ?) I think the proc-device-tree should be proc-device-tree = “/proc/device-tree/host1x/i2c@546c0000/tca9546@70/i2c@1/rbpcv2_imx219_b@10”`
or other alphabets to denote different Camera nodes in the device tree.

It’s doesn’t matter with the string a, b
What I concern is the bus number after the i2c mux. The the bus number tca9546@70/i2c@0 should be bigger than tca9546@70/i2c@1.
But bus number of module0 in this case is 10(devname = “imx219 10-0010”) should be at tca9546@70/i2c@1 instead of tca9546@70/i2c@0

1 Like

Thanks. Was the problem in the name rbpcv2_imx219_a? (a, b?). Now everything works.

1 Like