xref: /freebsd/sys/contrib/device-tree/Bindings/media/i2c/adv7604.yaml (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
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/10/11/12 video decoder with HDMI receiver
8
9maintainers:
10  - Hans Verkuil <hverkuil-cisco@xs4all.nl>
11
12description:
13  The ADV7604 and ADV7610/11/12 are multiformat video decoders with
14  an integrated HDMI receiver. The ADV7604 has four multiplexed HDMI inputs
15  and one analog input, and the ADV7610/11 have one HDMI input and no analog
16  input. The ADV7612 is similar to the ADV7610/11 but has 2 HDMI inputs.
17
18  These device tree bindings support the ADV7610/11/12 only at the moment.
19
20properties:
21  compatible:
22    items:
23      - enum:
24          - adi,adv7610
25          - adi,adv7611
26          - adi,adv7612
27
28  reg:
29    minItems: 1
30    maxItems: 13
31
32  reg-names:
33    minItems: 1
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    $ref: /schemas/types.yaml#/definitions/uint32
64    enum: [ 0, 1 ]
65    description:
66      Select which input is selected after reset.
67
68  ports: true
69
70required:
71  - compatible
72  - reg
73  - ports
74
75additionalProperties: false
76
77allOf:
78  - if:
79      properties:
80        compatible:
81          contains:
82            const: adi,adv7611
83    then:
84      properties:
85        ports:
86          $ref: /schemas/graph.yaml#/properties/ports
87          properties:
88            port@0:
89              $ref: /schemas/graph.yaml#/properties/port
90              description: Input port
91
92            port@1:
93              $ref: /schemas/graph.yaml#/properties/port
94              description: Output port
95
96          required:
97            - port@1
98
99  - if:
100      properties:
101        compatible:
102          contains:
103            const: adi,adv7612
104    then:
105      properties:
106        ports:
107          $ref: /schemas/graph.yaml#/properties/ports
108          properties:
109            port@2:
110              $ref: /schemas/graph.yaml#/properties/port
111              description: Output port
112
113          patternProperties:
114            "^port@[0-1]$":
115              $ref: /schemas/graph.yaml#/properties/port
116              description: Input port
117
118          required:
119            - port@2
120
121examples:
122  - |
123    #include <dt-bindings/gpio/gpio.h>
124
125    i2c {
126            #address-cells = <1>;
127            #size-cells = <0>;
128
129            hdmi_receiver@4c {
130                    compatible = "adi,adv7611";
131                    /*
132                     * The edid page will be accessible @ 0x66 on the I2C bus. All
133                     * other maps will retain their default addresses.
134                     */
135                    reg = <0x4c>, <0x66>;
136                    reg-names = "main", "edid";
137
138                    reset-gpios = <&ioexp 0 GPIO_ACTIVE_LOW>;
139                    hpd-gpios = <&ioexp 2 GPIO_ACTIVE_HIGH>;
140                    default-input = <0>;
141
142                    ports {
143                            #address-cells = <1>;
144                            #size-cells = <0>;
145
146                            port@0 {
147                                    reg = <0>;
148                            };
149
150                            port@1 {
151                                    reg = <1>;
152                                    hdmi_in: endpoint {
153                                            remote-endpoint = <&ccdc_in>;
154                                    };
155                            };
156                    };
157
158
159            };
160    };
161