ADV7611 device tree entry & driver interface in Linux

Hi, I asked this question on the videos Q&A and I was directed here.

I'm using the ADV7611 in a design that utilizes a zynq 7000 and Linux.  I've enabled the driver in the kernel config and created a device tree entry for the part.  At boot I can see the adv7611 driver register on the i2c bus:

...

cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23
adv7611 0-004c: adv7611 found @ 0x98 (Cadence I2C at e0004000)

...

However, now I need to program the EDID page.  Looking at the linux driver (adv7604.c) I see the following functions:

static int adv76xx_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)

static int adv76xx_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)

Based on the naming I'm assuming that I should use the v4l2 api.  I've looked through the linux documentation for video parts, and it is unclear to me how to access the device?  I don't see any clear entries for the device in sysfs, nor do I see a device node that I could use with the IO subsystem.  I looked in /sys/class/video4linux and it is empty.  Most of the documentation that I've seen is very unclear regarding what I should expect in terms of accessing the device. 

Here is my device tree node, though I don't know that it is correct.  I created it by reading the driver source file adv7604.c in linux distro 4.14.0 in order to determine what the device tree parser expects at boot for the driver.  I also referenced the device tree bindings linux documentation for the part found here https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/media/i2c/adv7604.txt

And my device tree entry:


&i2c0 {
    clock-frequency = <400000>;
    status = "okay";
    adv7611: hdmi_receiver@4c {
        compatible = "adi,adv7611";
        reg = <0x4c>, <0x36>;  
        reg-names = "main", "edid";
        reset = <&gpio0 50>;
        hpd = <&gpio0 51>;

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

        default-input = <0>;
        // port 0 is the HDMI input port
        port@0 {
            reg = <0>;
            hdmi: endpoint {
                hsync-active=<1>;
                vsync-active=<1>;
                pclk-sample=<0>;
            };
        };
        port@1 {
            reg = <1>;
        };
    };
};

Should I expect to see an entry for the adv7611 either in /dev or somewhere in /sys/class/video4linux or even somewhere else?  Or if I need to use some other API I'd appreciate any guidance.

Thanks

Parents Reply Children