dt-bindings: display: sun4i-drm: Add LVDS properties
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / display / sunxi / sun4i-drm.txt
1 Allwinner A10 Display Pipeline
2 ==============================
3
4 The Allwinner A10 Display pipeline is composed of several components
5 that are going to be documented below:
6
7 For all connections between components up to the TCONs in the display
8 pipeline, when there are multiple components of the same type at the
9 same depth, the local endpoint ID must be the same as the remote
10 component's index. For example, if the remote endpoint is Frontend 1,
11 then the local endpoint ID must be 1.
12
13     Frontend 0  [0] ------- [0]  Backend 0  [0] ------- [0]  TCON 0
14                 [1] --   -- [1]             [1] --   -- [1]
15                       \ /                         \ /
16                        X                           X
17                       / \                         / \
18                 [0] --   -- [0]             [0] --   -- [0]
19     Frontend 1  [1] ------- [1]  Backend 1  [1] ------- [1]  TCON 1
20
21 For a two pipeline system such as the one depicted above, the lines
22 represent the connections between the components, while the numbers
23 within the square brackets corresponds to the ID of the local endpoint.
24
25 The same rule also applies to DE 2.0 mixer-TCON connections:
26
27     Mixer 0  [0] ----------- [0]  TCON 0
28              [1] ----   ---- [1]
29                      \ /
30                       X
31                      / \
32              [0] ----   ---- [0]
33     Mixer 1  [1] ----------- [1]  TCON 1
34
35 HDMI Encoder
36 ------------
37
38 The HDMI Encoder supports the HDMI video and audio outputs, and does
39 CEC. It is one end of the pipeline.
40
41 Required properties:
42   - compatible: value must be one of:
43     * allwinner,sun4i-a10-hdmi
44     * allwinner,sun5i-a10s-hdmi
45     * allwinner,sun6i-a31-hdmi
46   - reg: base address and size of memory-mapped region
47   - interrupts: interrupt associated to this IP
48   - clocks: phandles to the clocks feeding the HDMI encoder
49     * ahb: the HDMI interface clock
50     * mod: the HDMI module clock
51     * ddc: the HDMI ddc clock (A31 only)
52     * pll-0: the first video PLL
53     * pll-1: the second video PLL
54   - clock-names: the clock names mentioned above
55   - resets: phandle to the reset control for the HDMI encoder (A31 only)
56   - dmas: phandles to the DMA channels used by the HDMI encoder
57     * ddc-tx: The channel for DDC transmission
58     * ddc-rx: The channel for DDC reception
59     * audio-tx: The channel used for audio transmission
60   - dma-names: the channel names mentioned above
61
62   - ports: A ports node with endpoint definitions as defined in
63     Documentation/devicetree/bindings/media/video-interfaces.txt. The
64     first port should be the input endpoint. The second should be the
65     output, usually to an HDMI connector.
66
67 TV Encoder
68 ----------
69
70 The TV Encoder supports the composite and VGA output. It is one end of
71 the pipeline.
72
73 Required properties:
74  - compatible: value should be "allwinner,sun4i-a10-tv-encoder".
75  - reg: base address and size of memory-mapped region
76  - clocks: the clocks driving the TV encoder
77  - resets: phandle to the reset controller driving the encoder
78
79 - ports: A ports node with endpoint definitions as defined in
80   Documentation/devicetree/bindings/media/video-interfaces.txt. The
81   first port should be the input endpoint.
82
83 TCON
84 ----
85
86 The TCON acts as a timing controller for RGB, LVDS and TV interfaces.
87
88 Required properties:
89  - compatible: value must be either:
90    * allwinner,sun4i-a10-tcon
91    * allwinner,sun5i-a13-tcon
92    * allwinner,sun6i-a31-tcon
93    * allwinner,sun6i-a31s-tcon
94    * allwinner,sun7i-a20-tcon
95    * allwinner,sun8i-a33-tcon
96    * allwinner,sun8i-v3s-tcon
97  - reg: base address and size of memory-mapped region
98  - interrupts: interrupt associated to this IP
99  - clocks: phandles to the clocks feeding the TCON. Three are needed:
100    - 'ahb': the interface clocks
101    - 'tcon-ch0': The clock driving the TCON channel 0
102  - resets: phandles to the reset controllers driving the encoder
103    - "lcd": the reset line for the TCON channel 0
104
105  - clock-names: the clock names mentioned above
106  - reset-names: the reset names mentioned above
107  - clock-output-names: Name of the pixel clock created
108
109 - ports: A ports node with endpoint definitions as defined in
110   Documentation/devicetree/bindings/media/video-interfaces.txt. The
111   first port should be the input endpoint, the second one the output
112
113   The output may have multiple endpoints. The TCON has two channels,
114   usually with the first channel being used for the panels interfaces
115   (RGB, LVDS, etc.), and the second being used for the outputs that
116   require another controller (TV Encoder, HDMI, etc.). The endpoints
117   will take an extra property, allwinner,tcon-channel, to specify the
118   channel the endpoint is associated to. If that property is not
119   present, the endpoint number will be used as the channel number.
120
121 On SoCs other than the A33 and V3s, there is one more clock required:
122    - 'tcon-ch1': The clock driving the TCON channel 1
123
124 On SoCs that support LVDS (all SoCs but the A13, H3, H5 and V3s), you
125 need one more reset line:
126    - 'lvds': The reset line driving the LVDS logic
127
128 And on the A23, A31, A31s and A33, you need one more clock line:
129    - 'lvds-alt': An alternative clock source, separate from the TCON channel 0
130                  clock, that can be used to drive the LVDS clock
131
132 DRC
133 ---
134
135 The DRC (Dynamic Range Controller), found in the latest Allwinner SoCs
136 (A31, A23, A33), allows to dynamically adjust pixel
137 brightness/contrast based on histogram measurements for LCD content
138 adaptive backlight control.
139
140
141 Required properties:
142   - compatible: value must be one of:
143     * allwinner,sun6i-a31-drc
144     * allwinner,sun6i-a31s-drc
145     * allwinner,sun8i-a33-drc
146   - reg: base address and size of the memory-mapped region.
147   - interrupts: interrupt associated to this IP
148   - clocks: phandles to the clocks feeding the DRC
149     * ahb: the DRC interface clock
150     * mod: the DRC module clock
151     * ram: the DRC DRAM clock
152   - clock-names: the clock names mentioned above
153   - resets: phandles to the reset line driving the DRC
154
155 - ports: A ports node with endpoint definitions as defined in
156   Documentation/devicetree/bindings/media/video-interfaces.txt. The
157   first port should be the input endpoints, the second one the outputs
158
159 Display Engine Backend
160 ----------------------
161
162 The display engine backend exposes layers and sprites to the
163 system.
164
165 Required properties:
166   - compatible: value must be one of:
167     * allwinner,sun4i-a10-display-backend
168     * allwinner,sun5i-a13-display-backend
169     * allwinner,sun6i-a31-display-backend
170     * allwinner,sun7i-a20-display-backend
171     * allwinner,sun8i-a33-display-backend
172   - reg: base address and size of the memory-mapped region.
173   - interrupts: interrupt associated to this IP
174   - clocks: phandles to the clocks feeding the frontend and backend
175     * ahb: the backend interface clock
176     * mod: the backend module clock
177     * ram: the backend DRAM clock
178   - clock-names: the clock names mentioned above
179   - resets: phandles to the reset controllers driving the backend
180
181 - ports: A ports node with endpoint definitions as defined in
182   Documentation/devicetree/bindings/media/video-interfaces.txt. The
183   first port should be the input endpoints, the second one the output
184
185 On the A33, some additional properties are required:
186   - reg needs to have an additional region corresponding to the SAT
187   - reg-names need to be set, with "be" and "sat"
188   - clocks and clock-names need to have a phandle to the SAT bus
189     clocks, whose name will be "sat"
190   - resets and reset-names need to have a phandle to the SAT bus
191     resets, whose name will be "sat"
192
193 Display Engine Frontend
194 -----------------------
195
196 The display engine frontend does formats conversion, scaling,
197 deinterlacing and color space conversion.
198
199 Required properties:
200   - compatible: value must be one of:
201     * allwinner,sun4i-a10-display-frontend
202     * allwinner,sun5i-a13-display-frontend
203     * allwinner,sun6i-a31-display-frontend
204     * allwinner,sun7i-a20-display-frontend
205     * allwinner,sun8i-a33-display-frontend
206   - reg: base address and size of the memory-mapped region.
207   - interrupts: interrupt associated to this IP
208   - clocks: phandles to the clocks feeding the frontend and backend
209     * ahb: the backend interface clock
210     * mod: the backend module clock
211     * ram: the backend DRAM clock
212   - clock-names: the clock names mentioned above
213   - resets: phandles to the reset controllers driving the backend
214
215 - ports: A ports node with endpoint definitions as defined in
216   Documentation/devicetree/bindings/media/video-interfaces.txt. The
217   first port should be the input endpoints, the second one the outputs
218
219 Display Engine 2.0 Mixer
220 ------------------------
221
222 The DE2 mixer have many functionalities, currently only layer blending is
223 supported.
224
225 Required properties:
226   - compatible: value must be one of:
227     * allwinner,sun8i-v3s-de2-mixer
228   - reg: base address and size of the memory-mapped region.
229   - clocks: phandles to the clocks feeding the mixer
230     * bus: the mixer interface clock
231     * mod: the mixer module clock
232   - clock-names: the clock names mentioned above
233   - resets: phandles to the reset controllers driving the mixer
234
235 - ports: A ports node with endpoint definitions as defined in
236   Documentation/devicetree/bindings/media/video-interfaces.txt. The
237   first port should be the input endpoints, the second one the output
238
239
240 Display Engine Pipeline
241 -----------------------
242
243 The display engine pipeline (and its entry point, since it can be
244 either directly the backend or the frontend) is represented as an
245 extra node.
246
247 Required properties:
248   - compatible: value must be one of:
249     * allwinner,sun4i-a10-display-engine
250     * allwinner,sun5i-a10s-display-engine
251     * allwinner,sun5i-a13-display-engine
252     * allwinner,sun6i-a31-display-engine
253     * allwinner,sun6i-a31s-display-engine
254     * allwinner,sun7i-a20-display-engine
255     * allwinner,sun8i-a33-display-engine
256     * allwinner,sun8i-v3s-display-engine
257
258   - allwinner,pipelines: list of phandle to the display engine
259     frontends (DE 1.0) or mixers (DE 2.0) available.
260
261 Example:
262
263 panel: panel {
264         compatible = "olimex,lcd-olinuxino-43-ts";
265         #address-cells = <1>;
266         #size-cells = <0>;
267
268         port {
269                 #address-cells = <1>;
270                 #size-cells = <0>;
271
272                 panel_input: endpoint {
273                         remote-endpoint = <&tcon0_out_panel>;
274                 };
275         };
276 };
277
278 connector {
279         compatible = "hdmi-connector";
280         type = "a";
281
282         port {
283                 hdmi_con_in: endpoint {
284                         remote-endpoint = <&hdmi_out_con>;
285                 };
286         };
287 };
288
289 hdmi: hdmi@1c16000 {
290         compatible = "allwinner,sun5i-a10s-hdmi";
291         reg = <0x01c16000 0x1000>;
292         interrupts = <58>;
293         clocks = <&ccu CLK_AHB_HDMI>, <&ccu CLK_HDMI>,
294                  <&ccu CLK_PLL_VIDEO0_2X>,
295                  <&ccu CLK_PLL_VIDEO1_2X>;
296         clock-names = "ahb", "mod", "pll-0", "pll-1";
297         dmas = <&dma SUN4I_DMA_NORMAL 16>,
298                <&dma SUN4I_DMA_NORMAL 16>,
299                <&dma SUN4I_DMA_DEDICATED 24>;
300         dma-names = "ddc-tx", "ddc-rx", "audio-tx";
301
302         ports {
303                 #address-cells = <1>;
304                 #size-cells = <0>;
305
306                 port@0 {
307                         #address-cells = <1>;
308                         #size-cells = <0>;
309                         reg = <0>;
310
311                         hdmi_in_tcon0: endpoint {
312                                 remote-endpoint = <&tcon0_out_hdmi>;
313                         };
314                 };
315
316                 port@1 {
317                         #address-cells = <1>;
318                         #size-cells = <0>;
319                         reg = <1>;
320
321                         hdmi_out_con: endpoint {
322                                 remote-endpoint = <&hdmi_con_in>;
323                         };
324                 };
325         };
326 };
327
328 tve0: tv-encoder@1c0a000 {
329         compatible = "allwinner,sun4i-a10-tv-encoder";
330         reg = <0x01c0a000 0x1000>;
331         clocks = <&ahb_gates 34>;
332         resets = <&tcon_ch0_clk 0>;
333
334         port {
335                 #address-cells = <1>;
336                 #size-cells = <0>;
337
338                 tve0_in_tcon0: endpoint@0 {
339                         reg = <0>;
340                         remote-endpoint = <&tcon0_out_tve0>;
341                 };
342         };
343 };
344
345 tcon0: lcd-controller@1c0c000 {
346         compatible = "allwinner,sun5i-a13-tcon";
347         reg = <0x01c0c000 0x1000>;
348         interrupts = <44>;
349         resets = <&tcon_ch0_clk 1>;
350         reset-names = "lcd";
351         clocks = <&ahb_gates 36>,
352                  <&tcon_ch0_clk>,
353                  <&tcon_ch1_clk>;
354         clock-names = "ahb",
355                       "tcon-ch0",
356                       "tcon-ch1";
357         clock-output-names = "tcon-pixel-clock";
358
359         ports {
360                 #address-cells = <1>;
361                 #size-cells = <0>;
362
363                 tcon0_in: port@0 {
364                         #address-cells = <1>;
365                         #size-cells = <0>;
366                         reg = <0>;
367
368                         tcon0_in_be0: endpoint@0 {
369                                 reg = <0>;
370                                 remote-endpoint = <&be0_out_tcon0>;
371                         };
372                 };
373
374                 tcon0_out: port@1 {
375                         #address-cells = <1>;
376                         #size-cells = <0>;
377                         reg = <1>;
378
379                         tcon0_out_panel: endpoint@0 {
380                                 reg = <0>;
381                                 remote-endpoint = <&panel_input>;
382                         };
383
384                         tcon0_out_tve0: endpoint@1 {
385                                 reg = <1>;
386                                 remote-endpoint = <&tve0_in_tcon0>;
387                         };
388                 };
389         };
390 };
391
392 fe0: display-frontend@1e00000 {
393         compatible = "allwinner,sun5i-a13-display-frontend";
394         reg = <0x01e00000 0x20000>;
395         interrupts = <47>;
396         clocks = <&ahb_gates 46>, <&de_fe_clk>,
397                  <&dram_gates 25>;
398         clock-names = "ahb", "mod",
399                       "ram";
400         resets = <&de_fe_clk>;
401
402         ports {
403                 #address-cells = <1>;
404                 #size-cells = <0>;
405
406                 fe0_out: port@1 {
407                         #address-cells = <1>;
408                         #size-cells = <0>;
409                         reg = <1>;
410
411                         fe0_out_be0: endpoint {
412                                 remote-endpoint = <&be0_in_fe0>;
413                         };
414                 };
415         };
416 };
417
418 be0: display-backend@1e60000 {
419         compatible = "allwinner,sun5i-a13-display-backend";
420         reg = <0x01e60000 0x10000>;
421         interrupts = <47>;
422         clocks = <&ahb_gates 44>, <&de_be_clk>,
423                  <&dram_gates 26>;
424         clock-names = "ahb", "mod",
425                       "ram";
426         resets = <&de_be_clk>;
427
428         ports {
429                 #address-cells = <1>;
430                 #size-cells = <0>;
431
432                 be0_in: port@0 {
433                         #address-cells = <1>;
434                         #size-cells = <0>;
435                         reg = <0>;
436
437                         be0_in_fe0: endpoint@0 {
438                                 reg = <0>;
439                                 remote-endpoint = <&fe0_out_be0>;
440                         };
441                 };
442
443                 be0_out: port@1 {
444                         #address-cells = <1>;
445                         #size-cells = <0>;
446                         reg = <1>;
447
448                         be0_out_tcon0: endpoint@0 {
449                                 reg = <0>;
450                                 remote-endpoint = <&tcon0_in_be0>;
451                         };
452                 };
453         };
454 };
455
456 display-engine {
457         compatible = "allwinner,sun5i-a13-display-engine";
458         allwinner,pipelines = <&fe0>;
459 };