1b255e126SJianxin Pan// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2b255e126SJianxin Pan/*
3b255e126SJianxin Pan * Copyright (c) 2019 Amlogic, Inc. All rights reserved.
4b255e126SJianxin Pan */
5b255e126SJianxin Pan
6b255e126SJianxin Pan#include <dt-bindings/interrupt-controller/irq.h>
7b255e126SJianxin Pan#include <dt-bindings/interrupt-controller/arm-gic.h>
8e6eeb92dSQianggui Song#include <dt-bindings/gpio/meson-a1-gpio.h>
9b255e126SJianxin Pan
10b255e126SJianxin Pan/ {
11b255e126SJianxin Pan	compatible = "amlogic,a1";
12b255e126SJianxin Pan
13b255e126SJianxin Pan	interrupt-parent = <&gic>;
14b255e126SJianxin Pan	#address-cells = <2>;
15b255e126SJianxin Pan	#size-cells = <2>;
16b255e126SJianxin Pan
17b255e126SJianxin Pan	cpus {
18b255e126SJianxin Pan		#address-cells = <2>;
19b255e126SJianxin Pan		#size-cells = <0>;
20b255e126SJianxin Pan
21b255e126SJianxin Pan		cpu0: cpu@0 {
22b255e126SJianxin Pan			device_type = "cpu";
23b255e126SJianxin Pan			compatible = "arm,cortex-a35";
24b255e126SJianxin Pan			reg = <0x0 0x0>;
25b255e126SJianxin Pan			enable-method = "psci";
26b255e126SJianxin Pan			next-level-cache = <&l2>;
27b255e126SJianxin Pan		};
28b255e126SJianxin Pan
29b255e126SJianxin Pan		cpu1: cpu@1 {
30b255e126SJianxin Pan			device_type = "cpu";
31b255e126SJianxin Pan			compatible = "arm,cortex-a35";
32b255e126SJianxin Pan			reg = <0x0 0x1>;
33b255e126SJianxin Pan			enable-method = "psci";
34b255e126SJianxin Pan			next-level-cache = <&l2>;
35b255e126SJianxin Pan		};
36b255e126SJianxin Pan
37b255e126SJianxin Pan		l2: l2-cache0 {
38b255e126SJianxin Pan			compatible = "cache";
3949f65e2eSPierre Gondois			cache-level = <2>;
40c2258a94SKrzysztof Kozlowski			cache-unified;
41b255e126SJianxin Pan		};
42b255e126SJianxin Pan	};
43b255e126SJianxin Pan
44b255e126SJianxin Pan	psci {
45b255e126SJianxin Pan		compatible = "arm,psci-1.0";
46b255e126SJianxin Pan		method = "smc";
47b255e126SJianxin Pan	};
48b255e126SJianxin Pan
49b255e126SJianxin Pan	reserved-memory {
50b255e126SJianxin Pan		#address-cells = <2>;
51b255e126SJianxin Pan		#size-cells = <2>;
52b255e126SJianxin Pan		ranges;
53b255e126SJianxin Pan
54b255e126SJianxin Pan		linux,cma {
55b255e126SJianxin Pan			compatible = "shared-dma-pool";
56b255e126SJianxin Pan			reusable;
57b255e126SJianxin Pan			size = <0x0 0x800000>;
58b255e126SJianxin Pan			alignment = <0x0 0x400000>;
59b255e126SJianxin Pan			linux,cma-default;
60b255e126SJianxin Pan		};
61b255e126SJianxin Pan	};
62b255e126SJianxin Pan
63b255e126SJianxin Pan	sm: secure-monitor {
64b255e126SJianxin Pan		compatible = "amlogic,meson-gxbb-sm";
6504dd0b65SJianxin Pan
6604dd0b65SJianxin Pan		pwrc: power-controller {
6704dd0b65SJianxin Pan			compatible = "amlogic,meson-a1-pwrc";
6804dd0b65SJianxin Pan			#power-domain-cells = <1>;
6904dd0b65SJianxin Pan			status = "okay";
7004dd0b65SJianxin Pan		};
71b255e126SJianxin Pan	};
72b255e126SJianxin Pan
73b255e126SJianxin Pan	soc {
74b255e126SJianxin Pan		compatible = "simple-bus";
75b255e126SJianxin Pan		#address-cells = <2>;
76b255e126SJianxin Pan		#size-cells = <2>;
77b255e126SJianxin Pan		ranges;
78b255e126SJianxin Pan
79b255e126SJianxin Pan		apb: bus@fe000000 {
80b255e126SJianxin Pan			compatible = "simple-bus";
81b255e126SJianxin Pan			reg = <0x0 0xfe000000 0x0 0x1000000>;
82b255e126SJianxin Pan			#address-cells = <2>;
83b255e126SJianxin Pan			#size-cells = <2>;
84b255e126SJianxin Pan			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x1000000>;
85b255e126SJianxin Pan
86e6eeb92dSQianggui Song
8703f2dea7SXingyu Chen			reset: reset-controller@0 {
8803f2dea7SXingyu Chen				compatible = "amlogic,meson-a1-reset";
8903f2dea7SXingyu Chen				reg = <0x0 0x0 0x0 0x8c>;
9003f2dea7SXingyu Chen				#reset-cells = <1>;
9103f2dea7SXingyu Chen			};
9203f2dea7SXingyu Chen
93d9421d6cSKevin Hilman			periphs_pinctrl: pinctrl@400 {
94e6eeb92dSQianggui Song				compatible = "amlogic,meson-a1-periphs-pinctrl";
95e6eeb92dSQianggui Song				#address-cells = <2>;
96e6eeb92dSQianggui Song				#size-cells = <2>;
97e6eeb92dSQianggui Song				ranges;
98e6eeb92dSQianggui Song
99d9421d6cSKevin Hilman				gpio: bank@400 {
100e6eeb92dSQianggui Song					reg = <0x0 0x0400 0x0 0x003c>,
101e6eeb92dSQianggui Song					      <0x0 0x0480 0x0 0x0118>;
102e6eeb92dSQianggui Song					reg-names = "mux", "gpio";
103e6eeb92dSQianggui Song					gpio-controller;
104e6eeb92dSQianggui Song					#gpio-cells = <2>;
105e6eeb92dSQianggui Song					gpio-ranges = <&periphs_pinctrl 0 0 62>;
106e6eeb92dSQianggui Song				};
107e6eeb92dSQianggui Song
108e6eeb92dSQianggui Song			};
109e6eeb92dSQianggui Song
110b255e126SJianxin Pan			uart_AO: serial@1c00 {
111*6d71ded2SDmitry Rokosov				compatible = "amlogic,meson-a1-uart",
112b255e126SJianxin Pan					     "amlogic,meson-ao-uart";
113b255e126SJianxin Pan				reg = <0x0 0x1c00 0x0 0x18>;
114b255e126SJianxin Pan				interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
115b255e126SJianxin Pan				clocks = <&xtal>, <&xtal>, <&xtal>;
116b255e126SJianxin Pan				clock-names = "xtal", "pclk", "baud";
117b255e126SJianxin Pan				status = "disabled";
118b255e126SJianxin Pan			};
119b255e126SJianxin Pan
120b255e126SJianxin Pan			uart_AO_B: serial@2000 {
121*6d71ded2SDmitry Rokosov				compatible = "amlogic,meson-a1-uart",
122b255e126SJianxin Pan					     "amlogic,meson-ao-uart";
123b255e126SJianxin Pan				reg = <0x0 0x2000 0x0 0x18>;
124b255e126SJianxin Pan				interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
125b255e126SJianxin Pan				clocks = <&xtal>, <&xtal>, <&xtal>;
126b255e126SJianxin Pan				clock-names = "xtal", "pclk", "baud";
127b255e126SJianxin Pan				status = "disabled";
128b255e126SJianxin Pan			};
129ea254644SAlexey Romanov
130ea254644SAlexey Romanov			gpio_intc: interrupt-controller@0440 {
131ea254644SAlexey Romanov				compatible = "amlogic,meson-a1-gpio-intc",
132ea254644SAlexey Romanov					     "amlogic,meson-gpio-intc";
133ea254644SAlexey Romanov				reg = <0x0 0x0440 0x0 0x14>;
134ea254644SAlexey Romanov				interrupt-controller;
135ea254644SAlexey Romanov				#interrupt-cells = <2>;
136ea254644SAlexey Romanov				amlogic,channel-interrupts =
137ea254644SAlexey Romanov					<49 50 51 52 53 54 55 56>;
138ea254644SAlexey Romanov			};
139b255e126SJianxin Pan		};
140b255e126SJianxin Pan
141b255e126SJianxin Pan		gic: interrupt-controller@ff901000 {
142b255e126SJianxin Pan			compatible = "arm,gic-400";
143b255e126SJianxin Pan			reg = <0x0 0xff901000 0x0 0x1000>,
144b255e126SJianxin Pan			      <0x0 0xff902000 0x0 0x2000>,
145b255e126SJianxin Pan			      <0x0 0xff904000 0x0 0x2000>,
146b255e126SJianxin Pan			      <0x0 0xff906000 0x0 0x2000>;
147b255e126SJianxin Pan			interrupt-controller;
148b255e126SJianxin Pan			interrupts = <GIC_PPI 9
149b255e126SJianxin Pan				(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
150b255e126SJianxin Pan			#interrupt-cells = <3>;
151b255e126SJianxin Pan			#address-cells = <0>;
152b255e126SJianxin Pan		};
153b255e126SJianxin Pan	};
154b255e126SJianxin Pan
155b255e126SJianxin Pan	timer {
156b255e126SJianxin Pan		compatible = "arm,armv8-timer";
157b255e126SJianxin Pan		interrupts = <GIC_PPI 13
158b255e126SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
159b255e126SJianxin Pan			     <GIC_PPI 14
160b255e126SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
161b255e126SJianxin Pan			     <GIC_PPI 11
162b255e126SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
163b255e126SJianxin Pan			     <GIC_PPI 10
164b255e126SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
165b255e126SJianxin Pan	};
166b255e126SJianxin Pan
167b255e126SJianxin Pan	xtal: xtal-clk {
168b255e126SJianxin Pan		compatible = "fixed-clock";
169b255e126SJianxin Pan		clock-frequency = <24000000>;
170b255e126SJianxin Pan		clock-output-names = "xtal";
171b255e126SJianxin Pan		#clock-cells = <0>;
172b255e126SJianxin Pan	};
173b255e126SJianxin Pan};
174