Meaning of VI and NVCSI in DT of TX2

I’m struggling a bit in understanding in deep the actual meaning of the video input and NVCSI entries in the device tree of the TX2 camera sensor drivers. More precisely, I’m focusing in the OV5693, although all the sensors I’ve seen include almost the same. AFAIK, host1x is a DMA engine, and the entries inside it define the flow of the video data, going from sensor → VI → NVCSI → I2C. Moreover, the remote-endpoint property defines the sink and the source. Am I correct? If so:

  1. How does the DT know which port is the source and which the sink?
  2. Is the flow like: sensor → vi(port@0) → nvcsi(port@1) → nvcsi(port@0) → i2c(port@0)?
  3. Port-index defines the sensor port connection. But how? Why some sensors take the value <0> and others (for example e3326) <2>?
host1x {
		vi@15700000 {
			num-channels = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					liimx185_vi_in0: endpoint {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&liimx185_csi_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>;
						liimx185_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&liimx185_imx185_out0>;
						};
					};
					port@1 {
						reg = <1>;
						liimx185_csi_out0: endpoint@1 {
							remote-endpoint = <&liimx185_vi_in0>;
						};
					};
				};
			};
		};
	};

hello euskadi,

the brief camera sensor pipeline as shown below.
Sensor(raw) → NVCSI-> VI-> ISP(yuv)-> Encoder/Decoder-> Display

please check Sensor Software Driver Programming Guide, check the [Port Index] session for the diagram.
suggest you also access Tutorials page, expand [Developer Tools] session and check the [V4L2 Sensor Driver Development Tutorial].
thanks

The correct link is as below.

sensor → (port0)nvcsi(port1) → (port0)vi

Ok, that makes it more clear. And why is the port0 attached to the I2C entry’s port section?

i2c means sensors’s control interface does’t matter with the streaming data follow.
You can treat the i2c and sensor as one device.