1b795fadfSChris Packham// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2b795fadfSChris Packham/*
3b795fadfSChris Packham * Device Tree For AC5.
4b795fadfSChris Packham *
5b795fadfSChris Packham * Copyright (C) 2021 Marvell
6b795fadfSChris Packham * Copyright (C) 2022 Allied Telesis Labs
7b795fadfSChris Packham */
8b795fadfSChris Packham
9b795fadfSChris Packham#include <dt-bindings/gpio/gpio.h>
10b795fadfSChris Packham#include <dt-bindings/interrupt-controller/arm-gic.h>
11b795fadfSChris Packham
12b795fadfSChris Packham/ {
13b795fadfSChris Packham	model = "Marvell AC5 SoC";
14b795fadfSChris Packham	compatible = "marvell,ac5";
15b795fadfSChris Packham	interrupt-parent = <&gic>;
16b795fadfSChris Packham	#address-cells = <2>;
17b795fadfSChris Packham	#size-cells = <2>;
18b795fadfSChris Packham
19b795fadfSChris Packham	cpus {
20b795fadfSChris Packham		#address-cells = <2>;
21b795fadfSChris Packham		#size-cells = <0>;
22b795fadfSChris Packham
23b795fadfSChris Packham		cpu-map {
24b795fadfSChris Packham			cluster0 {
25b795fadfSChris Packham				core0 {
26b795fadfSChris Packham					cpu = <&cpu0>;
27b795fadfSChris Packham				};
28b795fadfSChris Packham				core1 {
29b795fadfSChris Packham					cpu = <&cpu1>;
30b795fadfSChris Packham				};
31b795fadfSChris Packham			};
32b795fadfSChris Packham		};
33b795fadfSChris Packham
34b795fadfSChris Packham		cpu0: cpu@0 {
35b795fadfSChris Packham			device_type = "cpu";
36b795fadfSChris Packham			compatible = "arm,cortex-a55";
37b795fadfSChris Packham			reg = <0x0 0x0>;
38b795fadfSChris Packham			enable-method = "psci";
39b795fadfSChris Packham			next-level-cache = <&l2>;
40b795fadfSChris Packham		};
41b795fadfSChris Packham
42b795fadfSChris Packham		cpu1: cpu@1 {
43b795fadfSChris Packham			device_type = "cpu";
44b795fadfSChris Packham			compatible = "arm,cortex-a55";
45b795fadfSChris Packham			reg = <0x0 0x100>;
46b795fadfSChris Packham			enable-method = "psci";
47b795fadfSChris Packham			next-level-cache = <&l2>;
48b795fadfSChris Packham		};
49b795fadfSChris Packham
50b795fadfSChris Packham		l2: l2-cache {
51b795fadfSChris Packham			compatible = "cache";
52b795fadfSChris Packham		};
53b795fadfSChris Packham	};
54b795fadfSChris Packham
55b795fadfSChris Packham	psci {
56b795fadfSChris Packham		compatible = "arm,psci-0.2";
57b795fadfSChris Packham		method = "smc";
58b795fadfSChris Packham	};
59b795fadfSChris Packham
60b795fadfSChris Packham	timer {
61b795fadfSChris Packham		compatible = "arm,armv8-timer";
62b795fadfSChris Packham		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>,
63b795fadfSChris Packham			     <GIC_PPI 8 IRQ_TYPE_LEVEL_HIGH>,
64b795fadfSChris Packham			     <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>,
65b795fadfSChris Packham			     <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
66b795fadfSChris Packham	};
67b795fadfSChris Packham
68b795fadfSChris Packham	pmu {
69b795fadfSChris Packham		compatible = "arm,armv8-pmuv3";
70b795fadfSChris Packham		interrupts = <GIC_PPI 12 IRQ_TYPE_LEVEL_HIGH>;
71b795fadfSChris Packham	};
72b795fadfSChris Packham
73b795fadfSChris Packham	soc {
74b795fadfSChris Packham		compatible = "simple-bus";
75b795fadfSChris Packham		#address-cells = <2>;
76b795fadfSChris Packham		#size-cells = <2>;
77b795fadfSChris Packham		ranges;
78b795fadfSChris Packham		dma-ranges;
79b795fadfSChris Packham
80b795fadfSChris Packham		internal-regs@7f000000 {
81b795fadfSChris Packham			#address-cells = <1>;
82b795fadfSChris Packham			#size-cells = <1>;
83b795fadfSChris Packham			compatible = "simple-bus";
84b795fadfSChris Packham			/* 16M internal register @ 0x7f00_0000 */
85b795fadfSChris Packham			ranges = <0x0 0x0 0x7f000000 0x1000000>;
86b795fadfSChris Packham			dma-coherent;
87b795fadfSChris Packham
88b795fadfSChris Packham			uart0: serial@12000 {
89b795fadfSChris Packham				compatible = "snps,dw-apb-uart";
90b795fadfSChris Packham				reg = <0x12000 0x100>;
91b795fadfSChris Packham				reg-shift = <2>;
92b795fadfSChris Packham				interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
93b795fadfSChris Packham				reg-io-width = <1>;
94b795fadfSChris Packham				clocks = <&cnm_clock>;
95b795fadfSChris Packham				status = "okay";
96b795fadfSChris Packham			};
97b795fadfSChris Packham
98*31be791eSChris Packham			uart1: serial@12100 {
99*31be791eSChris Packham				compatible = "snps,dw-apb-uart";
100*31be791eSChris Packham				reg = <0x11000 0x100>;
101*31be791eSChris Packham				reg-shift = <2>;
102*31be791eSChris Packham				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
103*31be791eSChris Packham				reg-io-width = <1>;
104*31be791eSChris Packham				clocks = <&cnm_clock>;
105*31be791eSChris Packham				status = "disabled";
106*31be791eSChris Packham			};
107*31be791eSChris Packham
108*31be791eSChris Packham			uart2: serial@12200 {
109*31be791eSChris Packham				compatible = "snps,dw-apb-uart";
110*31be791eSChris Packham				reg = <0x12200 0x100>;
111*31be791eSChris Packham				reg-shift = <2>;
112*31be791eSChris Packham				interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
113*31be791eSChris Packham				reg-io-width = <1>;
114*31be791eSChris Packham				clocks = <&cnm_clock>;
115*31be791eSChris Packham				status = "disabled";
116*31be791eSChris Packham			};
117*31be791eSChris Packham
118*31be791eSChris Packham			uart3: serial@12300 {
119*31be791eSChris Packham				compatible = "snps,dw-apb-uart";
120*31be791eSChris Packham				reg = <0x12300 0x100>;
121*31be791eSChris Packham				reg-shift = <2>;
122*31be791eSChris Packham				interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
123*31be791eSChris Packham				reg-io-width = <1>;
124*31be791eSChris Packham				clocks = <&cnm_clock>;
125*31be791eSChris Packham				status = "disabled";
126*31be791eSChris Packham			};
127*31be791eSChris Packham
128b795fadfSChris Packham			mdio: mdio@22004 {
129b795fadfSChris Packham				#address-cells = <1>;
130b795fadfSChris Packham				#size-cells = <0>;
131b795fadfSChris Packham				compatible = "marvell,orion-mdio";
132b795fadfSChris Packham				reg = <0x22004 0x4>;
133b795fadfSChris Packham				clocks = <&cnm_clock>;
134b795fadfSChris Packham			};
135b795fadfSChris Packham
136b795fadfSChris Packham			i2c0: i2c@11000{
137b795fadfSChris Packham				compatible = "marvell,mv78230-i2c";
138b795fadfSChris Packham				reg = <0x11000 0x20>;
139b795fadfSChris Packham				#address-cells = <1>;
140b795fadfSChris Packham				#size-cells = <0>;
141b795fadfSChris Packham
142b795fadfSChris Packham				clocks = <&cnm_clock>;
143b795fadfSChris Packham				clock-names = "core";
144b795fadfSChris Packham				interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
145b795fadfSChris Packham				clock-frequency=<100000>;
146b795fadfSChris Packham
147b795fadfSChris Packham				pinctrl-names = "default", "gpio";
148b795fadfSChris Packham				pinctrl-0 = <&i2c0_pins>;
149b795fadfSChris Packham				pinctrl-1 = <&i2c0_gpio>;
150b795fadfSChris Packham				scl_gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
151b795fadfSChris Packham				sda_gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>;
152b795fadfSChris Packham				status = "disabled";
153b795fadfSChris Packham			};
154b795fadfSChris Packham
155b795fadfSChris Packham			i2c1: i2c@11100{
156b795fadfSChris Packham				compatible = "marvell,mv78230-i2c";
157b795fadfSChris Packham				reg = <0x11100 0x20>;
158b795fadfSChris Packham				#address-cells = <1>;
159b795fadfSChris Packham				#size-cells = <0>;
160b795fadfSChris Packham
161b795fadfSChris Packham				clocks = <&cnm_clock>;
162b795fadfSChris Packham				clock-names = "core";
163b795fadfSChris Packham				interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
164b795fadfSChris Packham				clock-frequency=<100000>;
165b795fadfSChris Packham
166b795fadfSChris Packham				pinctrl-names = "default", "gpio";
167b795fadfSChris Packham				pinctrl-0 = <&i2c1_pins>;
168b795fadfSChris Packham				pinctrl-1 = <&i2c1_gpio>;
169b795fadfSChris Packham				scl_gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>;
170b795fadfSChris Packham				sda_gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
171b795fadfSChris Packham				status = "disabled";
172b795fadfSChris Packham			};
173b795fadfSChris Packham
174b795fadfSChris Packham			gpio0: gpio@18100 {
175b795fadfSChris Packham				compatible = "marvell,orion-gpio";
176b795fadfSChris Packham				reg = <0x18100 0x40>;
177b795fadfSChris Packham				ngpios = <32>;
178b795fadfSChris Packham				gpio-controller;
179b795fadfSChris Packham				#gpio-cells = <2>;
180b795fadfSChris Packham				gpio-ranges = <&pinctrl0 0 0 32>;
181b795fadfSChris Packham				marvell,pwm-offset = <0x1f0>;
182b795fadfSChris Packham				interrupt-controller;
183b795fadfSChris Packham				#interrupt-cells = <2>;
184b795fadfSChris Packham				interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
185b795fadfSChris Packham					     <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
186b795fadfSChris Packham					     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
187b795fadfSChris Packham					     <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
188b795fadfSChris Packham			};
189b795fadfSChris Packham
190b795fadfSChris Packham			gpio1: gpio@18140 {
191b795fadfSChris Packham				reg = <0x18140 0x40>;
192b795fadfSChris Packham				compatible = "marvell,orion-gpio";
193b795fadfSChris Packham				ngpios = <14>;
194b795fadfSChris Packham				gpio-controller;
195b795fadfSChris Packham				#gpio-cells = <2>;
196b795fadfSChris Packham				gpio-ranges = <&pinctrl0 0 32 14>;
197b795fadfSChris Packham				marvell,pwm-offset = <0x1f0>;
198b795fadfSChris Packham				interrupt-controller;
199b795fadfSChris Packham				#interrupt-cells = <2>;
200b795fadfSChris Packham				interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>,
201b795fadfSChris Packham					     <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
202b795fadfSChris Packham			};
203b795fadfSChris Packham		};
204b795fadfSChris Packham
205b795fadfSChris Packham		/*
206b795fadfSChris Packham		 * Dedicated section for devices behind 32bit controllers so we
207b795fadfSChris Packham		 * can configure specific DMA mapping for them
208b795fadfSChris Packham		 */
209b795fadfSChris Packham		behind-32bit-controller@7f000000 {
210b795fadfSChris Packham			compatible = "simple-bus";
211b795fadfSChris Packham			#address-cells = <0x2>;
212b795fadfSChris Packham			#size-cells = <0x2>;
213b795fadfSChris Packham			ranges = <0x0 0x0 0x0 0x7f000000 0x0 0x1000000>;
214b795fadfSChris Packham			/* Host phy ram starts at 0x200M */
215b795fadfSChris Packham			dma-ranges = <0x0 0x0 0x2 0x0 0x1 0x0>;
216b795fadfSChris Packham			dma-coherent;
217b795fadfSChris Packham
218b795fadfSChris Packham			eth0: ethernet@20000 {
219b795fadfSChris Packham				compatible = "marvell,armada-ac5-neta";
220b795fadfSChris Packham				reg = <0x0 0x20000 0x0 0x4000>;
221b795fadfSChris Packham				interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
222b795fadfSChris Packham				clocks = <&cnm_clock>;
223b795fadfSChris Packham				phy-mode = "sgmii";
224b795fadfSChris Packham				status = "disabled";
225b795fadfSChris Packham			};
226b795fadfSChris Packham
227b795fadfSChris Packham			eth1: ethernet@24000 {
228b795fadfSChris Packham				compatible = "marvell,armada-ac5-neta";
229b795fadfSChris Packham				reg = <0x0 0x24000 0x0 0x4000>;
230b795fadfSChris Packham				interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
231b795fadfSChris Packham				clocks = <&cnm_clock>;
232b795fadfSChris Packham				phy-mode = "sgmii";
233b795fadfSChris Packham				status = "disabled";
234b795fadfSChris Packham			};
235b795fadfSChris Packham
236b795fadfSChris Packham			usb0: usb@80000 {
237b795fadfSChris Packham				compatible = "marvell,orion-ehci";
238b795fadfSChris Packham				reg = <0x0 0x80000 0x0 0x500>;
239b795fadfSChris Packham				interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
240b795fadfSChris Packham				status = "disabled";
241b795fadfSChris Packham			};
242b795fadfSChris Packham
243b795fadfSChris Packham			usb1: usb@a0000 {
244b795fadfSChris Packham				compatible = "marvell,orion-ehci";
245b795fadfSChris Packham				reg = <0x0 0xa0000 0x0 0x500>;
246b795fadfSChris Packham				interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
247b795fadfSChris Packham				status = "disabled";
248b795fadfSChris Packham			};
249b795fadfSChris Packham		};
250b795fadfSChris Packham
251b795fadfSChris Packham		pinctrl0: pinctrl@80020100 {
252b795fadfSChris Packham			compatible = "marvell,ac5-pinctrl";
253b795fadfSChris Packham			reg = <0 0x80020100 0 0x20>;
254b795fadfSChris Packham
255b795fadfSChris Packham			i2c0_pins: i2c0-pins {
256b795fadfSChris Packham				marvell,pins = "mpp26", "mpp27";
257b795fadfSChris Packham				marvell,function = "i2c0";
258b795fadfSChris Packham			};
259b795fadfSChris Packham
260b795fadfSChris Packham			i2c0_gpio: i2c0-gpio-pins {
261b795fadfSChris Packham				marvell,pins = "mpp26", "mpp27";
262b795fadfSChris Packham				marvell,function = "gpio";
263b795fadfSChris Packham			};
264b795fadfSChris Packham
265b795fadfSChris Packham			i2c1_pins: i2c1-pins {
266b795fadfSChris Packham				marvell,pins = "mpp20", "mpp21";
267b795fadfSChris Packham				marvell,function = "i2c1";
268b795fadfSChris Packham			};
269b795fadfSChris Packham
270b795fadfSChris Packham			i2c1_gpio: i2c1-gpio-pins {
271b795fadfSChris Packham				marvell,pins = "mpp20", "mpp21";
272b795fadfSChris Packham				marvell,function = "i2c1";
273b795fadfSChris Packham			};
274b795fadfSChris Packham		};
275b795fadfSChris Packham
276b795fadfSChris Packham		spi0: spi@805a0000 {
277b795fadfSChris Packham			compatible = "marvell,armada-3700-spi";
278b795fadfSChris Packham			reg = <0x0 0x805a0000 0x0 0x50>;
279b795fadfSChris Packham			#address-cells = <0x1>;
280b795fadfSChris Packham			#size-cells = <0x0>;
281b795fadfSChris Packham			clocks = <&spi_clock>;
282b795fadfSChris Packham			interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
283b795fadfSChris Packham			num-cs = <1>;
284b795fadfSChris Packham			status = "disabled";
285b795fadfSChris Packham		};
286b795fadfSChris Packham
287b795fadfSChris Packham		spi1: spi@805a8000 {
288b795fadfSChris Packham			compatible = "marvell,armada-3700-spi";
289b795fadfSChris Packham			reg = <0x0 0x805a8000 0x0 0x50>;
290b795fadfSChris Packham			#address-cells = <0x1>;
291b795fadfSChris Packham			#size-cells = <0x0>;
292b795fadfSChris Packham			clocks = <&spi_clock>;
293b795fadfSChris Packham			interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
294b795fadfSChris Packham			num-cs = <1>;
295b795fadfSChris Packham			status = "disabled";
296b795fadfSChris Packham		};
297b795fadfSChris Packham
298b795fadfSChris Packham		gic: interrupt-controller@80600000 {
299b795fadfSChris Packham			compatible = "arm,gic-v3";
300b795fadfSChris Packham			#interrupt-cells = <3>;
301b795fadfSChris Packham			interrupt-controller;
302b795fadfSChris Packham			reg = <0x0 0x80600000 0x0 0x10000>, /* GICD */
303b795fadfSChris Packham			      <0x0 0x80660000 0x0 0x40000>; /* GICR */
304b795fadfSChris Packham			interrupts = <GIC_PPI 6 IRQ_TYPE_LEVEL_HIGH>;
305b795fadfSChris Packham		};
306b795fadfSChris Packham	};
307b795fadfSChris Packham
308b795fadfSChris Packham	clocks {
309b795fadfSChris Packham		cnm_clock: cnm-clock {
310b795fadfSChris Packham			compatible = "fixed-clock";
311b795fadfSChris Packham			#clock-cells = <0>;
312b795fadfSChris Packham			clock-frequency = <328000000>;
313b795fadfSChris Packham		};
314b795fadfSChris Packham
315b795fadfSChris Packham		spi_clock: spi-clock {
316b795fadfSChris Packham			compatible = "fixed-clock";
317b795fadfSChris Packham			#clock-cells = <0>;
318b795fadfSChris Packham			clock-frequency = <200000000>;
319b795fadfSChris Packham		};
320b795fadfSChris Packham	};
321b795fadfSChris Packham};
322