16bc37facSAndre Przywara/*
26bc37facSAndre Przywara * Copyright (C) 2016 ARM Ltd.
36bc37facSAndre Przywara * based on the Allwinner H3 dtsi:
46bc37facSAndre Przywara *    Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
56bc37facSAndre Przywara *
66bc37facSAndre Przywara * This file is dual-licensed: you can use it either under the terms
76bc37facSAndre Przywara * of the GPL or the X11 license, at your option. Note that this dual
86bc37facSAndre Przywara * licensing only applies to this file, and not this project as a
96bc37facSAndre Przywara * whole.
106bc37facSAndre Przywara *
116bc37facSAndre Przywara *  a) This file is free software; you can redistribute it and/or
126bc37facSAndre Przywara *     modify it under the terms of the GNU General Public License as
136bc37facSAndre Przywara *     published by the Free Software Foundation; either version 2 of the
146bc37facSAndre Przywara *     License, or (at your option) any later version.
156bc37facSAndre Przywara *
166bc37facSAndre Przywara *     This file is distributed in the hope that it will be useful,
176bc37facSAndre Przywara *     but WITHOUT ANY WARRANTY; without even the implied warranty of
186bc37facSAndre Przywara *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
196bc37facSAndre Przywara *     GNU General Public License for more details.
206bc37facSAndre Przywara *
216bc37facSAndre Przywara * Or, alternatively,
226bc37facSAndre Przywara *
236bc37facSAndre Przywara *  b) Permission is hereby granted, free of charge, to any person
246bc37facSAndre Przywara *     obtaining a copy of this software and associated documentation
256bc37facSAndre Przywara *     files (the "Software"), to deal in the Software without
266bc37facSAndre Przywara *     restriction, including without limitation the rights to use,
276bc37facSAndre Przywara *     copy, modify, merge, publish, distribute, sublicense, and/or
286bc37facSAndre Przywara *     sell copies of the Software, and to permit persons to whom the
296bc37facSAndre Przywara *     Software is furnished to do so, subject to the following
306bc37facSAndre Przywara *     conditions:
316bc37facSAndre Przywara *
326bc37facSAndre Przywara *     The above copyright notice and this permission notice shall be
336bc37facSAndre Przywara *     included in all copies or substantial portions of the Software.
346bc37facSAndre Przywara *
356bc37facSAndre Przywara *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
366bc37facSAndre Przywara *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
376bc37facSAndre Przywara *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
386bc37facSAndre Przywara *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
396bc37facSAndre Przywara *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
406bc37facSAndre Przywara *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
416bc37facSAndre Przywara *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
426bc37facSAndre Przywara *     OTHER DEALINGS IN THE SOFTWARE.
436bc37facSAndre Przywara */
446bc37facSAndre Przywara
45a004ee35SIcenowy Zheng#include <dt-bindings/clock/sun50i-a64-ccu.h>
466bc37facSAndre Przywara#include <dt-bindings/interrupt-controller/arm-gic.h>
476bc37facSAndre Przywara#include <dt-bindings/pinctrl/sun4i-a10.h>
48a004ee35SIcenowy Zheng#include <dt-bindings/reset/sun50i-a64-ccu.h>
496bc37facSAndre Przywara
506bc37facSAndre Przywara/ {
516bc37facSAndre Przywara	interrupt-parent = <&gic>;
526bc37facSAndre Przywara	#address-cells = <1>;
536bc37facSAndre Przywara	#size-cells = <1>;
546bc37facSAndre Przywara
556bc37facSAndre Przywara	cpus {
566bc37facSAndre Przywara		#address-cells = <1>;
576bc37facSAndre Przywara		#size-cells = <0>;
586bc37facSAndre Przywara
596bc37facSAndre Przywara		cpu0: cpu@0 {
606bc37facSAndre Przywara			compatible = "arm,cortex-a53", "arm,armv8";
616bc37facSAndre Przywara			device_type = "cpu";
626bc37facSAndre Przywara			reg = <0>;
636bc37facSAndre Przywara			enable-method = "psci";
646bc37facSAndre Przywara		};
656bc37facSAndre Przywara
666bc37facSAndre Przywara		cpu1: cpu@1 {
676bc37facSAndre Przywara			compatible = "arm,cortex-a53", "arm,armv8";
686bc37facSAndre Przywara			device_type = "cpu";
696bc37facSAndre Przywara			reg = <1>;
706bc37facSAndre Przywara			enable-method = "psci";
716bc37facSAndre Przywara		};
726bc37facSAndre Przywara
736bc37facSAndre Przywara		cpu2: cpu@2 {
746bc37facSAndre Przywara			compatible = "arm,cortex-a53", "arm,armv8";
756bc37facSAndre Przywara			device_type = "cpu";
766bc37facSAndre Przywara			reg = <2>;
776bc37facSAndre Przywara			enable-method = "psci";
786bc37facSAndre Przywara		};
796bc37facSAndre Przywara
806bc37facSAndre Przywara		cpu3: cpu@3 {
816bc37facSAndre Przywara			compatible = "arm,cortex-a53", "arm,armv8";
826bc37facSAndre Przywara			device_type = "cpu";
836bc37facSAndre Przywara			reg = <3>;
846bc37facSAndre Przywara			enable-method = "psci";
856bc37facSAndre Przywara		};
866bc37facSAndre Przywara	};
876bc37facSAndre Przywara
886bc37facSAndre Przywara	osc24M: osc24M_clk {
896bc37facSAndre Przywara		#clock-cells = <0>;
906bc37facSAndre Przywara		compatible = "fixed-clock";
916bc37facSAndre Przywara		clock-frequency = <24000000>;
926bc37facSAndre Przywara		clock-output-names = "osc24M";
936bc37facSAndre Przywara	};
946bc37facSAndre Przywara
956bc37facSAndre Przywara	osc32k: osc32k_clk {
966bc37facSAndre Przywara		#clock-cells = <0>;
976bc37facSAndre Przywara		compatible = "fixed-clock";
986bc37facSAndre Przywara		clock-frequency = <32768>;
996bc37facSAndre Przywara		clock-output-names = "osc32k";
1006bc37facSAndre Przywara	};
1016bc37facSAndre Przywara
1026bc37facSAndre Przywara	psci {
1036bc37facSAndre Przywara		compatible = "arm,psci-0.2";
1046bc37facSAndre Przywara		method = "smc";
1056bc37facSAndre Przywara	};
1066bc37facSAndre Przywara
1076bc37facSAndre Przywara	timer {
1086bc37facSAndre Przywara		compatible = "arm,armv8-timer";
1096bc37facSAndre Przywara		interrupts = <GIC_PPI 13
1106bc37facSAndre Przywara			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
1116bc37facSAndre Przywara			     <GIC_PPI 14
1126bc37facSAndre Przywara			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
1136bc37facSAndre Przywara			     <GIC_PPI 11
1146bc37facSAndre Przywara			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
1156bc37facSAndre Przywara			     <GIC_PPI 10
1166bc37facSAndre Przywara			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
1176bc37facSAndre Przywara	};
1186bc37facSAndre Przywara
1196bc37facSAndre Przywara	soc {
1206bc37facSAndre Przywara		compatible = "simple-bus";
1216bc37facSAndre Przywara		#address-cells = <1>;
1226bc37facSAndre Przywara		#size-cells = <1>;
1236bc37facSAndre Przywara		ranges;
1246bc37facSAndre Przywara
125a004ee35SIcenowy Zheng		usbphy: phy@01c19400 {
126a004ee35SIcenowy Zheng			compatible = "allwinner,sun50i-a64-usb-phy";
127a004ee35SIcenowy Zheng			reg = <0x01c19400 0x14>,
128a004ee35SIcenowy Zheng			      <0x01c1b800 0x4>;
129a004ee35SIcenowy Zheng			reg-names = "phy_ctrl",
130a004ee35SIcenowy Zheng				    "pmu1";
131a004ee35SIcenowy Zheng			clocks = <&ccu CLK_USB_PHY0>,
132a004ee35SIcenowy Zheng				 <&ccu CLK_USB_PHY1>;
133a004ee35SIcenowy Zheng			clock-names = "usb0_phy",
134a004ee35SIcenowy Zheng				      "usb1_phy";
135a004ee35SIcenowy Zheng			resets = <&ccu RST_USB_PHY0>,
136a004ee35SIcenowy Zheng				 <&ccu RST_USB_PHY1>;
137a004ee35SIcenowy Zheng			reset-names = "usb0_reset",
138a004ee35SIcenowy Zheng				      "usb1_reset";
139a004ee35SIcenowy Zheng			status = "disabled";
140a004ee35SIcenowy Zheng			#phy-cells = <1>;
141a004ee35SIcenowy Zheng		};
142a004ee35SIcenowy Zheng
143a004ee35SIcenowy Zheng		ehci1: usb@01c1b000 {
144a004ee35SIcenowy Zheng			compatible = "allwinner,sun50i-a64-ehci", "generic-ehci";
145a004ee35SIcenowy Zheng			reg = <0x01c1b000 0x100>;
146a004ee35SIcenowy Zheng			interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
147a004ee35SIcenowy Zheng			clocks = <&ccu CLK_BUS_OHCI1>,
148a004ee35SIcenowy Zheng				 <&ccu CLK_BUS_EHCI1>,
149a004ee35SIcenowy Zheng				 <&ccu CLK_USB_OHCI1>;
150a004ee35SIcenowy Zheng			resets = <&ccu RST_BUS_OHCI1>,
151a004ee35SIcenowy Zheng				 <&ccu RST_BUS_EHCI1>;
152a004ee35SIcenowy Zheng			phys = <&usbphy 1>;
153a004ee35SIcenowy Zheng			phy-names = "usb";
154a004ee35SIcenowy Zheng			status = "disabled";
155a004ee35SIcenowy Zheng		};
156a004ee35SIcenowy Zheng
157a004ee35SIcenowy Zheng		ohci1: usb@01c1b400 {
158a004ee35SIcenowy Zheng			compatible = "allwinner,sun50i-a64-ohci", "generic-ohci";
159a004ee35SIcenowy Zheng			reg = <0x01c1b400 0x100>;
160a004ee35SIcenowy Zheng			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
161a004ee35SIcenowy Zheng			clocks = <&ccu CLK_BUS_OHCI1>,
162a004ee35SIcenowy Zheng				 <&ccu CLK_USB_OHCI1>;
163a004ee35SIcenowy Zheng			resets = <&ccu RST_BUS_OHCI1>;
164a004ee35SIcenowy Zheng			phys = <&usbphy 1>;
165a004ee35SIcenowy Zheng			phy-names = "usb";
166a004ee35SIcenowy Zheng			status = "disabled";
167a004ee35SIcenowy Zheng		};
168a004ee35SIcenowy Zheng
1696bc37facSAndre Przywara		ccu: clock@01c20000 {
1706bc37facSAndre Przywara			compatible = "allwinner,sun50i-a64-ccu";
1716bc37facSAndre Przywara			reg = <0x01c20000 0x400>;
1726bc37facSAndre Przywara			clocks = <&osc24M>, <&osc32k>;
1736bc37facSAndre Przywara			clock-names = "hosc", "losc";
1746bc37facSAndre Przywara			#clock-cells = <1>;
1756bc37facSAndre Przywara			#reset-cells = <1>;
1766bc37facSAndre Przywara		};
1776bc37facSAndre Przywara
1786bc37facSAndre Przywara		pio: pinctrl@1c20800 {
1796bc37facSAndre Przywara			compatible = "allwinner,sun50i-a64-pinctrl";
1806bc37facSAndre Przywara			reg = <0x01c20800 0x400>;
1816bc37facSAndre Przywara			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
1826bc37facSAndre Przywara				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
1836bc37facSAndre Przywara				     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
184f98121f3SArnd Bergmann			clocks = <&ccu 58>;
1856bc37facSAndre Przywara			gpio-controller;
1866bc37facSAndre Przywara			#gpio-cells = <3>;
1876bc37facSAndre Przywara			interrupt-controller;
1886bc37facSAndre Przywara			#interrupt-cells = <3>;
1896bc37facSAndre Przywara
1906bc37facSAndre Przywara			i2c1_pins: i2c1_pins {
1916bc37facSAndre Przywara				pins = "PH2", "PH3";
1926bc37facSAndre Przywara				function = "i2c1";
1936bc37facSAndre Przywara			};
1946bc37facSAndre Przywara
1956bc37facSAndre Przywara			uart0_pins_a: uart0@0 {
1966bc37facSAndre Przywara				pins = "PB8", "PB9";
1976bc37facSAndre Przywara				function = "uart0";
1986bc37facSAndre Przywara			};
1996bc37facSAndre Przywara		};
2006bc37facSAndre Przywara
2016bc37facSAndre Przywara		uart0: serial@1c28000 {
2026bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
2036bc37facSAndre Przywara			reg = <0x01c28000 0x400>;
2046bc37facSAndre Przywara			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
2056bc37facSAndre Przywara			reg-shift = <2>;
2066bc37facSAndre Przywara			reg-io-width = <4>;
207f98121f3SArnd Bergmann			clocks = <&ccu 67>;
208f98121f3SArnd Bergmann			resets = <&ccu 46>;
2096bc37facSAndre Przywara			status = "disabled";
2106bc37facSAndre Przywara		};
2116bc37facSAndre Przywara
2126bc37facSAndre Przywara		uart1: serial@1c28400 {
2136bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
2146bc37facSAndre Przywara			reg = <0x01c28400 0x400>;
2156bc37facSAndre Przywara			interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
2166bc37facSAndre Przywara			reg-shift = <2>;
2176bc37facSAndre Przywara			reg-io-width = <4>;
218f98121f3SArnd Bergmann			clocks = <&ccu 68>;
219f98121f3SArnd Bergmann			resets = <&ccu 47>;
2206bc37facSAndre Przywara			status = "disabled";
2216bc37facSAndre Przywara		};
2226bc37facSAndre Przywara
2236bc37facSAndre Przywara		uart2: serial@1c28800 {
2246bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
2256bc37facSAndre Przywara			reg = <0x01c28800 0x400>;
2266bc37facSAndre Przywara			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
2276bc37facSAndre Przywara			reg-shift = <2>;
2286bc37facSAndre Przywara			reg-io-width = <4>;
229f98121f3SArnd Bergmann			clocks = <&ccu 69>;
230f98121f3SArnd Bergmann			resets = <&ccu 48>;
2316bc37facSAndre Przywara			status = "disabled";
2326bc37facSAndre Przywara		};
2336bc37facSAndre Przywara
2346bc37facSAndre Przywara		uart3: serial@1c28c00 {
2356bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
2366bc37facSAndre Przywara			reg = <0x01c28c00 0x400>;
2376bc37facSAndre Przywara			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
2386bc37facSAndre Przywara			reg-shift = <2>;
2396bc37facSAndre Przywara			reg-io-width = <4>;
240f98121f3SArnd Bergmann			clocks = <&ccu 70>;
241f98121f3SArnd Bergmann			resets = <&ccu 49>;
2426bc37facSAndre Przywara			status = "disabled";
2436bc37facSAndre Przywara		};
2446bc37facSAndre Przywara
2456bc37facSAndre Przywara		uart4: serial@1c29000 {
2466bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
2476bc37facSAndre Przywara			reg = <0x01c29000 0x400>;
2486bc37facSAndre Przywara			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
2496bc37facSAndre Przywara			reg-shift = <2>;
2506bc37facSAndre Przywara			reg-io-width = <4>;
251f98121f3SArnd Bergmann			clocks = <&ccu 71>;
252f98121f3SArnd Bergmann			resets = <&ccu 50>;
2536bc37facSAndre Przywara			status = "disabled";
2546bc37facSAndre Przywara		};
2556bc37facSAndre Przywara
2566bc37facSAndre Przywara		i2c0: i2c@1c2ac00 {
2576bc37facSAndre Przywara			compatible = "allwinner,sun6i-a31-i2c";
2586bc37facSAndre Przywara			reg = <0x01c2ac00 0x400>;
2596bc37facSAndre Przywara			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
260f98121f3SArnd Bergmann			clocks = <&ccu 63>;
261f98121f3SArnd Bergmann			resets = <&ccu 42>;
2626bc37facSAndre Przywara			status = "disabled";
2636bc37facSAndre Przywara			#address-cells = <1>;
2646bc37facSAndre Przywara			#size-cells = <0>;
2656bc37facSAndre Przywara		};
2666bc37facSAndre Przywara
2676bc37facSAndre Przywara		i2c1: i2c@1c2b000 {
2686bc37facSAndre Przywara			compatible = "allwinner,sun6i-a31-i2c";
2696bc37facSAndre Przywara			reg = <0x01c2b000 0x400>;
2706bc37facSAndre Przywara			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
271f98121f3SArnd Bergmann			clocks = <&ccu 64>;
272f98121f3SArnd Bergmann			resets = <&ccu 43>;
2736bc37facSAndre Przywara			status = "disabled";
2746bc37facSAndre Przywara			#address-cells = <1>;
2756bc37facSAndre Przywara			#size-cells = <0>;
2766bc37facSAndre Przywara		};
2776bc37facSAndre Przywara
2786bc37facSAndre Przywara		i2c2: i2c@1c2b400 {
2796bc37facSAndre Przywara			compatible = "allwinner,sun6i-a31-i2c";
2806bc37facSAndre Przywara			reg = <0x01c2b400 0x400>;
2816bc37facSAndre Przywara			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
282f98121f3SArnd Bergmann			clocks = <&ccu 65>;
283f98121f3SArnd Bergmann			resets = <&ccu 44>;
2846bc37facSAndre Przywara			status = "disabled";
2856bc37facSAndre Przywara			#address-cells = <1>;
2866bc37facSAndre Przywara			#size-cells = <0>;
2876bc37facSAndre Przywara		};
2886bc37facSAndre Przywara
2896bc37facSAndre Przywara		gic: interrupt-controller@1c81000 {
2906bc37facSAndre Przywara			compatible = "arm,gic-400";
2916bc37facSAndre Przywara			reg = <0x01c81000 0x1000>,
2926bc37facSAndre Przywara			      <0x01c82000 0x2000>,
2936bc37facSAndre Przywara			      <0x01c84000 0x2000>,
2946bc37facSAndre Przywara			      <0x01c86000 0x2000>;
2956bc37facSAndre Przywara			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
2966bc37facSAndre Przywara			interrupt-controller;
2976bc37facSAndre Przywara			#interrupt-cells = <3>;
2986bc37facSAndre Przywara		};
2996bc37facSAndre Przywara
3006bc37facSAndre Przywara		rtc: rtc@1f00000 {
3016bc37facSAndre Przywara			compatible = "allwinner,sun6i-a31-rtc";
3026bc37facSAndre Przywara			reg = <0x01f00000 0x54>;
3036bc37facSAndre Przywara			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
3046bc37facSAndre Przywara				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
3056bc37facSAndre Przywara		};
3066bc37facSAndre Przywara	};
3076bc37facSAndre Przywara};
308