Documentation / devicetree / bindings / media / i2c / adv7604.yaml


Based on kernel version 6.8. Page generated on 2024-03-11 21:26 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/adv7604.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADV7604/10/11/12 video decoder with HDMI receiver

maintainers:
  - Hans Verkuil <hverkuil-cisco@xs4all.nl>

description:
  The ADV7604 and ADV7610/11/12 are multiformat video decoders with
  an integrated HDMI receiver. The ADV7604 has four multiplexed HDMI inputs
  and one analog input, and the ADV7610/11 have one HDMI input and no analog
  input. The ADV7612 is similar to the ADV7610/11 but has 2 HDMI inputs.
 
  These device tree bindings support the ADV7610/11/12 only at the moment.

properties:
  compatible:
    items:
      - enum:
          - adi,adv7610
          - adi,adv7611
          - adi,adv7612

  reg:
    minItems: 1
    maxItems: 13

  reg-names:
    minItems: 1
    items:
      - const: main
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]

  interrupts:
    maxItems: 1

  reset-gpios:
    maxItems: 1

  hpd-gpios:
    minItems: 1
    description:
      References to the GPIOs that control the HDMI hot-plug detection pins,
      one per HDMI input. The active flag indicates the GPIO level that
      enables hot-plug detection.

  default-input:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [ 0, 1 ]
    description:
      Select which input is selected after reset.

  ports: true

required:
  - compatible
  - reg
  - ports

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: adi,adv7611
    then:
      properties:
        ports:
          $ref: /schemas/graph.yaml#/properties/ports
          properties:
            port@0:
              $ref: /schemas/graph.yaml#/properties/port
              description: Input port

            port@1:
              $ref: /schemas/graph.yaml#/properties/port
              description: Output port

          required:
            - port@1

  - if:
      properties:
        compatible:
          contains:
            const: adi,adv7612
    then:
      properties:
        ports:
          $ref: /schemas/graph.yaml#/properties/ports
          properties:
            port@2:
              $ref: /schemas/graph.yaml#/properties/port
              description: Output port

          patternProperties:
            "^port@[0-1]$":
              $ref: /schemas/graph.yaml#/properties/port
              description: Input port

          required:
            - port@2

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
 
    i2c {
            #address-cells = <1>;
            #size-cells = <0>;
 
            hdmi_receiver@4c {
                    compatible = "adi,adv7611";
                    /*
                     * The edid page will be accessible @ 0x66 on the I2C bus. All
                     * other maps will retain their default addresses.
                     */
                    reg = <0x4c>, <0x66>;
                    reg-names = "main", "edid";
 
                    reset-gpios = <&ioexp 0 GPIO_ACTIVE_LOW>;
                    hpd-gpios = <&ioexp 2 GPIO_ACTIVE_HIGH>;
                    default-input = <0>;
 
                    ports {
                            #address-cells = <1>;
                            #size-cells = <0>;
 
                            port@0 {
                                    reg = <0>;
                            };
 
                            port@1 {
                                    reg = <1>;
                                    hdmi_in: endpoint {
                                            remote-endpoint = <&ccdc_in>;
                                    };
                            };
                    };
 
 
            };
    };