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
456bc37facSAndre Przywara#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>
486bc37facSAndre Przywara#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
1256bc37facSAndre Przywara		ccu: clock@01c20000 {
1266bc37facSAndre Przywara			compatible = "allwinner,sun50i-a64-ccu";
1276bc37facSAndre Przywara			reg = <0x01c20000 0x400>;
1286bc37facSAndre Przywara			clocks = <&osc24M>, <&osc32k>;
1296bc37facSAndre Przywara			clock-names = "hosc", "losc";
1306bc37facSAndre Przywara			#clock-cells = <1>;
1316bc37facSAndre Przywara			#reset-cells = <1>;
1326bc37facSAndre Przywara		};
1336bc37facSAndre Przywara
1346bc37facSAndre Przywara		pio: pinctrl@1c20800 {
1356bc37facSAndre Przywara			compatible = "allwinner,sun50i-a64-pinctrl";
1366bc37facSAndre Przywara			reg = <0x01c20800 0x400>;
1376bc37facSAndre Przywara			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
1386bc37facSAndre Przywara				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
1396bc37facSAndre Przywara				     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
1406bc37facSAndre Przywara			clocks = <&ccu CLK_BUS_PIO>;
1416bc37facSAndre Przywara			gpio-controller;
1426bc37facSAndre Przywara			#gpio-cells = <3>;
1436bc37facSAndre Przywara			interrupt-controller;
1446bc37facSAndre Przywara			#interrupt-cells = <3>;
1456bc37facSAndre Przywara
1466bc37facSAndre Przywara			i2c1_pins: i2c1_pins {
1476bc37facSAndre Przywara				pins = "PH2", "PH3";
1486bc37facSAndre Przywara				function = "i2c1";
1496bc37facSAndre Przywara			};
1506bc37facSAndre Przywara
1516bc37facSAndre Przywara			uart0_pins_a: uart0@0 {
1526bc37facSAndre Przywara				pins = "PB8", "PB9";
1536bc37facSAndre Przywara				function = "uart0";
1546bc37facSAndre Przywara			};
1556bc37facSAndre Przywara		};
1566bc37facSAndre Przywara
1576bc37facSAndre Przywara		uart0: serial@1c28000 {
1586bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
1596bc37facSAndre Przywara			reg = <0x01c28000 0x400>;
1606bc37facSAndre Przywara			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
1616bc37facSAndre Przywara			reg-shift = <2>;
1626bc37facSAndre Przywara			reg-io-width = <4>;
1636bc37facSAndre Przywara			clocks = <&ccu CLK_BUS_UART0>;
1646bc37facSAndre Przywara			resets = <&ccu RST_BUS_UART0>;
1656bc37facSAndre Przywara			status = "disabled";
1666bc37facSAndre Przywara		};
1676bc37facSAndre Przywara
1686bc37facSAndre Przywara		uart1: serial@1c28400 {
1696bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
1706bc37facSAndre Przywara			reg = <0x01c28400 0x400>;
1716bc37facSAndre Przywara			interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
1726bc37facSAndre Przywara			reg-shift = <2>;
1736bc37facSAndre Przywara			reg-io-width = <4>;
1746bc37facSAndre Przywara			clocks = <&ccu CLK_BUS_UART1>;
1756bc37facSAndre Przywara			resets = <&ccu RST_BUS_UART1>;
1766bc37facSAndre Przywara			status = "disabled";
1776bc37facSAndre Przywara		};
1786bc37facSAndre Przywara
1796bc37facSAndre Przywara		uart2: serial@1c28800 {
1806bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
1816bc37facSAndre Przywara			reg = <0x01c28800 0x400>;
1826bc37facSAndre Przywara			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
1836bc37facSAndre Przywara			reg-shift = <2>;
1846bc37facSAndre Przywara			reg-io-width = <4>;
1856bc37facSAndre Przywara			clocks = <&ccu CLK_BUS_UART2>;
1866bc37facSAndre Przywara			resets = <&ccu RST_BUS_UART2>;
1876bc37facSAndre Przywara			status = "disabled";
1886bc37facSAndre Przywara		};
1896bc37facSAndre Przywara
1906bc37facSAndre Przywara		uart3: serial@1c28c00 {
1916bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
1926bc37facSAndre Przywara			reg = <0x01c28c00 0x400>;
1936bc37facSAndre Przywara			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
1946bc37facSAndre Przywara			reg-shift = <2>;
1956bc37facSAndre Przywara			reg-io-width = <4>;
1966bc37facSAndre Przywara			clocks = <&ccu CLK_BUS_UART3>;
1976bc37facSAndre Przywara			resets = <&ccu RST_BUS_UART3>;
1986bc37facSAndre Przywara			status = "disabled";
1996bc37facSAndre Przywara		};
2006bc37facSAndre Przywara
2016bc37facSAndre Przywara		uart4: serial@1c29000 {
2026bc37facSAndre Przywara			compatible = "snps,dw-apb-uart";
2036bc37facSAndre Przywara			reg = <0x01c29000 0x400>;
2046bc37facSAndre Przywara			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
2056bc37facSAndre Przywara			reg-shift = <2>;
2066bc37facSAndre Przywara			reg-io-width = <4>;
2076bc37facSAndre Przywara			clocks = <&ccu CLK_BUS_UART4>;
2086bc37facSAndre Przywara			resets = <&ccu RST_BUS_UART4>;
2096bc37facSAndre Przywara			status = "disabled";
2106bc37facSAndre Przywara		};
2116bc37facSAndre Przywara
2126bc37facSAndre Przywara		i2c0: i2c@1c2ac00 {
2136bc37facSAndre Przywara			compatible = "allwinner,sun6i-a31-i2c";
2146bc37facSAndre Przywara			reg = <0x01c2ac00 0x400>;
2156bc37facSAndre Przywara			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
2166bc37facSAndre Przywara			clocks = <&ccu CLK_BUS_I2C0>;
2176bc37facSAndre Przywara			resets = <&ccu RST_BUS_I2C0>;
2186bc37facSAndre Przywara			status = "disabled";
2196bc37facSAndre Przywara			#address-cells = <1>;
2206bc37facSAndre Przywara			#size-cells = <0>;
2216bc37facSAndre Przywara		};
2226bc37facSAndre Przywara
2236bc37facSAndre Przywara		i2c1: i2c@1c2b000 {
2246bc37facSAndre Przywara			compatible = "allwinner,sun6i-a31-i2c";
2256bc37facSAndre Przywara			reg = <0x01c2b000 0x400>;
2266bc37facSAndre Przywara			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
2276bc37facSAndre Przywara			clocks = <&ccu CLK_BUS_I2C1>;
2286bc37facSAndre Przywara			resets = <&ccu RST_BUS_I2C1>;
2296bc37facSAndre Przywara			status = "disabled";
2306bc37facSAndre Przywara			#address-cells = <1>;
2316bc37facSAndre Przywara			#size-cells = <0>;
2326bc37facSAndre Przywara		};
2336bc37facSAndre Przywara
2346bc37facSAndre Przywara		i2c2: i2c@1c2b400 {
2356bc37facSAndre Przywara			compatible = "allwinner,sun6i-a31-i2c";
2366bc37facSAndre Przywara			reg = <0x01c2b400 0x400>;
2376bc37facSAndre Przywara			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
2386bc37facSAndre Przywara			clocks = <&ccu CLK_BUS_I2C2>;
2396bc37facSAndre Przywara			resets = <&ccu RST_BUS_I2C2>;
2406bc37facSAndre Przywara			status = "disabled";
2416bc37facSAndre Przywara			#address-cells = <1>;
2426bc37facSAndre Przywara			#size-cells = <0>;
2436bc37facSAndre Przywara		};
2446bc37facSAndre Przywara
2456bc37facSAndre Przywara		gic: interrupt-controller@1c81000 {
2466bc37facSAndre Przywara			compatible = "arm,gic-400";
2476bc37facSAndre Przywara			reg = <0x01c81000 0x1000>,
2486bc37facSAndre Przywara			      <0x01c82000 0x2000>,
2496bc37facSAndre Przywara			      <0x01c84000 0x2000>,
2506bc37facSAndre Przywara			      <0x01c86000 0x2000>;
2516bc37facSAndre Przywara			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
2526bc37facSAndre Przywara			interrupt-controller;
2536bc37facSAndre Przywara			#interrupt-cells = <3>;
2546bc37facSAndre Przywara		};
2556bc37facSAndre Przywara
2566bc37facSAndre Przywara		rtc: rtc@1f00000 {
2576bc37facSAndre Przywara			compatible = "allwinner,sun6i-a31-rtc";
2586bc37facSAndre Przywara			reg = <0x01f00000 0x54>;
2596bc37facSAndre Przywara			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
2606bc37facSAndre Przywara				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
2616bc37facSAndre Przywara		};
2626bc37facSAndre Przywara	};
2636bc37facSAndre Przywara};
264