CSI Camera Issue in L4T 35.1

Hi,

I am Trying to enbale 3rd-CSI Camera in L4T 35.1, and Modified the device-tree configurations for that .Its a 2-Lane CSI Camera and
reffered the link to add port-index :- Tegra Linux Driver

In dmesg getting the following error,

jetson@jetson-desktop:~$ sudo dmesg | grep “imx219”
[sudo] password for jetson:
[ 11.564068] imx219 0-0010: Failed to find port info.
[ 11.564231] imx219 0-0010: Failed to initialize imx219
[ 11.564353] imx219 0-0010: tegra camera driver registration failed
[ 11.598952] imx219: probe of 0-0010 failed with error -61

Current Device-tree Changes for 3rd CSI Camera:-

tegra-capture-vi {
num-channels = <3>;
ports {
vi_port3: port@3 {
reg = <3>;
rbpcv2_imx219_vi_in3: endpoint {
port-index = <5>;
bus-width = <2>;
remote-endpoint = <&rbpcv2_imx219_csi_out3>;
};
};
};
};

            host1x@13e00000 {
                    nvcsi@15a00000 {
                    num-channels = <3>;
                    csi_chan3: channel@3 {
                            reg = <3>;
                            ports {
                                    #address-cells = <1>;
                                    #size-cells = <0>;
                                    csi_chan3_port0: port@0 {
                                            reg = <0>;
                                            rbpcv2_imx219_csi_in3: endpoint@6 {
                                                    port-index = <5>;
                                                    bus-width = <2>;
                                                    remote-endpoint = <&rbpcv2_imx219_out3>;
                                            };
                                    };
                                    csi_chan3_port1: port@1 {
                                            reg = <1>;
                                            rbpcv2_imx219_csi_out3: endpoint@7 {
                                                    remote-endpoint = <&rbpcv2_imx219_vi_in3>;
                                            };
                                    };
                            };
                    };
            };
    };

    i2c@3160000 {
            rbpcv2_imx219_g@10 {
                    /* V4L2 device node location */
                    devnode = "video3";
                    ports {
                            port@0 {
				rbpcv2_imx219_out3: endpoint {
                                            status = "okay";
                                            port-index = <5>;
                                            bus-width = <2>;
                                            remote-endpoint = <&rbpcv2_imx219_csi_in3>;
                                    };
                            };
                    };
            };
    };

    tegra-camera-platform {
            num_csi_lanes = <6>;
            modules {
                    cam_module3: module3 {
                            status = "okay";
                            badge = "jakku_bottom_RBP194";
                            position = "bottom";
                            orientation = "1";
                            cam_module3_drivernode0: drivernode0 {
                                    status = "okay";
                                    pcl_id = "v4l2_sensor";
                                    devname = "imx219 0-0010";
                                    proc-device-tree = "/proc/device-tree/i2c@3160000/rbpcv2_imx219_g@10";
                            };
                            cam_module3_drivernode1: drivernode1 {
                                    status = "okay";
                                    pcl_id = "v4l2_lens";
                                    proc-device-tree = "/proc/device-tree/lens_imx219@RBPCV2/";
                            };
                    };
            };
    };

};

Please, help me out to resolve the above issue @ShaneCCC @WayneWWW

Thanks

hello chaithra.bv,

your port bindings looks incorrect.
you should use CSI-G, and it’s connected to VI-5.
it means… the port index should be port-index=6 for nvcsi, whereas tegra-capture-vi using port-index=5.

BTW,
could you please moving to latest release, which also include bug fixes for camera functions.

1 Like

hello @JerryChang,

Thanks for the update, I have tried the port-Index = 6 for nvcsi and checked the status of CSI Camera in “ls /dev/video”,(device nodes) Now its Camera- 3 is detecting and blank screen is appearing while previewing the Camera and the system is hanging at this stage and rebooting automatically.

How I can resolve this?

