Merge tag 'pwm/for-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / rk3188.dtsi
1 /*
2  * Copyright (c) 2013 MundoReader S.L.
3  * Author: Heiko Stuebner <heiko@sntech.de>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  */
15
16 #include <dt-bindings/gpio/gpio.h>
17 #include <dt-bindings/pinctrl/rockchip.h>
18 #include <dt-bindings/clock/rk3188-cru.h>
19 #include "rk3xxx.dtsi"
20
21 / {
22         compatible = "rockchip,rk3188";
23
24         cpus {
25                 #address-cells = <1>;
26                 #size-cells = <0>;
27                 enable-method = "rockchip,rk3066-smp";
28
29                 cpu@0 {
30                         device_type = "cpu";
31                         compatible = "arm,cortex-a9";
32                         next-level-cache = <&L2>;
33                         reg = <0x0>;
34                 };
35                 cpu@1 {
36                         device_type = "cpu";
37                         compatible = "arm,cortex-a9";
38                         next-level-cache = <&L2>;
39                         reg = <0x1>;
40                 };
41                 cpu@2 {
42                         device_type = "cpu";
43                         compatible = "arm,cortex-a9";
44                         next-level-cache = <&L2>;
45                         reg = <0x2>;
46                 };
47                 cpu@3 {
48                         device_type = "cpu";
49                         compatible = "arm,cortex-a9";
50                         next-level-cache = <&L2>;
51                         reg = <0x3>;
52                 };
53         };
54
55         sram: sram@10080000 {
56                 compatible = "mmio-sram";
57                 reg = <0x10080000 0x8000>;
58                 #address-cells = <1>;
59                 #size-cells = <1>;
60                 ranges = <0 0x10080000 0x8000>;
61
62                 smp-sram@0 {
63                         compatible = "rockchip,rk3066-smp-sram";
64                         reg = <0x0 0x50>;
65                 };
66         };
67
68         cru: clock-controller@20000000 {
69                 compatible = "rockchip,rk3188-cru";
70                 reg = <0x20000000 0x1000>;
71                 rockchip,grf = <&grf>;
72
73                 #clock-cells = <1>;
74                 #reset-cells = <1>;
75         };
76
77         pinctrl: pinctrl {
78                 compatible = "rockchip,rk3188-pinctrl";
79                 rockchip,grf = <&grf>;
80                 rockchip,pmu = <&pmu>;
81
82                 #address-cells = <1>;
83                 #size-cells = <1>;
84                 ranges;
85
86                 gpio0: gpio0@0x2000a000 {
87                         compatible = "rockchip,rk3188-gpio-bank0";
88                         reg = <0x2000a000 0x100>;
89                         interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
90                         clocks = <&cru PCLK_GPIO0>;
91
92                         gpio-controller;
93                         #gpio-cells = <2>;
94
95                         interrupt-controller;
96                         #interrupt-cells = <2>;
97                 };
98
99                 gpio1: gpio1@0x2003c000 {
100                         compatible = "rockchip,gpio-bank";
101                         reg = <0x2003c000 0x100>;
102                         interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
103                         clocks = <&cru PCLK_GPIO1>;
104
105                         gpio-controller;
106                         #gpio-cells = <2>;
107
108                         interrupt-controller;
109                         #interrupt-cells = <2>;
110                 };
111
112                 gpio2: gpio2@2003e000 {
113                         compatible = "rockchip,gpio-bank";
114                         reg = <0x2003e000 0x100>;
115                         interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
116                         clocks = <&cru PCLK_GPIO2>;
117
118                         gpio-controller;
119                         #gpio-cells = <2>;
120
121                         interrupt-controller;
122                         #interrupt-cells = <2>;
123                 };
124
125                 gpio3: gpio3@20080000 {
126                         compatible = "rockchip,gpio-bank";
127                         reg = <0x20080000 0x100>;
128                         interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
129                         clocks = <&cru PCLK_GPIO3>;
130
131                         gpio-controller;
132                         #gpio-cells = <2>;
133
134                         interrupt-controller;
135                         #interrupt-cells = <2>;
136                 };
137
138                 pcfg_pull_up: pcfg_pull_up {
139                         bias-pull-up;
140                 };
141
142                 pcfg_pull_down: pcfg_pull_down {
143                         bias-pull-down;
144                 };
145
146                 pcfg_pull_none: pcfg_pull_none {
147                         bias-disable;
148                 };
149
150                 emmc {
151                         emmc_clk: emmc-clk {
152                                 rockchip,pins = <RK_GPIO0 24 RK_FUNC_2 &pcfg_pull_none>;
153                         };
154
155                         emmc_cmd: emmc-cmd {
156                                 rockchip,pins = <RK_GPIO0 26 RK_FUNC_2 &pcfg_pull_up>;
157                         };
158
159                         emmc_rst: emmc-rst {
160                                 rockchip,pins = <RK_GPIO0 27 RK_FUNC_2 &pcfg_pull_none>;
161                         };
162
163                         /*
164                          * The data pins are shared between nandc and emmc and
165                          * not accessible through pinctrl. Also they should've
166                          * been already set correctly by firmware, as
167                          * flash/emmc is the boot-device.
168                          */
169                 };
170
171                 emac {
172                         emac_xfer: emac-xfer {
173                                 rockchip,pins = <RK_GPIO3 16 RK_FUNC_2 &pcfg_pull_none>, /* tx_en */
174                                                 <RK_GPIO3 17 RK_FUNC_2 &pcfg_pull_none>, /* txd1 */
175                                                 <RK_GPIO3 18 RK_FUNC_2 &pcfg_pull_none>, /* txd0 */
176                                                 <RK_GPIO3 19 RK_FUNC_2 &pcfg_pull_none>, /* rxd0 */
177                                                 <RK_GPIO3 20 RK_FUNC_2 &pcfg_pull_none>, /* rxd1 */
178                                                 <RK_GPIO3 21 RK_FUNC_2 &pcfg_pull_none>, /* mac_clk */
179                                                 <RK_GPIO3 22 RK_FUNC_2 &pcfg_pull_none>, /* rx_err */
180                                                 <RK_GPIO3 23 RK_FUNC_2 &pcfg_pull_none>; /* crs_dvalid */
181                         };
182
183                         emac_mdio: emac-mdio {
184                                 rockchip,pins = <RK_GPIO3 24 RK_FUNC_2 &pcfg_pull_none>,
185                                                 <RK_GPIO3 25 RK_FUNC_2 &pcfg_pull_none>;
186                         };
187                 };
188
189                 i2c0 {
190                         i2c0_xfer: i2c0-xfer {
191                                 rockchip,pins = <RK_GPIO1 24 RK_FUNC_1 &pcfg_pull_none>,
192                                                 <RK_GPIO1 25 RK_FUNC_1 &pcfg_pull_none>;
193                         };
194                 };
195
196                 i2c1 {
197                         i2c1_xfer: i2c1-xfer {
198                                 rockchip,pins = <RK_GPIO1 26 RK_FUNC_1 &pcfg_pull_none>,
199                                                 <RK_GPIO1 27 RK_FUNC_1 &pcfg_pull_none>;
200                         };
201                 };
202
203                 i2c2 {
204                         i2c2_xfer: i2c2-xfer {
205                                 rockchip,pins = <RK_GPIO1 28 RK_FUNC_1 &pcfg_pull_none>,
206                                                 <RK_GPIO1 29 RK_FUNC_1 &pcfg_pull_none>;
207                         };
208                 };
209
210                 i2c3 {
211                         i2c3_xfer: i2c3-xfer {
212                                 rockchip,pins = <RK_GPIO3 14 RK_FUNC_2 &pcfg_pull_none>,
213                                                 <RK_GPIO3 15 RK_FUNC_2 &pcfg_pull_none>;
214                         };
215                 };
216
217                 i2c4 {
218                         i2c4_xfer: i2c4-xfer {
219                                 rockchip,pins = <RK_GPIO1 30 RK_FUNC_1 &pcfg_pull_none>,
220                                                 <RK_GPIO1 31 RK_FUNC_1 &pcfg_pull_none>;
221                         };
222                 };
223
224                 pwm0 {
225                         pwm0_out: pwm0-out {
226                                 rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_none>;
227                         };
228                 };
229
230                 pwm1 {
231                         pwm1_out: pwm1-out {
232                                 rockchip,pins = <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_none>;
233                         };
234                 };
235
236                 pwm2 {
237                         pwm2_out: pwm2-out {
238                                 rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_none>;
239                         };
240                 };
241
242                 pwm3 {
243                         pwm3_out: pwm3-out {
244                                 rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_none>;
245                         };
246                 };
247
248                 spi0 {
249                         spi0_clk: spi0-clk {
250                                 rockchip,pins = <RK_GPIO1 6 RK_FUNC_2 &pcfg_pull_up>;
251                         };
252                         spi0_cs0: spi0-cs0 {
253                                 rockchip,pins = <RK_GPIO1 7 RK_FUNC_2 &pcfg_pull_up>;
254                         };
255                         spi0_tx: spi0-tx {
256                                 rockchip,pins = <RK_GPIO1 5 RK_FUNC_2 &pcfg_pull_up>;
257                         };
258                         spi0_rx: spi0-rx {
259                                 rockchip,pins = <RK_GPIO1 4 RK_FUNC_2 &pcfg_pull_up>;
260                         };
261                         spi0_cs1: spi0-cs1 {
262                                 rockchip,pins = <RK_GPIO1 15 RK_FUNC_1 &pcfg_pull_up>;
263                         };
264                 };
265
266                 spi1 {
267                         spi1_clk: spi1-clk {
268                                 rockchip,pins = <RK_GPIO0 30 RK_FUNC_1 &pcfg_pull_up>;
269                         };
270                         spi1_cs0: spi1-cs0 {
271                                 rockchip,pins = <RK_GPIO0 31 RK_FUNC_1 &pcfg_pull_up>;
272                         };
273                         spi1_rx: spi1-rx {
274                                 rockchip,pins = <RK_GPIO0 28 RK_FUNC_1 &pcfg_pull_up>;
275                         };
276                         spi1_tx: spi1-tx {
277                                 rockchip,pins = <RK_GPIO0 29 RK_FUNC_1 &pcfg_pull_up>;
278                         };
279                         spi1_cs1: spi1-cs1 {
280                                 rockchip,pins = <RK_GPIO1 14 RK_FUNC_2 &pcfg_pull_up>;
281                         };
282                 };
283
284                 uart0 {
285                         uart0_xfer: uart0-xfer {
286                                 rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_up>,
287                                                 <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_none>;
288                         };
289
290                         uart0_cts: uart0-cts {
291                                 rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_none>;
292                         };
293
294                         uart0_rts: uart0-rts {
295                                 rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_none>;
296                         };
297                 };
298
299                 uart1 {
300                         uart1_xfer: uart1-xfer {
301                                 rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_up>,
302                                                 <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_none>;
303                         };
304
305                         uart1_cts: uart1-cts {
306                                 rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_none>;
307                         };
308
309                         uart1_rts: uart1-rts {
310                                 rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_none>;
311                         };
312                 };
313
314                 uart2 {
315                         uart2_xfer: uart2-xfer {
316                                 rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_up>,
317                                                 <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_none>;
318                         };
319                         /* no rts / cts for uart2 */
320                 };
321
322                 uart3 {
323                         uart3_xfer: uart3-xfer {
324                                 rockchip,pins = <RK_GPIO1 10 RK_FUNC_1 &pcfg_pull_up>,
325                                                 <RK_GPIO1 11 RK_FUNC_1 &pcfg_pull_none>;
326                         };
327
328                         uart3_cts: uart3-cts {
329                                 rockchip,pins = <RK_GPIO1 12 RK_FUNC_1 &pcfg_pull_none>;
330                         };
331
332                         uart3_rts: uart3-rts {
333                                 rockchip,pins = <RK_GPIO1 13 RK_FUNC_1 &pcfg_pull_none>;
334                         };
335                 };
336
337                 sd0 {
338                         sd0_clk: sd0-clk {
339                                 rockchip,pins = <RK_GPIO3 2 RK_FUNC_1 &pcfg_pull_none>;
340                         };
341
342                         sd0_cmd: sd0-cmd {
343                                 rockchip,pins = <RK_GPIO3 3 RK_FUNC_1 &pcfg_pull_none>;
344                         };
345
346                         sd0_cd: sd0-cd {
347                                 rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_none>;
348                         };
349
350                         sd0_wp: sd0-wp {
351                                 rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_none>;
352                         };
353
354                         sd0_pwr: sd0-pwr {
355                                 rockchip,pins = <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
356                         };
357
358                         sd0_bus1: sd0-bus-width1 {
359                                 rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>;
360                         };
361
362                         sd0_bus4: sd0-bus-width4 {
363                                 rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
364                                                 <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>,
365                                                 <RK_GPIO3 6 RK_FUNC_1 &pcfg_pull_none>,
366                                                 <RK_GPIO3 7 RK_FUNC_1 &pcfg_pull_none>;
367                         };
368                 };
369
370                 sd1 {
371                         sd1_clk: sd1-clk {
372                                 rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_none>;
373                         };
374
375                         sd1_cmd: sd1-cmd {
376                                 rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_none>;
377                         };
378
379                         sd1_cd: sd1-cd {
380                                 rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_none>;
381                         };
382
383                         sd1_wp: sd1-wp {
384                                 rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_none>;
385                         };
386
387                         sd1_bus1: sd1-bus-width1 {
388                                 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>;
389                         };
390
391                         sd1_bus4: sd1-bus-width4 {
392                                 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>,
393                                                 <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_none>,
394                                                 <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_none>,
395                                                 <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_none>;
396                         };
397                 };
398         };
399 };
400
401 &emac {
402         compatible = "rockchip,rk3188-emac";
403 };
404
405 &global_timer {
406         interrupts = <GIC_PPI 11 0xf04>;
407 };
408
409 &local_timer {
410         interrupts = <GIC_PPI 13 0xf04>;
411 };
412
413 &i2c0 {
414         compatible = "rockchip,rk3188-i2c";
415         pinctrl-names = "default";
416         pinctrl-0 = <&i2c0_xfer>;
417 };
418
419 &i2c1 {
420         compatible = "rockchip,rk3188-i2c";
421         pinctrl-names = "default";
422         pinctrl-0 = <&i2c1_xfer>;
423 };
424
425 &i2c2 {
426         compatible = "rockchip,rk3188-i2c";
427         pinctrl-names = "default";
428         pinctrl-0 = <&i2c2_xfer>;
429 };
430
431 &i2c3 {
432         compatible = "rockchip,rk3188-i2c";
433         pinctrl-names = "default";
434         pinctrl-0 = <&i2c3_xfer>;
435 };
436
437 &i2c4 {
438         compatible = "rockchip,rk3188-i2c";
439         pinctrl-names = "default";
440         pinctrl-0 = <&i2c4_xfer>;
441 };
442
443 &pwm0 {
444         pinctrl-names = "default";
445         pinctrl-0 = <&pwm0_out>;
446 };
447
448 &pwm1 {
449         pinctrl-names = "default";
450         pinctrl-0 = <&pwm1_out>;
451 };
452
453 &pwm2 {
454         pinctrl-names = "default";
455         pinctrl-0 = <&pwm2_out>;
456 };
457
458 &pwm3 {
459         pinctrl-names = "default";
460         pinctrl-0 = <&pwm3_out>;
461 };
462
463 &spi0 {
464         compatible = "rockchip,rk3188-spi", "rockchip,rk3066-spi";
465         pinctrl-names = "default";
466         pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
467 };
468
469 &spi1 {
470         compatible = "rockchip,rk3188-spi", "rockchip,rk3066-spi";
471         pinctrl-names = "default";
472         pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0>;
473 };
474
475 &uart0 {
476         pinctrl-names = "default";
477         pinctrl-0 = <&uart0_xfer>;
478 };
479
480 &uart1 {
481         pinctrl-names = "default";
482         pinctrl-0 = <&uart1_xfer>;
483 };
484
485 &uart2 {
486         pinctrl-names = "default";
487         pinctrl-0 = <&uart2_xfer>;
488 };
489
490 &uart3 {
491         pinctrl-names = "default";
492         pinctrl-0 = <&uart3_xfer>;
493 };
494
495 &wdt {
496         compatible = "rockchip,rk3188-wdt", "snps,dw-wdt";
497 };