summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/display/allwinner,sun8i-r40-tcon-top.yaml
blob: 61ef7b33721857cb60764c12541082ef2f993c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/allwinner,sun8i-r40-tcon-top.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner R40 TCON TOP Device Tree Bindings

maintainers:
  - Chen-Yu Tsai <wens@csie.org>
  - Maxime Ripard <mripard@kernel.org>

description: |
  TCON TOPs main purpose is to configure whole display pipeline. It
  determines relationships between mixers and TCONs, selects source
  TCON for HDMI, muxes LCD and TV encoder GPIO output, selects TV
  encoder clock source and contains additional TV TCON and DSI gates.

  It allows display pipeline to be configured in very different ways:

                                  / LCD0/LVDS0
                   / [0] TCON-LCD0
                   |              \ MIPI DSI
   mixer0          |
          \        / [1] TCON-LCD1 - LCD1/LVDS1
           TCON-TOP
          /        \ [2] TCON-TV0 [0] - TVE0/RGB
   mixer1          |                  \
                   |                   TCON-TOP - HDMI
                   |                  /
                   \ [3] TCON-TV1 [1] - TVE1/RGB

  Note that both TCON TOP references same physical unit. Both mixers
  can be connected to any TCON. Not all TCON TOP variants support all
  features.

properties:
  "#clock-cells":
    const: 1

  compatible:
    enum:
      - allwinner,sun8i-r40-tcon-top
      - allwinner,sun50i-h6-tcon-top

  reg:
    maxItems: 1

  clocks:
    minItems: 2
    items:
      - description: The TCON TOP interface clock
      - description: The TCON TOP TV0 clock
      - description: The TCON TOP TVE0 clock
      - description: The TCON TOP TV1 clock
      - description: The TCON TOP TVE1 clock
      - description: The TCON TOP MIPI DSI clock

  clock-names:
    minItems: 2
    items:
      - const: bus
      - const: tcon-tv0
      - const: tve0
      - const: tcon-tv1
      - const: tve1
      - const: dsi

  clock-output-names:
    minItems: 1
    maxItems: 3
    description: >
      The first item is the name of the clock created for the TV0
      channel, the second item is the name of the TCON TV1 channel
      clock and the third one is the name of the DSI channel clock.

  resets:
    maxItems: 1

  ports:
    $ref: /schemas/graph.yaml#/properties/ports

    properties:
      port@0:
        $ref: /schemas/graph.yaml#/properties/port
        description: |
          Input endpoint for Mixer 0 mux.

      port@1:
        $ref: /schemas/graph.yaml#/properties/port
        description: |
          Output endpoint for Mixer 0 mux

      port@2:
        $ref: /schemas/graph.yaml#/properties/port
        description: |
          Input endpoint for Mixer 1 mux.

      port@3:
        $ref: /schemas/graph.yaml#/properties/port
        description: |
          Output endpoint for Mixer 1 mux

      port@4:
        $ref: /schemas/graph.yaml#/properties/port
        description: |
          Input endpoint for HDMI mux.

      port@5:
        $ref: /schemas/graph.yaml#/properties/port
        description: |
          Output endpoint for HDMI mux

    required:
      - port@0
      - port@1
      - port@4
      - port@5

required:
  - "#clock-cells"
  - compatible
  - reg
  - clocks
  - clock-names
  - clock-output-names
  - resets
  - ports

additionalProperties: false

if:
  properties:
    compatible:
      contains:
        const: allwinner,sun50i-h6-tcon-top

then:
  properties:
    clocks:
      maxItems: 2

    clock-output-names:
      maxItems: 1

else:
  properties:
    clocks:
      minItems: 6

    clock-output-names:
      minItems: 3

    ports:
      required:
        - port@2
        - port@3

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    #include <dt-bindings/clock/sun8i-r40-ccu.h>
    #include <dt-bindings/reset/sun8i-r40-ccu.h>

      tcon_top: tcon-top@1c70000 {
          compatible = "allwinner,sun8i-r40-tcon-top";
          reg = <0x01c70000 0x1000>;
          clocks = <&ccu CLK_BUS_TCON_TOP>,
                   <&ccu CLK_TCON_TV0>,
                   <&ccu CLK_TVE0>,
                   <&ccu CLK_TCON_TV1>,
                   <&ccu CLK_TVE1>,
                   <&ccu CLK_DSI_DPHY>;
          clock-names = "bus",
                        "tcon-tv0",
                        "tve0",
                        "tcon-tv1",
                        "tve1",
                        "dsi";
          clock-output-names = "tcon-top-tv0",
                               "tcon-top-tv1",
                               "tcon-top-dsi";
          resets = <&ccu RST_BUS_TCON_TOP>;
          #clock-cells = <1>;

          ports {
              #address-cells = <1>;
              #size-cells = <0>;

              tcon_top_mixer0_in: port@0 {
                  reg = <0>;

                  tcon_top_mixer0_in_mixer0: endpoint {
                      remote-endpoint = <&mixer0_out_tcon_top>;
                  };
              };

              tcon_top_mixer0_out: port@1 {
                  #address-cells = <1>;
                  #size-cells = <0>;
                  reg = <1>;

                  tcon_top_mixer0_out_tcon_lcd0: endpoint@0 {
                      reg = <0>;
                  };

                  tcon_top_mixer0_out_tcon_lcd1: endpoint@1 {
                      reg = <1>;
                  };

                  tcon_top_mixer0_out_tcon_tv0: endpoint@2 {
                      reg = <2>;
                      remote-endpoint = <&tcon_tv0_in_tcon_top_mixer0>;
                  };

                  tcon_top_mixer0_out_tcon_tv1: endpoint@3 {
                      reg = <3>;
                      remote-endpoint = <&tcon_tv1_in_tcon_top_mixer0>;
                  };
              };

              tcon_top_mixer1_in: port@2 {
                  #address-cells = <1>;
                  #size-cells = <0>;
                  reg = <2>;

                  tcon_top_mixer1_in_mixer1: endpoint@1 {
                      reg = <1>;
                      remote-endpoint = <&mixer1_out_tcon_top>;
                  };
              };

              tcon_top_mixer1_out: port@3 {
                  #address-cells = <1>;
                  #size-cells = <0>;
                  reg = <3>;

                  tcon_top_mixer1_out_tcon_lcd0: endpoint@0 {
                      reg = <0>;
                  };

                  tcon_top_mixer1_out_tcon_lcd1: endpoint@1 {
                      reg = <1>;
                  };

                  tcon_top_mixer1_out_tcon_tv0: endpoint@2 {
                      reg = <2>;
                      remote-endpoint = <&tcon_tv0_in_tcon_top_mixer1>;
                  };

                  tcon_top_mixer1_out_tcon_tv1: endpoint@3 {
                      reg = <3>;
                      remote-endpoint = <&tcon_tv1_in_tcon_top_mixer1>;
                  };
              };

              tcon_top_hdmi_in: port@4 {
                  #address-cells = <1>;
                  #size-cells = <0>;
                  reg = <4>;

                  tcon_top_hdmi_in_tcon_tv0: endpoint@0 {
                      reg = <0>;
                      remote-endpoint = <&tcon_tv0_out_tcon_top>;
                  };

                  tcon_top_hdmi_in_tcon_tv1: endpoint@1 {
                      reg = <1>;
                      remote-endpoint = <&tcon_tv1_out_tcon_top>;
                  };
              };

              tcon_top_hdmi_out: port@5 {
                  reg = <5>;

                  tcon_top_hdmi_out_hdmi: endpoint {
                      remote-endpoint = <&hdmi_in_tcon_top>;
                  };
              };
          };
      };

...