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";
39b255e126SJianxin Pan		};
40b255e126SJianxin Pan	};
41b255e126SJianxin Pan
42b255e126SJianxin Pan	psci {
43b255e126SJianxin Pan		compatible = "arm,psci-1.0";
44b255e126SJianxin Pan		method = "smc";
45b255e126SJianxin Pan	};
46b255e126SJianxin Pan
47b255e126SJianxin Pan	reserved-memory {
48b255e126SJianxin Pan		#address-cells = <2>;
49b255e126SJianxin Pan		#size-cells = <2>;
50b255e126SJianxin Pan		ranges;
51b255e126SJianxin Pan
52b255e126SJianxin Pan		linux,cma {
53b255e126SJianxin Pan			compatible = "shared-dma-pool";
54b255e126SJianxin Pan			reusable;
55b255e126SJianxin Pan			size = <0x0 0x800000>;
56b255e126SJianxin Pan			alignment = <0x0 0x400000>;
57b255e126SJianxin Pan			linux,cma-default;
58b255e126SJianxin Pan		};
59b255e126SJianxin Pan	};
60b255e126SJianxin Pan
61b255e126SJianxin Pan	sm: secure-monitor {
62b255e126SJianxin Pan		compatible = "amlogic,meson-gxbb-sm";
63b255e126SJianxin Pan	};
64b255e126SJianxin Pan
65b255e126SJianxin Pan	soc {
66b255e126SJianxin Pan		compatible = "simple-bus";
67b255e126SJianxin Pan		#address-cells = <2>;
68b255e126SJianxin Pan		#size-cells = <2>;
69b255e126SJianxin Pan		ranges;
70b255e126SJianxin Pan
71b255e126SJianxin Pan		apb: bus@fe000000 {
72b255e126SJianxin Pan			compatible = "simple-bus";
73b255e126SJianxin Pan			reg = <0x0 0xfe000000 0x0 0x1000000>;
74b255e126SJianxin Pan			#address-cells = <2>;
75b255e126SJianxin Pan			#size-cells = <2>;
76b255e126SJianxin Pan			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x1000000>;
77b255e126SJianxin Pan
78e6eeb92dSQianggui Song
7903f2dea7SXingyu Chen			reset: reset-controller@0 {
8003f2dea7SXingyu Chen				compatible = "amlogic,meson-a1-reset";
8103f2dea7SXingyu Chen				reg = <0x0 0x0 0x0 0x8c>;
8203f2dea7SXingyu Chen				#reset-cells = <1>;
8303f2dea7SXingyu Chen			};
8403f2dea7SXingyu Chen
85e6eeb92dSQianggui Song			periphs_pinctrl: pinctrl@0400 {
86e6eeb92dSQianggui Song				compatible = "amlogic,meson-a1-periphs-pinctrl";
87e6eeb92dSQianggui Song				#address-cells = <2>;
88e6eeb92dSQianggui Song				#size-cells = <2>;
89e6eeb92dSQianggui Song				ranges;
90e6eeb92dSQianggui Song
91e6eeb92dSQianggui Song				gpio: bank@0400 {
92e6eeb92dSQianggui Song					reg = <0x0 0x0400 0x0 0x003c>,
93e6eeb92dSQianggui Song					      <0x0 0x0480 0x0 0x0118>;
94e6eeb92dSQianggui Song					reg-names = "mux", "gpio";
95e6eeb92dSQianggui Song					gpio-controller;
96e6eeb92dSQianggui Song					#gpio-cells = <2>;
97e6eeb92dSQianggui Song					gpio-ranges = <&periphs_pinctrl 0 0 62>;
98e6eeb92dSQianggui Song				};
99e6eeb92dSQianggui Song
100e6eeb92dSQianggui Song			};
101e6eeb92dSQianggui Song
102b255e126SJianxin Pan			uart_AO: serial@1c00 {
103b255e126SJianxin Pan				compatible = "amlogic,meson-gx-uart",
104b255e126SJianxin Pan					     "amlogic,meson-ao-uart";
105b255e126SJianxin Pan				reg = <0x0 0x1c00 0x0 0x18>;
106b255e126SJianxin Pan				interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
107b255e126SJianxin Pan				clocks = <&xtal>, <&xtal>, <&xtal>;
108b255e126SJianxin Pan				clock-names = "xtal", "pclk", "baud";
109b255e126SJianxin Pan				status = "disabled";
110b255e126SJianxin Pan			};
111b255e126SJianxin Pan
112b255e126SJianxin Pan			uart_AO_B: serial@2000 {
113b255e126SJianxin Pan				compatible = "amlogic,meson-gx-uart",
114b255e126SJianxin Pan					     "amlogic,meson-ao-uart";
115b255e126SJianxin Pan				reg = <0x0 0x2000 0x0 0x18>;
116b255e126SJianxin Pan				interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
117b255e126SJianxin Pan				clocks = <&xtal>, <&xtal>, <&xtal>;
118b255e126SJianxin Pan				clock-names = "xtal", "pclk", "baud";
119b255e126SJianxin Pan				status = "disabled";
120b255e126SJianxin Pan			};
121b255e126SJianxin Pan		};
122b255e126SJianxin Pan
123b255e126SJianxin Pan		gic: interrupt-controller@ff901000 {
124b255e126SJianxin Pan			compatible = "arm,gic-400";
125b255e126SJianxin Pan			reg = <0x0 0xff901000 0x0 0x1000>,
126b255e126SJianxin Pan			      <0x0 0xff902000 0x0 0x2000>,
127b255e126SJianxin Pan			      <0x0 0xff904000 0x0 0x2000>,
128b255e126SJianxin Pan			      <0x0 0xff906000 0x0 0x2000>;
129b255e126SJianxin Pan			interrupt-controller;
130b255e126SJianxin Pan			interrupts = <GIC_PPI 9
131b255e126SJianxin Pan				(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
132b255e126SJianxin Pan			#interrupt-cells = <3>;
133b255e126SJianxin Pan			#address-cells = <0>;
134b255e126SJianxin Pan		};
135b255e126SJianxin Pan	};
136b255e126SJianxin Pan
137b255e126SJianxin Pan	timer {
138b255e126SJianxin Pan		compatible = "arm,armv8-timer";
139b255e126SJianxin Pan		interrupts = <GIC_PPI 13
140b255e126SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
141b255e126SJianxin Pan			     <GIC_PPI 14
142b255e126SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
143b255e126SJianxin Pan			     <GIC_PPI 11
144b255e126SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
145b255e126SJianxin Pan			     <GIC_PPI 10
146b255e126SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
147b255e126SJianxin Pan	};
148b255e126SJianxin Pan
149b255e126SJianxin Pan	xtal: xtal-clk {
150b255e126SJianxin Pan		compatible = "fixed-clock";
151b255e126SJianxin Pan		clock-frequency = <24000000>;
152b255e126SJianxin Pan		clock-output-names = "xtal";
153b255e126SJianxin Pan		#clock-cells = <0>;
154b255e126SJianxin Pan	};
155b255e126SJianxin Pan};
156