vi, nvcsi, sensor devices and video device (v4l2) and v4l2 subdev and media framework doubts

Hi All,

This may be the simple question, but need the help on this:

In device tree, vi, nvcsi and sensor devices are linked via media framework as:

vi@15700000 {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = “okay”;
reg = <0>;
tc358840_vi_in0: endpoint {
status = “okay”;
csi-port = <0>;

                                            bus-width = <8>;                                                             remote-endpoint = <&tc358840_csi_out0>;
                                    };
                            };
                    };
            };

nvcsi@150c0000 {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
status = “okay”;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
status = “okay”;
tc358840_csi_in0: endpoint@0 {
status = “okay”;

                                                    csi-port = <0>;
                                                    
                                                    bus-width = <8>; 
                                                    remote-endpoint = <&tc358840_out0>;
                                            };
                                    };
                                    port@1 {
                                            reg = <1>;
                                            status = "okay";
                                            tc358840_csi_out0: endpoint@1 {
                                                    status = "okay";
                                                    remote-endpoint = <&tc358840_vi_in0>;
                                            };
                                    };
                            };
                    };
            };

i2c@3180000 {
tc358840@0f {
compatible = “toshiba,tc358840”;

                    reg = <0x0f>;
                    status = "okay";

                    /* Physical dimensions of sensor */
            //      physical_w = "22.30";
            //      physical_h = "14.90";
                    physical_w = "4.713";
                    physical_h = "3.494";

                    /* Sensor Model */
                    sensor_model ="tc358840";

                    devnode ="video0";

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

                            port@0 {
                                    reg = <0>;
                                    status = "okay";
                                    tc358840_out0: endpoint {
                                            status = "okay";
                                            csi-port = <0>;
                                            bus-width = <8>; 
                                            remote-endpoint = <&tc358840_csi_in0>;
                                    };
                            };
                    };
            };

    };

Here, vi is video device and v4l2 device. nvcsi and tc358840 devices are the v4l2 subdevices.
I can get the idea as they are connected using the media framework and registered with video4Linux2 framework.

The doubt is:

  1. What is the need for the link between the nvcsi and tc358850 device or nvcsi and some camera device??
  2. Because of this link between the nvcsi and tc358840 device or nvcsi and some camera device, whether data transfer happens? Or What will happen??

Thanks for the inputs. Looking into this.

-Thanks.

hello BalajiNP,

please also check the parker TRM, there’s [NVCSI Host Architecture] for well-understanding.
thanks