hello chaithra.bv,

may I know the kernel logs while the camera stream enabled?
so, you meant you cannot terminate the pipeline to recover that until watchdog timeout to reboot the system?

1 Like

hello @JerryChang

I have mentioned the dmesg logs below:-

jetson@jetson-desktop:~$ dmesg | grep “imx219”

[ 11.700718] imx219 0-0010: tegracam sensor driver:imx219_v2.0.6
[ 11.722279] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx219 0-0010 bound

hello chaithra.bv,

that’s kernel init messages to probe the camera device.
what’s the actual failure of blank screen?

1 Like

hello @JerryChang

The Actual failure for blank screen is :-

jetson@jetson-desktop:~$ journalctl -o short-precise -k -b -1

Apr 21 18:24:39.866820 jetson-desktop kernel: tegra-camrtc-capture-vi tegra-capture-vi: Invalid NVCSI stream Id

hello chaithra.bv,

it’s reported an invalid NVCSI stream ID, hence the stream is not initialized.
please double check your device tree settings, especially the port bindings.

1 Like

hello @JerryChang

I have Checked the device tree and the same device tree is using for L4T 32.6 also, their, its working fine without any issues.

But, in the 35.1, I am facing this issue, is their any unique changes in the L4T 35.1 related to IMX219 CSI Camera?

hello chaithra.bv,

may I know how your migrate the driver from r32.6 to r35.1?
you may see-also reference driver for comparison,
for example, $public_sources/r35.1/Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-camera-rbpcv2-imx219.dtsi

may I know how many cameras on your camera board?
do you have all of three cameras well connected, or, it’s only single camera connected for 3rd-CSI verification?
please also share your revised device tree for review again, thanks

hello @JerryChang,

There are 3-imx219 - CSI Camera’s Supports to Camera board and all the camera ports are working fine. I have
tegra194-camera-rbpcv2-imx219.dtsi (26.3 KB)
verified it and as of now, I have connected only one camera to the 3rd port.

And related to the Revised device tree for CSI Camera (includes CSI-1, CSI-2 and CSI-3)

/*

  • Top level DTS file for NB Turbo revB board.
    */

/dts-v1/;
#include “common/tegra194-mstl-nb-common-csi-imx219.dtsi”

/ {
nvidia,dtsfilename = FILE;
nvidia,dtbbuildtime = DATE, TIME;

compatible = "nvidia,tegra194";

/* dts entry for 3rd CSI camera on 	Board */
tegra-capture-vi  {
		num-channels = <3>;
		ports {
			vi_port2: port@2 {
				reg = <2>;
				rbpcv2_imx219_vi_in2: endpoint {
					port-index = <6>;
					bus-width = <2>;
					remote-endpoint = <&rbpcv2_imx219_csi_out2>;
				};
			};
		};
	}; 

	host1x@13e00000 {
		nvcsi@15a00000 {
		num-channels = <3>;
		csi_chan2: channel@2 {
			reg = <2>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				csi_chan2_port0: port@0 {
					reg = <0>;
					rbpcv2_imx219_csi_in2: endpoint@4 {
						port-index = <6>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx219_out2>;
					};
				};
				csi_chan2_port1: port@1 {
					reg = <1>;
					rbpcv2_imx219_csi_out2: endpoint@5 {
						remote-endpoint = <&rbpcv2_imx219_vi_in2>;
					};
				};
			};
		};
	};
};  

i2c@3160000 {
	imx219_cam2: rbpcv2_imx219_g@10 {
		/* V4L2 device node location */
		devnode = "video2";
		ports {
			port@0 {
				rbpcv2_imx219_out2: endpoint {
					status = "okay";
					port-index = <6>;
					bus-width = <2>;
					remote-endpoint = <&rbpcv2_imx219_csi_in2>;
				};
			};
		};
	};
};

