Loading...
Note: File does not exist in v6.9.4.
1/*
2 * Copyright 2017 Chen-Yu Tsai <wens@csie.org>
3 * Copyright 2017 Icenowy Zheng <icenowy@aosc.io>
4 *
5 * 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.
9 *
10 * 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.
42 */
43
44#include <dt-bindings/interrupt-controller/arm-gic.h>
45#include <dt-bindings/clock/sun8i-r40-ccu.h>
46#include <dt-bindings/reset/sun8i-r40-ccu.h>
47
48/ {
49 #address-cells = <1>;
50 #size-cells = <1>;
51 interrupt-parent = <&gic>;
52
53 clocks {
54 #address-cells = <1>;
55 #size-cells = <1>;
56 ranges;
57
58 osc24M: osc24M {
59 #clock-cells = <0>;
60 compatible = "fixed-clock";
61 clock-frequency = <24000000>;
62 clock-output-names = "osc24M";
63 };
64
65 osc32k: osc32k {
66 #clock-cells = <0>;
67 compatible = "fixed-clock";
68 clock-frequency = <32768>;
69 clock-output-names = "osc32k";
70 };
71 };
72
73 cpus {
74 #address-cells = <1>;
75 #size-cells = <0>;
76
77 cpu@0 {
78 compatible = "arm,cortex-a7";
79 device_type = "cpu";
80 reg = <0>;
81 };
82
83 cpu@1 {
84 compatible = "arm,cortex-a7";
85 device_type = "cpu";
86 reg = <1>;
87 };
88
89 cpu@2 {
90 compatible = "arm,cortex-a7";
91 device_type = "cpu";
92 reg = <2>;
93 };
94
95 cpu@3 {
96 compatible = "arm,cortex-a7";
97 device_type = "cpu";
98 reg = <3>;
99 };
100 };
101
102 soc {
103 compatible = "simple-bus";
104 #address-cells = <1>;
105 #size-cells = <1>;
106 ranges;
107
108 nmi_intc: interrupt-controller@1c00030 {
109 compatible = "allwinner,sun7i-a20-sc-nmi";
110 interrupt-controller;
111 #interrupt-cells = <2>;
112 reg = <0x01c00030 0x0c>;
113 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
114 };
115
116 mmc0: mmc@1c0f000 {
117 compatible = "allwinner,sun8i-r40-mmc",
118 "allwinner,sun50i-a64-mmc";
119 reg = <0x01c0f000 0x1000>;
120 clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
121 clock-names = "ahb", "mmc";
122 resets = <&ccu RST_BUS_MMC0>;
123 reset-names = "ahb";
124 pinctrl-0 = <&mmc0_pins>;
125 pinctrl-names = "default";
126 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
127 status = "disabled";
128 #address-cells = <1>;
129 #size-cells = <0>;
130 };
131
132 mmc1: mmc@1c10000 {
133 compatible = "allwinner,sun8i-r40-mmc",
134 "allwinner,sun50i-a64-mmc";
135 reg = <0x01c10000 0x1000>;
136 clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
137 clock-names = "ahb", "mmc";
138 resets = <&ccu RST_BUS_MMC1>;
139 reset-names = "ahb";
140 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
141 status = "disabled";
142 #address-cells = <1>;
143 #size-cells = <0>;
144 };
145
146 mmc2: mmc@1c11000 {
147 compatible = "allwinner,sun8i-r40-emmc",
148 "allwinner,sun50i-a64-emmc";
149 reg = <0x01c11000 0x1000>;
150 clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
151 clock-names = "ahb", "mmc";
152 resets = <&ccu RST_BUS_MMC2>;
153 reset-names = "ahb";
154 pinctrl-0 = <&mmc2_pins>;
155 pinctrl-names = "default";
156 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
157 status = "disabled";
158 #address-cells = <1>;
159 #size-cells = <0>;
160 };
161
162 mmc3: mmc@1c12000 {
163 compatible = "allwinner,sun8i-r40-mmc",
164 "allwinner,sun50i-a64-mmc";
165 reg = <0x01c12000 0x1000>;
166 clocks = <&ccu CLK_BUS_MMC3>, <&ccu CLK_MMC3>;
167 clock-names = "ahb", "mmc";
168 resets = <&ccu RST_BUS_MMC3>;
169 reset-names = "ahb";
170 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
171 status = "disabled";
172 #address-cells = <1>;
173 #size-cells = <0>;
174 };
175
176 usbphy: phy@1c13400 {
177 compatible = "allwinner,sun8i-r40-usb-phy";
178 reg = <0x01c13400 0x14>,
179 <0x01c14800 0x4>,
180 <0x01c19800 0x4>,
181 <0x01c1c800 0x4>;
182 reg-names = "phy_ctrl",
183 "pmu0",
184 "pmu1",
185 "pmu2";
186 clocks = <&ccu CLK_USB_PHY0>,
187 <&ccu CLK_USB_PHY1>,
188 <&ccu CLK_USB_PHY2>;
189 clock-names = "usb0_phy",
190 "usb1_phy",
191 "usb2_phy";
192 resets = <&ccu RST_USB_PHY0>,
193 <&ccu RST_USB_PHY1>,
194 <&ccu RST_USB_PHY2>;
195 reset-names = "usb0_reset",
196 "usb1_reset",
197 "usb2_reset";
198 status = "disabled";
199 #phy-cells = <1>;
200 };
201
202 ehci1: usb@1c19000 {
203 compatible = "allwinner,sun8i-r40-ehci", "generic-ehci";
204 reg = <0x01c19000 0x100>;
205 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
206 clocks = <&ccu CLK_BUS_EHCI1>;
207 resets = <&ccu RST_BUS_EHCI1>;
208 phys = <&usbphy 1>;
209 phy-names = "usb";
210 status = "disabled";
211 };
212
213 ohci1: usb@1c19400 {
214 compatible = "allwinner,sun8i-r40-ohci", "generic-ohci";
215 reg = <0x01c19400 0x100>;
216 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
217 clocks = <&ccu CLK_BUS_OHCI1>,
218 <&ccu CLK_USB_OHCI1>;
219 resets = <&ccu RST_BUS_OHCI1>;
220 phys = <&usbphy 1>;
221 phy-names = "usb";
222 status = "disabled";
223 };
224
225 ehci2: usb@1c1c000 {
226 compatible = "allwinner,sun8i-r40-ehci", "generic-ehci";
227 reg = <0x01c1c000 0x100>;
228 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
229 clocks = <&ccu CLK_BUS_EHCI2>;
230 resets = <&ccu RST_BUS_EHCI2>;
231 phys = <&usbphy 2>;
232 phy-names = "usb";
233 status = "disabled";
234 };
235
236 ohci2: usb@1c1c400 {
237 compatible = "allwinner,sun8i-r40-ohci", "generic-ohci";
238 reg = <0x01c1c400 0x100>;
239 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
240 clocks = <&ccu CLK_BUS_OHCI2>,
241 <&ccu CLK_USB_OHCI2>;
242 resets = <&ccu RST_BUS_OHCI2>;
243 phys = <&usbphy 2>;
244 phy-names = "usb";
245 status = "disabled";
246 };
247
248 ccu: clock@1c20000 {
249 compatible = "allwinner,sun8i-r40-ccu";
250 reg = <0x01c20000 0x400>;
251 clocks = <&osc24M>, <&osc32k>;
252 clock-names = "hosc", "losc";
253 #clock-cells = <1>;
254 #reset-cells = <1>;
255 };
256
257 pio: pinctrl@1c20800 {
258 compatible = "allwinner,sun8i-r40-pinctrl";
259 reg = <0x01c20800 0x400>;
260 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
261 clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
262 clock-names = "apb", "hosc", "losc";
263 gpio-controller;
264 interrupt-controller;
265 #interrupt-cells = <3>;
266 #gpio-cells = <3>;
267
268 i2c0_pins: i2c0-pins {
269 pins = "PB0", "PB1";
270 function = "i2c0";
271 };
272
273 mmc0_pins: mmc0-pins {
274 pins = "PF0", "PF1", "PF2",
275 "PF3", "PF4", "PF5";
276 function = "mmc0";
277 drive-strength = <30>;
278 bias-pull-up;
279 };
280
281 mmc1_pg_pins: mmc1-pg-pins {
282 pins = "PG0", "PG1", "PG2",
283 "PG3", "PG4", "PG5";
284 function = "mmc1";
285 drive-strength = <30>;
286 bias-pull-up;
287 };
288
289 mmc2_pins: mmc2-pins {
290 pins = "PC5", "PC6", "PC7", "PC8", "PC9",
291 "PC10", "PC11", "PC12", "PC13", "PC14",
292 "PC15", "PC24";
293 function = "mmc2";
294 drive-strength = <30>;
295 bias-pull-up;
296 };
297
298 uart0_pb_pins: uart0-pb-pins {
299 pins = "PB22", "PB23";
300 function = "uart0";
301 };
302 };
303
304 wdt: watchdog@1c20c90 {
305 compatible = "allwinner,sun4i-a10-wdt";
306 reg = <0x01c20c90 0x10>;
307 };
308
309 uart0: serial@1c28000 {
310 compatible = "snps,dw-apb-uart";
311 reg = <0x01c28000 0x400>;
312 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
313 reg-shift = <2>;
314 reg-io-width = <4>;
315 clocks = <&ccu CLK_BUS_UART0>;
316 resets = <&ccu RST_BUS_UART0>;
317 status = "disabled";
318 };
319
320 uart1: serial@1c28400 {
321 compatible = "snps,dw-apb-uart";
322 reg = <0x01c28400 0x400>;
323 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
324 reg-shift = <2>;
325 reg-io-width = <4>;
326 clocks = <&ccu CLK_BUS_UART1>;
327 resets = <&ccu RST_BUS_UART1>;
328 status = "disabled";
329 };
330
331 uart2: serial@1c28800 {
332 compatible = "snps,dw-apb-uart";
333 reg = <0x01c28800 0x400>;
334 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
335 reg-shift = <2>;
336 reg-io-width = <4>;
337 clocks = <&ccu CLK_BUS_UART2>;
338 resets = <&ccu RST_BUS_UART2>;
339 status = "disabled";
340 };
341
342 uart3: serial@1c28c00 {
343 compatible = "snps,dw-apb-uart";
344 reg = <0x01c28c00 0x400>;
345 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
346 reg-shift = <2>;
347 reg-io-width = <4>;
348 clocks = <&ccu CLK_BUS_UART3>;
349 resets = <&ccu RST_BUS_UART3>;
350 status = "disabled";
351 };
352
353 uart4: serial@1c29000 {
354 compatible = "snps,dw-apb-uart";
355 reg = <0x01c29000 0x400>;
356 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
357 reg-shift = <2>;
358 reg-io-width = <4>;
359 clocks = <&ccu CLK_BUS_UART4>;
360 resets = <&ccu RST_BUS_UART4>;
361 status = "disabled";
362 };
363
364 uart5: serial@1c29400 {
365 compatible = "snps,dw-apb-uart";
366 reg = <0x01c29400 0x400>;
367 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
368 reg-shift = <2>;
369 reg-io-width = <4>;
370 clocks = <&ccu CLK_BUS_UART5>;
371 resets = <&ccu RST_BUS_UART5>;
372 status = "disabled";
373 };
374
375 uart6: serial@1c29800 {
376 compatible = "snps,dw-apb-uart";
377 reg = <0x01c29800 0x400>;
378 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
379 reg-shift = <2>;
380 reg-io-width = <4>;
381 clocks = <&ccu CLK_BUS_UART6>;
382 resets = <&ccu RST_BUS_UART6>;
383 status = "disabled";
384 };
385
386 uart7: serial@1c29c00 {
387 compatible = "snps,dw-apb-uart";
388 reg = <0x01c29c00 0x400>;
389 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
390 reg-shift = <2>;
391 reg-io-width = <4>;
392 clocks = <&ccu CLK_BUS_UART7>;
393 resets = <&ccu RST_BUS_UART7>;
394 status = "disabled";
395 };
396
397 i2c0: i2c@1c2ac00 {
398 compatible = "allwinner,sun6i-a31-i2c";
399 reg = <0x01c2ac00 0x400>;
400 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
401 clocks = <&ccu CLK_BUS_I2C0>;
402 resets = <&ccu RST_BUS_I2C0>;
403 pinctrl-0 = <&i2c0_pins>;
404 pinctrl-names = "default";
405 status = "disabled";
406 #address-cells = <1>;
407 #size-cells = <0>;
408 };
409
410 i2c1: i2c@1c2b000 {
411 compatible = "allwinner,sun6i-a31-i2c";
412 reg = <0x01c2b000 0x400>;
413 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
414 clocks = <&ccu CLK_BUS_I2C1>;
415 resets = <&ccu RST_BUS_I2C1>;
416 status = "disabled";
417 #address-cells = <1>;
418 #size-cells = <0>;
419 };
420
421 i2c2: i2c@1c2b400 {
422 compatible = "allwinner,sun6i-a31-i2c";
423 reg = <0x01c2b400 0x400>;
424 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
425 clocks = <&ccu CLK_BUS_I2C2>;
426 resets = <&ccu RST_BUS_I2C2>;
427 status = "disabled";
428 #address-cells = <1>;
429 #size-cells = <0>;
430 };
431
432 i2c3: i2c@1c2b800 {
433 compatible = "allwinner,sun6i-a31-i2c";
434 reg = <0x01c2b800 0x400>;
435 interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
436 clocks = <&ccu CLK_BUS_I2C3>;
437 resets = <&ccu RST_BUS_I2C3>;
438 status = "disabled";
439 #address-cells = <1>;
440 #size-cells = <0>;
441 };
442
443 i2c4: i2c@1c2c000 {
444 compatible = "allwinner,sun6i-a31-i2c";
445 reg = <0x01c2c000 0x400>;
446 interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
447 clocks = <&ccu CLK_BUS_I2C4>;
448 resets = <&ccu RST_BUS_I2C4>;
449 status = "disabled";
450 #address-cells = <1>;
451 #size-cells = <0>;
452 };
453
454 gic: interrupt-controller@1c81000 {
455 compatible = "arm,gic-400";
456 reg = <0x01c81000 0x1000>,
457 <0x01c82000 0x1000>,
458 <0x01c84000 0x2000>,
459 <0x01c86000 0x2000>;
460 interrupt-controller;
461 #interrupt-cells = <3>;
462 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
463 };
464 };
465
466 timer {
467 compatible = "arm,armv7-timer";
468 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
469 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
470 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
471 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
472 };
473};