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    items:
34      - const: main
35      - enum: [ avlink, cec, infoframe, esdp, dpp, afe, rep, edid, hdmi, test, cp, vdp ]
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
48  interrupts:
49    maxItems: 1
50
51  reset-gpios:
52    maxItems: 1
53
54  hpd-gpios:
55    minItems: 1
56    description:
57      References to the GPIOs that control the HDMI hot-plug detection pins,
58      one per HDMI input. The active flag indicates the GPIO level that
59      enables hot-plug detection.
60
61  default-input:
62    maxItems: 1
63    description:
64      Select which input is selected after reset.
65
66  ports: true
67
68required:
69  - compatible
70  - reg
71  - ports
72
73additionalProperties: false
74
75allOf:
76  - if:
77      properties:
78        compatible:
79          contains:
80            const: adi,adv7611
81    then:
82      properties:
83        ports:
84          $ref: /schemas/graph.yaml#/properties/ports
85          properties:
86            port@0:
87              $ref: /schemas/graph.yaml#/properties/port
88              description: Input port
89
90            port@1:
91              $ref: /schemas/graph.yaml#/properties/port
92              description: Output port
93
94          required:
95            - port@1
96
97  - if:
98      properties:
99        compatible:
100          contains:
101            const: adi,adv7612
102    then:
103      properties:
104        ports:
105          $ref: /schemas/graph.yaml#/properties/ports
106          properties:
107            port@2:
108              $ref: /schemas/graph.yaml#/properties/port
109              description: Output port
110
111          patternProperties:
112            "^port@[0-1]$":
113              $ref: /schemas/graph.yaml#/properties/port
114              description: Input port
115
116          required:
117            - port@2
118
119examples:
120  - |
121    #include <dt-bindings/gpio/gpio.h>
122
123    i2c {
124            #address-cells = <1>;
125            #size-cells = <0>;
126
127            hdmi_receiver@4c {
128                    compatible = "adi,adv7611";
129                    /*
130                     * The edid page will be accessible @ 0x66 on the I2C bus. All
131                     * other maps will retain their default addresses.
132                     */
133                    reg = <0x4c>, <0x66>;
134                    reg-names = "main", "edid";
135
136                    reset-gpios = <&ioexp 0 GPIO_ACTIVE_LOW>;
137                    hpd-gpios = <&ioexp 2 GPIO_ACTIVE_HIGH>;
138                    default-input = <0>;
139
140                    ports {
141                            #address-cells = <1>;
142                            #size-cells = <0>;
143
144                            port@0 {
145                                    reg = <0>;
146                            };
147
148                            port@1 {
149                                    reg = <1>;
150                                    hdmi_in: endpoint {
151                                            remote-endpoint = <&ccdc_in>;
152                                    };
153                            };
154                    };
155
156
157            };
158    };
159