tegra-camera-platform {
	num_csi_lanes = <6>;
	modules {

		cam_module2: module2 {
			status = "okay";
			badge = "jakku_bottomright_RBP194";
			position = "bottomright";
			orientation = "1";
			cam_module2_drivernode0: drivernode0 {
				status = "okay";
				pcl_id = "v4l2_sensor";
				devname = "imx219 0-0010";
				proc-device-tree = "/proc/device-tree/i2c@3160000/rbpcv2_imx219_g@10";
			};
			cam_module2_drivernode1: drivernode1 {
				status = "okay";
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/lens_imx219@RBPCV2/";
			};
		};
	};
};

};

hello @JerryChang,

There are 3-imx219 - CSI Camera’s Supports to Camera board and all the camera ports are working fine. I have verified it and as of now, I have connected only one camera to the 3rd port.

And related to the Revised device tree for CSI Camera (includes CSI-1, CSI-2 and CSI-3)

tegra194-camera-jakku-rbpcv2-imx219.dtsi (1.6 KB)
tegra194-camera-rbpcv2-imx219.dtsi (26.3 KB)
tegra194-mstl-nb-common-csi-imx219.dtsi (7.7 KB)

/*

  • Top level DTS file for NB Turbo revB board.
    */

/dts-v1/;
#include “common/tegra194-mstl-nb-common-csi-imx219.dtsi”

/ {
nvidia,dtsfilename = FILE;
nvidia,dtbbuildtime = DATE, TIME;

compatible = "nvidia,tegra194";

/* dts entry for 3rd CSI camera on 	Board */
tegra-capture-vi  {
		num-channels = <3>;
		ports {
			vi_port2: port@2 {
				reg = <2>;
				rbpcv2_imx219_vi_in2: endpoint {
					port-index = <6>;
					bus-width = <2>;
					remote-endpoint = <&rbpcv2_imx219_csi_out2>;
				};
			};
		};
	}; 

	host1x@13e00000 {
		nvcsi@15a00000 {
		num-channels = <3>;
		csi_chan2: channel@2 {
			reg = <2>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				csi_chan2_port0: port@0 {
					reg = <0>;
					rbpcv2_imx219_csi_in2: endpoint@4 {
						port-index = <6>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx219_out2>;
					};
				};
				csi_chan2_port1: port@1 {
					reg = <1>;
					rbpcv2_imx219_csi_out2: endpoint@5 {
						remote-endpoint = <&rbpcv2_imx219_vi_in2>;
					};
				};
			};
		};
	};
};  

i2c@3160000 {
	imx219_cam2: rbpcv2_imx219_g@10 {
		/* V4L2 device node location */
		devnode = "video2";
		ports {
			port@0 {
				rbpcv2_imx219_out2: endpoint {
					status = "okay";
					port-index = <6>;
					bus-width = <2>;
					remote-endpoint = <&rbpcv2_imx219_csi_in2>;
				};
			};
		};
	};
};

tegra-camera-platform {
	num_csi_lanes = <6>;
	modules {

		cam_module2: module2 {
			status = "okay";
			badge = "jakku_bottomright_RBP194";
			position = "bottomright";
			orientation = "1";
			cam_module2_drivernode0: drivernode0 {
				status = "okay";
				pcl_id = "v4l2_sensor";
				devname = "imx219 0-0010";
				proc-device-tree = "/proc/device-tree/i2c@3160000/rbpcv2_imx219_g@10";
			};
			cam_module2_drivernode1: drivernode1 {
				status = "okay";
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/lens_imx219@RBPCV2/";
			};
		};
	};
};

};

hello chaithra.bv,

here’s incorrect port bindings for VI stream.

please also check Port Index session for reference.
since there’re only 5 VI steams available, you should define the camera using CSI-G as following.
i.e. sensor → CSI-G (port-index=6) → VI stream (port-index=5).

2 Likes

Thankyou for your support @JerryChang,

CSI Camera-3 is Working fine.

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