2 * Copyright 2017 Chen-Yu Tsai <wens@csie.org>
3 * Copyright 2017 Icenowy Zheng <icenowy@aosc.io>
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
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.
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.
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
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
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.
44 #include <dt-bindings/interrupt-controller/arm-gic.h>
45 #include <dt-bindings/clock/sun8i-de2.h>
46 #include <dt-bindings/clock/sun8i-r40-ccu.h>
47 #include <dt-bindings/reset/sun8i-r40-ccu.h>
48 #include <dt-bindings/reset/sun8i-de2.h>
53 interrupt-parent = <&gic>;
62 compatible = "fixed-clock";
63 clock-frequency = <24000000>;
64 clock-accuracy = <50000>;
65 clock-output-names = "osc24M";
70 compatible = "fixed-clock";
71 clock-frequency = <32768>;
72 clock-accuracy = <20000>;
73 clock-output-names = "ext-osc32k";
82 compatible = "arm,cortex-a7";
88 compatible = "arm,cortex-a7";
94 compatible = "arm,cortex-a7";
100 compatible = "arm,cortex-a7";
107 compatible = "allwinner,sun8i-r40-display-engine";
108 allwinner,pipelines = <&mixer0>, <&mixer1>;
113 compatible = "simple-bus";
114 #address-cells = <1>;
118 display_clocks: clock@1000000 {
119 compatible = "allwinner,sun8i-r40-de2-clk",
120 "allwinner,sun8i-h3-de2-clk";
121 reg = <0x01000000 0x100000>;
122 clocks = <&ccu CLK_DE>,
126 resets = <&ccu RST_BUS_DE>;
131 mixer0: mixer@1100000 {
132 compatible = "allwinner,sun8i-r40-de2-mixer-0";
133 reg = <0x01100000 0x100000>;
134 clocks = <&display_clocks CLK_BUS_MIXER0>,
135 <&display_clocks CLK_MIXER0>;
138 resets = <&display_clocks RST_MIXER0>;
141 #address-cells = <1>;
146 mixer0_out_tcon_top: endpoint {
147 remote-endpoint = <&tcon_top_mixer0_in_mixer0>;
153 mixer1: mixer@1200000 {
154 compatible = "allwinner,sun8i-r40-de2-mixer-1";
155 reg = <0x01200000 0x100000>;
156 clocks = <&display_clocks CLK_BUS_MIXER1>,
157 <&display_clocks CLK_MIXER1>;
160 resets = <&display_clocks RST_WB>;
163 #address-cells = <1>;
168 mixer1_out_tcon_top: endpoint {
169 remote-endpoint = <&tcon_top_mixer1_in_mixer1>;
175 nmi_intc: interrupt-controller@1c00030 {
176 compatible = "allwinner,sun7i-a20-sc-nmi";
177 interrupt-controller;
178 #interrupt-cells = <2>;
179 reg = <0x01c00030 0x0c>;
180 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
184 compatible = "allwinner,sun8i-r40-mmc",
185 "allwinner,sun50i-a64-mmc";
186 reg = <0x01c0f000 0x1000>;
187 clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
188 clock-names = "ahb", "mmc";
189 resets = <&ccu RST_BUS_MMC0>;
191 pinctrl-0 = <&mmc0_pins>;
192 pinctrl-names = "default";
193 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
195 #address-cells = <1>;
200 compatible = "allwinner,sun8i-r40-mmc",
201 "allwinner,sun50i-a64-mmc";
202 reg = <0x01c10000 0x1000>;
203 clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
204 clock-names = "ahb", "mmc";
205 resets = <&ccu RST_BUS_MMC1>;
207 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
209 #address-cells = <1>;
214 compatible = "allwinner,sun8i-r40-emmc",
215 "allwinner,sun50i-a64-emmc";
216 reg = <0x01c11000 0x1000>;
217 clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
218 clock-names = "ahb", "mmc";
219 resets = <&ccu RST_BUS_MMC2>;
221 pinctrl-0 = <&mmc2_pins>;
222 pinctrl-names = "default";
223 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
225 #address-cells = <1>;
230 compatible = "allwinner,sun8i-r40-mmc",
231 "allwinner,sun50i-a64-mmc";
232 reg = <0x01c12000 0x1000>;
233 clocks = <&ccu CLK_BUS_MMC3>, <&ccu CLK_MMC3>;
234 clock-names = "ahb", "mmc";
235 resets = <&ccu RST_BUS_MMC3>;
237 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
239 #address-cells = <1>;
243 usbphy: phy@1c13400 {
244 compatible = "allwinner,sun8i-r40-usb-phy";
245 reg = <0x01c13400 0x14>,
249 reg-names = "phy_ctrl",
253 clocks = <&ccu CLK_USB_PHY0>,
256 clock-names = "usb0_phy",
259 resets = <&ccu RST_USB_PHY0>,
262 reset-names = "usb0_reset",
270 compatible = "allwinner,sun8i-r40-ehci", "generic-ehci";
271 reg = <0x01c19000 0x100>;
272 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
273 clocks = <&ccu CLK_BUS_EHCI1>;
274 resets = <&ccu RST_BUS_EHCI1>;
281 compatible = "allwinner,sun8i-r40-ohci", "generic-ohci";
282 reg = <0x01c19400 0x100>;
283 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
284 clocks = <&ccu CLK_BUS_OHCI1>,
285 <&ccu CLK_USB_OHCI1>;
286 resets = <&ccu RST_BUS_OHCI1>;
293 compatible = "allwinner,sun8i-r40-ehci", "generic-ehci";
294 reg = <0x01c1c000 0x100>;
295 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
296 clocks = <&ccu CLK_BUS_EHCI2>;
297 resets = <&ccu RST_BUS_EHCI2>;
304 compatible = "allwinner,sun8i-r40-ohci", "generic-ohci";
305 reg = <0x01c1c400 0x100>;
306 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
307 clocks = <&ccu CLK_BUS_OHCI2>,
308 <&ccu CLK_USB_OHCI2>;
309 resets = <&ccu RST_BUS_OHCI2>;
316 compatible = "allwinner,sun8i-r40-ccu";
317 reg = <0x01c20000 0x400>;
318 clocks = <&osc24M>, <&rtc 0>;
319 clock-names = "hosc", "losc";
325 compatible = "allwinner,sun8i-r40-rtc",
326 "allwinner,sun8i-h3-rtc";
327 reg = <0x01c20400 0x400>;
328 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
329 clock-output-names = "osc32k", "osc32k-out";
334 pio: pinctrl@1c20800 {
335 compatible = "allwinner,sun8i-r40-pinctrl";
336 reg = <0x01c20800 0x400>;
337 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
338 clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&rtc 0>;
339 clock-names = "apb", "hosc", "losc";
341 interrupt-controller;
342 #interrupt-cells = <3>;
345 clk_out_a_pin: clk-out-a-pin {
347 function = "clk_out_a";
350 gmac_rgmii_pins: gmac-rgmii-pins {
351 pins = "PA0", "PA1", "PA2", "PA3",
352 "PA4", "PA5", "PA6", "PA7",
353 "PA8", "PA10", "PA11", "PA12",
354 "PA13", "PA15", "PA16";
357 * data lines in RGMII mode use DDR mode
358 * and need a higher signal drive strength
360 drive-strength = <40>;
363 i2c0_pins: i2c0-pins {
368 mmc0_pins: mmc0-pins {
369 pins = "PF0", "PF1", "PF2",
372 drive-strength = <30>;
376 mmc1_pg_pins: mmc1-pg-pins {
377 pins = "PG0", "PG1", "PG2",
380 drive-strength = <30>;
384 mmc2_pins: mmc2-pins {
385 pins = "PC5", "PC6", "PC7", "PC8", "PC9",
386 "PC10", "PC11", "PC12", "PC13", "PC14",
389 drive-strength = <30>;
393 uart0_pb_pins: uart0-pb-pins {
394 pins = "PB22", "PB23";
398 uart3_pg_pins: uart3-pg-pins {
403 uart3_rts_cts_pg_pins: uart3-rts-cts-pg-pins {
409 wdt: watchdog@1c20c90 {
410 compatible = "allwinner,sun4i-a10-wdt";
411 reg = <0x01c20c90 0x10>;
414 uart0: serial@1c28000 {
415 compatible = "snps,dw-apb-uart";
416 reg = <0x01c28000 0x400>;
417 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
420 clocks = <&ccu CLK_BUS_UART0>;
421 resets = <&ccu RST_BUS_UART0>;
425 uart1: serial@1c28400 {
426 compatible = "snps,dw-apb-uart";
427 reg = <0x01c28400 0x400>;
428 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
431 clocks = <&ccu CLK_BUS_UART1>;
432 resets = <&ccu RST_BUS_UART1>;
436 uart2: serial@1c28800 {
437 compatible = "snps,dw-apb-uart";
438 reg = <0x01c28800 0x400>;
439 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
442 clocks = <&ccu CLK_BUS_UART2>;
443 resets = <&ccu RST_BUS_UART2>;
447 uart3: serial@1c28c00 {
448 compatible = "snps,dw-apb-uart";
449 reg = <0x01c28c00 0x400>;
450 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
453 clocks = <&ccu CLK_BUS_UART3>;
454 resets = <&ccu RST_BUS_UART3>;
458 uart4: serial@1c29000 {
459 compatible = "snps,dw-apb-uart";
460 reg = <0x01c29000 0x400>;
461 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
464 clocks = <&ccu CLK_BUS_UART4>;
465 resets = <&ccu RST_BUS_UART4>;
469 uart5: serial@1c29400 {
470 compatible = "snps,dw-apb-uart";
471 reg = <0x01c29400 0x400>;
472 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
475 clocks = <&ccu CLK_BUS_UART5>;
476 resets = <&ccu RST_BUS_UART5>;
480 uart6: serial@1c29800 {
481 compatible = "snps,dw-apb-uart";
482 reg = <0x01c29800 0x400>;
483 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
486 clocks = <&ccu CLK_BUS_UART6>;
487 resets = <&ccu RST_BUS_UART6>;
491 uart7: serial@1c29c00 {
492 compatible = "snps,dw-apb-uart";
493 reg = <0x01c29c00 0x400>;
494 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
497 clocks = <&ccu CLK_BUS_UART7>;
498 resets = <&ccu RST_BUS_UART7>;
503 compatible = "allwinner,sun6i-a31-i2c";
504 reg = <0x01c2ac00 0x400>;
505 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
506 clocks = <&ccu CLK_BUS_I2C0>;
507 resets = <&ccu RST_BUS_I2C0>;
508 pinctrl-0 = <&i2c0_pins>;
509 pinctrl-names = "default";
511 #address-cells = <1>;
516 compatible = "allwinner,sun6i-a31-i2c";
517 reg = <0x01c2b000 0x400>;
518 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
519 clocks = <&ccu CLK_BUS_I2C1>;
520 resets = <&ccu RST_BUS_I2C1>;
522 #address-cells = <1>;
527 compatible = "allwinner,sun6i-a31-i2c";
528 reg = <0x01c2b400 0x400>;
529 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
530 clocks = <&ccu CLK_BUS_I2C2>;
531 resets = <&ccu RST_BUS_I2C2>;
533 #address-cells = <1>;
538 compatible = "allwinner,sun6i-a31-i2c";
539 reg = <0x01c2b800 0x400>;
540 interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
541 clocks = <&ccu CLK_BUS_I2C3>;
542 resets = <&ccu RST_BUS_I2C3>;
544 #address-cells = <1>;
549 compatible = "allwinner,sun6i-a31-i2c";
550 reg = <0x01c2c000 0x400>;
551 interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
552 clocks = <&ccu CLK_BUS_I2C4>;
553 resets = <&ccu RST_BUS_I2C4>;
555 #address-cells = <1>;
560 compatible = "allwinner,sun8i-r40-ahci";
561 reg = <0x01c18000 0x1000>;
562 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
563 clocks = <&ccu CLK_BUS_SATA>, <&ccu CLK_SATA>;
564 resets = <&ccu RST_BUS_SATA>;
565 resets-name = "ahci";
566 #address-cells = <1>;
572 gmac: ethernet@1c50000 {
573 compatible = "allwinner,sun8i-r40-gmac";
575 reg = <0x01c50000 0x10000>;
576 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
577 interrupt-names = "macirq";
578 resets = <&ccu RST_BUS_GMAC>;
579 reset-names = "stmmaceth";
580 clocks = <&ccu CLK_BUS_GMAC>;
581 clock-names = "stmmaceth";
585 compatible = "snps,dwmac-mdio";
586 #address-cells = <1>;
591 tcon_top: tcon-top@1c70000 {
592 compatible = "allwinner,sun8i-r40-tcon-top";
593 reg = <0x01c70000 0x1000>;
594 clocks = <&ccu CLK_BUS_TCON_TOP>,
606 clock-output-names = "tcon-top-tv0",
609 resets = <&ccu RST_BUS_TCON_TOP>;
613 #address-cells = <1>;
616 tcon_top_mixer0_in: port@0 {
617 #address-cells = <1>;
621 tcon_top_mixer0_in_mixer0: endpoint@0 {
623 remote-endpoint = <&mixer0_out_tcon_top>;
627 tcon_top_mixer0_out: port@1 {
628 #address-cells = <1>;
632 tcon_top_mixer0_out_tcon_lcd0: endpoint@0 {
636 tcon_top_mixer0_out_tcon_lcd1: endpoint@1 {
640 tcon_top_mixer0_out_tcon_tv0: endpoint@2 {
642 remote-endpoint = <&tcon_tv0_in_tcon_top_mixer0>;
645 tcon_top_mixer0_out_tcon_tv1: endpoint@3 {
647 remote-endpoint = <&tcon_tv1_in_tcon_top_mixer0>;
651 tcon_top_mixer1_in: port@2 {
652 #address-cells = <1>;
656 tcon_top_mixer1_in_mixer1: endpoint@1 {
658 remote-endpoint = <&mixer1_out_tcon_top>;
662 tcon_top_mixer1_out: port@3 {
663 #address-cells = <1>;
667 tcon_top_mixer1_out_tcon_lcd0: endpoint@0 {
671 tcon_top_mixer1_out_tcon_lcd1: endpoint@1 {
675 tcon_top_mixer1_out_tcon_tv0: endpoint@2 {
677 remote-endpoint = <&tcon_tv0_in_tcon_top_mixer1>;
680 tcon_top_mixer1_out_tcon_tv1: endpoint@3 {
682 remote-endpoint = <&tcon_tv1_in_tcon_top_mixer1>;
686 tcon_top_hdmi_in: port@4 {
687 #address-cells = <1>;
691 tcon_top_hdmi_in_tcon_tv0: endpoint@0 {
693 remote-endpoint = <&tcon_tv0_out_tcon_top>;
696 tcon_top_hdmi_in_tcon_tv1: endpoint@1 {
698 remote-endpoint = <&tcon_tv1_out_tcon_top>;
702 tcon_top_hdmi_out: port@5 {
705 tcon_top_hdmi_out_hdmi: endpoint {
706 remote-endpoint = <&hdmi_in_tcon_top>;
712 tcon_tv0: lcd-controller@1c73000 {
713 compatible = "allwinner,sun8i-r40-tcon-tv";
714 reg = <0x01c73000 0x1000>;
715 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
716 clocks = <&ccu CLK_BUS_TCON_TV0>, <&tcon_top 0>;
717 clock-names = "ahb", "tcon-ch1";
718 resets = <&ccu RST_BUS_TCON_TV0>;
723 #address-cells = <1>;
726 tcon_tv0_in: port@0 {
727 #address-cells = <1>;
731 tcon_tv0_in_tcon_top_mixer0: endpoint@0 {
733 remote-endpoint = <&tcon_top_mixer0_out_tcon_tv0>;
736 tcon_tv0_in_tcon_top_mixer1: endpoint@1 {
738 remote-endpoint = <&tcon_top_mixer1_out_tcon_tv0>;
742 tcon_tv0_out: port@1 {
743 #address-cells = <1>;
747 tcon_tv0_out_tcon_top: endpoint@1 {
749 remote-endpoint = <&tcon_top_hdmi_in_tcon_tv0>;
755 tcon_tv1: lcd-controller@1c74000 {
756 compatible = "allwinner,sun8i-r40-tcon-tv";
757 reg = <0x01c74000 0x1000>;
758 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
759 clocks = <&ccu CLK_BUS_TCON_TV1>, <&tcon_top 1>;
760 clock-names = "ahb", "tcon-ch1";
761 resets = <&ccu RST_BUS_TCON_TV1>;
766 #address-cells = <1>;
769 tcon_tv1_in: port@0 {
770 #address-cells = <1>;
774 tcon_tv1_in_tcon_top_mixer0: endpoint@0 {
776 remote-endpoint = <&tcon_top_mixer0_out_tcon_tv1>;
779 tcon_tv1_in_tcon_top_mixer1: endpoint@1 {
781 remote-endpoint = <&tcon_top_mixer1_out_tcon_tv1>;
785 tcon_tv1_out: port@1 {
786 #address-cells = <1>;
790 tcon_tv1_out_tcon_top: endpoint@1 {
792 remote-endpoint = <&tcon_top_hdmi_in_tcon_tv1>;
798 gic: interrupt-controller@1c81000 {
799 compatible = "arm,gic-400";
800 reg = <0x01c81000 0x1000>,
804 interrupt-controller;
805 #interrupt-cells = <3>;
806 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
810 compatible = "allwinner,sun8i-r40-dw-hdmi",
811 "allwinner,sun8i-a83t-dw-hdmi";
812 reg = <0x01ee0000 0x10000>;
814 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
815 clocks = <&ccu CLK_BUS_HDMI0>, <&ccu CLK_HDMI_SLOW>,
817 clock-names = "iahb", "isfr", "tmds";
818 resets = <&ccu RST_BUS_HDMI1>;
819 reset-names = "ctrl";
821 phy-names = "hdmi-phy";
825 #address-cells = <1>;
831 hdmi_in_tcon_top: endpoint {
832 remote-endpoint = <&tcon_top_hdmi_out_hdmi>;
842 hdmi_phy: hdmi-phy@1ef0000 {
843 compatible = "allwinner,sun8i-r40-hdmi-phy";
844 reg = <0x01ef0000 0x10000>;
845 clocks = <&ccu CLK_BUS_HDMI1>, <&ccu CLK_HDMI_SLOW>,
847 clock-names = "bus", "mod", "pll-0", "pll-1";
848 resets = <&ccu RST_BUS_HDMI0>;
855 compatible = "arm,armv7-timer";
856 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
857 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
858 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
859 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;