This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux: How to config dts while there are two vin port all connect to one sub-device

Tool/software: Linux

Our processor is DRA74X, with 3.02.00.03 SDK version.

On our custom board, we have one sub-device(adv7182a), and two vin port(vin3a & vin4b) all connect with the sub-device.

How to config dts file for this scenario?

Regards,

Shawn

  • Hi Shawn,

    Do you want to capture the same video from both the ports?
    This is little unusual.

    This will be an experiment you will have to try out.
    You can link both vin3a and vin4a endpoints with the same subdev endpoint.
    That should trigger the match function for both of the devices, I guesss.




    Regards,
    Nikhil D
  • Hi Nikhil,

    I already try below setting, bu fail. I only can see one video device => /dev/video1, which combine with vin-3a, any suggestion?
    &i2c1 {
    status = "okay";
    clock-frequency = <400000>;

    adv7611: adv7611@4c {
    compatible = "adi,adv7611";
    reg = <0x4c>;

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

    port@1 {
    adv7611_out: endpoint@0 {
    remote-endpoint = <&vin4b>, <&vin3a>;
    //hsync-active = <1>;
    //vsync-active = <1>;
    pclk-sample = <1>;
    bus-width = <8>;
    channels = <0>;

    pixel-mux;
    };
    };
    };
    };


    video_in4B: &vin4b {
    status = "okay";
    endpoint@0 {
    slave-mode;
    remote-endpoint = <&adv7611_out>;
    };
    };

    video_in3A: &vin3a {
    status = "okay";
    endpoint@0 {
    slave-mode;
    remote-endpoint = <&adv7611_out>;
    };
    };
  • Hi Shawn,

    Another option you can try is to duplicate the endpoint node in subdev.

    Link a unique node to the video ports but all part of the same i2c device.

    This way, there is a chance that Linux binds the same subdev to two different V4L2 devices

    Regards,

    Nikhil D

  • Hi Nikhil,

    At our custom board, for test purpose, we need to test two video input port(vin-3a & vin-4b) and they all connect to the same subdevice 
    I try below setting, still only can see one video device => /dev/video1, which combine with vin-3a, is there any other setting could let two video input port combine with the same subdevice?

    &i2c1 {
    status = "okay";
    clock-frequency = <400000>;

    adv7611: adv7611@4c {
    compatible = "adi,adv7611";
    reg = <0x4c>;

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

    //reset-gpios = <&ioexp 0 GPIO_ACTIVE_LOW>;
    //hpd-gpios = <&ioexp 2 GPIO_ACTIVE_HIGH>;

    port@1 {
    adv7611_out: endpoint@0 {
    remote-endpoint = <&vin4b>;
    //hsync-active = <1>;
    //vsync-active = <1>;
    pclk-sample = <1>;
    bus-width = <8>;
    channels = <0>;

    pixel-mux;
    };

    adv7611_out2: endpoint@1 {
    remote-endpoint = <&vin3a>;
    //hsync-active = <1>;
    //vsync-active = <1>;
    pclk-sample = <1>;
    bus-width = <8>;
    channels = <0>;

    pixel-mux;
    };
    };
    };
    };


    video_in4B: &vin4b {
    status = "okay";
    endpoint@0 {
    slave-mode;
    remote-endpoint = <&adv7611_out>;
    };
    };


    video_in3A: &vin3a {
    status = "okay";
    endpoint@0 {
    slave-mode;
    remote-endpoint = <&adv7611_out2>;
    };
    };

  • As I mentioned earlier, this is non standard scenario.

    We are trying different experiments to work aorund V4L2 subdevice to bind with the V4L2 device.

    Next you can try to define separate ports with each having one endpoint node..

    You can link the endpoint nodes with the DT nodes for vin3a and vin4b

    Regards,

    Nikhil D