2 * Copyright 2014 Chen-Yu Tsai
4 * Chen-Yu Tsai <wens@csie.org>
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
11 * a) This file is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
16 * This file is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
23 * b) Permission is hereby granted, free of charge, to any person
24 * obtaining a copy of this software and associated documentation
25 * files (the "Software"), to deal in the Software without
26 * restriction, including without limitation the rights to use,
27 * copy, modify, merge, publish, distribute, sublicense, and/or
28 * sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42 * OTHER DEALINGS IN THE SOFTWARE.
45 #include "skeleton64.dtsi"
47 #include <dt-bindings/interrupt-controller/arm-gic.h>
49 #include <dt-bindings/pinctrl/sun4i-a10.h>
51 #include <dt-bindings/clock/sun9i-a80-ccu.h>
52 #include <dt-bindings/clock/sun9i-a80-de.h>
53 #include <dt-bindings/clock/sun9i-a80-usb.h>
54 #include <dt-bindings/reset/sun9i-a80-ccu.h>
55 #include <dt-bindings/reset/sun9i-a80-de.h>
56 #include <dt-bindings/reset/sun9i-a80-usb.h>
59 interrupt-parent = <&gic>;
66 compatible = "arm,cortex-a7";
72 compatible = "arm,cortex-a7";
78 compatible = "arm,cortex-a7";
84 compatible = "arm,cortex-a7";
90 compatible = "arm,cortex-a15";
96 compatible = "arm,cortex-a15";
102 compatible = "arm,cortex-a15";
108 compatible = "arm,cortex-a15";
115 /* 8GB max. with LPAE */
116 reg = <0 0x20000000 0x02 0>;
120 compatible = "arm,armv7-timer";
121 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
122 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
123 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
124 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
125 clock-frequency = <24000000>;
126 arm,cpu-registers-not-fw-configured;
130 #address-cells = <1>;
133 * map 64 bit address range down to 32 bits,
134 * as the peripherals are all under 512MB.
136 ranges = <0 0 0 0x20000000>;
139 * This clock is actually configurable from the PRCM address
140 * space. The external 24M oscillator can be turned off, and
141 * the clock switched to an internal 16M RC oscillator. Under
142 * normal operation there's no reason to do this, and the
143 * default is to use the external good one, so just model this
144 * as a fixed clock. Also it is not entirely clear if the
145 * osc24M mux in the PRCM affects the entire clock tree, which
146 * would also throw all the PLL clock rates off, or just the
147 * downstream clocks in the PRCM.
151 compatible = "fixed-clock";
152 clock-frequency = <24000000>;
153 clock-output-names = "osc24M";
157 * The 32k clock is from an external source, normally the
158 * AC100 codec/RTC chip. This serves as a placeholder for
159 * board dts files to specify the source.
163 compatible = "fixed-factor-clock";
166 clock-output-names = "osc32k";
169 cpus_clk: clk@08001410 {
170 compatible = "allwinner,sun9i-a80-cpus-clk";
171 reg = <0x08001410 0x4>;
173 clocks = <&osc32k>, <&osc24M>,
174 <&ccu CLK_PLL_PERIPH0>,
175 <&ccu CLK_PLL_AUDIO>;
176 clock-output-names = "cpus";
180 compatible = "fixed-factor-clock";
184 clocks = <&cpus_clk>;
185 clock-output-names = "ahbs";
189 compatible = "allwinner,sun8i-a23-apb0-clk";
190 reg = <0x0800141c 0x4>;
193 clock-output-names = "apbs";
196 apbs_gates: clk@08001428 {
197 compatible = "allwinner,sun9i-a80-apbs-gates-clk";
198 reg = <0x08001428 0x4>;
201 clock-indices = <0>, <1>,
208 clock-output-names = "apbs_pio", "apbs_ir",
209 "apbs_timer", "apbs_rsb",
210 "apbs_uart", "apbs_1wire",
211 "apbs_i2c0", "apbs_i2c1",
212 "apbs_ps2_0", "apbs_ps2_1",
213 "apbs_dma", "apbs_i2s0",
214 "apbs_i2s1", "apbs_twd";
217 r_1wire_clk: clk@08001450 {
218 reg = <0x08001450 0x4>;
220 compatible = "allwinner,sun4i-a10-mod0-clk";
221 clocks = <&osc32k>, <&osc24M>;
222 clock-output-names = "r_1wire";
225 r_ir_clk: clk@08001454 {
226 reg = <0x08001454 0x4>;
228 compatible = "allwinner,sun4i-a10-mod0-clk";
229 clocks = <&osc32k>, <&osc24M>;
230 clock-output-names = "r_ir";
235 compatible = "simple-bus";
236 #address-cells = <1>;
239 * map 64 bit address range down to 32 bits,
240 * as the peripherals are all under 512MB.
242 ranges = <0 0 0 0x20000000>;
244 ehci0: usb@00a00000 {
245 compatible = "allwinner,sun9i-a80-ehci", "generic-ehci";
246 reg = <0x00a00000 0x100>;
247 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
248 clocks = <&usb_clocks CLK_BUS_HCI0>;
249 resets = <&usb_clocks RST_USB0_HCI>;
255 ohci0: usb@00a00400 {
256 compatible = "allwinner,sun9i-a80-ohci", "generic-ohci";
257 reg = <0x00a00400 0x100>;
258 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
259 clocks = <&usb_clocks CLK_BUS_HCI0>,
260 <&usb_clocks CLK_USB_OHCI0>;
261 resets = <&usb_clocks RST_USB0_HCI>;
267 usbphy1: phy@00a00800 {
268 compatible = "allwinner,sun9i-a80-usb-phy";
269 reg = <0x00a00800 0x4>;
270 clocks = <&usb_clocks CLK_USB0_PHY>;
272 resets = <&usb_clocks RST_USB0_PHY>;
278 ehci1: usb@00a01000 {
279 compatible = "allwinner,sun9i-a80-ehci", "generic-ehci";
280 reg = <0x00a01000 0x100>;
281 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
282 clocks = <&usb_clocks CLK_BUS_HCI1>;
283 resets = <&usb_clocks RST_USB1_HCI>;
289 usbphy2: phy@00a01800 {
290 compatible = "allwinner,sun9i-a80-usb-phy";
291 reg = <0x00a01800 0x4>;
292 clocks = <&usb_clocks CLK_USB1_HSIC>,
293 <&usb_clocks CLK_USB_HSIC>,
294 <&usb_clocks CLK_USB1_PHY>;
295 clock-names = "hsic_480M",
298 resets = <&usb_clocks RST_USB1_HSIC>,
299 <&usb_clocks RST_USB1_PHY>;
300 reset-names = "hsic",
304 /* usb1 is always used with HSIC */
308 ehci2: usb@00a02000 {
309 compatible = "allwinner,sun9i-a80-ehci", "generic-ehci";
310 reg = <0x00a02000 0x100>;
311 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
312 clocks = <&usb_clocks CLK_BUS_HCI2>;
313 resets = <&usb_clocks RST_USB2_HCI>;
319 ohci2: usb@00a02400 {
320 compatible = "allwinner,sun9i-a80-ohci", "generic-ohci";
321 reg = <0x00a02400 0x100>;
322 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
323 clocks = <&usb_clocks CLK_BUS_HCI2>,
324 <&usb_clocks CLK_USB_OHCI2>;
325 resets = <&usb_clocks RST_USB2_HCI>;
331 usbphy3: phy@00a02800 {
332 compatible = "allwinner,sun9i-a80-usb-phy";
333 reg = <0x00a02800 0x4>;
334 clocks = <&usb_clocks CLK_USB2_HSIC>,
335 <&usb_clocks CLK_USB_HSIC>,
336 <&usb_clocks CLK_USB2_PHY>;
337 clock-names = "hsic_480M",
340 resets = <&usb_clocks RST_USB2_HSIC>,
341 <&usb_clocks RST_USB2_PHY>;
342 reset-names = "hsic",
348 usb_clocks: clock@00a08000 {
349 compatible = "allwinner,sun9i-a80-usb-clks";
350 reg = <0x00a08000 0x8>;
351 clocks = <&ccu CLK_BUS_USB>, <&osc24M>;
352 clock-names = "bus", "hosc";
358 compatible = "allwinner,sun9i-a80-mmc";
359 reg = <0x01c0f000 0x1000>;
360 clocks = <&mmc_config_clk 0>, <&ccu CLK_MMC0>,
361 <&ccu CLK_MMC0_OUTPUT>,
362 <&ccu CLK_MMC0_SAMPLE>;
363 clock-names = "ahb", "mmc", "output", "sample";
364 resets = <&mmc_config_clk 0>;
366 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
368 #address-cells = <1>;
373 compatible = "allwinner,sun9i-a80-mmc";
374 reg = <0x01c10000 0x1000>;
375 clocks = <&mmc_config_clk 1>, <&ccu CLK_MMC1>,
376 <&ccu CLK_MMC1_OUTPUT>,
377 <&ccu CLK_MMC1_SAMPLE>;
378 clock-names = "ahb", "mmc", "output", "sample";
379 resets = <&mmc_config_clk 1>;
381 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
383 #address-cells = <1>;
388 compatible = "allwinner,sun9i-a80-mmc";
389 reg = <0x01c11000 0x1000>;
390 clocks = <&mmc_config_clk 2>, <&ccu CLK_MMC2>,
391 <&ccu CLK_MMC2_OUTPUT>,
392 <&ccu CLK_MMC2_SAMPLE>;
393 clock-names = "ahb", "mmc", "output", "sample";
394 resets = <&mmc_config_clk 2>;
396 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
398 #address-cells = <1>;
403 compatible = "allwinner,sun9i-a80-mmc";
404 reg = <0x01c12000 0x1000>;
405 clocks = <&mmc_config_clk 3>, <&ccu CLK_MMC3>,
406 <&ccu CLK_MMC3_OUTPUT>,
407 <&ccu CLK_MMC3_SAMPLE>;
408 clock-names = "ahb", "mmc", "output", "sample";
409 resets = <&mmc_config_clk 3>;
411 interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
413 #address-cells = <1>;
417 mmc_config_clk: clk@01c13000 {
418 compatible = "allwinner,sun9i-a80-mmc-config-clk";
419 reg = <0x01c13000 0x10>;
420 clocks = <&ccu CLK_BUS_MMC>;
422 resets = <&ccu RST_BUS_MMC>;
426 clock-output-names = "mmc0_config", "mmc1_config",
427 "mmc2_config", "mmc3_config";
430 gic: interrupt-controller@01c41000 {
431 compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
432 reg = <0x01c41000 0x1000>,
436 interrupt-controller;
437 #interrupt-cells = <3>;
438 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
441 de_clocks: clock@03000000 {
442 compatible = "allwinner,sun9i-a80-de-clks";
443 reg = <0x03000000 0x30>;
444 clocks = <&ccu CLK_DE>,
450 resets = <&ccu RST_BUS_DE>;
455 ccu: clock@06000000 {
456 compatible = "allwinner,sun9i-a80-ccu";
457 reg = <0x06000000 0x800>;
458 clocks = <&osc24M>, <&osc32k>;
459 clock-names = "hosc", "losc";
465 compatible = "allwinner,sun4i-a10-timer";
466 reg = <0x06000c00 0xa0>;
467 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
468 <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
469 <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
470 <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
471 <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
472 <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
477 wdt: watchdog@06000ca0 {
478 compatible = "allwinner,sun6i-a31-wdt";
479 reg = <0x06000ca0 0x20>;
480 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
483 pio: pinctrl@06000800 {
484 compatible = "allwinner,sun9i-a80-pinctrl";
485 reg = <0x06000800 0x400>;
486 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
487 <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
488 <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
489 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
490 <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
491 clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
492 clock-names = "apb", "hosc", "losc";
494 interrupt-controller;
495 #interrupt-cells = <3>;
499 i2c3_pins_a: i2c3@0 {
500 pins = "PG10", "PG11";
505 pins = "PF0", "PF1" ,"PF2", "PF3",
508 drive-strength = <30>;
513 pins = "PG0", "PG1" ,"PG2", "PG3",
516 drive-strength = <30>;
520 mmc2_8bit_pins: mmc2_8bit {
521 pins = "PC6", "PC7", "PC8", "PC9",
522 "PC10", "PC11", "PC12",
523 "PC13", "PC14", "PC15",
526 drive-strength = <30>;
530 uart0_pins_a: uart0@0 {
531 pins = "PH12", "PH13";
535 uart4_pins_a: uart4@0 {
536 pins = "PG12", "PG13", "PG14", "PG15";
541 uart0: serial@07000000 {
542 compatible = "snps,dw-apb-uart";
543 reg = <0x07000000 0x400>;
544 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
547 clocks = <&ccu CLK_BUS_UART0>;
548 resets = <&ccu RST_BUS_UART0>;
552 uart1: serial@07000400 {
553 compatible = "snps,dw-apb-uart";
554 reg = <0x07000400 0x400>;
555 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
558 clocks = <&ccu CLK_BUS_UART1>;
559 resets = <&ccu RST_BUS_UART1>;
563 uart2: serial@07000800 {
564 compatible = "snps,dw-apb-uart";
565 reg = <0x07000800 0x400>;
566 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
569 clocks = <&ccu CLK_BUS_UART2>;
570 resets = <&ccu RST_BUS_UART2>;
574 uart3: serial@07000c00 {
575 compatible = "snps,dw-apb-uart";
576 reg = <0x07000c00 0x400>;
577 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
580 clocks = <&ccu CLK_BUS_UART3>;
581 resets = <&ccu RST_BUS_UART3>;
585 uart4: serial@07001000 {
586 compatible = "snps,dw-apb-uart";
587 reg = <0x07001000 0x400>;
588 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
591 clocks = <&ccu CLK_BUS_UART4>;
592 resets = <&ccu RST_BUS_UART4>;
596 uart5: serial@07001400 {
597 compatible = "snps,dw-apb-uart";
598 reg = <0x07001400 0x400>;
599 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
602 clocks = <&ccu CLK_BUS_UART5>;
603 resets = <&ccu RST_BUS_UART5>;
608 compatible = "allwinner,sun6i-a31-i2c";
609 reg = <0x07002800 0x400>;
610 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
611 clocks = <&ccu CLK_BUS_I2C0>;
612 resets = <&ccu RST_BUS_I2C0>;
614 #address-cells = <1>;
619 compatible = "allwinner,sun6i-a31-i2c";
620 reg = <0x07002c00 0x400>;
621 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
622 clocks = <&ccu CLK_BUS_I2C1>;
623 resets = <&ccu RST_BUS_I2C1>;
625 #address-cells = <1>;
630 compatible = "allwinner,sun6i-a31-i2c";
631 reg = <0x07003000 0x400>;
632 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
633 clocks = <&ccu CLK_BUS_I2C2>;
634 resets = <&ccu RST_BUS_I2C2>;
636 #address-cells = <1>;
641 compatible = "allwinner,sun6i-a31-i2c";
642 reg = <0x07003400 0x400>;
643 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
644 clocks = <&ccu CLK_BUS_I2C3>;
645 resets = <&ccu RST_BUS_I2C3>;
647 #address-cells = <1>;
652 compatible = "allwinner,sun6i-a31-i2c";
653 reg = <0x07003800 0x400>;
654 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
655 clocks = <&ccu CLK_BUS_I2C4>;
656 resets = <&ccu RST_BUS_I2C4>;
658 #address-cells = <1>;
662 r_wdt: watchdog@08001000 {
663 compatible = "allwinner,sun6i-a31-wdt";
664 reg = <0x08001000 0x20>;
665 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
668 apbs_rst: reset@080014b0 {
669 reg = <0x080014b0 0x4>;
670 compatible = "allwinner,sun6i-a31-clock-reset";
674 nmi_intc: interrupt-controller@080015a0 {
675 compatible = "allwinner,sun9i-a80-nmi";
676 interrupt-controller;
677 #interrupt-cells = <2>;
678 reg = <0x080015a0 0xc>;
679 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
683 compatible = "allwinner,sun5i-a13-ir";
684 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
685 pinctrl-names = "default";
686 pinctrl-0 = <&r_ir_pins>;
687 clocks = <&apbs_gates 1>, <&r_ir_clk>;
688 clock-names = "apb", "ir";
689 resets = <&apbs_rst 1>;
690 reg = <0x08002000 0x40>;
694 r_uart: serial@08002800 {
695 compatible = "snps,dw-apb-uart";
696 reg = <0x08002800 0x400>;
697 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
700 clocks = <&apbs_gates 4>;
701 resets = <&apbs_rst 4>;
705 r_pio: pinctrl@08002c00 {
706 compatible = "allwinner,sun9i-a80-r-pinctrl";
707 reg = <0x08002c00 0x400>;
708 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
709 <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
710 clocks = <&apbs_gates 0>, <&osc24M>, <&osc32k>;
711 clock-names = "apb", "hosc", "losc";
712 resets = <&apbs_rst 0>;
714 interrupt-controller;
715 #interrupt-cells = <3>;
720 function = "s_cir_rx";
726 drive-strength = <20>;
731 r_rsb: i2c@08003400 {
732 compatible = "allwinner,sun8i-a23-rsb";
733 reg = <0x08003400 0x400>;
734 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
735 clocks = <&apbs_gates 3>;
736 clock-frequency = <3000000>;
737 resets = <&apbs_rst 3>;
738 pinctrl-names = "default";
739 pinctrl-0 = <&r_rsb_pins>;
741 #address-cells = <1>;