Merge branches 'acpi-button', 'acpica' and 'acpi-sysfs'
[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 TV Encoder
8 ----------
9
10 The TV Encoder supports the composite and VGA output. It is one end of
11 the pipeline.
12
13 Required properties:
14  - compatible: value should be "allwinner,sun4i-a10-tv-encoder".
15  - reg: base address and size of memory-mapped region
16  - clocks: the clocks driving the TV encoder
17  - resets: phandle to the reset controller driving the encoder
18
19 - ports: A ports node with endpoint definitions as defined in
20   Documentation/devicetree/bindings/media/video-interfaces.txt. The
21   first port should be the input endpoint.
22
23 TCON
24 ----
25
26 The TCON acts as a timing controller for RGB, LVDS and TV interfaces.
27
28 Required properties:
29  - compatible: value must be either:
30    * allwinner,sun5i-a13-tcon
31    * allwinner,sun6i-a31-tcon
32    * allwinner,sun6i-a31s-tcon
33    * allwinner,sun8i-a33-tcon
34  - reg: base address and size of memory-mapped region
35  - interrupts: interrupt associated to this IP
36  - clocks: phandles to the clocks feeding the TCON. Three are needed:
37    - 'ahb': the interface clocks
38    - 'tcon-ch0': The clock driving the TCON channel 0
39  - resets: phandles to the reset controllers driving the encoder
40    - "lcd": the reset line for the TCON channel 0
41
42  - clock-names: the clock names mentioned above
43  - reset-names: the reset names mentioned above
44  - clock-output-names: Name of the pixel clock created
45
46 - ports: A ports node with endpoint definitions as defined in
47   Documentation/devicetree/bindings/media/video-interfaces.txt. The
48   first port should be the input endpoint, the second one the output
49
50   The output should have two endpoints. The first is the block
51   connected to the TCON channel 0 (usually a panel or a bridge), the
52   second the block connected to the TCON channel 1 (usually the TV
53   encoder)
54
55 On SoCs other than the A33, there is one more clock required:
56    - 'tcon-ch1': The clock driving the TCON channel 1
57
58 DRC
59 ---
60
61 The DRC (Dynamic Range Controller), found in the latest Allwinner SoCs
62 (A31, A23, A33), allows to dynamically adjust pixel
63 brightness/contrast based on histogram measurements for LCD content
64 adaptive backlight control.
65
66
67 Required properties:
68   - compatible: value must be one of:
69     * allwinner,sun6i-a31-drc
70     * allwinner,sun6i-a31s-drc
71     * allwinner,sun8i-a33-drc
72   - reg: base address and size of the memory-mapped region.
73   - interrupts: interrupt associated to this IP
74   - clocks: phandles to the clocks feeding the DRC
75     * ahb: the DRC interface clock
76     * mod: the DRC module clock
77     * ram: the DRC DRAM clock
78   - clock-names: the clock names mentioned above
79   - resets: phandles to the reset line driving the DRC
80
81 - ports: A ports node with endpoint definitions as defined in
82   Documentation/devicetree/bindings/media/video-interfaces.txt. The
83   first port should be the input endpoints, the second one the outputs
84
85 Display Engine Backend
86 ----------------------
87
88 The display engine backend exposes layers and sprites to the
89 system.
90
91 Required properties:
92   - compatible: value must be one of:
93     * allwinner,sun5i-a13-display-backend
94     * allwinner,sun6i-a31-display-backend
95     * allwinner,sun8i-a33-display-backend
96   - reg: base address and size of the memory-mapped region.
97   - interrupts: interrupt associated to this IP
98   - clocks: phandles to the clocks feeding the frontend and backend
99     * ahb: the backend interface clock
100     * mod: the backend module clock
101     * ram: the backend DRAM clock
102   - clock-names: the clock names mentioned above
103   - resets: phandles to the reset controllers driving the backend
104
105 - ports: A ports node with endpoint definitions as defined in
106   Documentation/devicetree/bindings/media/video-interfaces.txt. The
107   first port should be the input endpoints, the second one the output
108
109 On the A33, some additional properties are required:
110   - reg needs to have an additional region corresponding to the SAT
111   - reg-names need to be set, with "be" and "sat"
112   - clocks and clock-names need to have a phandle to the SAT bus
113     clocks, whose name will be "sat"
114   - resets and reset-names need to have a phandle to the SAT bus
115     resets, whose name will be "sat"
116
117 Display Engine Frontend
118 -----------------------
119
120 The display engine frontend does formats conversion, scaling,
121 deinterlacing and color space conversion.
122
123 Required properties:
124   - compatible: value must be one of:
125     * allwinner,sun5i-a13-display-frontend
126     * allwinner,sun6i-a31-display-frontend
127     * allwinner,sun8i-a33-display-frontend
128   - reg: base address and size of the memory-mapped region.
129   - interrupts: interrupt associated to this IP
130   - clocks: phandles to the clocks feeding the frontend and backend
131     * ahb: the backend interface clock
132     * mod: the backend module clock
133     * ram: the backend DRAM clock
134   - clock-names: the clock names mentioned above
135   - resets: phandles to the reset controllers driving the backend
136
137 - ports: A ports node with endpoint definitions as defined in
138   Documentation/devicetree/bindings/media/video-interfaces.txt. The
139   first port should be the input endpoints, the second one the outputs
140
141
142 Display Engine Pipeline
143 -----------------------
144
145 The display engine pipeline (and its entry point, since it can be
146 either directly the backend or the frontend) is represented as an
147 extra node.
148
149 Required properties:
150   - compatible: value must be one of:
151     * allwinner,sun5i-a13-display-engine
152     * allwinner,sun6i-a31-display-engine
153     * allwinner,sun6i-a31s-display-engine
154     * allwinner,sun8i-a33-display-engine
155
156   - allwinner,pipelines: list of phandle to the display engine
157     frontends available.
158
159 Example:
160
161 panel: panel {
162         compatible = "olimex,lcd-olinuxino-43-ts";
163         #address-cells = <1>;
164         #size-cells = <0>;
165
166         port {
167                 #address-cells = <1>;
168                 #size-cells = <0>;
169
170                 panel_input: endpoint {
171                         remote-endpoint = <&tcon0_out_panel>;
172                 };
173         };
174 };
175
176 tve0: tv-encoder@01c0a000 {
177         compatible = "allwinner,sun4i-a10-tv-encoder";
178         reg = <0x01c0a000 0x1000>;
179         clocks = <&ahb_gates 34>;
180         resets = <&tcon_ch0_clk 0>;
181
182         port {
183                 #address-cells = <1>;
184                 #size-cells = <0>;
185
186                 tve0_in_tcon0: endpoint@0 {
187                         reg = <0>;
188                         remote-endpoint = <&tcon0_out_tve0>;
189                 };
190         };
191 };
192
193 tcon0: lcd-controller@1c0c000 {
194         compatible = "allwinner,sun5i-a13-tcon";
195         reg = <0x01c0c000 0x1000>;
196         interrupts = <44>;
197         resets = <&tcon_ch0_clk 1>;
198         reset-names = "lcd";
199         clocks = <&ahb_gates 36>,
200                  <&tcon_ch0_clk>,
201                  <&tcon_ch1_clk>;
202         clock-names = "ahb",
203                       "tcon-ch0",
204                       "tcon-ch1";
205         clock-output-names = "tcon-pixel-clock";
206
207         ports {
208                 #address-cells = <1>;
209                 #size-cells = <0>;
210
211                 tcon0_in: port@0 {
212                         #address-cells = <1>;
213                         #size-cells = <0>;
214                         reg = <0>;
215
216                         tcon0_in_be0: endpoint@0 {
217                                 reg = <0>;
218                                 remote-endpoint = <&be0_out_tcon0>;
219                         };
220                 };
221
222                 tcon0_out: port@1 {
223                         #address-cells = <1>;
224                         #size-cells = <0>;
225                         reg = <1>;
226
227                         tcon0_out_panel: endpoint@0 {
228                                 reg = <0>;
229                                 remote-endpoint = <&panel_input>;
230                         };
231
232                         tcon0_out_tve0: endpoint@1 {
233                                 reg = <1>;
234                                 remote-endpoint = <&tve0_in_tcon0>;
235                         };
236                 };
237         };
238 };
239
240 fe0: display-frontend@1e00000 {
241         compatible = "allwinner,sun5i-a13-display-frontend";
242         reg = <0x01e00000 0x20000>;
243         interrupts = <47>;
244         clocks = <&ahb_gates 46>, <&de_fe_clk>,
245                  <&dram_gates 25>;
246         clock-names = "ahb", "mod",
247                       "ram";
248         resets = <&de_fe_clk>;
249
250         ports {
251                 #address-cells = <1>;
252                 #size-cells = <0>;
253
254                 fe0_out: port@1 {
255                         #address-cells = <1>;
256                         #size-cells = <0>;
257                         reg = <1>;
258
259                         fe0_out_be0: endpoint {
260                                 remote-endpoint = <&be0_in_fe0>;
261                         };
262                 };
263         };
264 };
265
266 be0: display-backend@1e60000 {
267         compatible = "allwinner,sun5i-a13-display-backend";
268         reg = <0x01e60000 0x10000>;
269         interrupts = <47>;
270         clocks = <&ahb_gates 44>, <&de_be_clk>,
271                  <&dram_gates 26>;
272         clock-names = "ahb", "mod",
273                       "ram";
274         resets = <&de_be_clk>;
275
276         ports {
277                 #address-cells = <1>;
278                 #size-cells = <0>;
279
280                 be0_in: port@0 {
281                         #address-cells = <1>;
282                         #size-cells = <0>;
283                         reg = <0>;
284
285                         be0_in_fe0: endpoint@0 {
286                                 reg = <0>;
287                                 remote-endpoint = <&fe0_out_be0>;
288                         };
289                 };
290
291                 be0_out: port@1 {
292                         #address-cells = <1>;
293                         #size-cells = <0>;
294                         reg = <1>;
295
296                         be0_out_tcon0: endpoint@0 {
297                                 reg = <0>;
298                                 remote-endpoint = <&tcon0_in_be0>;
299                         };
300                 };
301         };
302 };
303
304 display-engine {
305         compatible = "allwinner,sun5i-a13-display-engine";
306         allwinner,pipelines = <&fe0>;
307 };