19d59b708SYixun Lan/*
29d59b708SYixun Lan * Copyright (c) 2017 Amlogic, Inc. All rights reserved.
39d59b708SYixun Lan *
49d59b708SYixun Lan * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
59d59b708SYixun Lan */
69d59b708SYixun Lan
79d59b708SYixun Lan#include <dt-bindings/gpio/gpio.h>
89d59b708SYixun Lan#include <dt-bindings/interrupt-controller/irq.h>
99d59b708SYixun Lan#include <dt-bindings/interrupt-controller/arm-gic.h>
109d59b708SYixun Lan
119d59b708SYixun Lan/ {
129d59b708SYixun Lan	compatible = "amlogic,meson-axg";
139d59b708SYixun Lan
149d59b708SYixun Lan	interrupt-parent = <&gic>;
159d59b708SYixun Lan	#address-cells = <2>;
169d59b708SYixun Lan	#size-cells = <2>;
179d59b708SYixun Lan
189d59b708SYixun Lan	reserved-memory {
199d59b708SYixun Lan		#address-cells = <2>;
209d59b708SYixun Lan		#size-cells = <2>;
219d59b708SYixun Lan		ranges;
229d59b708SYixun Lan
239d59b708SYixun Lan		/* 16 MiB reserved for Hardware ROM Firmware */
249d59b708SYixun Lan		hwrom_reserved: hwrom@0 {
259d59b708SYixun Lan			reg = <0x0 0x0 0x0 0x1000000>;
269d59b708SYixun Lan			no-map;
279d59b708SYixun Lan		};
289d59b708SYixun Lan
299d59b708SYixun Lan		/* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
30a5494aedSArnd Bergmann		secmon_reserved: secmon@5000000 {
319d59b708SYixun Lan			reg = <0x0 0x05000000 0x0 0x300000>;
329d59b708SYixun Lan			no-map;
339d59b708SYixun Lan		};
349d59b708SYixun Lan	};
359d59b708SYixun Lan
369d59b708SYixun Lan	cpus {
379d59b708SYixun Lan		#address-cells = <0x2>;
389d59b708SYixun Lan		#size-cells = <0x0>;
399d59b708SYixun Lan
409d59b708SYixun Lan		cpu0: cpu@0 {
419d59b708SYixun Lan			device_type = "cpu";
429d59b708SYixun Lan			compatible = "arm,cortex-a53", "arm,armv8";
439d59b708SYixun Lan			reg = <0x0 0x0>;
449d59b708SYixun Lan			enable-method = "psci";
459d59b708SYixun Lan			next-level-cache = <&l2>;
469d59b708SYixun Lan		};
479d59b708SYixun Lan
489d59b708SYixun Lan		cpu1: cpu@1 {
499d59b708SYixun Lan			device_type = "cpu";
509d59b708SYixun Lan			compatible = "arm,cortex-a53", "arm,armv8";
519d59b708SYixun Lan			reg = <0x0 0x1>;
529d59b708SYixun Lan			enable-method = "psci";
539d59b708SYixun Lan			next-level-cache = <&l2>;
549d59b708SYixun Lan		};
559d59b708SYixun Lan
569d59b708SYixun Lan		cpu2: cpu@2 {
579d59b708SYixun Lan			device_type = "cpu";
589d59b708SYixun Lan			compatible = "arm,cortex-a53", "arm,armv8";
599d59b708SYixun Lan			reg = <0x0 0x2>;
609d59b708SYixun Lan			enable-method = "psci";
619d59b708SYixun Lan			next-level-cache = <&l2>;
629d59b708SYixun Lan		};
639d59b708SYixun Lan
649d59b708SYixun Lan		cpu3: cpu@3 {
659d59b708SYixun Lan			device_type = "cpu";
669d59b708SYixun Lan			compatible = "arm,cortex-a53", "arm,armv8";
679d59b708SYixun Lan			reg = <0x0 0x3>;
689d59b708SYixun Lan			enable-method = "psci";
699d59b708SYixun Lan			next-level-cache = <&l2>;
709d59b708SYixun Lan		};
719d59b708SYixun Lan
729d59b708SYixun Lan		l2: l2-cache0 {
739d59b708SYixun Lan			compatible = "cache";
749d59b708SYixun Lan		};
759d59b708SYixun Lan	};
769d59b708SYixun Lan
779d59b708SYixun Lan	arm-pmu {
789d59b708SYixun Lan		compatible = "arm,cortex-a53-pmu";
799d59b708SYixun Lan		interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
809d59b708SYixun Lan			     <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
819d59b708SYixun Lan			     <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
829d59b708SYixun Lan			     <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
839d59b708SYixun Lan		interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
849d59b708SYixun Lan	};
859d59b708SYixun Lan
869d59b708SYixun Lan	psci {
879d59b708SYixun Lan		compatible = "arm,psci-1.0";
889d59b708SYixun Lan		method = "smc";
899d59b708SYixun Lan	};
909d59b708SYixun Lan
919d59b708SYixun Lan	timer {
929d59b708SYixun Lan		compatible = "arm,armv8-timer";
939d59b708SYixun Lan		interrupts = <GIC_PPI 13
949d59b708SYixun Lan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
959d59b708SYixun Lan			     <GIC_PPI 14
969d59b708SYixun Lan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
979d59b708SYixun Lan			     <GIC_PPI 11
989d59b708SYixun Lan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
999d59b708SYixun Lan			     <GIC_PPI 10
1009d59b708SYixun Lan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
1019d59b708SYixun Lan	};
1029d59b708SYixun Lan
1039d59b708SYixun Lan	xtal: xtal-clk {
1049d59b708SYixun Lan		compatible = "fixed-clock";
1059d59b708SYixun Lan		clock-frequency = <24000000>;
1069d59b708SYixun Lan		clock-output-names = "xtal";
1079d59b708SYixun Lan		#clock-cells = <0>;
1089d59b708SYixun Lan	};
1099d59b708SYixun Lan
1109d59b708SYixun Lan	soc {
1119d59b708SYixun Lan		compatible = "simple-bus";
1129d59b708SYixun Lan		#address-cells = <2>;
1139d59b708SYixun Lan		#size-cells = <2>;
1149d59b708SYixun Lan		ranges;
1159d59b708SYixun Lan
1160cb6c604SKevin Hilman		cbus: bus@ffd00000 {
1179d59b708SYixun Lan			compatible = "simple-bus";
1189d59b708SYixun Lan			reg = <0x0 0xffd00000 0x0 0x25000>;
1199d59b708SYixun Lan			#address-cells = <2>;
1209d59b708SYixun Lan			#size-cells = <2>;
1219d59b708SYixun Lan			ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x25000>;
1229d59b708SYixun Lan
1234a81e5ddSJian Hu			pwm_ab: pwm@1b000 {
1244a81e5ddSJian Hu				compatible = "amlogic,meson-axg-ee-pwm";
1254a81e5ddSJian Hu				reg = <0x0 0x1b000 0x0 0x20>;
1264a81e5ddSJian Hu				#pwm-cells = <3>;
1274a81e5ddSJian Hu				status = "disabled";
1284a81e5ddSJian Hu			};
1294a81e5ddSJian Hu
1304a81e5ddSJian Hu			pwm_cd: pwm@1a000 {
1314a81e5ddSJian Hu				compatible = "amlogic,meson-axg-ee-pwm";
1324a81e5ddSJian Hu				reg = <0x0 0x1a000 0x0 0x20>;
1334a81e5ddSJian Hu				#pwm-cells = <3>;
1344a81e5ddSJian Hu				status = "disabled";
1354a81e5ddSJian Hu			};
1364a81e5ddSJian Hu
1379d59b708SYixun Lan			uart_A: serial@24000 {
1389d59b708SYixun Lan				compatible = "amlogic,meson-gx-uart", "amlogic,meson-uart";
1399d59b708SYixun Lan				reg = <0x0 0x24000 0x0 0x14>;
1409d59b708SYixun Lan				interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
1419d59b708SYixun Lan				status = "disabled";
1429d59b708SYixun Lan			};
1439d59b708SYixun Lan
1449d59b708SYixun Lan			uart_B: serial@23000 {
1459d59b708SYixun Lan				compatible = "amlogic,meson-gx-uart", "amlogic,meson-uart";
1469d59b708SYixun Lan				reg = <0x0 0x23000 0x0 0x14>;
1479d59b708SYixun Lan				interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
1489d59b708SYixun Lan				status = "disabled";
1499d59b708SYixun Lan			};
1509d59b708SYixun Lan		};
1519d59b708SYixun Lan
1529d59b708SYixun Lan		gic: interrupt-controller@ffc01000 {
1539d59b708SYixun Lan			compatible = "arm,gic-400";
1549d59b708SYixun Lan			reg = <0x0 0xffc01000 0 0x1000>,
1559d59b708SYixun Lan			      <0x0 0xffc02000 0 0x2000>,
1569d59b708SYixun Lan			      <0x0 0xffc04000 0 0x2000>,
1579d59b708SYixun Lan			      <0x0 0xffc06000 0 0x2000>;
1589d59b708SYixun Lan			interrupt-controller;
1599d59b708SYixun Lan			interrupts = <GIC_PPI 9
1609d59b708SYixun Lan				(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
1619d59b708SYixun Lan			#interrupt-cells = <3>;
1629d59b708SYixun Lan			#address-cells = <0>;
1639d59b708SYixun Lan		};
1649d59b708SYixun Lan
165abfc18f9SQiufang Dai		hiubus: bus@ff63c000 {
166abfc18f9SQiufang Dai			compatible = "simple-bus";
167abfc18f9SQiufang Dai			reg = <0x0 0xff63c000 0x0 0x1c00>;
168abfc18f9SQiufang Dai			#address-cells = <2>;
169abfc18f9SQiufang Dai			#size-cells = <2>;
170abfc18f9SQiufang Dai			ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
171abfc18f9SQiufang Dai
172abfc18f9SQiufang Dai			clkc: clock-controller@0 {
173abfc18f9SQiufang Dai				compatible = "amlogic,axg-clkc";
174abfc18f9SQiufang Dai				#clock-cells = <1>;
175abfc18f9SQiufang Dai				reg = <0x0 0x0 0x0 0x320>;
176abfc18f9SQiufang Dai			};
177abfc18f9SQiufang Dai		};
178abfc18f9SQiufang Dai
1799d59b708SYixun Lan		mailbox: mailbox@ff63dc00 {
1809d59b708SYixun Lan			compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu";
1819d59b708SYixun Lan			reg = <0 0xff63dc00 0 0x400>;
1829d59b708SYixun Lan			interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
1839d59b708SYixun Lan				     <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>,
1849d59b708SYixun Lan				     <GIC_SPI 210 IRQ_TYPE_EDGE_RISING>;
1859d59b708SYixun Lan			#mbox-cells = <1>;
1869d59b708SYixun Lan		};
1879d59b708SYixun Lan
188de05ded6SXingyu Chen		periphs: periphs@ff634000 {
189de05ded6SXingyu Chen			compatible = "simple-bus";
190de05ded6SXingyu Chen			reg = <0x0 0xff634000 0x0 0x2000>;
191de05ded6SXingyu Chen			#address-cells = <2>;
192de05ded6SXingyu Chen			#size-cells = <2>;
193de05ded6SXingyu Chen			ranges = <0x0 0x0 0x0 0xff634000 0x0 0x2000>;
194de05ded6SXingyu Chen
195de05ded6SXingyu Chen			pinctrl_periphs: pinctrl@480 {
196de05ded6SXingyu Chen				compatible = "amlogic,meson-axg-periphs-pinctrl";
197de05ded6SXingyu Chen				#address-cells = <2>;
198de05ded6SXingyu Chen				#size-cells = <2>;
199de05ded6SXingyu Chen				ranges;
200de05ded6SXingyu Chen
201de05ded6SXingyu Chen				gpio: bank@480 {
202de05ded6SXingyu Chen					reg = <0x0 0x00480 0x0 0x40>,
203de05ded6SXingyu Chen						<0x0 0x004e8 0x0 0x14>,
204de05ded6SXingyu Chen						<0x0 0x00520 0x0 0x14>,
205de05ded6SXingyu Chen						<0x0 0x00430 0x0 0x3c>;
206de05ded6SXingyu Chen					reg-names = "mux", "pull", "pull-enable", "gpio";
207de05ded6SXingyu Chen					gpio-controller;
208de05ded6SXingyu Chen					#gpio-cells = <2>;
209de05ded6SXingyu Chen					gpio-ranges = <&pinctrl_periphs 0 0 86>;
210de05ded6SXingyu Chen				};
2114a81e5ddSJian Hu
2124a81e5ddSJian Hu				pwm_a_a_pins: pwm_a_a {
2134a81e5ddSJian Hu					mux {
2144a81e5ddSJian Hu						groups = "pwm_a_a";
2154a81e5ddSJian Hu						function = "pwm_a";
2164a81e5ddSJian Hu					};
2174a81e5ddSJian Hu				};
2184a81e5ddSJian Hu
2194a81e5ddSJian Hu				pwm_a_x18_pins: pwm_a_x18 {
2204a81e5ddSJian Hu					mux {
2214a81e5ddSJian Hu						groups = "pwm_a_x18";
2224a81e5ddSJian Hu						function = "pwm_a";
2234a81e5ddSJian Hu					};
2244a81e5ddSJian Hu				};
2254a81e5ddSJian Hu
2264a81e5ddSJian Hu				pwm_a_x20_pins: pwm_a_x20 {
2274a81e5ddSJian Hu					mux {
2284a81e5ddSJian Hu						groups = "pwm_a_x20";
2294a81e5ddSJian Hu						function = "pwm_a";
2304a81e5ddSJian Hu					};
2314a81e5ddSJian Hu				};
2324a81e5ddSJian Hu
2334a81e5ddSJian Hu				pwm_a_z_pins: pwm_a_z {
2344a81e5ddSJian Hu					mux {
2354a81e5ddSJian Hu						groups = "pwm_a_z";
2364a81e5ddSJian Hu						function = "pwm_a";
2374a81e5ddSJian Hu					};
2384a81e5ddSJian Hu				};
2394a81e5ddSJian Hu
2404a81e5ddSJian Hu				pwm_b_a_pins: pwm_b_a {
2414a81e5ddSJian Hu					mux {
2424a81e5ddSJian Hu						groups = "pwm_b_a";
2434a81e5ddSJian Hu						function = "pwm_b";
2444a81e5ddSJian Hu					};
2454a81e5ddSJian Hu				};
2464a81e5ddSJian Hu
2474a81e5ddSJian Hu				pwm_b_x_pins: pwm_b_x {
2484a81e5ddSJian Hu					mux {
2494a81e5ddSJian Hu						groups = "pwm_b_x";
2504a81e5ddSJian Hu						function = "pwm_b";
2514a81e5ddSJian Hu					};
2524a81e5ddSJian Hu				};
2534a81e5ddSJian Hu
2544a81e5ddSJian Hu				pwm_b_z_pins: pwm_b_z {
2554a81e5ddSJian Hu					mux {
2564a81e5ddSJian Hu						groups = "pwm_b_z";
2574a81e5ddSJian Hu						function = "pwm_b";
2584a81e5ddSJian Hu					};
2594a81e5ddSJian Hu				};
2604a81e5ddSJian Hu
2614a81e5ddSJian Hu				pwm_c_a_pins: pwm_c_a {
2624a81e5ddSJian Hu					mux {
2634a81e5ddSJian Hu						groups = "pwm_c_a";
2644a81e5ddSJian Hu						function = "pwm_c";
2654a81e5ddSJian Hu					};
2664a81e5ddSJian Hu				};
2674a81e5ddSJian Hu
2684a81e5ddSJian Hu				pwm_c_x10_pins: pwm_c_x10 {
2694a81e5ddSJian Hu					mux {
2704a81e5ddSJian Hu						groups = "pwm_c_x10";
2714a81e5ddSJian Hu						function = "pwm_c";
2724a81e5ddSJian Hu					};
2734a81e5ddSJian Hu				};
2744a81e5ddSJian Hu
2754a81e5ddSJian Hu				pwm_c_x17_pins: pwm_c_x17 {
2764a81e5ddSJian Hu					mux {
2774a81e5ddSJian Hu						groups = "pwm_c_x17";
2784a81e5ddSJian Hu						function = "pwm_c";
2794a81e5ddSJian Hu					};
2804a81e5ddSJian Hu				};
2814a81e5ddSJian Hu
2824a81e5ddSJian Hu				pwm_d_x11_pins: pwm_d_x11 {
2834a81e5ddSJian Hu					mux {
2844a81e5ddSJian Hu						groups = "pwm_d_x11";
2854a81e5ddSJian Hu						function = "pwm_d";
2864a81e5ddSJian Hu					};
2874a81e5ddSJian Hu				};
2884a81e5ddSJian Hu
2894a81e5ddSJian Hu				pwm_d_x16_pins: pwm_d_x16 {
2904a81e5ddSJian Hu					mux {
2914a81e5ddSJian Hu						groups = "pwm_d_x16";
2924a81e5ddSJian Hu						function = "pwm_d";
2934a81e5ddSJian Hu					};
2944a81e5ddSJian Hu				};
295de05ded6SXingyu Chen			};
296de05ded6SXingyu Chen		};
297de05ded6SXingyu Chen
2989d59b708SYixun Lan		sram: sram@fffc0000 {
2999d59b708SYixun Lan			compatible = "amlogic,meson-axg-sram", "mmio-sram";
3009d59b708SYixun Lan			reg = <0x0 0xfffc0000 0x0 0x20000>;
3019d59b708SYixun Lan			#address-cells = <1>;
3029d59b708SYixun Lan			#size-cells = <1>;
3039d59b708SYixun Lan			ranges = <0 0x0 0xfffc0000 0x20000>;
3049d59b708SYixun Lan
3059d59b708SYixun Lan			cpu_scp_lpri: scp-shmem@0 {
3069d59b708SYixun Lan				compatible = "amlogic,meson-axg-scp-shmem";
3079d59b708SYixun Lan				reg = <0x13000 0x400>;
3089d59b708SYixun Lan			};
3099d59b708SYixun Lan
3109d59b708SYixun Lan			cpu_scp_hpri: scp-shmem@200 {
3119d59b708SYixun Lan				compatible = "amlogic,meson-axg-scp-shmem";
3129d59b708SYixun Lan				reg = <0x13400 0x400>;
3139d59b708SYixun Lan			};
3149d59b708SYixun Lan		};
3159d59b708SYixun Lan
3160cb6c604SKevin Hilman		aobus: bus@ff800000 {
3179d59b708SYixun Lan			compatible = "simple-bus";
3189d59b708SYixun Lan			reg = <0x0 0xff800000 0x0 0x100000>;
3199d59b708SYixun Lan			#address-cells = <2>;
3209d59b708SYixun Lan			#size-cells = <2>;
3219d59b708SYixun Lan			ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
3229d59b708SYixun Lan
323de05ded6SXingyu Chen			pinctrl_aobus: pinctrl@14 {
324de05ded6SXingyu Chen				compatible = "amlogic,meson-axg-aobus-pinctrl";
325de05ded6SXingyu Chen				#address-cells = <2>;
326de05ded6SXingyu Chen				#size-cells = <2>;
327de05ded6SXingyu Chen				ranges;
328de05ded6SXingyu Chen
329de05ded6SXingyu Chen				gpio_ao: bank@14 {
330de05ded6SXingyu Chen					reg = <0x0 0x00014 0x0 0x8>,
331de05ded6SXingyu Chen						<0x0 0x0002c 0x0 0x4>,
332de05ded6SXingyu Chen						<0x0 0x00024 0x0 0x8>;
333de05ded6SXingyu Chen					reg-names = "mux", "pull", "gpio";
334de05ded6SXingyu Chen					gpio-controller;
335de05ded6SXingyu Chen					#gpio-cells = <2>;
336de05ded6SXingyu Chen					gpio-ranges = <&pinctrl_aobus 0 0 15>;
337de05ded6SXingyu Chen				};
338de05ded6SXingyu Chen			};
339de05ded6SXingyu Chen
3404a81e5ddSJian Hu			pwm_AO_ab: pwm@7000 {
3414a81e5ddSJian Hu				compatible = "amlogic,meson-axg-ao-pwm";
3424a81e5ddSJian Hu				reg = <0x0 0x07000 0x0 0x20>;
3434a81e5ddSJian Hu				#pwm-cells = <3>;
3444a81e5ddSJian Hu				status = "disabled";
3454a81e5ddSJian Hu			};
3464a81e5ddSJian Hu
3474a81e5ddSJian Hu			pwm_AO_cd: pwm@2000 {
3484a81e5ddSJian Hu				compatible = "amlogic,axg-ao-pwm";
3494a81e5ddSJian Hu				reg = <0x0 0x02000  0x0 0x20>;
3504a81e5ddSJian Hu				#pwm-cells = <3>;
3514a81e5ddSJian Hu				status = "disabled";
3524a81e5ddSJian Hu			};
3534a81e5ddSJian Hu
3549d59b708SYixun Lan			uart_AO: serial@3000 {
3559d59b708SYixun Lan				compatible = "amlogic,meson-gx-uart", "amlogic,meson-ao-uart";
3569d59b708SYixun Lan				reg = <0x0 0x3000 0x0 0x18>;
3579d59b708SYixun Lan				interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
3589d59b708SYixun Lan				clocks = <&xtal>, <&xtal>, <&xtal>;
3599d59b708SYixun Lan				clock-names = "xtal", "pclk", "baud";
3609d59b708SYixun Lan				status = "disabled";
3619d59b708SYixun Lan			};
3629d59b708SYixun Lan
3639d59b708SYixun Lan			uart_AO_B: serial@4000 {
3649d59b708SYixun Lan				compatible = "amlogic,meson-gx-uart", "amlogic,meson-ao-uart";
3659d59b708SYixun Lan				reg = <0x0 0x4000 0x0 0x18>;
3669d59b708SYixun Lan				interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
3679d59b708SYixun Lan				clocks = <&xtal>, <&xtal>, <&xtal>;
3689d59b708SYixun Lan				clock-names = "xtal", "pclk", "baud";
3699d59b708SYixun Lan				status = "disabled";
3709d59b708SYixun Lan			};
3719d59b708SYixun Lan		};
3729d59b708SYixun Lan	};
3739d59b708SYixun Lan};
374