blob: e15beb3c671ed58dcbc20b8a2e6df66851643179 [file] [log] [blame]
Heiko Stuebnerf75efdd2013-09-29 13:25:08 +02001/*
2 * Copyright (c) 2013 MundoReader S.L.
3 * Author: Heiko Stuebner <heiko@sntech.de>
4 *
Heiko Stuebnerd6250a12015-03-06 19:03:59 +01005 * This file is dual-licensed: you can use it either under the terms
6 * of the GPL or the X11 license, at your option. Note that this dual
7 * licensing only applies to this file, and not this project as a
8 * whole.
Heiko Stuebnerf75efdd2013-09-29 13:25:08 +02009 *
Heiko Stuebnerd6250a12015-03-06 19:03:59 +010010 * a) This file is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 * This file is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * Or, alternatively,
21 *
22 * b) Permission is hereby granted, free of charge, to any person
23 * obtaining a copy of this software and associated documentation
24 * files (the "Software"), to deal in the Software without
25 * restriction, including without limitation the rights to use,
26 * copy, modify, merge, publish, distribute, sublicense, and/or
27 * sell copies of the Software, and to permit persons to whom the
28 * Software is furnished to do so, subject to the following
29 * conditions:
30 *
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
33 *
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41 * OTHER DEALINGS IN THE SOFTWARE.
Heiko Stuebnerf75efdd2013-09-29 13:25:08 +020042 */
43
44#include <dt-bindings/interrupt-controller/irq.h>
45#include <dt-bindings/interrupt-controller/arm-gic.h>
Andy Yanb60ab702016-07-06 21:28:34 +080046#include <dt-bindings/soc/rockchip,boot-mode.h>
Heiko Stuebnerf75efdd2013-09-29 13:25:08 +020047#include "skeleton.dtsi"
48
49/ {
50 interrupt-parent = <&gic>;
51
Heiko Stuebner9cdffd82014-06-24 20:12:06 +020052 aliases {
Heiko Stuebnerb3e4b952015-11-07 22:37:26 +010053 ethernet0 = &emac;
Heiko Stuebner9cdffd82014-06-24 20:12:06 +020054 i2c0 = &i2c0;
55 i2c1 = &i2c1;
56 i2c2 = &i2c2;
57 i2c3 = &i2c3;
58 i2c4 = &i2c4;
Heiko Stuebner4ff4ae12014-09-10 17:04:36 +020059 mshc0 = &emmc;
60 mshc1 = &mmc0;
61 mshc2 = &mmc1;
Julien CHAUVEAUe5b0ded2014-10-30 16:51:17 +010062 serial0 = &uart0;
63 serial1 = &uart1;
64 serial2 = &uart2;
65 serial3 = &uart3;
Heiko Stuebner39c2bd72014-09-10 16:28:02 +020066 spi0 = &spi0;
67 spi1 = &spi1;
Heiko Stuebner9cdffd82014-06-24 20:12:06 +020068 };
69
Heiko Stübnerac42f482014-08-14 23:01:50 +020070 amba {
Masahiro Yamada2ef7d5f2016-03-09 13:26:45 +090071 compatible = "simple-bus";
Heiko Stübnerac42f482014-08-14 23:01:50 +020072 #address-cells = <1>;
73 #size-cells = <1>;
74 ranges;
75
76 dmac1_s: dma-controller@20018000 {
77 compatible = "arm,pl330", "arm,primecell";
78 reg = <0x20018000 0x4000>;
79 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
80 <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
81 #dma-cells = <1>;
Shawn Lin9bed8b42016-01-22 19:06:48 +080082 arm,pl330-broken-no-flushp;
Heiko Stübnerac42f482014-08-14 23:01:50 +020083 clocks = <&cru ACLK_DMA1>;
84 clock-names = "apb_pclk";
85 };
86
87 dmac1_ns: dma-controller@2001c000 {
88 compatible = "arm,pl330", "arm,primecell";
89 reg = <0x2001c000 0x4000>;
90 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
91 <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
92 #dma-cells = <1>;
Shawn Lin9bed8b42016-01-22 19:06:48 +080093 arm,pl330-broken-no-flushp;
Heiko Stübnerac42f482014-08-14 23:01:50 +020094 clocks = <&cru ACLK_DMA1>;
95 clock-names = "apb_pclk";
96 status = "disabled";
97 };
98
99 dmac2: dma-controller@20078000 {
100 compatible = "arm,pl330", "arm,primecell";
101 reg = <0x20078000 0x4000>;
102 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
103 <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
104 #dma-cells = <1>;
Shawn Lin9bed8b42016-01-22 19:06:48 +0800105 arm,pl330-broken-no-flushp;
Heiko Stübnerac42f482014-08-14 23:01:50 +0200106 clocks = <&cru ACLK_DMA2>;
107 clock-names = "apb_pclk";
108 };
109 };
110
Heiko Stuebner560106c2014-04-15 19:44:59 +0200111 xin24m: oscillator {
112 compatible = "fixed-clock";
113 clock-frequency = <24000000>;
114 #clock-cells = <0>;
115 clock-output-names = "xin24m";
116 };
117
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200118 L2: l2-cache-controller@10138000 {
119 compatible = "arm,pl310-cache";
120 reg = <0x10138000 0x1000>;
121 cache-unified;
122 cache-level = <2>;
123 };
124
Heiko Stuebnerff84b902014-07-26 23:28:03 +0200125 scu@1013c000 {
126 compatible = "arm,cortex-a9-scu";
127 reg = <0x1013c000 0x100>;
128 };
129
Heiko Stuebnere40b43d2014-07-26 18:53:07 +0200130 global_timer: global-timer@1013c200 {
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200131 compatible = "arm,cortex-a9-global-timer";
132 reg = <0x1013c200 0x20>;
133 interrupts = <GIC_PPI 11 0x304>;
134 clocks = <&cru CORE_PERI>;
135 };
136
Heiko Stuebnere40b43d2014-07-26 18:53:07 +0200137 local_timer: local-timer@1013c600 {
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200138 compatible = "arm,cortex-a9-twd-timer";
139 reg = <0x1013c600 0x20>;
140 interrupts = <GIC_PPI 13 0x304>;
141 clocks = <&cru CORE_PERI>;
142 };
143
Heiko Stuebnerff84b902014-07-26 23:28:03 +0200144 gic: interrupt-controller@1013d000 {
145 compatible = "arm,cortex-a9-gic";
146 interrupt-controller;
147 #interrupt-cells = <3>;
148 reg = <0x1013d000 0x1000>,
149 <0x1013c100 0x0100>;
150 };
151
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200152 uart0: serial@10124000 {
153 compatible = "snps,dw-apb-uart";
154 reg = <0x10124000 0x400>;
155 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
156 reg-shift = <2>;
157 reg-io-width = <1>;
Heiko Stuebner69667ca2014-06-26 16:06:12 +0200158 clock-names = "baudclk", "apb_pclk";
159 clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200160 status = "disabled";
161 };
162
163 uart1: serial@10126000 {
164 compatible = "snps,dw-apb-uart";
165 reg = <0x10126000 0x400>;
166 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
167 reg-shift = <2>;
168 reg-io-width = <1>;
Heiko Stuebner69667ca2014-06-26 16:06:12 +0200169 clock-names = "baudclk", "apb_pclk";
170 clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200171 status = "disabled";
172 };
173
Heiko Stuebnerfd14e6f2014-09-09 15:37:27 +0200174 usb_otg: usb@10180000 {
175 compatible = "rockchip,rk3066-usb", "snps,dwc2";
176 reg = <0x10180000 0x40000>;
177 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
178 clocks = <&cru HCLK_OTG0>;
179 clock-names = "otg";
Heiko Stuebnerec32bd92015-08-02 22:29:33 +0200180 dr_mode = "otg";
181 g-np-tx-fifo-size = <16>;
182 g-rx-fifo-size = <275>;
183 g-tx-fifo-size = <256 128 128 64 64 32>;
184 g-use-dma;
Heiko Stuebner760bb972015-08-01 20:28:36 +0200185 phys = <&usbphy0>;
186 phy-names = "usb2-phy";
Heiko Stuebnerfd14e6f2014-09-09 15:37:27 +0200187 status = "disabled";
188 };
189
190 usb_host: usb@101c0000 {
191 compatible = "snps,dwc2";
192 reg = <0x101c0000 0x40000>;
193 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
194 clocks = <&cru HCLK_OTG1>;
195 clock-names = "otg";
Heiko Stuebnerec32bd92015-08-02 22:29:33 +0200196 dr_mode = "host";
Heiko Stuebner760bb972015-08-01 20:28:36 +0200197 phys = <&usbphy1>;
198 phy-names = "usb2-phy";
Heiko Stuebnerfd14e6f2014-09-09 15:37:27 +0200199 status = "disabled";
200 };
201
Romain Perier18ec91e2014-09-08 17:14:49 +0000202 emac: ethernet@10204000 {
203 compatible = "snps,arc-emac";
204 reg = <0x10204000 0x3c>;
205 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
206 #address-cells = <1>;
207 #size-cells = <0>;
208
209 rockchip,grf = <&grf>;
210
211 clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>;
212 clock-names = "hclk", "macref";
213 max-speed = <100>;
214 phy-mode = "rmii";
215
216 status = "disabled";
217 };
218
Heiko Stuebnere40b43d2014-07-26 18:53:07 +0200219 mmc0: dwmmc@10214000 {
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200220 compatible = "rockchip,rk2928-dw-mshc";
221 reg = <0x10214000 0x1000>;
222 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200223 clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>;
224 clock-names = "biu", "ciu";
Julien CHAUVEAU4c1e3ff2014-11-28 11:24:14 +0100225 fifo-depth = <256>;
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200226 status = "disabled";
227 };
Heiko Stuebner46b82192013-06-17 22:17:16 +0200228
Heiko Stuebnere40b43d2014-07-26 18:53:07 +0200229 mmc1: dwmmc@10218000 {
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200230 compatible = "rockchip,rk2928-dw-mshc";
231 reg = <0x10218000 0x1000>;
232 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200233 clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>;
234 clock-names = "biu", "ciu";
Julien CHAUVEAU4c1e3ff2014-11-28 11:24:14 +0100235 fifo-depth = <256>;
Heiko Stuebnerc3030d32014-07-26 18:44:35 +0200236 status = "disabled";
Heiko Stuebnerf75efdd2013-09-29 13:25:08 +0200237 };
Heiko Stuebnerff84b902014-07-26 23:28:03 +0200238
Heiko Stuebner4ff4ae12014-09-10 17:04:36 +0200239 emmc: dwmmc@1021c000 {
240 compatible = "rockchip,rk2928-dw-mshc";
241 reg = <0x1021c000 0x1000>;
242 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
Heiko Stuebner4ff4ae12014-09-10 17:04:36 +0200243 clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>;
244 clock-names = "biu", "ciu";
Julien CHAUVEAU4c1e3ff2014-11-28 11:24:14 +0100245 fifo-depth = <256>;
Heiko Stuebner4ff4ae12014-09-10 17:04:36 +0200246 status = "disabled";
247 };
248
Heiko Stuebnerff84b902014-07-26 23:28:03 +0200249 pmu: pmu@20004000 {
Andy Yanb60ab702016-07-06 21:28:34 +0800250 compatible = "rockchip,rk3066-pmu", "syscon", "simple-mfd";
Heiko Stuebnerff84b902014-07-26 23:28:03 +0200251 reg = <0x20004000 0x100>;
Andy Yanb60ab702016-07-06 21:28:34 +0800252
253 reboot-mode {
254 compatible = "syscon-reboot-mode";
255 offset = <0x40>;
256 mode-normal = <BOOT_NORMAL>;
257 mode-recovery = <BOOT_RECOVERY>;
258 mode-bootloader = <BOOT_FASTBOOT>;
259 mode-loader = <BOOT_BL_DOWNLOAD>;
260 };
Heiko Stuebnerff84b902014-07-26 23:28:03 +0200261 };
262
263 grf: grf@20008000 {
264 compatible = "syscon";
265 reg = <0x20008000 0x200>;
266 };
267
Heiko Stuebner9cdffd82014-06-24 20:12:06 +0200268 i2c0: i2c@2002d000 {
269 compatible = "rockchip,rk3066-i2c";
270 reg = <0x2002d000 0x1000>;
271 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
272 #address-cells = <1>;
273 #size-cells = <0>;
274
275 rockchip,grf = <&grf>;
Heiko Stuebner9cdffd82014-06-24 20:12:06 +0200276
277 clock-names = "i2c";
278 clocks = <&cru PCLK_I2C0>;
279
280 status = "disabled";
281 };
282
283 i2c1: i2c@2002f000 {
284 compatible = "rockchip,rk3066-i2c";
285 reg = <0x2002f000 0x1000>;
286 interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
287 #address-cells = <1>;
288 #size-cells = <0>;
289
290 rockchip,grf = <&grf>;
291
292 clocks = <&cru PCLK_I2C1>;
293 clock-names = "i2c";
294
295 status = "disabled";
296 };
297
Beniamino Galvani550c7f42014-06-26 20:03:41 +0200298 pwm0: pwm@20030000 {
299 compatible = "rockchip,rk2928-pwm";
300 reg = <0x20030000 0x10>;
301 #pwm-cells = <2>;
302 clocks = <&cru PCLK_PWM01>;
303 status = "disabled";
304 };
305
306 pwm1: pwm@20030010 {
307 compatible = "rockchip,rk2928-pwm";
308 reg = <0x20030010 0x10>;
309 #pwm-cells = <2>;
310 clocks = <&cru PCLK_PWM01>;
311 status = "disabled";
312 };
313
Heiko Stuebnereb2b9d42014-07-30 10:16:17 +0200314 wdt: watchdog@2004c000 {
315 compatible = "snps,dw-wdt";
316 reg = <0x2004c000 0x100>;
317 clocks = <&cru PCLK_WDT>;
318 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
319 status = "disabled";
320 };
321
Beniamino Galvani550c7f42014-06-26 20:03:41 +0200322 pwm2: pwm@20050020 {
323 compatible = "rockchip,rk2928-pwm";
324 reg = <0x20050020 0x10>;
325 #pwm-cells = <2>;
326 clocks = <&cru PCLK_PWM23>;
327 status = "disabled";
328 };
329
330 pwm3: pwm@20050030 {
331 compatible = "rockchip,rk2928-pwm";
332 reg = <0x20050030 0x10>;
333 #pwm-cells = <2>;
334 clocks = <&cru PCLK_PWM23>;
335 status = "disabled";
336 };
337
Heiko Stuebner9cdffd82014-06-24 20:12:06 +0200338 i2c2: i2c@20056000 {
339 compatible = "rockchip,rk3066-i2c";
340 reg = <0x20056000 0x1000>;
341 interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
342 #address-cells = <1>;
343 #size-cells = <0>;
344
345 rockchip,grf = <&grf>;
346
347 clocks = <&cru PCLK_I2C2>;
348 clock-names = "i2c";
349
350 status = "disabled";
351 };
352
353 i2c3: i2c@2005a000 {
354 compatible = "rockchip,rk3066-i2c";
355 reg = <0x2005a000 0x1000>;
356 interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
357 #address-cells = <1>;
358 #size-cells = <0>;
359
360 rockchip,grf = <&grf>;
361
362 clocks = <&cru PCLK_I2C3>;
363 clock-names = "i2c";
364
365 status = "disabled";
366 };
367
368 i2c4: i2c@2005e000 {
369 compatible = "rockchip,rk3066-i2c";
370 reg = <0x2005e000 0x1000>;
371 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
372 #address-cells = <1>;
373 #size-cells = <0>;
374
375 rockchip,grf = <&grf>;
376
377 clocks = <&cru PCLK_I2C4>;
378 clock-names = "i2c";
379
380 status = "disabled";
381 };
382
Heiko Stuebnerff84b902014-07-26 23:28:03 +0200383 uart2: serial@20064000 {
384 compatible = "snps,dw-apb-uart";
385 reg = <0x20064000 0x400>;
386 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
387 reg-shift = <2>;
388 reg-io-width = <1>;
Heiko Stuebner69667ca2014-06-26 16:06:12 +0200389 clock-names = "baudclk", "apb_pclk";
390 clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
Heiko Stuebnerff84b902014-07-26 23:28:03 +0200391 status = "disabled";
392 };
393
394 uart3: serial@20068000 {
395 compatible = "snps,dw-apb-uart";
396 reg = <0x20068000 0x400>;
397 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
398 reg-shift = <2>;
399 reg-io-width = <1>;
Heiko Stuebner69667ca2014-06-26 16:06:12 +0200400 clock-names = "baudclk", "apb_pclk";
401 clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
Heiko Stuebnerff84b902014-07-26 23:28:03 +0200402 status = "disabled";
403 };
Heiko Stübnerf23a6172014-08-20 21:09:24 +0200404
405 saradc: saradc@2006c000 {
406 compatible = "rockchip,saradc";
407 reg = <0x2006c000 0x100>;
408 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
409 #io-channel-cells = <1>;
410 clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
411 clock-names = "saradc", "apb_pclk";
Caesar Wang3d4267a2016-07-27 22:24:07 +0800412 resets = <&cru SRST_SARADC>;
413 reset-names = "saradc-apb";
Heiko Stübnerf23a6172014-08-20 21:09:24 +0200414 status = "disabled";
415 };
Heiko Stuebner39c2bd72014-09-10 16:28:02 +0200416
417 spi0: spi@20070000 {
418 compatible = "rockchip,rk3066-spi";
419 clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
420 clock-names = "spiclk", "apb_pclk";
421 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
422 reg = <0x20070000 0x1000>;
423 #address-cells = <1>;
424 #size-cells = <0>;
Julien CHAUVEAUb3e3a7b2014-10-10 10:04:13 +0200425 dmas = <&dmac2 10>, <&dmac2 11>;
426 dma-names = "tx", "rx";
Heiko Stuebner39c2bd72014-09-10 16:28:02 +0200427 status = "disabled";
428 };
429
430 spi1: spi@20074000 {
431 compatible = "rockchip,rk3066-spi";
432 clocks = <&cru SCLK_SPI1>, <&cru PCLK_SPI1>;
433 clock-names = "spiclk", "apb_pclk";
434 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
435 reg = <0x20074000 0x1000>;
436 #address-cells = <1>;
437 #size-cells = <0>;
Julien CHAUVEAUb3e3a7b2014-10-10 10:04:13 +0200438 dmas = <&dmac2 12>, <&dmac2 13>;
439 dma-names = "tx", "rx";
Heiko Stuebner39c2bd72014-09-10 16:28:02 +0200440 status = "disabled";
441 };
Heiko Stuebnerf75efdd2013-09-29 13:25:08 +0200442};