xref: /freebsd/sys/contrib/device-tree/Bindings/display/bridge/adi,adv7511.yaml (revision 3a3af6b2a160bea72509a9d5ef84e25906b0478a)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices ADV7511/11W/13 HDMI Encoders
8
9maintainers:
10  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
11
12description: |
13  The ADV7511, ADV7511W and ADV7513 are HDMI audio and video
14  transmitters compatible with HDMI 1.4 and DVI 1.0. They support color
15  space conversion, S/PDIF, CEC and HDCP. The transmitter input is
16  parallel RGB or YUV data.
17
18properties:
19  compatible:
20    enum:
21      - adi,adv7511
22      - adi,adv7511w
23      - adi,adv7513
24
25  reg:
26    description: |
27      I2C slave addresses.
28
29      The ADV7511/11W/13 internal registers are split into four pages
30      exposed through different I2C addresses, creating four register
31      maps. Each map has it own I2C address and acts as a standard slave
32      device on the I2C bus. The main address is mandatory, others are
33      optional and revert to defaults if not specified.
34    minItems: 1
35    maxItems: 4
36
37  reg-names:
38    description:
39      Names of maps with programmable addresses. It can contain any map
40      needing a non-default address.
41    minItems: 1
42    items:
43      - const: main
44      - const: edid
45      - const: cec
46      - const: packet
47
48  clocks:
49    description: Reference to the CEC clock.
50    maxItems: 1
51
52  clock-names:
53    const: cec
54
55  interrupts:
56    maxItems: 1
57
58  pd-gpios:
59    description: GPIO connected to the power down signal.
60    maxItems: 1
61
62  avdd-supply:
63    description: A 1.8V supply that powers up the AVDD pin.
64
65  dvdd-supply:
66    description: A 1.8V supply that powers up the DVDD pin.
67
68  pvdd-supply:
69    description: A 1.8V supply that powers up the PVDD pin.
70
71  dvdd-3v-supply:
72    description: A 3.3V supply that powers up the DVDD_3V pin.
73
74  bgvdd-supply:
75    description: A 1.8V supply that powers up the BGVDD pin.
76
77  adi,input-depth:
78    description: Number of bits per color component at the input.
79    $ref: /schemas/types.yaml#/definitions/uint32
80    enum: [ 8, 10, 12 ]
81
82  adi,input-colorspace:
83    description: Input color space.
84    enum: [ rgb, yuv422, yuv444 ]
85
86  adi,input-clock:
87    description: |
88      Input clock type.
89        "1x": one clock cycle per pixel
90        "2x": two clock cycles per pixel
91        "dd": one clock cycle per pixel, data driven on both edges
92    enum: [ 1x, 2x, dd ]
93
94  adi,clock-delay:
95    description:
96      Video data clock delay relative to the pixel clock, in ps
97      (-1200ps .. 1600 ps).
98    $ref: /schemas/types.yaml#/definitions/uint32
99    default: 0
100
101  adi,embedded-sync:
102    description:
103      If defined, the input uses synchronization signals embedded in the
104      data stream (similar to BT.656).
105    type: boolean
106
107  adi,input-style:
108    description:
109      Input components arrangement variant as listed in the input
110      format tables in the datasheet.
111    $ref: /schemas/types.yaml#/definitions/uint32
112    enum: [ 1, 2, 3 ]
113
114  adi,input-justification:
115    description: Input bit justification.
116    enum: [ left, evenly, right ]
117
118  ports:
119    description:
120      The ADV7511(W)/13 has two video ports and one audio port. This node
121      models their connections as documented in
122      Documentation/devicetree/bindings/media/video-interfaces.txt
123      Documentation/devicetree/bindings/graph.txt
124    type: object
125    properties:
126      port@0:
127        description: Video port for the RGB or YUV input.
128        type: object
129
130      port@1:
131        description: Video port for the HDMI output.
132        type: object
133
134      port@2:
135        description: Audio port for the HDMI output.
136        type: object
137
138# adi,input-colorspace and adi,input-clock are required except in
139# "rgb 1x" and "yuv444 1x" modes, in which case they must not be
140# specified.
141if:
142  not:
143    properties:
144      adi,input-colorspace:
145        contains:
146          enum: [ rgb, yuv444 ]
147      adi,input-clock:
148        contains:
149          const: 1x
150
151then:
152  required:
153    - adi,input-style
154    - adi,input-justification
155
156else:
157  properties:
158    adi,input-style: false
159    adi,input-justification: false
160
161
162required:
163  - compatible
164  - reg
165  - ports
166  - adi,input-depth
167  - adi,input-colorspace
168  - adi,input-clock
169  - avdd-supply
170  - dvdd-supply
171  - pvdd-supply
172  - dvdd-3v-supply
173  - bgvdd-supply
174
175additionalProperties: false
176
177examples:
178  - |
179    #include <dt-bindings/interrupt-controller/irq.h>
180
181    i2c@e6500000 {
182        #address-cells = <1>;
183        #size-cells = <0>;
184
185        reg = <0 0xe6500000>;
186
187        adv7511w: hdmi@39 {
188            compatible = "adi,adv7511w";
189            /*
190             * The EDID page will be accessible on address 0x66 on the I2C
191             * bus. All other maps continue to use their default addresses.
192             */
193            reg = <0x39>, <0x66>;
194            reg-names = "main", "edid";
195            interrupt-parent = <&gpio3>;
196            interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
197            clocks = <&cec_clock>;
198            clock-names = "cec";
199            avdd-supply = <&v1v8>;
200            dvdd-supply = <&v1v8>;
201            pvdd-supply = <&v1v8>;
202            dvdd-3v-supply = <&v3v3>;
203            bgvdd-supply = <&v1v8>;
204
205            adi,input-depth = <8>;
206            adi,input-colorspace = "yuv422";
207            adi,input-clock = "1x";
208
209            adi,input-style = <3>;
210            adi,input-justification = "right";
211            ports {
212                #address-cells = <1>;
213                #size-cells = <0>;
214
215                port@0 {
216                    reg = <0>;
217                    adv7511w_in: endpoint {
218                        remote-endpoint = <&dpi_out>;
219                    };
220                };
221
222                port@1 {
223                    reg = <1>;
224                    adv7511_out: endpoint {
225                        remote-endpoint = <&hdmi_connector_in>;
226                    };
227                };
228
229                port@2 {
230                    reg = <2>;
231                    codec_endpoint: endpoint {
232                        remote-endpoint = <&i2s0_cpu_endpoint>;
233                    };
234                };
235            };
236        };
237    };
238
239...
240