xref: /freebsd/sys/contrib/device-tree/Bindings/display/allwinner,sun4i-a10-tcon.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/display/allwinner,sun4i-a10-tcon.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7*7ef62cebSEmmanuel Vadottitle: Allwinner A10 Timings Controller (TCON)
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Chen-Yu Tsai <wens@csie.org>
11c66ec88fSEmmanuel Vadot  - Maxime Ripard <mripard@kernel.org>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotdescription: |
14c66ec88fSEmmanuel Vadot  The TCON acts as a timing controller for RGB, LVDS and TV
15c66ec88fSEmmanuel Vadot  interfaces.
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadotproperties:
18c66ec88fSEmmanuel Vadot  "#clock-cells":
19c66ec88fSEmmanuel Vadot    const: 0
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel Vadot  compatible:
22c66ec88fSEmmanuel Vadot    oneOf:
23c66ec88fSEmmanuel Vadot      - const: allwinner,sun4i-a10-tcon
24c66ec88fSEmmanuel Vadot      - const: allwinner,sun5i-a13-tcon
25c66ec88fSEmmanuel Vadot      - const: allwinner,sun6i-a31-tcon
26c66ec88fSEmmanuel Vadot      - const: allwinner,sun6i-a31s-tcon
27c66ec88fSEmmanuel Vadot      - const: allwinner,sun7i-a20-tcon
28c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-a23-tcon
29c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-a33-tcon
30c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-a83t-tcon-lcd
31c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-a83t-tcon-tv
32c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-r40-tcon-tv
33c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-v3s-tcon
34c66ec88fSEmmanuel Vadot      - const: allwinner,sun9i-a80-tcon-lcd
35c66ec88fSEmmanuel Vadot      - const: allwinner,sun9i-a80-tcon-tv
36d5b0e70fSEmmanuel Vadot      - const: allwinner,sun20i-d1-tcon-lcd
37d5b0e70fSEmmanuel Vadot      - const: allwinner,sun20i-d1-tcon-tv
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot      - items:
40c66ec88fSEmmanuel Vadot          - enum:
41c66ec88fSEmmanuel Vadot              - allwinner,sun7i-a20-tcon0
42c66ec88fSEmmanuel Vadot              - allwinner,sun7i-a20-tcon1
43c66ec88fSEmmanuel Vadot          - const: allwinner,sun7i-a20-tcon
44c66ec88fSEmmanuel Vadot
45c66ec88fSEmmanuel Vadot      - items:
46c66ec88fSEmmanuel Vadot          - enum:
47c66ec88fSEmmanuel Vadot              - allwinner,sun50i-a64-tcon-lcd
48c66ec88fSEmmanuel Vadot          - const: allwinner,sun8i-a83t-tcon-lcd
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot      - items:
51c66ec88fSEmmanuel Vadot          - enum:
52c66ec88fSEmmanuel Vadot              - allwinner,sun8i-h3-tcon-tv
53c66ec88fSEmmanuel Vadot              - allwinner,sun50i-a64-tcon-tv
54c66ec88fSEmmanuel Vadot          - const: allwinner,sun8i-a83t-tcon-tv
55c66ec88fSEmmanuel Vadot
56c66ec88fSEmmanuel Vadot      - items:
57c66ec88fSEmmanuel Vadot          - enum:
58c66ec88fSEmmanuel Vadot              - allwinner,sun50i-h6-tcon-tv
59c66ec88fSEmmanuel Vadot          - const: allwinner,sun8i-r40-tcon-tv
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel Vadot  reg:
62c66ec88fSEmmanuel Vadot    maxItems: 1
63c66ec88fSEmmanuel Vadot
64c66ec88fSEmmanuel Vadot  interrupts:
65c66ec88fSEmmanuel Vadot    maxItems: 1
66c66ec88fSEmmanuel Vadot
67c66ec88fSEmmanuel Vadot  clocks:
68c66ec88fSEmmanuel Vadot    minItems: 1
69c66ec88fSEmmanuel Vadot    maxItems: 4
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel Vadot  clock-names:
72c66ec88fSEmmanuel Vadot    minItems: 1
73c66ec88fSEmmanuel Vadot    maxItems: 4
74c66ec88fSEmmanuel Vadot
75c66ec88fSEmmanuel Vadot  clock-output-names:
76c66ec88fSEmmanuel Vadot    description:
77c66ec88fSEmmanuel Vadot      Name of the LCD pixel clock created.
78c66ec88fSEmmanuel Vadot    maxItems: 1
79c66ec88fSEmmanuel Vadot
80c66ec88fSEmmanuel Vadot  dmas:
81c66ec88fSEmmanuel Vadot    maxItems: 1
82c66ec88fSEmmanuel Vadot
83c66ec88fSEmmanuel Vadot  resets:
84c66ec88fSEmmanuel Vadot    anyOf:
85c66ec88fSEmmanuel Vadot      - items:
86c66ec88fSEmmanuel Vadot          - description: TCON Reset Line
87c66ec88fSEmmanuel Vadot
88c66ec88fSEmmanuel Vadot      - items:
89c66ec88fSEmmanuel Vadot          - description: TCON Reset Line
90c66ec88fSEmmanuel Vadot          - description: TCON LVDS Reset Line
91c66ec88fSEmmanuel Vadot
92c66ec88fSEmmanuel Vadot      - items:
93c66ec88fSEmmanuel Vadot          - description: TCON Reset Line
94c66ec88fSEmmanuel Vadot          - description: TCON eDP Reset Line
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadot      - items:
97c66ec88fSEmmanuel Vadot          - description: TCON Reset Line
98c66ec88fSEmmanuel Vadot          - description: TCON eDP Reset Line
99c66ec88fSEmmanuel Vadot          - description: TCON LVDS Reset Line
100c66ec88fSEmmanuel Vadot
101c66ec88fSEmmanuel Vadot  reset-names:
102c66ec88fSEmmanuel Vadot    oneOf:
103c66ec88fSEmmanuel Vadot      - const: lcd
104c66ec88fSEmmanuel Vadot
105c66ec88fSEmmanuel Vadot      - items:
106c66ec88fSEmmanuel Vadot          - const: lcd
107c66ec88fSEmmanuel Vadot          - const: lvds
108c66ec88fSEmmanuel Vadot
109c66ec88fSEmmanuel Vadot      - items:
110c66ec88fSEmmanuel Vadot          - const: lcd
111c66ec88fSEmmanuel Vadot          - const: edp
112c66ec88fSEmmanuel Vadot
113c66ec88fSEmmanuel Vadot      - items:
114c66ec88fSEmmanuel Vadot          - const: lcd
115c66ec88fSEmmanuel Vadot          - const: edp
116c66ec88fSEmmanuel Vadot          - const: lvds
117c66ec88fSEmmanuel Vadot
118c66ec88fSEmmanuel Vadot  ports:
1195def4c47SEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
120c66ec88fSEmmanuel Vadot
121c66ec88fSEmmanuel Vadot    properties:
122c66ec88fSEmmanuel Vadot      port@0:
1235def4c47SEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
124c66ec88fSEmmanuel Vadot        description: |
125c66ec88fSEmmanuel Vadot          Input endpoints of the controller.
126c66ec88fSEmmanuel Vadot
127c66ec88fSEmmanuel Vadot      port@1:
1285def4c47SEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
1295def4c47SEmmanuel Vadot        unevaluatedProperties: false
130c66ec88fSEmmanuel Vadot        description: |
131c66ec88fSEmmanuel Vadot          Output endpoints of the controller.
132c66ec88fSEmmanuel Vadot
133c66ec88fSEmmanuel Vadot        patternProperties:
134c66ec88fSEmmanuel Vadot          "^endpoint(@[0-9])$":
1355def4c47SEmmanuel Vadot            $ref: /schemas/graph.yaml#/$defs/endpoint-base
1365def4c47SEmmanuel Vadot            unevaluatedProperties: false
137c66ec88fSEmmanuel Vadot
138c66ec88fSEmmanuel Vadot            properties:
139c66ec88fSEmmanuel Vadot              allwinner,tcon-channel:
140c66ec88fSEmmanuel Vadot                $ref: /schemas/types.yaml#/definitions/uint32
141c66ec88fSEmmanuel Vadot                description: |
142c66ec88fSEmmanuel Vadot                  TCON can have 1 or 2 channels, usually with the
143c66ec88fSEmmanuel Vadot                  first channel being used for the panels interfaces
144c66ec88fSEmmanuel Vadot                  (RGB, LVDS, etc.), and the second being used for the
145c66ec88fSEmmanuel Vadot                  outputs that require another controller (TV Encoder,
146c66ec88fSEmmanuel Vadot                  HDMI, etc.).
147c66ec88fSEmmanuel Vadot
148c66ec88fSEmmanuel Vadot                  If that property is present, specifies the TCON
149c66ec88fSEmmanuel Vadot                  channel the endpoint is associated to. If that
150c66ec88fSEmmanuel Vadot                  property is not present, the endpoint number will be
151c66ec88fSEmmanuel Vadot                  used as the channel number.
152c66ec88fSEmmanuel Vadot
153c66ec88fSEmmanuel Vadot    required:
154c66ec88fSEmmanuel Vadot      - port@0
155c66ec88fSEmmanuel Vadot      - port@1
156c66ec88fSEmmanuel Vadot
157c66ec88fSEmmanuel Vadotrequired:
158c66ec88fSEmmanuel Vadot  - compatible
159c66ec88fSEmmanuel Vadot  - reg
160c66ec88fSEmmanuel Vadot  - interrupts
161c66ec88fSEmmanuel Vadot  - clocks
162c66ec88fSEmmanuel Vadot  - clock-names
163c66ec88fSEmmanuel Vadot  - resets
164c66ec88fSEmmanuel Vadot  - ports
165c66ec88fSEmmanuel Vadot
166c66ec88fSEmmanuel VadotadditionalProperties: false
167c66ec88fSEmmanuel Vadot
168c66ec88fSEmmanuel VadotallOf:
169c66ec88fSEmmanuel Vadot  - if:
170c66ec88fSEmmanuel Vadot      properties:
171c66ec88fSEmmanuel Vadot        compatible:
172c66ec88fSEmmanuel Vadot          contains:
173c66ec88fSEmmanuel Vadot            enum:
174c66ec88fSEmmanuel Vadot              - allwinner,sun4i-a10-tcon
175c66ec88fSEmmanuel Vadot              - allwinner,sun5i-a13-tcon
176c66ec88fSEmmanuel Vadot              - allwinner,sun7i-a20-tcon
177c66ec88fSEmmanuel Vadot
178c66ec88fSEmmanuel Vadot    then:
179c66ec88fSEmmanuel Vadot      properties:
180c66ec88fSEmmanuel Vadot        clocks:
181c66ec88fSEmmanuel Vadot          minItems: 3
182c66ec88fSEmmanuel Vadot
183c66ec88fSEmmanuel Vadot        clock-names:
184c66ec88fSEmmanuel Vadot          items:
185c66ec88fSEmmanuel Vadot            - const: ahb
186c66ec88fSEmmanuel Vadot            - const: tcon-ch0
187c66ec88fSEmmanuel Vadot            - const: tcon-ch1
188c66ec88fSEmmanuel Vadot
189c66ec88fSEmmanuel Vadot  - if:
190c66ec88fSEmmanuel Vadot      properties:
191c66ec88fSEmmanuel Vadot        compatible:
192c66ec88fSEmmanuel Vadot          contains:
193c66ec88fSEmmanuel Vadot            enum:
194c66ec88fSEmmanuel Vadot              - allwinner,sun6i-a31-tcon
195c66ec88fSEmmanuel Vadot              - allwinner,sun6i-a31s-tcon
196c66ec88fSEmmanuel Vadot
197c66ec88fSEmmanuel Vadot    then:
198c66ec88fSEmmanuel Vadot      properties:
199c66ec88fSEmmanuel Vadot        clocks:
200c66ec88fSEmmanuel Vadot          minItems: 4
201c66ec88fSEmmanuel Vadot
202c66ec88fSEmmanuel Vadot        clock-names:
203c66ec88fSEmmanuel Vadot          items:
204c66ec88fSEmmanuel Vadot            - const: ahb
205c66ec88fSEmmanuel Vadot            - const: tcon-ch0
206c66ec88fSEmmanuel Vadot            - const: tcon-ch1
207c66ec88fSEmmanuel Vadot            - const: lvds-alt
208c66ec88fSEmmanuel Vadot
209c66ec88fSEmmanuel Vadot  - if:
210c66ec88fSEmmanuel Vadot      properties:
211c66ec88fSEmmanuel Vadot        compatible:
212c66ec88fSEmmanuel Vadot          contains:
213c66ec88fSEmmanuel Vadot            enum:
214c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a23-tcon
215c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a33-tcon
216c66ec88fSEmmanuel Vadot
217c66ec88fSEmmanuel Vadot    then:
218c66ec88fSEmmanuel Vadot      properties:
219c66ec88fSEmmanuel Vadot        clocks:
220c66ec88fSEmmanuel Vadot          minItems: 3
221c66ec88fSEmmanuel Vadot
222c66ec88fSEmmanuel Vadot        clock-names:
223c66ec88fSEmmanuel Vadot          items:
224c66ec88fSEmmanuel Vadot            - const: ahb
225c66ec88fSEmmanuel Vadot            - const: tcon-ch0
226c66ec88fSEmmanuel Vadot            - const: lvds-alt
227c66ec88fSEmmanuel Vadot
228c66ec88fSEmmanuel Vadot  - if:
229c66ec88fSEmmanuel Vadot      properties:
230c66ec88fSEmmanuel Vadot        compatible:
231c66ec88fSEmmanuel Vadot          contains:
232c66ec88fSEmmanuel Vadot            enum:
233c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a83t-tcon-lcd
234c66ec88fSEmmanuel Vadot              - allwinner,sun8i-v3s-tcon
235c66ec88fSEmmanuel Vadot              - allwinner,sun9i-a80-tcon-lcd
236b97ee269SEmmanuel Vadot              - allwinner,sun20i-d1-tcon-lcd
237c66ec88fSEmmanuel Vadot
238c66ec88fSEmmanuel Vadot    then:
239c66ec88fSEmmanuel Vadot      properties:
240c66ec88fSEmmanuel Vadot        clocks:
241c66ec88fSEmmanuel Vadot          minItems: 2
242c66ec88fSEmmanuel Vadot
243c66ec88fSEmmanuel Vadot        clock-names:
244c66ec88fSEmmanuel Vadot          items:
245c66ec88fSEmmanuel Vadot            - const: ahb
246c66ec88fSEmmanuel Vadot            - const: tcon-ch0
247c66ec88fSEmmanuel Vadot
248c66ec88fSEmmanuel Vadot  - if:
249c66ec88fSEmmanuel Vadot      properties:
250c66ec88fSEmmanuel Vadot        compatible:
251c66ec88fSEmmanuel Vadot          contains:
252c66ec88fSEmmanuel Vadot            enum:
253c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a83t-tcon-tv
254c66ec88fSEmmanuel Vadot              - allwinner,sun8i-r40-tcon-tv
255c66ec88fSEmmanuel Vadot              - allwinner,sun9i-a80-tcon-tv
256b97ee269SEmmanuel Vadot              - allwinner,sun20i-d1-tcon-tv
257c66ec88fSEmmanuel Vadot
258c66ec88fSEmmanuel Vadot    then:
259c66ec88fSEmmanuel Vadot      properties:
260c66ec88fSEmmanuel Vadot        clocks:
261c66ec88fSEmmanuel Vadot          minItems: 2
262c66ec88fSEmmanuel Vadot
263c66ec88fSEmmanuel Vadot        clock-names:
264c66ec88fSEmmanuel Vadot          items:
265c66ec88fSEmmanuel Vadot            - const: ahb
266c66ec88fSEmmanuel Vadot            - const: tcon-ch1
267c66ec88fSEmmanuel Vadot
268c66ec88fSEmmanuel Vadot  - if:
269c66ec88fSEmmanuel Vadot      properties:
270c66ec88fSEmmanuel Vadot        compatible:
271c66ec88fSEmmanuel Vadot          contains:
272c66ec88fSEmmanuel Vadot            enum:
273c66ec88fSEmmanuel Vadot              - allwinner,sun5i-a13-tcon
274c66ec88fSEmmanuel Vadot              - allwinner,sun6i-a31-tcon
275c66ec88fSEmmanuel Vadot              - allwinner,sun6i-a31s-tcon
276c66ec88fSEmmanuel Vadot              - allwinner,sun7i-a20-tcon
277c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a23-tcon
278c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a33-tcon
279c66ec88fSEmmanuel Vadot              - allwinner,sun8i-v3s-tcon
280c66ec88fSEmmanuel Vadot              - allwinner,sun9i-a80-tcon-lcd
281c66ec88fSEmmanuel Vadot              - allwinner,sun4i-a10-tcon
282c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a83t-tcon-lcd
283b97ee269SEmmanuel Vadot              - allwinner,sun20i-d1-tcon-lcd
284c66ec88fSEmmanuel Vadot
285c66ec88fSEmmanuel Vadot    then:
286c66ec88fSEmmanuel Vadot      required:
287c66ec88fSEmmanuel Vadot        - "#clock-cells"
288c66ec88fSEmmanuel Vadot        - clock-output-names
289c66ec88fSEmmanuel Vadot
290c66ec88fSEmmanuel Vadot  - if:
291c66ec88fSEmmanuel Vadot      properties:
292c66ec88fSEmmanuel Vadot        compatible:
293c66ec88fSEmmanuel Vadot          contains:
294c66ec88fSEmmanuel Vadot            enum:
295c66ec88fSEmmanuel Vadot              - allwinner,sun6i-a31-tcon
296c66ec88fSEmmanuel Vadot              - allwinner,sun6i-a31s-tcon
297c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a23-tcon
298c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a33-tcon
299c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a83t-tcon-lcd
300b97ee269SEmmanuel Vadot              - allwinner,sun20i-d1-tcon-lcd
301c66ec88fSEmmanuel Vadot
302c66ec88fSEmmanuel Vadot    then:
303c66ec88fSEmmanuel Vadot      properties:
304c66ec88fSEmmanuel Vadot        resets:
305c66ec88fSEmmanuel Vadot          minItems: 2
306c66ec88fSEmmanuel Vadot
307c66ec88fSEmmanuel Vadot        reset-names:
308c66ec88fSEmmanuel Vadot          items:
309c66ec88fSEmmanuel Vadot            - const: lcd
310c66ec88fSEmmanuel Vadot            - const: lvds
311c66ec88fSEmmanuel Vadot
312c66ec88fSEmmanuel Vadot  - if:
313c66ec88fSEmmanuel Vadot      properties:
314c66ec88fSEmmanuel Vadot        compatible:
315c66ec88fSEmmanuel Vadot          contains:
316c66ec88fSEmmanuel Vadot            enum:
317c66ec88fSEmmanuel Vadot              - allwinner,sun9i-a80-tcon-lcd
318c66ec88fSEmmanuel Vadot
319c66ec88fSEmmanuel Vadot    then:
320c66ec88fSEmmanuel Vadot      properties:
321c66ec88fSEmmanuel Vadot        resets:
322c66ec88fSEmmanuel Vadot          minItems: 3
323c66ec88fSEmmanuel Vadot
324c66ec88fSEmmanuel Vadot        reset-names:
325c66ec88fSEmmanuel Vadot          items:
326c66ec88fSEmmanuel Vadot            - const: lcd
327c66ec88fSEmmanuel Vadot            - const: edp
328c66ec88fSEmmanuel Vadot            - const: lvds
329c66ec88fSEmmanuel Vadot
330c66ec88fSEmmanuel Vadot  - if:
331c66ec88fSEmmanuel Vadot      properties:
332c66ec88fSEmmanuel Vadot        compatible:
333c66ec88fSEmmanuel Vadot          contains:
334c66ec88fSEmmanuel Vadot            enum:
335c66ec88fSEmmanuel Vadot              - allwinner,sun9i-a80-tcon-tv
336c66ec88fSEmmanuel Vadot
337c66ec88fSEmmanuel Vadot    then:
338c66ec88fSEmmanuel Vadot      properties:
339c66ec88fSEmmanuel Vadot        resets:
340c66ec88fSEmmanuel Vadot          minItems: 2
341c66ec88fSEmmanuel Vadot
342c66ec88fSEmmanuel Vadot        reset-names:
343c66ec88fSEmmanuel Vadot          items:
344c66ec88fSEmmanuel Vadot            - const: lcd
345c66ec88fSEmmanuel Vadot            - const: edp
346c66ec88fSEmmanuel Vadot
347c66ec88fSEmmanuel Vadot  - if:
348c66ec88fSEmmanuel Vadot      properties:
349c66ec88fSEmmanuel Vadot        compatible:
350c66ec88fSEmmanuel Vadot          contains:
351c66ec88fSEmmanuel Vadot            enum:
352c66ec88fSEmmanuel Vadot              - allwinner,sun4i-a10-tcon
353c66ec88fSEmmanuel Vadot              - allwinner,sun5i-a13-tcon
354c66ec88fSEmmanuel Vadot              - allwinner,sun6i-a31-tcon
355c66ec88fSEmmanuel Vadot              - allwinner,sun6i-a31s-tcon
356c66ec88fSEmmanuel Vadot              - allwinner,sun7i-a20-tcon
357c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a23-tcon
358c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a33-tcon
359c66ec88fSEmmanuel Vadot
360c66ec88fSEmmanuel Vadot    then:
361c66ec88fSEmmanuel Vadot      required:
362c66ec88fSEmmanuel Vadot        - dmas
363c66ec88fSEmmanuel Vadot
364c66ec88fSEmmanuel Vadotexamples:
365c66ec88fSEmmanuel Vadot  - |
366c66ec88fSEmmanuel Vadot    #include <dt-bindings/dma/sun4i-a10.h>
367c66ec88fSEmmanuel Vadot
368c66ec88fSEmmanuel Vadot    /*
369c66ec88fSEmmanuel Vadot     * This comes from the clock/sun4i-a10-ccu.h and
370c66ec88fSEmmanuel Vadot     * reset/sun4i-a10-ccu.h headers, but we can't include them since
371c66ec88fSEmmanuel Vadot     * it would trigger a bunch of warnings for redefinitions of
372c66ec88fSEmmanuel Vadot     * symbols with the other example.
373c66ec88fSEmmanuel Vadot     */
374c66ec88fSEmmanuel Vadot
375c66ec88fSEmmanuel Vadot    #define CLK_AHB_LCD0	56
376c66ec88fSEmmanuel Vadot    #define CLK_TCON0_CH0	149
377c66ec88fSEmmanuel Vadot    #define CLK_TCON0_CH1	155
378c66ec88fSEmmanuel Vadot    #define RST_TCON0		11
379c66ec88fSEmmanuel Vadot
380c66ec88fSEmmanuel Vadot    lcd-controller@1c0c000 {
381c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun4i-a10-tcon";
382c66ec88fSEmmanuel Vadot        reg = <0x01c0c000 0x1000>;
383c66ec88fSEmmanuel Vadot        interrupts = <44>;
384c66ec88fSEmmanuel Vadot        resets = <&ccu RST_TCON0>;
385c66ec88fSEmmanuel Vadot        reset-names = "lcd";
386c66ec88fSEmmanuel Vadot        clocks = <&ccu CLK_AHB_LCD0>,
387c66ec88fSEmmanuel Vadot                 <&ccu CLK_TCON0_CH0>,
388c66ec88fSEmmanuel Vadot                 <&ccu CLK_TCON0_CH1>;
389c66ec88fSEmmanuel Vadot        clock-names = "ahb",
390c66ec88fSEmmanuel Vadot                      "tcon-ch0",
391c66ec88fSEmmanuel Vadot                      "tcon-ch1";
392c66ec88fSEmmanuel Vadot        clock-output-names = "tcon0-pixel-clock";
393c66ec88fSEmmanuel Vadot        #clock-cells = <0>;
394c66ec88fSEmmanuel Vadot        dmas = <&dma SUN4I_DMA_DEDICATED 14>;
395c66ec88fSEmmanuel Vadot
396c66ec88fSEmmanuel Vadot        ports {
397c66ec88fSEmmanuel Vadot            #address-cells = <1>;
398c66ec88fSEmmanuel Vadot            #size-cells = <0>;
399c66ec88fSEmmanuel Vadot
400c66ec88fSEmmanuel Vadot            port@0 {
401c66ec88fSEmmanuel Vadot                #address-cells = <1>;
402c66ec88fSEmmanuel Vadot                #size-cells = <0>;
403c66ec88fSEmmanuel Vadot                reg = <0>;
404c66ec88fSEmmanuel Vadot
405c66ec88fSEmmanuel Vadot                endpoint@0 {
406c66ec88fSEmmanuel Vadot                    reg = <0>;
407c66ec88fSEmmanuel Vadot                    remote-endpoint = <&be0_out_tcon0>;
408c66ec88fSEmmanuel Vadot                };
409c66ec88fSEmmanuel Vadot
410c66ec88fSEmmanuel Vadot                endpoint@1 {
411c66ec88fSEmmanuel Vadot                    reg = <1>;
412c66ec88fSEmmanuel Vadot                    remote-endpoint = <&be1_out_tcon0>;
413c66ec88fSEmmanuel Vadot                };
414c66ec88fSEmmanuel Vadot            };
415c66ec88fSEmmanuel Vadot
416c66ec88fSEmmanuel Vadot            port@1 {
417c66ec88fSEmmanuel Vadot                #address-cells = <1>;
418c66ec88fSEmmanuel Vadot                #size-cells = <0>;
419c66ec88fSEmmanuel Vadot                reg = <1>;
420c66ec88fSEmmanuel Vadot
421c66ec88fSEmmanuel Vadot                endpoint@1 {
422c66ec88fSEmmanuel Vadot                    reg = <1>;
423c66ec88fSEmmanuel Vadot                    remote-endpoint = <&hdmi_in_tcon0>;
424c66ec88fSEmmanuel Vadot                    allwinner,tcon-channel = <1>;
425c66ec88fSEmmanuel Vadot                };
426c66ec88fSEmmanuel Vadot            };
427c66ec88fSEmmanuel Vadot        };
428c66ec88fSEmmanuel Vadot    };
429c66ec88fSEmmanuel Vadot
430c66ec88fSEmmanuel Vadot    #undef CLK_AHB_LCD0
431c66ec88fSEmmanuel Vadot    #undef CLK_TCON0_CH0
432c66ec88fSEmmanuel Vadot    #undef CLK_TCON0_CH1
433c66ec88fSEmmanuel Vadot    #undef RST_TCON0
434c66ec88fSEmmanuel Vadot
435c66ec88fSEmmanuel Vadot  - |
436c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
437c66ec88fSEmmanuel Vadot
438c66ec88fSEmmanuel Vadot    /*
439c66ec88fSEmmanuel Vadot     * This comes from the clock/sun6i-a31-ccu.h and
440c66ec88fSEmmanuel Vadot     * reset/sun6i-a31-ccu.h headers, but we can't include them since
441c66ec88fSEmmanuel Vadot     * it would trigger a bunch of warnings for redefinitions of
442c66ec88fSEmmanuel Vadot     * symbols with the other example.
443c66ec88fSEmmanuel Vadot     */
444c66ec88fSEmmanuel Vadot
445c66ec88fSEmmanuel Vadot    #define CLK_PLL_MIPI	15
446c66ec88fSEmmanuel Vadot    #define CLK_AHB1_LCD0	47
447c66ec88fSEmmanuel Vadot    #define CLK_LCD0_CH0	127
448c66ec88fSEmmanuel Vadot    #define CLK_LCD0_CH1	129
449c66ec88fSEmmanuel Vadot    #define RST_AHB1_LCD0	27
450c66ec88fSEmmanuel Vadot    #define RST_AHB1_LVDS	41
451c66ec88fSEmmanuel Vadot
452c66ec88fSEmmanuel Vadot    lcd-controller@1c0c000 {
453c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun6i-a31-tcon";
454c66ec88fSEmmanuel Vadot        reg = <0x01c0c000 0x1000>;
455c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
456c66ec88fSEmmanuel Vadot        dmas = <&dma 11>;
457c66ec88fSEmmanuel Vadot        resets = <&ccu RST_AHB1_LCD0>, <&ccu RST_AHB1_LVDS>;
458c66ec88fSEmmanuel Vadot        reset-names = "lcd", "lvds";
459c66ec88fSEmmanuel Vadot        clocks = <&ccu CLK_AHB1_LCD0>,
460c66ec88fSEmmanuel Vadot                 <&ccu CLK_LCD0_CH0>,
461c66ec88fSEmmanuel Vadot                 <&ccu CLK_LCD0_CH1>,
462c66ec88fSEmmanuel Vadot                 <&ccu CLK_PLL_MIPI>;
463c66ec88fSEmmanuel Vadot        clock-names = "ahb",
464c66ec88fSEmmanuel Vadot                      "tcon-ch0",
465c66ec88fSEmmanuel Vadot                      "tcon-ch1",
466c66ec88fSEmmanuel Vadot                      "lvds-alt";
467c66ec88fSEmmanuel Vadot        clock-output-names = "tcon0-pixel-clock";
468c66ec88fSEmmanuel Vadot        #clock-cells = <0>;
469c66ec88fSEmmanuel Vadot
470c66ec88fSEmmanuel Vadot        ports {
471c66ec88fSEmmanuel Vadot            #address-cells = <1>;
472c66ec88fSEmmanuel Vadot            #size-cells = <0>;
473c66ec88fSEmmanuel Vadot
474c66ec88fSEmmanuel Vadot            port@0 {
475c66ec88fSEmmanuel Vadot                #address-cells = <1>;
476c66ec88fSEmmanuel Vadot                #size-cells = <0>;
477c66ec88fSEmmanuel Vadot                reg = <0>;
478c66ec88fSEmmanuel Vadot
479c66ec88fSEmmanuel Vadot                endpoint@0 {
480c66ec88fSEmmanuel Vadot                    reg = <0>;
481c66ec88fSEmmanuel Vadot                    remote-endpoint = <&drc0_out_tcon0>;
482c66ec88fSEmmanuel Vadot                };
483c66ec88fSEmmanuel Vadot
484c66ec88fSEmmanuel Vadot                endpoint@1 {
485c66ec88fSEmmanuel Vadot                    reg = <1>;
486c66ec88fSEmmanuel Vadot                    remote-endpoint = <&drc1_out_tcon0>;
487c66ec88fSEmmanuel Vadot                };
488c66ec88fSEmmanuel Vadot            };
489c66ec88fSEmmanuel Vadot
490c66ec88fSEmmanuel Vadot            port@1 {
491c66ec88fSEmmanuel Vadot                #address-cells = <1>;
492c66ec88fSEmmanuel Vadot                #size-cells = <0>;
493c66ec88fSEmmanuel Vadot                reg = <1>;
494c66ec88fSEmmanuel Vadot
495c66ec88fSEmmanuel Vadot                endpoint@1 {
496c66ec88fSEmmanuel Vadot                    reg = <1>;
497c66ec88fSEmmanuel Vadot                    remote-endpoint = <&hdmi_in_tcon0>;
498c66ec88fSEmmanuel Vadot                    allwinner,tcon-channel = <1>;
499c66ec88fSEmmanuel Vadot                };
500c66ec88fSEmmanuel Vadot            };
501c66ec88fSEmmanuel Vadot        };
502c66ec88fSEmmanuel Vadot    };
503c66ec88fSEmmanuel Vadot
504c66ec88fSEmmanuel Vadot    #undef CLK_PLL_MIPI
505c66ec88fSEmmanuel Vadot    #undef CLK_AHB1_LCD0
506c66ec88fSEmmanuel Vadot    #undef CLK_LCD0_CH0
507c66ec88fSEmmanuel Vadot    #undef CLK_LCD0_CH1
508c66ec88fSEmmanuel Vadot    #undef RST_AHB1_LCD0
509c66ec88fSEmmanuel Vadot    #undef RST_AHB1_LVDS
510c66ec88fSEmmanuel Vadot
511c66ec88fSEmmanuel Vadot  - |
512c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
513c66ec88fSEmmanuel Vadot
514c66ec88fSEmmanuel Vadot    /*
515c66ec88fSEmmanuel Vadot     * This comes from the clock/sun9i-a80-ccu.h and
516c66ec88fSEmmanuel Vadot     * reset/sun9i-a80-ccu.h headers, but we can't include them since
517c66ec88fSEmmanuel Vadot     * it would trigger a bunch of warnings for redefinitions of
518c66ec88fSEmmanuel Vadot     * symbols with the other example.
519c66ec88fSEmmanuel Vadot     */
520c66ec88fSEmmanuel Vadot
521c66ec88fSEmmanuel Vadot    #define CLK_BUS_LCD0	102
522c66ec88fSEmmanuel Vadot    #define CLK_LCD0		58
523c66ec88fSEmmanuel Vadot    #define RST_BUS_LCD0	22
524c66ec88fSEmmanuel Vadot    #define RST_BUS_EDP		24
525c66ec88fSEmmanuel Vadot    #define RST_BUS_LVDS	25
526c66ec88fSEmmanuel Vadot
527c66ec88fSEmmanuel Vadot    lcd-controller@3c00000 {
528c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun9i-a80-tcon-lcd";
529c66ec88fSEmmanuel Vadot        reg = <0x03c00000 0x10000>;
530c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
531c66ec88fSEmmanuel Vadot        clocks = <&ccu CLK_BUS_LCD0>, <&ccu CLK_LCD0>;
532c66ec88fSEmmanuel Vadot        clock-names = "ahb", "tcon-ch0";
533c66ec88fSEmmanuel Vadot        resets = <&ccu RST_BUS_LCD0>, <&ccu RST_BUS_EDP>, <&ccu RST_BUS_LVDS>;
534c66ec88fSEmmanuel Vadot        reset-names = "lcd", "edp", "lvds";
535c66ec88fSEmmanuel Vadot        clock-output-names = "tcon0-pixel-clock";
536c66ec88fSEmmanuel Vadot        #clock-cells = <0>;
537c66ec88fSEmmanuel Vadot
538c66ec88fSEmmanuel Vadot        ports {
539c66ec88fSEmmanuel Vadot            #address-cells = <1>;
540c66ec88fSEmmanuel Vadot            #size-cells = <0>;
541c66ec88fSEmmanuel Vadot
542c66ec88fSEmmanuel Vadot            port@0 {
543c66ec88fSEmmanuel Vadot                reg = <0>;
544c66ec88fSEmmanuel Vadot
545c66ec88fSEmmanuel Vadot                endpoint {
546c66ec88fSEmmanuel Vadot                    remote-endpoint = <&drc0_out_tcon0>;
547c66ec88fSEmmanuel Vadot                };
548c66ec88fSEmmanuel Vadot            };
549c66ec88fSEmmanuel Vadot
550c66ec88fSEmmanuel Vadot            port@1 {
551c66ec88fSEmmanuel Vadot                reg = <1>;
552c66ec88fSEmmanuel Vadot            };
553c66ec88fSEmmanuel Vadot        };
554c66ec88fSEmmanuel Vadot    };
555c66ec88fSEmmanuel Vadot
556c66ec88fSEmmanuel Vadot    #undef CLK_BUS_TCON0
557c66ec88fSEmmanuel Vadot    #undef CLK_TCON0
558c66ec88fSEmmanuel Vadot    #undef RST_BUS_TCON0
559c66ec88fSEmmanuel Vadot    #undef RST_BUS_EDP
560c66ec88fSEmmanuel Vadot    #undef RST_BUS_LVDS
561c66ec88fSEmmanuel Vadot
562c66ec88fSEmmanuel Vadot  - |
563c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
564c66ec88fSEmmanuel Vadot
565c66ec88fSEmmanuel Vadot    /*
566c66ec88fSEmmanuel Vadot     * This comes from the clock/sun8i-a83t-ccu.h and
567c66ec88fSEmmanuel Vadot     * reset/sun8i-a83t-ccu.h headers, but we can't include them since
568c66ec88fSEmmanuel Vadot     * it would trigger a bunch of warnings for redefinitions of
569c66ec88fSEmmanuel Vadot     * symbols with the other example.
570c66ec88fSEmmanuel Vadot     */
571c66ec88fSEmmanuel Vadot
572c66ec88fSEmmanuel Vadot    #define CLK_BUS_TCON0	36
573c66ec88fSEmmanuel Vadot    #define CLK_TCON0		85
574c66ec88fSEmmanuel Vadot    #define RST_BUS_TCON0	22
575c66ec88fSEmmanuel Vadot    #define RST_BUS_LVDS	31
576c66ec88fSEmmanuel Vadot
577c66ec88fSEmmanuel Vadot    lcd-controller@1c0c000 {
578c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun8i-a83t-tcon-lcd";
579c66ec88fSEmmanuel Vadot        reg = <0x01c0c000 0x1000>;
580c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
581c66ec88fSEmmanuel Vadot        clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>;
582c66ec88fSEmmanuel Vadot        clock-names = "ahb", "tcon-ch0";
583c66ec88fSEmmanuel Vadot        clock-output-names = "tcon-pixel-clock";
584c66ec88fSEmmanuel Vadot        #clock-cells = <0>;
585c66ec88fSEmmanuel Vadot        resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>;
586c66ec88fSEmmanuel Vadot        reset-names = "lcd", "lvds";
587c66ec88fSEmmanuel Vadot
588c66ec88fSEmmanuel Vadot        ports {
589c66ec88fSEmmanuel Vadot            #address-cells = <1>;
590c66ec88fSEmmanuel Vadot            #size-cells = <0>;
591c66ec88fSEmmanuel Vadot
592c66ec88fSEmmanuel Vadot            port@0 {
593c66ec88fSEmmanuel Vadot                #address-cells = <1>;
594c66ec88fSEmmanuel Vadot                #size-cells = <0>;
595c66ec88fSEmmanuel Vadot                reg = <0>;
596c66ec88fSEmmanuel Vadot
597c66ec88fSEmmanuel Vadot                endpoint@0 {
598c66ec88fSEmmanuel Vadot                    reg = <0>;
599c66ec88fSEmmanuel Vadot                    remote-endpoint = <&mixer0_out_tcon0>;
600c66ec88fSEmmanuel Vadot                };
601c66ec88fSEmmanuel Vadot
602c66ec88fSEmmanuel Vadot                endpoint@1 {
603c66ec88fSEmmanuel Vadot                    reg = <1>;
604c66ec88fSEmmanuel Vadot                    remote-endpoint = <&mixer1_out_tcon0>;
605c66ec88fSEmmanuel Vadot                };
606c66ec88fSEmmanuel Vadot            };
607c66ec88fSEmmanuel Vadot
608c66ec88fSEmmanuel Vadot            port@1 {
609c66ec88fSEmmanuel Vadot                reg = <1>;
610c66ec88fSEmmanuel Vadot            };
611c66ec88fSEmmanuel Vadot        };
612c66ec88fSEmmanuel Vadot    };
613c66ec88fSEmmanuel Vadot
614c66ec88fSEmmanuel Vadot    #undef CLK_BUS_TCON0
615c66ec88fSEmmanuel Vadot    #undef CLK_TCON0
616c66ec88fSEmmanuel Vadot    #undef RST_BUS_TCON0
617c66ec88fSEmmanuel Vadot    #undef RST_BUS_LVDS
618c66ec88fSEmmanuel Vadot
619c66ec88fSEmmanuel Vadot  - |
620c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
621c66ec88fSEmmanuel Vadot
622c66ec88fSEmmanuel Vadot    /*
623c66ec88fSEmmanuel Vadot     * This comes from the clock/sun8i-r40-ccu.h and
624c66ec88fSEmmanuel Vadot     * reset/sun8i-r40-ccu.h headers, but we can't include them since
625c66ec88fSEmmanuel Vadot     * it would trigger a bunch of warnings for redefinitions of
626c66ec88fSEmmanuel Vadot     * symbols with the other example.
627c66ec88fSEmmanuel Vadot     */
628c66ec88fSEmmanuel Vadot
629c66ec88fSEmmanuel Vadot    #define CLK_BUS_TCON_TV0	73
630c66ec88fSEmmanuel Vadot    #define RST_BUS_TCON_TV0	49
631c66ec88fSEmmanuel Vadot
632c66ec88fSEmmanuel Vadot    tcon_tv0: lcd-controller@1c73000 {
633c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun8i-r40-tcon-tv";
634c66ec88fSEmmanuel Vadot        reg = <0x01c73000 0x1000>;
635c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
636c66ec88fSEmmanuel Vadot        clocks = <&ccu CLK_BUS_TCON_TV0>, <&tcon_top 0>;
637c66ec88fSEmmanuel Vadot        clock-names = "ahb", "tcon-ch1";
638c66ec88fSEmmanuel Vadot        resets = <&ccu RST_BUS_TCON_TV0>;
639c66ec88fSEmmanuel Vadot        reset-names = "lcd";
640c66ec88fSEmmanuel Vadot
641c66ec88fSEmmanuel Vadot        ports {
642c66ec88fSEmmanuel Vadot            #address-cells = <1>;
643c66ec88fSEmmanuel Vadot            #size-cells = <0>;
644c66ec88fSEmmanuel Vadot
645c66ec88fSEmmanuel Vadot            port@0 {
646c66ec88fSEmmanuel Vadot                #address-cells = <1>;
647c66ec88fSEmmanuel Vadot                #size-cells = <0>;
648c66ec88fSEmmanuel Vadot                reg = <0>;
649c66ec88fSEmmanuel Vadot
650c66ec88fSEmmanuel Vadot                endpoint@0 {
651c66ec88fSEmmanuel Vadot                    reg = <0>;
652c66ec88fSEmmanuel Vadot                    remote-endpoint = <&tcon_top_mixer0_out_tcon_tv0>;
653c66ec88fSEmmanuel Vadot                };
654c66ec88fSEmmanuel Vadot
655c66ec88fSEmmanuel Vadot                endpoint@1 {
656c66ec88fSEmmanuel Vadot                    reg = <1>;
657c66ec88fSEmmanuel Vadot                    remote-endpoint = <&tcon_top_mixer1_out_tcon_tv0>;
658c66ec88fSEmmanuel Vadot                };
659c66ec88fSEmmanuel Vadot            };
660c66ec88fSEmmanuel Vadot
661c66ec88fSEmmanuel Vadot            tcon_tv0_out: port@1 {
662c66ec88fSEmmanuel Vadot                #address-cells = <1>;
663c66ec88fSEmmanuel Vadot                #size-cells = <0>;
664c66ec88fSEmmanuel Vadot                reg = <1>;
665c66ec88fSEmmanuel Vadot
666c66ec88fSEmmanuel Vadot                endpoint@1 {
667c66ec88fSEmmanuel Vadot                    reg = <1>;
668c66ec88fSEmmanuel Vadot                    remote-endpoint = <&tcon_top_hdmi_in_tcon_tv0>;
669c66ec88fSEmmanuel Vadot                };
670c66ec88fSEmmanuel Vadot            };
671c66ec88fSEmmanuel Vadot        };
672c66ec88fSEmmanuel Vadot    };
673c66ec88fSEmmanuel Vadot
674c66ec88fSEmmanuel Vadot    #undef CLK_BUS_TCON_TV0
675c66ec88fSEmmanuel Vadot    #undef RST_BUS_TCON_TV0
676c66ec88fSEmmanuel Vadot
677c66ec88fSEmmanuel Vadot...
678