19c8c52f7SJianxin Pan// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
29c8c52f7SJianxin Pan/*
39c8c52f7SJianxin Pan * Copyright (c) 2018 Amlogic, Inc. All rights reserved.
49c8c52f7SJianxin Pan */
59c8c52f7SJianxin Pan
69c8c52f7SJianxin Pan#include <dt-bindings/gpio/gpio.h>
7965c827aSJerome Brunet#include <dt-bindings/clock/g12a-clkc.h>
89c8c52f7SJianxin Pan#include <dt-bindings/interrupt-controller/irq.h>
99c8c52f7SJianxin Pan#include <dt-bindings/interrupt-controller/arm-gic.h>
109c8c52f7SJianxin Pan
119c8c52f7SJianxin Pan/ {
129c8c52f7SJianxin Pan	compatible = "amlogic,g12a";
139c8c52f7SJianxin Pan
149c8c52f7SJianxin Pan	interrupt-parent = <&gic>;
159c8c52f7SJianxin Pan	#address-cells = <2>;
169c8c52f7SJianxin Pan	#size-cells = <2>;
179c8c52f7SJianxin Pan
189c8c52f7SJianxin Pan	cpus {
199c8c52f7SJianxin Pan		#address-cells = <0x2>;
209c8c52f7SJianxin Pan		#size-cells = <0x0>;
219c8c52f7SJianxin Pan
229c8c52f7SJianxin Pan		cpu0: cpu@0 {
239c8c52f7SJianxin Pan			device_type = "cpu";
2431af04cdSRob Herring			compatible = "arm,cortex-a53";
259c8c52f7SJianxin Pan			reg = <0x0 0x0>;
269c8c52f7SJianxin Pan			enable-method = "psci";
279c8c52f7SJianxin Pan			next-level-cache = <&l2>;
289c8c52f7SJianxin Pan		};
299c8c52f7SJianxin Pan
309c8c52f7SJianxin Pan		cpu1: cpu@1 {
319c8c52f7SJianxin Pan			device_type = "cpu";
3231af04cdSRob Herring			compatible = "arm,cortex-a53";
339c8c52f7SJianxin Pan			reg = <0x0 0x1>;
349c8c52f7SJianxin Pan			enable-method = "psci";
359c8c52f7SJianxin Pan			next-level-cache = <&l2>;
369c8c52f7SJianxin Pan		};
379c8c52f7SJianxin Pan
389c8c52f7SJianxin Pan		cpu2: cpu@2 {
399c8c52f7SJianxin Pan			device_type = "cpu";
4031af04cdSRob Herring			compatible = "arm,cortex-a53";
419c8c52f7SJianxin Pan			reg = <0x0 0x2>;
429c8c52f7SJianxin Pan			enable-method = "psci";
439c8c52f7SJianxin Pan			next-level-cache = <&l2>;
449c8c52f7SJianxin Pan		};
459c8c52f7SJianxin Pan
469c8c52f7SJianxin Pan		cpu3: cpu@3 {
479c8c52f7SJianxin Pan			device_type = "cpu";
4831af04cdSRob Herring			compatible = "arm,cortex-a53";
499c8c52f7SJianxin Pan			reg = <0x0 0x3>;
509c8c52f7SJianxin Pan			enable-method = "psci";
519c8c52f7SJianxin Pan			next-level-cache = <&l2>;
529c8c52f7SJianxin Pan		};
539c8c52f7SJianxin Pan
549c8c52f7SJianxin Pan		l2: l2-cache0 {
559c8c52f7SJianxin Pan			compatible = "cache";
569c8c52f7SJianxin Pan		};
579c8c52f7SJianxin Pan	};
589c8c52f7SJianxin Pan
59965c827aSJerome Brunet	efuse: efuse {
60965c827aSJerome Brunet		compatible = "amlogic,meson-gxbb-efuse";
61965c827aSJerome Brunet		clocks = <&clkc CLKID_EFUSE>;
62965c827aSJerome Brunet		#address-cells = <1>;
63965c827aSJerome Brunet		#size-cells = <1>;
64965c827aSJerome Brunet		read-only;
65965c827aSJerome Brunet	};
66965c827aSJerome Brunet
679c8c52f7SJianxin Pan	psci {
689c8c52f7SJianxin Pan		compatible = "arm,psci-1.0";
699c8c52f7SJianxin Pan		method = "smc";
709c8c52f7SJianxin Pan	};
719c8c52f7SJianxin Pan
729c8c52f7SJianxin Pan	reserved-memory {
739c8c52f7SJianxin Pan		#address-cells = <2>;
749c8c52f7SJianxin Pan		#size-cells = <2>;
759c8c52f7SJianxin Pan		ranges;
769c8c52f7SJianxin Pan
779c8c52f7SJianxin Pan		/* 3 MiB reserved for ARM Trusted Firmware (BL31) */
789c8c52f7SJianxin Pan		secmon_reserved: secmon@5000000 {
799c8c52f7SJianxin Pan			reg = <0x0 0x05000000 0x0 0x300000>;
809c8c52f7SJianxin Pan			no-map;
819c8c52f7SJianxin Pan		};
829c8c52f7SJianxin Pan	};
839c8c52f7SJianxin Pan
84bd395152SJerome Brunet	sm: secure-monitor {
85bd395152SJerome Brunet		compatible = "amlogic,meson-gxbb-sm";
86bd395152SJerome Brunet	};
87bd395152SJerome Brunet
889c8c52f7SJianxin Pan	soc {
899c8c52f7SJianxin Pan		compatible = "simple-bus";
909c8c52f7SJianxin Pan		#address-cells = <2>;
919c8c52f7SJianxin Pan		#size-cells = <2>;
929c8c52f7SJianxin Pan		ranges;
939c8c52f7SJianxin Pan
94503f5fedSJerome Brunet		apb: bus@ff600000 {
959c8c52f7SJianxin Pan			compatible = "simple-bus";
96503f5fedSJerome Brunet			reg = <0x0 0xff600000 0x0 0x200000>;
979c8c52f7SJianxin Pan			#address-cells = <2>;
989c8c52f7SJianxin Pan			#size-cells = <2>;
99503f5fedSJerome Brunet			ranges = <0x0 0x0 0x0 0xff600000 0x0 0x200000>;
100503f5fedSJerome Brunet
101503f5fedSJerome Brunet			periphs: bus@34400 {
102503f5fedSJerome Brunet				compatible = "simple-bus";
103503f5fedSJerome Brunet				reg = <0x0 0x34400 0x0 0x400>;
104503f5fedSJerome Brunet				#address-cells = <2>;
105503f5fedSJerome Brunet				#size-cells = <2>;
106503f5fedSJerome Brunet				ranges = <0x0 0x0 0x0 0x34400 0x0 0x400>;
1079c8c52f7SJianxin Pan			};
1089c8c52f7SJianxin Pan
109503f5fedSJerome Brunet			hiu: bus@3c000 {
1109c8c52f7SJianxin Pan				compatible = "simple-bus";
111503f5fedSJerome Brunet				reg = <0x0 0x3c000 0x0 0x1400>;
1129c8c52f7SJianxin Pan				#address-cells = <2>;
1139c8c52f7SJianxin Pan				#size-cells = <2>;
114503f5fedSJerome Brunet				ranges = <0x0 0x0 0x0 0x3c000 0x0 0x1400>;
115785fb434SJerome Brunet
116785fb434SJerome Brunet				hhi: system-controller@0 {
117785fb434SJerome Brunet					compatible = "amlogic,meson-gx-hhi-sysctrl",
118785fb434SJerome Brunet						     "simple-mfd", "syscon";
119785fb434SJerome Brunet					reg = <0 0 0 0x400>;
120785fb434SJerome Brunet
121785fb434SJerome Brunet					clkc: clock-controller {
122785fb434SJerome Brunet						compatible = "amlogic,g12a-clkc";
123785fb434SJerome Brunet						#clock-cells = <1>;
124785fb434SJerome Brunet						clocks = <&xtal>;
125785fb434SJerome Brunet						clock-names = "xtal";
126785fb434SJerome Brunet					};
127785fb434SJerome Brunet				};
128503f5fedSJerome Brunet			};
1299c8c52f7SJianxin Pan		};
1309c8c52f7SJianxin Pan
1319c8c52f7SJianxin Pan		aobus: bus@ff800000 {
1329c8c52f7SJianxin Pan			compatible = "simple-bus";
1339c8c52f7SJianxin Pan			reg = <0x0 0xff800000 0x0 0x100000>;
1349c8c52f7SJianxin Pan			#address-cells = <2>;
1359c8c52f7SJianxin Pan			#size-cells = <2>;
1369c8c52f7SJianxin Pan			ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
1379c8c52f7SJianxin Pan
138b019f4a4SNeil Armstrong			rti: sys-ctrl@0 {
139b019f4a4SNeil Armstrong				compatible = "amlogic,meson-gx-ao-sysctrl",
140b019f4a4SNeil Armstrong					     "simple-mfd", "syscon";
141b019f4a4SNeil Armstrong				reg = <0x0 0x0 0x0 0x100>;
142b019f4a4SNeil Armstrong				#address-cells = <2>;
143b019f4a4SNeil Armstrong				#size-cells = <2>;
144b019f4a4SNeil Armstrong				ranges = <0x0 0x0 0x0 0x0 0x0 0x100>;
145b019f4a4SNeil Armstrong
146b019f4a4SNeil Armstrong				clkc_AO: clock-controller {
147b019f4a4SNeil Armstrong					compatible = "amlogic,meson-g12a-aoclkc";
148b019f4a4SNeil Armstrong					#clock-cells = <1>;
149b019f4a4SNeil Armstrong					#reset-cells = <1>;
150b019f4a4SNeil Armstrong					clocks = <&xtal>, <&clkc CLKID_CLK81>;
151b019f4a4SNeil Armstrong					clock-names = "xtal", "mpeg-clk";
152b019f4a4SNeil Armstrong				};
153b019f4a4SNeil Armstrong			};
154b019f4a4SNeil Armstrong
1550fa724c5SNeil Armstrong			sec_AO: ao-secure@140 {
1560fa724c5SNeil Armstrong				compatible = "amlogic,meson-gx-ao-secure", "syscon";
1570fa724c5SNeil Armstrong				reg = <0x0 0x140 0x0 0x140>;
1580fa724c5SNeil Armstrong				amlogic,has-chip-id;
1590fa724c5SNeil Armstrong			};
1600fa724c5SNeil Armstrong
1619c8c52f7SJianxin Pan			uart_AO: serial@3000 {
162503f5fedSJerome Brunet				compatible = "amlogic,meson-gx-uart",
163503f5fedSJerome Brunet					     "amlogic,meson-ao-uart";
1649c8c52f7SJianxin Pan				reg = <0x0 0x3000 0x0 0x18>;
1659c8c52f7SJianxin Pan				interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
1669c8c52f7SJianxin Pan				clocks = <&xtal>, <&xtal>, <&xtal>;
1679c8c52f7SJianxin Pan				clock-names = "xtal", "pclk", "baud";
1689c8c52f7SJianxin Pan				status = "disabled";
1699c8c52f7SJianxin Pan			};
1709c8c52f7SJianxin Pan
1719c8c52f7SJianxin Pan			uart_AO_B: serial@4000 {
172503f5fedSJerome Brunet				compatible = "amlogic,meson-gx-uart",
173503f5fedSJerome Brunet					     "amlogic,meson-ao-uart";
1749c8c52f7SJianxin Pan				reg = <0x0 0x4000 0x0 0x18>;
1759c8c52f7SJianxin Pan				interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
1769c8c52f7SJianxin Pan				clocks = <&xtal>, <&xtal>, <&xtal>;
1779c8c52f7SJianxin Pan				clock-names = "xtal", "pclk", "baud";
1789c8c52f7SJianxin Pan				status = "disabled";
1799c8c52f7SJianxin Pan			};
1809c8c52f7SJianxin Pan		};
1819c8c52f7SJianxin Pan
1829c8c52f7SJianxin Pan		gic: interrupt-controller@ffc01000 {
1839c8c52f7SJianxin Pan			compatible = "arm,gic-400";
1849c8c52f7SJianxin Pan			reg = <0x0 0xffc01000 0 0x1000>,
1859c8c52f7SJianxin Pan			      <0x0 0xffc02000 0 0x2000>,
1869c8c52f7SJianxin Pan			      <0x0 0xffc04000 0 0x2000>,
1879c8c52f7SJianxin Pan			      <0x0 0xffc06000 0 0x2000>;
1889c8c52f7SJianxin Pan			interrupt-controller;
1899c8c52f7SJianxin Pan			interrupts = <GIC_PPI 9
1909c8c52f7SJianxin Pan				(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
1919c8c52f7SJianxin Pan			#interrupt-cells = <3>;
1929c8c52f7SJianxin Pan			#address-cells = <0>;
1939c8c52f7SJianxin Pan		};
1949c8c52f7SJianxin Pan
1959c8c52f7SJianxin Pan		cbus: bus@ffd00000 {
1969c8c52f7SJianxin Pan			compatible = "simple-bus";
197503f5fedSJerome Brunet			reg = <0x0 0xffd00000 0x0 0x100000>;
1989c8c52f7SJianxin Pan			#address-cells = <2>;
1999c8c52f7SJianxin Pan			#size-cells = <2>;
200503f5fedSJerome Brunet			ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x100000>;
2019c8c52f7SJianxin Pan
20260d4fdb8SJerome Brunet			clk_msr: clock-measure@18000 {
20360d4fdb8SJerome Brunet				compatible = "amlogic,meson-g12a-clk-measure";
20460d4fdb8SJerome Brunet				reg = <0x0 0x18000 0x0 0x10>;
20560d4fdb8SJerome Brunet			};
2069c8c52f7SJianxin Pan		};
2079c8c52f7SJianxin Pan	};
2089c8c52f7SJianxin Pan
2099c8c52f7SJianxin Pan	timer {
2109c8c52f7SJianxin Pan		compatible = "arm,armv8-timer";
2119c8c52f7SJianxin Pan		interrupts = <GIC_PPI 13
2129c8c52f7SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
2139c8c52f7SJianxin Pan			     <GIC_PPI 14
2149c8c52f7SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
2159c8c52f7SJianxin Pan			     <GIC_PPI 11
2169c8c52f7SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
2179c8c52f7SJianxin Pan			     <GIC_PPI 10
2189c8c52f7SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
2199c8c52f7SJianxin Pan	};
2209c8c52f7SJianxin Pan
2219c8c52f7SJianxin Pan	xtal: xtal-clk {
2229c8c52f7SJianxin Pan		compatible = "fixed-clock";
2239c8c52f7SJianxin Pan		clock-frequency = <24000000>;
2249c8c52f7SJianxin Pan		clock-output-names = "xtal";
2259c8c52f7SJianxin Pan		#clock-cells = <0>;
2269c8c52f7SJianxin Pan	};
2279c8c52f7SJianxin Pan
2289c8c52f7SJianxin Pan};
229