Images on the CSI channel cannot be obtained correctly on the custom carrier board

I used a custom board, the hardware design is cam_i2c (i2c@3180000) connected to tca9548 to expand 8 * i2c channels, and the output of tca9548 is i2c@0, i2c@1, i2c@2 and i2c@3 connected to 3 veye-imx385 cameras respectively. i2c@6 connects to the tca9534 and its extended IO port is used to control the pwdn of the four cameras.

When testing the camera driver, I used only one channel in the device tree file to get the image correctly. The following figure shows the information obtained by using v4l2-ctl.There is also a device tree file for successfully obtaining the image



imx385_1_dts.zip (55.8 KB)

Then I wrote a 3-channel following the 1-channel camera device tree file and tried to get the image. Unfortunately, the image is a green one



imx385_3_dts.zip (56.1 KB)

Forgive me for not understanding the device tree deeply enough, this should be some attributes of the device tree I did not configure well, hope to provide some help. Thank you!

Below looks like incorrect. Please check the programing guide for the detail.
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html#property-value-pairs

			channel@1 {
				reg = <0x01>;
				phandle = <0x413>;

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

					port@0 {
						reg = <0x00>;
						phandle = <0x415>;

						endpoint@2 {
							bus-width = <0x02>;
							remote-endpoint = <0x46f>;
							port-index = <0x01>;
							status = "okay";
							phandle = <0x2ba>;
						};
					};

					port@3 {
						reg = <0x01>;

						endpoint@3 {
							remote-endpoint = <0x26a>;
							status = "okay";
							phandle = <0x414>;
						};
					};

					port@1 {
						reg = <0x01>;
						phandle = <0x416>;

						endpoint@3 {
							remote-endpoint = <0x26a>;
							status = "okay";
							phandle = <0x248>;
						};
					};

					port@2 {
						reg = <0x00>;

						endpoint@2 {
							bus-width = <0x02>;
							remote-endpoint = <0x46f>;
							port-index = <0x01>;
							status = "okay";
							phandle = <0x2b9>;
						};
					};
				};

Thank you for your reply!

I’m using jetson-io.py to change CSI ports. I inserted /delete-node/ port@2 and /delete-node/ port@3 into ports{},and dtbo files are generated using dtc. This script doesn’t seem to remove port@2 and port@3 from channel@1.
So I have set the status = “disabled” of port2&3,but that doesn’t seem to be working.

There’s one piece of information I need to add. I only mount the camera to cam0 (CSI-channel@0), but there are two videos under /dev, video0 and video1. Normally speaking, the camera should be video0, but it is actually video1, which seems to have some problems, can provide some ideas to check?

Looks like the sensor driver didn’t check if sensor is connect to register the video node. Normally if i2c failed communicate with sensor the driver shouldn’t register the video node.