Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
[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   - clocks: phandles to the clocks feeding the frontend and backend
98     * ahb: the backend interface clock
99     * mod: the backend module clock
100     * ram: the backend DRAM clock
101   - clock-names: the clock names mentioned above
102   - resets: phandles to the reset controllers driving the backend
103
104 - ports: A ports node with endpoint definitions as defined in
105   Documentation/devicetree/bindings/media/video-interfaces.txt. The
106   first port should be the input endpoints, the second one the output
107
108 On the A33, some additional properties are required:
109   - reg needs to have an additional region corresponding to the SAT
110   - reg-names need to be set, with "be" and "sat"
111   - clocks and clock-names need to have a phandle to the SAT bus
112     clocks, whose name will be "sat"
113   - resets and reset-names need to have a phandle to the SAT bus
114     resets, whose name will be "sat"
115
116 Display Engine Frontend
117 -----------------------
118
119 The display engine frontend does formats conversion, scaling,
120 deinterlacing and color space conversion.
121
122 Required properties:
123   - compatible: value must be one of:
124     * allwinner,sun5i-a13-display-frontend
125     * allwinner,sun6i-a31-display-frontend
126     * allwinner,sun8i-a33-display-frontend
127   - reg: base address and size of the memory-mapped region.
128   - interrupts: interrupt associated to this IP
129   - clocks: phandles to the clocks feeding the frontend and backend
130     * ahb: the backend interface clock
131     * mod: the backend module clock
132     * ram: the backend DRAM clock
133   - clock-names: the clock names mentioned above
134   - resets: phandles to the reset controllers driving the backend
135
136 - ports: A ports node with endpoint definitions as defined in
137   Documentation/devicetree/bindings/media/video-interfaces.txt. The
138   first port should be the input endpoints, the second one the outputs
139
140
141 Display Engine Pipeline
142 -----------------------
143
144 The display engine pipeline (and its entry point, since it can be
145 either directly the backend or the frontend) is represented as an
146 extra node.
147
148 Required properties:
149   - compatible: value must be one of:
150     * allwinner,sun5i-a13-display-engine
151     * allwinner,sun6i-a31-display-engine
152     * allwinner,sun6i-a31s-display-engine
153     * allwinner,sun8i-a33-display-engine
154
155   - allwinner,pipelines: list of phandle to the display engine
156     frontends available.
157
158 Example:
159
160 panel: panel {
161         compatible = "olimex,lcd-olinuxino-43-ts";
162         #address-cells = <1>;
163         #size-cells = <0>;
164
165         port {
166                 #address-cells = <1>;
167                 #size-cells = <0>;
168
169                 panel_input: endpoint {
170                         remote-endpoint = <&tcon0_out_panel>;
171                 };
172         };
173 };
174
175 tve0: tv-encoder@01c0a000 {
176         compatible = "allwinner,sun4i-a10-tv-encoder";
177         reg = <0x01c0a000 0x1000>;
178         clocks = <&ahb_gates 34>;
179         resets = <&tcon_ch0_clk 0>;
180
181         port {
182                 #address-cells = <1>;
183                 #size-cells = <0>;
184
185                 tve0_in_tcon0: endpoint@0 {
186                         reg = <0>;
187                         remote-endpoint = <&tcon0_out_tve0>;
188                 };
189         };
190 };
191
192 tcon0: lcd-controller@1c0c000 {
193         compatible = "allwinner,sun5i-a13-tcon";
194         reg = <0x01c0c000 0x1000>;
195         interrupts = <44>;
196         resets = <&tcon_ch0_clk 1>;
197         reset-names = "lcd";
198         clocks = <&ahb_gates 36>,
199                  <&tcon_ch0_clk>,
200                  <&tcon_ch1_clk>;
201         clock-names = "ahb",
202                       "tcon-ch0",
203                       "tcon-ch1";
204         clock-output-names = "tcon-pixel-clock";
205
206         ports {
207                 #address-cells = <1>;
208                 #size-cells = <0>;
209
210                 tcon0_in: port@0 {
211                         #address-cells = <1>;
212                         #size-cells = <0>;
213                         reg = <0>;
214
215                         tcon0_in_be0: endpoint@0 {
216                                 reg = <0>;
217                                 remote-endpoint = <&be0_out_tcon0>;
218                         };
219                 };
220
221                 tcon0_out: port@1 {
222                         #address-cells = <1>;
223                         #size-cells = <0>;
224                         reg = <1>;
225
226                         tcon0_out_panel: endpoint@0 {
227                                 reg = <0>;
228                                 remote-endpoint = <&panel_input>;
229                         };
230
231                         tcon0_out_tve0: endpoint@1 {
232                                 reg = <1>;
233                                 remote-endpoint = <&tve0_in_tcon0>;
234                         };
235                 };
236         };
237 };
238
239 fe0: display-frontend@1e00000 {
240         compatible = "allwinner,sun5i-a13-display-frontend";
241         reg = <0x01e00000 0x20000>;
242         interrupts = <47>;
243         clocks = <&ahb_gates 46>, <&de_fe_clk>,
244                  <&dram_gates 25>;
245         clock-names = "ahb", "mod",
246                       "ram";
247         resets = <&de_fe_clk>;
248
249         ports {
250                 #address-cells = <1>;
251                 #size-cells = <0>;
252
253                 fe0_out: port@1 {
254                         #address-cells = <1>;
255                         #size-cells = <0>;
256                         reg = <1>;
257
258                         fe0_out_be0: endpoint {
259                                 remote-endpoint = <&be0_in_fe0>;
260                         };
261                 };
262         };
263 };
264
265 be0: display-backend@1e60000 {
266         compatible = "allwinner,sun5i-a13-display-backend";
267         reg = <0x01e60000 0x10000>;
268         clocks = <&ahb_gates 44>, <&de_be_clk>,
269                  <&dram_gates 26>;
270         clock-names = "ahb", "mod",
271                       "ram";
272         resets = <&de_be_clk>;
273
274         ports {
275                 #address-cells = <1>;
276                 #size-cells = <0>;
277
278                 be0_in: port@0 {
279                         #address-cells = <1>;
280                         #size-cells = <0>;
281                         reg = <0>;
282
283                         be0_in_fe0: endpoint@0 {
284                                 reg = <0>;
285                                 remote-endpoint = <&fe0_out_be0>;
286                         };
287                 };
288
289                 be0_out: port@1 {
290                         #address-cells = <1>;
291                         #size-cells = <0>;
292                         reg = <1>;
293
294                         be0_out_tcon0: endpoint@0 {
295                                 reg = <0>;
296                                 remote-endpoint = <&tcon0_in_be0>;
297                         };
298                 };
299         };
300 };
301
302 display-engine {
303         compatible = "allwinner,sun5i-a13-display-engine";
304         allwinner,pipelines = <&fe0>;
305 };