vi@15700000 vs nvcsi@150c0000 port binding?

Hi.

I am a little confused on the port binding in the devicetable for the TX2.
I understand that the default OV5693 camera is connected in 2 different paths.
One path it goes through the ISP and the other it is connected directly (bayer frames to memory).

So:

OV5693–>ISP(bayer2yuv conversion)–>Tegra Drivers–>Camera Core–>nvcamerasrc (YUV Frames)
&
OV5693–>V4L2 Drivers–>Mediacontroller–>V4L2src (Bayer Frames)

In the device table (after removing the whole plugin & module setup to keep it clean) I have the OV5693 camera setup with the following port connections (I’ve removed some parts to keep this concise here. only including the important port connection part). These connections work which look to be the following.

nvcsi port 0 <–> ov5693 v4l2 video0 device (im assuming this is the direct /dev/video0 path)

vi port 0 <–> nvscsi port 1 (im assuming this is the ISP path)

host1x {
		vi@15700000 {
			status = "okay";
			num-channels = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				status = "okay";
				port@0 {
					status = "okay";
					reg = <0>;
					ov5693_vi_in0: endpoint {
						status = "okay";
						csi-port = <2>;
						bus-width = <2>;
						remote-endpoint = <&ov5693_vi_out0>;
					};
				};		
			};
		};
		nvcsi@150c0000 {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						ov5693_csi_in0: endpoint@0 {
							status = "okay";
							csi-port = <2>;
							bus-width = <2>;
							remote-endpoint = <&ov5693_out0>;
						};
					};	
					port@1 {
						reg = <1>;
						ov5693_vi_out0: endpoint@1 {
							status = "okay";
							remote-endpoint = <&ov5693_vi_in0>;
						};
					};					
				};
			};
		};
	};	
	i2c@3180000 {
		ov5693_0@36 {
			compatible = "nvidia,ov5693";
			reg = <0x36>;
			devnode = "video0";
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					ov5693_out0: endpoint {
						status = "okay";
						csi-port = <2>;
						bus-width = <2>;
						remote-endpoint = <&ov5693_csi_in0>;
					};
				};
			};
		};
	};

running the following once booted up works and claims 30fps:

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=100 -d /dev/video0

So my goal is to remove any instance of the ISP connection since I will not be using it. But upon setting up the connection directly like below:

host1x {
		vi@15700000 {
			status = "okay";
			num-channels = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				status = "okay";
				port@0 {
					status = "okay";
					reg = <0>;
					ov5693_vi_in0: endpoint {
						status = "okay";
						csi-port = <2>;
						bus-width = <2>;
						remote-endpoint = <&ov5693_out0>;
					};
				};		
			};
		};
	i2c@3180000 {
		ov5693_0@36 {
			compatible = "nvidia,ov5693";
			reg = <0x36>;
			devnode = "video0";
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					ov5693_out0: endpoint {
						status = "okay";
						csi-port = <2>;
						bus-width = <2>;
						remote-endpoint = <&ov5693_vi_in0>;
					};
				};
			};
		};
	};

The v4l2-ctl command fails with a timeout error in dmesg. /dev/video0 still gets created and everything, but frames do not come through.

I based this on the “Port binding” part of the “Sensor Driver Programming Guide” section of the "Tegra Linux Driver Package Development Guide "

There it has the vi connected directly.

What am I doing wrong?

Hi
Your understand is incorrect. The device tree is no matter with the ISP. And the video node only for thee sensor control no matter v4l2src or nvcamerasrc are use the same video node to control the same sensor.

The DT means the sensor connect pipeline like below.
sensor -> csi -> vi

Ok.

Just so i understand completely. What is the difference between the NVCSI & VI in the X2 devicetree? I only ask because on the X1 I believe the device table only had the vi@ bindings and nvcsi wasn’t present. At least that is what I am seeing in 24.2 release dts folder.

Also the “Port binding” part of the “Sensor Driver Programming Guide” has the VI endpoints hooked up directly to the ov5693 i2c declaration which is also how the X1 hooks up the device in 24.2. Is this just a hold behind due to the X2 documentation not being updated fully yet?

With the X2 it now seems to do the following:

VI Port 0 --> NVCSI Port 1
NVCSI Port 0 --> I2C OV5693 Port 0

Is this the most efficient port binding to get the video4linux device operational with the isp and everything bypassed.

Hi
You are right we are modify the Document to fix that. Thanks for your remind.

Hi
I am using jetson TX2 with 28.1.0 version
My goal is to connect the radar sensor to the TX2 and capture the data through CSI
after booting the board i did not get any video0 nodes under dev directory

Please guide me

Please check the l4t document the chapter sensor programing guide to implement you sensor driver and DT.
By the way what color format the radar output. Not sure if NVCSI/VI can support it.

Thank you shaneCCC
I dont know about color, I am thinking of using ov5693 sub dev for this application but how to modify device tree for this application

Do I need to install any kernel modules??

The l4t document should have guide for the DT and sensor kernel driver.