blob: ee801a9c6b74144e4a8153908a5e1ad07365bfef [file] [log] [blame]
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +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>
17#include <dt-bindings/pinctrl/rockchip.h>
Heiko Stuebnerb13d2a72014-04-15 01:16:44 +020018#include <dt-bindings/clock/rk3188-cru.h>
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020019#include "rk3xxx.dtsi"
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020020
21/ {
22 compatible = "rockchip,rk3188";
23
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 Stuebner6bcf60f2013-10-14 17:34:02 +020028
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
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020055 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
Heiko Stuebner6e4b3b42014-07-22 22:56:16 +020077 pinctrl: pinctrl {
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020078 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>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020097 };
98
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020099 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>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200110 };
111
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200112 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>;
Heiko Stuebnerde18e012013-06-17 22:08:31 +0200117
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200118 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
Heiko Stuebner9cdffd82014-06-24 20:12:06 +0200150 i2c0 {
151 i2c0_xfer: i2c0-xfer {
152 rockchip,pins = <RK_GPIO1 24 RK_FUNC_1 &pcfg_pull_none>,
153 <RK_GPIO1 25 RK_FUNC_1 &pcfg_pull_none>;
154 };
155 };
156
157 i2c1 {
158 i2c1_xfer: i2c1-xfer {
159 rockchip,pins = <RK_GPIO1 26 RK_FUNC_1 &pcfg_pull_none>,
160 <RK_GPIO1 27 RK_FUNC_1 &pcfg_pull_none>;
161 };
162 };
163
164 i2c2 {
165 i2c2_xfer: i2c2-xfer {
166 rockchip,pins = <RK_GPIO1 28 RK_FUNC_1 &pcfg_pull_none>,
167 <RK_GPIO1 29 RK_FUNC_1 &pcfg_pull_none>;
168 };
169 };
170
171 i2c3 {
172 i2c3_xfer: i2c3-xfer {
173 rockchip,pins = <RK_GPIO3 14 RK_FUNC_2 &pcfg_pull_none>,
174 <RK_GPIO3 15 RK_FUNC_2 &pcfg_pull_none>;
175 };
176 };
177
178 i2c4 {
179 i2c4_xfer: i2c4-xfer {
180 rockchip,pins = <RK_GPIO1 30 RK_FUNC_1 &pcfg_pull_none>,
181 <RK_GPIO1 31 RK_FUNC_1 &pcfg_pull_none>;
182 };
183 };
184
Beniamino Galvani550c7f42014-06-26 20:03:41 +0200185 pwm0 {
186 pwm0_out: pwm0-out {
187 rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_none>;
188 };
189 };
190
191 pwm1 {
192 pwm1_out: pwm1-out {
193 rockchip,pins = <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_none>;
194 };
195 };
196
197 pwm2 {
198 pwm2_out: pwm2-out {
199 rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_none>;
200 };
201 };
202
203 pwm3 {
204 pwm3_out: pwm3-out {
205 rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_none>;
206 };
207 };
208
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200209 uart0 {
210 uart0_xfer: uart0-xfer {
211 rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_up>,
212 <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_none>;
213 };
214
215 uart0_cts: uart0-cts {
216 rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_none>;
217 };
218
219 uart0_rts: uart0-rts {
220 rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebnerde18e012013-06-17 22:08:31 +0200221 };
222 };
223
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200224 uart1 {
225 uart1_xfer: uart1-xfer {
226 rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_up>,
227 <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_none>;
228 };
Heiko Stuebnerb13d2a72014-04-15 01:16:44 +0200229
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200230 uart1_cts: uart1-cts {
231 rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_none>;
232 };
233
234 uart1_rts: uart1-rts {
235 rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_none>;
236 };
Heiko Stuebnerb13d2a72014-04-15 01:16:44 +0200237 };
238
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200239 uart2 {
240 uart2_xfer: uart2-xfer {
241 rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_up>,
242 <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_none>;
243 };
244 /* no rts / cts for uart2 */
245 };
Heiko Stuebner56f2b892014-04-29 22:02:52 +0200246
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200247 uart3 {
248 uart3_xfer: uart3-xfer {
249 rockchip,pins = <RK_GPIO1 10 RK_FUNC_1 &pcfg_pull_up>,
250 <RK_GPIO1 11 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200251 };
252
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200253 uart3_cts: uart3-cts {
254 rockchip,pins = <RK_GPIO1 12 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200255 };
256
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200257 uart3_rts: uart3-rts {
258 rockchip,pins = <RK_GPIO1 13 RK_FUNC_1 &pcfg_pull_none>;
259 };
260 };
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200261
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200262 sd0 {
263 sd0_clk: sd0-clk {
264 rockchip,pins = <RK_GPIO3 2 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200265 };
266
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200267 sd0_cmd: sd0-cmd {
268 rockchip,pins = <RK_GPIO3 3 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200269 };
270
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200271 sd0_cd: sd0-cd {
272 rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200273 };
274
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200275 sd0_wp: sd0-wp {
276 rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200277 };
278
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200279 sd0_pwr: sd0-pwr {
280 rockchip,pins = <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200281 };
282
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200283 sd0_bus1: sd0-bus-width1 {
284 rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200285 };
286
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200287 sd0_bus4: sd0-bus-width4 {
288 rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
289 <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>,
290 <RK_GPIO3 6 RK_FUNC_1 &pcfg_pull_none>,
291 <RK_GPIO3 7 RK_FUNC_1 &pcfg_pull_none>;
292 };
293 };
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200294
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200295 sd1 {
296 sd1_clk: sd1-clk {
297 rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200298 };
299
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200300 sd1_cmd: sd1-cmd {
301 rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200302 };
303
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200304 sd1_cd: sd1-cd {
305 rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200306 };
307
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200308 sd1_wp: sd1-wp {
309 rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200310 };
311
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200312 sd1_bus1: sd1-bus-width1 {
313 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>;
314 };
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200315
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200316 sd1_bus4: sd1-bus-width4 {
317 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>,
318 <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_none>,
319 <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_none>,
320 <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_none>;
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200321 };
322 };
323 };
324};
Heiko Stuebnerfcbbf962014-07-26 23:08:06 +0200325
326&global_timer {
327 interrupts = <GIC_PPI 11 0xf04>;
328};
329
330&local_timer {
331 interrupts = <GIC_PPI 13 0xf04>;
332};
333
Heiko Stuebner9cdffd82014-06-24 20:12:06 +0200334&i2c0 {
335 compatible = "rockchip,rk3188-i2c";
336 pinctrl-names = "default";
337 pinctrl-0 = <&i2c0_xfer>;
338};
339
340&i2c1 {
341 compatible = "rockchip,rk3188-i2c";
342 pinctrl-names = "default";
343 pinctrl-0 = <&i2c1_xfer>;
344};
345
346&i2c2 {
347 compatible = "rockchip,rk3188-i2c";
348 pinctrl-names = "default";
349 pinctrl-0 = <&i2c2_xfer>;
350};
351
352&i2c3 {
353 compatible = "rockchip,rk3188-i2c";
354 pinctrl-names = "default";
355 pinctrl-0 = <&i2c3_xfer>;
356};
357
358&i2c4 {
359 compatible = "rockchip,rk3188-i2c";
360 pinctrl-names = "default";
361 pinctrl-0 = <&i2c4_xfer>;
362};
363
Beniamino Galvani550c7f42014-06-26 20:03:41 +0200364&pwm0 {
365 pinctrl-names = "default";
366 pinctrl-0 = <&pwm0_out>;
367};
368
369&pwm1 {
370 pinctrl-names = "default";
371 pinctrl-0 = <&pwm1_out>;
372};
373
374&pwm2 {
375 pinctrl-names = "default";
376 pinctrl-0 = <&pwm2_out>;
377};
378
379&pwm3 {
380 pinctrl-names = "default";
381 pinctrl-0 = <&pwm3_out>;
382};
383
Heiko Stuebnerfcbbf962014-07-26 23:08:06 +0200384&uart0 {
385 pinctrl-names = "default";
386 pinctrl-0 = <&uart0_xfer>;
387};
388
389&uart1 {
390 pinctrl-names = "default";
391 pinctrl-0 = <&uart1_xfer>;
392};
393
394&uart2 {
395 pinctrl-names = "default";
396 pinctrl-0 = <&uart2_xfer>;
397};
398
399&uart3 {
400 pinctrl-names = "default";
401 pinctrl-0 = <&uart3_xfer>;
402};
Heiko Stuebnereb2b9d42014-07-30 10:16:17 +0200403
404&wdt {
405 compatible = "rockchip,rk3188-wdt", "snps,dw-wdt";
406};