xref: /linux/Documentation/devicetree/bindings/media/i2c/adv7604.yaml (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/media/i2c/adv7604.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices ADV7604/11/12 video decoder with HDMI receiver
8
9maintainers:
10  - Hans Verkuil <hverkuil-cisco@xs4all.nl>
11
12description:
13  The ADV7604 and ADV7611/12 are multiformat video decoders with an integrated
14  HDMI receiver. The ADV7604 has four multiplexed HDMI inputs and one analog
15  input, and the ADV7611 has one HDMI input and no analog input. The 7612 is
16  similar to the 7611 but has 2 HDMI inputs.
17
18  These device tree bindings support the ADV7611/12 only at the moment.
19
20properties:
21  compatible:
22    items:
23      - enum:
24          - adi,adv7611
25          - adi,adv7612
26
27  reg:
28    minItems: 1
29    maxItems: 13
30
31  reg-names:
32    minItems: 1
33    maxItems: 13
34    items:
35      - const: main
36      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
37      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
38      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
39      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
40      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
41      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
42      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
43      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
44      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
45      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
46      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
47      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
48
49  interrupts:
50    maxItems: 1
51
52  reset-gpios:
53    maxItems: 1
54
55  hpd-gpios:
56    minItems: 1
57    description:
58      References to the GPIOs that control the HDMI hot-plug detection pins,
59      one per HDMI input. The active flag indicates the GPIO level that
60      enables hot-plug detection.
61
62  default-input:
63    maxItems: 1
64    description:
65      Select which input is selected after reset.
66
67  ports:
68    type: object
69    description:
70      A node containing input and output port nodes with endpoint definitions
71      as documented in
72      Documentation/devicetree/bindings/media/video-interfaces.txt
73
74required:
75  - compatible
76  - reg
77
78additionalProperties: false
79
80allOf:
81  - if:
82      properties:
83        compatible:
84          contains:
85            const: adi,adv7611
86    then:
87      properties:
88        ports:
89          properties:
90            '#address-cells':
91              const: 1
92            '#size-cells':
93              const: 0
94            port@0:
95              type: object
96              description: Input port
97            port@1:
98              type: object
99              description: Output port
100
101          required:
102            - port@1
103
104          additionalProperties: false
105
106      required:
107        - ports
108
109  - if:
110      properties:
111        compatible:
112          contains:
113            const: adi,adv7612
114    then:
115      properties:
116        ports:
117          properties:
118            '#address-cells':
119              const: 1
120            '#size-cells':
121              const: 0
122            port@2:
123              type: object
124              description: Output port
125
126          patternProperties:
127            "^port@[0-1]$":
128              type: object
129              description: Input port
130
131          required:
132            - port@2
133
134          additionalProperties: false
135
136      required:
137        - ports
138
139examples:
140  - |
141    #include <dt-bindings/gpio/gpio.h>
142
143    i2c {
144            #address-cells = <1>;
145            #size-cells = <0>;
146
147            hdmi_receiver@4c {
148                    compatible = "adi,adv7611";
149                    /*
150                     * The edid page will be accessible @ 0x66 on the I2C bus. All
151                     * other maps will retain their default addresses.
152                     */
153                    reg = <0x4c>, <0x66>;
154                    reg-names = "main", "edid";
155
156                    reset-gpios = <&ioexp 0 GPIO_ACTIVE_LOW>;
157                    hpd-gpios = <&ioexp 2 GPIO_ACTIVE_HIGH>;
158                    default-input = <0>;
159
160                    ports {
161                            #address-cells = <1>;
162                            #size-cells = <0>;
163
164                            port@0 {
165                                    reg = <0>;
166                            };
167
168                            port@1 {
169                                    reg = <1>;
170                                    hdmi_in: endpoint {
171                                            remote-endpoint = <&ccdc_in>;
172                                    };
173                            };
174                    };
175
176
177            };
178    };
179