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