blob: 8b11fbd58071282f9bcc9eeb4cdcf39fe8939750 [file] [log] [blame]
Heiko Stuebnerd63dc052013-06-02 23:09:41 +02001/*
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>
Heiko Stuebnerd63dc052013-06-02 23:09:41 +020017#include <dt-bindings/pinctrl/rockchip.h>
Heiko Stuebnerb13d2a72014-04-15 01:16:44 +020018#include <dt-bindings/clock/rk3066a-cru.h>
Heiko Stuebnerf75efdd2013-09-29 13:25:08 +020019#include "rk3xxx.dtsi"
Heiko Stuebnerd63dc052013-06-02 23:09:41 +020020
21/ {
22 compatible = "rockchip,rk3066a";
Heiko Stuebnerd63dc052013-06-02 23:09:41 +020023
24 cpus {
25 #address-cells = <1>;
26 #size-cells = <0>;
Heiko Stübner26ab69c2014-03-27 01:06:32 +010027 enable-method = "rockchip,rk3066-smp";
Heiko Stuebnerd63dc052013-06-02 23:09:41 +020028
Heiko Stuebnerbe8a77c2014-09-13 00:34:29 +020029 cpu0: cpu@0 {
Heiko Stuebnerd63dc052013-06-02 23:09:41 +020030 device_type = "cpu";
31 compatible = "arm,cortex-a9";
32 next-level-cache = <&L2>;
33 reg = <0x0>;
Heiko Stuebnerbe8a77c2014-09-13 00:34:29 +020034 operating-points = <
35 /* kHz uV */
36 1008000 1075000
37 816000 1025000
38 600000 1025000
39 504000 1000000
40 312000 975000
41 >;
42 clock-latency = <40000>;
43 clocks = <&cru ARMCLK>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +020044 };
45 cpu@1 {
46 device_type = "cpu";
47 compatible = "arm,cortex-a9";
48 next-level-cache = <&L2>;
49 reg = <0x1>;
50 };
51 };
52
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020053 sram: sram@10080000 {
54 compatible = "mmio-sram";
55 reg = <0x10080000 0x10000>;
56 #address-cells = <1>;
57 #size-cells = <1>;
58 ranges = <0 0x10080000 0x10000>;
59
60 smp-sram@0 {
61 compatible = "rockchip,rk3066-smp-sram";
62 reg = <0x0 0x50>;
63 };
64 };
65
66 cru: clock-controller@20000000 {
67 compatible = "rockchip,rk3066a-cru";
68 reg = <0x20000000 0x1000>;
69 rockchip,grf = <&grf>;
70
71 #clock-cells = <1>;
72 #reset-cells = <1>;
73 };
74
Heiko Stuebnerff84b902014-07-26 23:28:03 +020075 timer@2000e000 {
76 compatible = "snps,dw-apb-timer-osc";
77 reg = <0x2000e000 0x100>;
78 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
79 clocks = <&cru SCLK_TIMER2>, <&cru PCLK_TIMER2>;
80 clock-names = "timer", "pclk";
81 };
82
83 timer@20038000 {
84 compatible = "snps,dw-apb-timer-osc";
85 reg = <0x20038000 0x100>;
86 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
87 clocks = <&cru SCLK_TIMER0>, <&cru PCLK_TIMER0>;
88 clock-names = "timer", "pclk";
89 };
90
91 timer@2003a000 {
92 compatible = "snps,dw-apb-timer-osc";
93 reg = <0x2003a000 0x100>;
94 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
95 clocks = <&cru SCLK_TIMER1>, <&cru PCLK_TIMER1>;
96 clock-names = "timer", "pclk";
97 };
98
Heiko Stuebner6e4b3b42014-07-22 22:56:16 +020099 pinctrl: pinctrl {
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200100 compatible = "rockchip,rk3066a-pinctrl";
101 rockchip,grf = <&grf>;
102 #address-cells = <1>;
103 #size-cells = <1>;
104 ranges;
105
106 gpio0: gpio0@20034000 {
107 compatible = "rockchip,gpio-bank";
108 reg = <0x20034000 0x100>;
109 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
110 clocks = <&cru PCLK_GPIO0>;
111
112 gpio-controller;
113 #gpio-cells = <2>;
114
115 interrupt-controller;
116 #interrupt-cells = <2>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200117 };
118
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200119 gpio1: gpio1@2003c000 {
120 compatible = "rockchip,gpio-bank";
121 reg = <0x2003c000 0x100>;
122 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
123 clocks = <&cru PCLK_GPIO1>;
124
125 gpio-controller;
126 #gpio-cells = <2>;
127
128 interrupt-controller;
129 #interrupt-cells = <2>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200130 };
131
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200132 gpio2: gpio2@2003e000 {
133 compatible = "rockchip,gpio-bank";
134 reg = <0x2003e000 0x100>;
135 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
136 clocks = <&cru PCLK_GPIO2>;
137
138 gpio-controller;
139 #gpio-cells = <2>;
140
141 interrupt-controller;
142 #interrupt-cells = <2>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200143 };
144
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200145 gpio3: gpio3@20080000 {
146 compatible = "rockchip,gpio-bank";
147 reg = <0x20080000 0x100>;
148 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
149 clocks = <&cru PCLK_GPIO3>;
Heiko Stuebnerde18e012013-06-17 22:08:31 +0200150
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200151 gpio-controller;
152 #gpio-cells = <2>;
153
154 interrupt-controller;
155 #interrupt-cells = <2>;
156 };
157
158 gpio4: gpio4@20084000 {
159 compatible = "rockchip,gpio-bank";
160 reg = <0x20084000 0x100>;
161 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
162 clocks = <&cru PCLK_GPIO4>;
163
164 gpio-controller;
165 #gpio-cells = <2>;
166
167 interrupt-controller;
168 #interrupt-cells = <2>;
169 };
170
171 gpio6: gpio6@2000a000 {
172 compatible = "rockchip,gpio-bank";
173 reg = <0x2000a000 0x100>;
174 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
175 clocks = <&cru PCLK_GPIO6>;
176
177 gpio-controller;
178 #gpio-cells = <2>;
179
180 interrupt-controller;
181 #interrupt-cells = <2>;
182 };
183
184 pcfg_pull_default: pcfg_pull_default {
185 bias-pull-pin-default;
186 };
187
188 pcfg_pull_none: pcfg_pull_none {
189 bias-disable;
190 };
191
Heiko Stuebner4ff4ae12014-09-10 17:04:36 +0200192 emmc {
193 emmc_clk: emmc-clk {
194 rockchip,pins = <RK_GPIO3 31 RK_FUNC_2 &pcfg_pull_default>;
195 };
196
197 emmc_cmd: emmc-cmd {
198 rockchip,pins = <RK_GPIO4 9 RK_FUNC_2 &pcfg_pull_default>;
199 };
200
201 emmc_rst: emmc-rst {
202 rockchip,pins = <RK_GPIO4 10 RK_FUNC_2 &pcfg_pull_default>;
203 };
204
205 /*
206 * The data pins are shared between nandc and emmc and
207 * not accessible through pinctrl. Also they should've
208 * been already set correctly by firmware, as
209 * flash/emmc is the boot-device.
210 */
211 };
212
Heiko Stuebner9cdffd82014-06-24 20:12:06 +0200213 i2c0 {
214 i2c0_xfer: i2c0-xfer {
215 rockchip,pins = <RK_GPIO2 28 RK_FUNC_1 &pcfg_pull_none>,
216 <RK_GPIO2 29 RK_FUNC_1 &pcfg_pull_none>;
217 };
218 };
219
220 i2c1 {
221 i2c1_xfer: i2c1-xfer {
222 rockchip,pins = <RK_GPIO2 30 RK_FUNC_1 &pcfg_pull_none>,
223 <RK_GPIO2 31 RK_FUNC_1 &pcfg_pull_none>;
224 };
225 };
226
227 i2c2 {
228 i2c2_xfer: i2c2-xfer {
229 rockchip,pins = <RK_GPIO3 0 RK_FUNC_1 &pcfg_pull_none>,
230 <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
231 };
232 };
233
234 i2c3 {
235 i2c3_xfer: i2c3-xfer {
236 rockchip,pins = <RK_GPIO3 2 RK_FUNC_2 &pcfg_pull_none>,
237 <RK_GPIO3 3 RK_FUNC_2 &pcfg_pull_none>;
238 };
239 };
240
241 i2c4 {
242 i2c4_xfer: i2c4-xfer {
243 rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
244 <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>;
245 };
246 };
247
Beniamino Galvani550c7f42014-06-26 20:03:41 +0200248 pwm0 {
249 pwm0_out: pwm0-out {
250 rockchip,pins = <RK_GPIO0 3 RK_FUNC_1 &pcfg_pull_none>;
251 };
252 };
253
254 pwm1 {
255 pwm1_out: pwm1-out {
256 rockchip,pins = <RK_GPIO0 4 RK_FUNC_1 &pcfg_pull_none>;
257 };
258 };
259
260 pwm2 {
261 pwm2_out: pwm2-out {
262 rockchip,pins = <RK_GPIO0 30 RK_FUNC_1 &pcfg_pull_none>;
263 };
264 };
265
266 pwm3 {
267 pwm3_out: pwm3-out {
268 rockchip,pins = <RK_GPIO0 31 RK_FUNC_1 &pcfg_pull_none>;
269 };
270 };
271
Heiko Stuebner39c2bd72014-09-10 16:28:02 +0200272 spi0 {
273 spi0_clk: spi0-clk {
274 rockchip,pins = <RK_GPIO1 5 RK_FUNC_2 &pcfg_pull_default>;
275 };
276 spi0_cs0: spi0-cs0 {
277 rockchip,pins = <RK_GPIO1 4 RK_FUNC_2 &pcfg_pull_default>;
278 };
279 spi0_tx: spi0-tx {
280 rockchip,pins = <RK_GPIO1 7 RK_FUNC_2 &pcfg_pull_default>;
281 };
282 spi0_rx: spi0-rx {
283 rockchip,pins = <RK_GPIO1 6 RK_FUNC_2 &pcfg_pull_default>;
284 };
285 spi0_cs1: spi0-cs1 {
286 rockchip,pins = <RK_GPIO4 15 RK_FUNC_1 &pcfg_pull_default>;
287 };
288 };
289
290 spi1 {
291 spi1_clk: spi1-clk {
292 rockchip,pins = <RK_GPIO2 19 RK_FUNC_2 &pcfg_pull_default>;
293 };
294 spi1_cs0: spi1-cs0 {
295 rockchip,pins = <RK_GPIO2 20 RK_FUNC_2 &pcfg_pull_default>;
296 };
297 spi1_rx: spi1-rx {
298 rockchip,pins = <RK_GPIO2 22 RK_FUNC_2 &pcfg_pull_default>;
299 };
300 spi1_tx: spi1-tx {
301 rockchip,pins = <RK_GPIO2 21 RK_FUNC_2 &pcfg_pull_default>;
302 };
303 spi1_cs1: spi1-cs1 {
304 rockchip,pins = <RK_GPIO2 23 RK_FUNC_2 &pcfg_pull_default>;
305 };
306 };
307
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200308 uart0 {
309 uart0_xfer: uart0-xfer {
310 rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_default>,
311 <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_default>;
312 };
313
314 uart0_cts: uart0-cts {
315 rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_default>;
316 };
317
318 uart0_rts: uart0-rts {
319 rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerde18e012013-06-17 22:08:31 +0200320 };
321 };
322
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200323 uart1 {
324 uart1_xfer: uart1-xfer {
325 rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_default>,
326 <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_default>;
327 };
Heiko Stuebnerb13d2a72014-04-15 01:16:44 +0200328
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200329 uart1_cts: uart1-cts {
330 rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_default>;
331 };
332
333 uart1_rts: uart1-rts {
334 rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_default>;
335 };
Heiko Stuebnerb13d2a72014-04-15 01:16:44 +0200336 };
337
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200338 uart2 {
339 uart2_xfer: uart2-xfer {
340 rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_default>,
341 <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_default>;
342 };
343 /* no rts / cts for uart2 */
344 };
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200345
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200346 uart3 {
347 uart3_xfer: uart3-xfer {
348 rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_default>,
349 <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200350 };
351
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200352 uart3_cts: uart3-cts {
353 rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200354 };
355
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200356 uart3_rts: uart3-rts {
357 rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_default>;
358 };
359 };
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200360
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200361 sd0 {
362 sd0_clk: sd0-clk {
363 rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200364 };
365
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200366 sd0_cmd: sd0-cmd {
367 rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200368 };
369
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200370 sd0_cd: sd0-cd {
371 rockchip,pins = <RK_GPIO3 14 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200372 };
373
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200374 sd0_wp: sd0-wp {
375 rockchip,pins = <RK_GPIO3 15 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200376 };
377
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200378 sd0_bus1: sd0-bus-width1 {
379 rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200380 };
381
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200382 sd0_bus4: sd0-bus-width4 {
383 rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>,
384 <RK_GPIO3 11 RK_FUNC_1 &pcfg_pull_default>,
385 <RK_GPIO3 12 RK_FUNC_1 &pcfg_pull_default>,
386 <RK_GPIO3 13 RK_FUNC_1 &pcfg_pull_default>;
387 };
388 };
389
390 sd1 {
391 sd1_clk: sd1-clk {
392 rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200393 };
394
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200395 sd1_cmd: sd1-cmd {
396 rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200397 };
398
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200399 sd1_cd: sd1-cd {
400 rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200401 };
402
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200403 sd1_wp: sd1-wp {
404 rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200405 };
406
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200407 sd1_bus1: sd1-bus-width1 {
408 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200409 };
410
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200411 sd1_bus4: sd1-bus-width4 {
412 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>,
413 <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_default>,
414 <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_default>,
415 <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_default>;
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200416 };
417 };
Heiko Stuebnerd63dc052013-06-02 23:09:41 +0200418 };
419};
Heiko Stuebnerfcbbf962014-07-26 23:08:06 +0200420
Heiko Stuebner9cdffd82014-06-24 20:12:06 +0200421&i2c0 {
422 pinctrl-names = "default";
423 pinctrl-0 = <&i2c0_xfer>;
424};
425
426&i2c1 {
427 pinctrl-names = "default";
428 pinctrl-0 = <&i2c1_xfer>;
429};
430
431&i2c2 {
432 pinctrl-names = "default";
433 pinctrl-0 = <&i2c2_xfer>;
434};
435
436&i2c3 {
437 pinctrl-names = "default";
438 pinctrl-0 = <&i2c3_xfer>;
439};
440
441&i2c4 {
442 pinctrl-names = "default";
443 pinctrl-0 = <&i2c4_xfer>;
444};
445
Heiko Stuebnerfcbbf962014-07-26 23:08:06 +0200446&mmc0 {
447 pinctrl-names = "default";
448 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4>;
449};
450
451&mmc1 {
452 pinctrl-names = "default";
453 pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_cd &sd1_bus4>;
454};
455
Beniamino Galvani550c7f42014-06-26 20:03:41 +0200456&pwm0 {
457 pinctrl-names = "default";
458 pinctrl-0 = <&pwm0_out>;
459};
460
461&pwm1 {
462 pinctrl-names = "default";
463 pinctrl-0 = <&pwm1_out>;
464};
465
466&pwm2 {
467 pinctrl-names = "default";
468 pinctrl-0 = <&pwm2_out>;
469};
470
471&pwm3 {
472 pinctrl-names = "default";
473 pinctrl-0 = <&pwm3_out>;
474};
475
Heiko Stuebner39c2bd72014-09-10 16:28:02 +0200476&spi0 {
477 pinctrl-names = "default";
478 pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
479};
480
481&spi1 {
482 pinctrl-names = "default";
483 pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0>;
484};
485
Heiko Stuebnerfcbbf962014-07-26 23:08:06 +0200486&uart0 {
487 pinctrl-names = "default";
488 pinctrl-0 = <&uart0_xfer>;
489};
490
491&uart1 {
492 pinctrl-names = "default";
493 pinctrl-0 = <&uart1_xfer>;
494};
495
496&uart2 {
497 pinctrl-names = "default";
498 pinctrl-0 = <&uart2_xfer>;
499};
500
501&uart3 {
502 pinctrl-names = "default";
503 pinctrl-0 = <&uart3_xfer>;
504};
Heiko Stuebnereb2b9d42014-07-30 10:16:17 +0200505
506&wdt {
507 compatible = "rockchip,rk3066-wdt", "snps,dw-wdt";
508};