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";
52b5d971cfSPierre Gondois			cache-level = <2>;
53b795fadfSChris Packham		};
54b795fadfSChris Packham	};
55b795fadfSChris Packham
56b795fadfSChris Packham	psci {
57b795fadfSChris Packham		compatible = "arm,psci-0.2";
58b795fadfSChris Packham		method = "smc";
59b795fadfSChris Packham	};
60b795fadfSChris Packham
61b795fadfSChris Packham	timer {
62b795fadfSChris Packham		compatible = "arm,armv8-timer";
63b795fadfSChris Packham		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>,
64b795fadfSChris Packham			     <GIC_PPI 8 IRQ_TYPE_LEVEL_HIGH>,
65b795fadfSChris Packham			     <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>,
66b795fadfSChris Packham			     <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
67b795fadfSChris Packham	};
68b795fadfSChris Packham
69b795fadfSChris Packham	pmu {
70b795fadfSChris Packham		compatible = "arm,armv8-pmuv3";
71b795fadfSChris Packham		interrupts = <GIC_PPI 12 IRQ_TYPE_LEVEL_HIGH>;
72b795fadfSChris Packham	};
73b795fadfSChris Packham
74b795fadfSChris Packham	soc {
75b795fadfSChris Packham		compatible = "simple-bus";
76b795fadfSChris Packham		#address-cells = <2>;
77b795fadfSChris Packham		#size-cells = <2>;
78b795fadfSChris Packham		ranges;
79b795fadfSChris Packham		dma-ranges;
80b795fadfSChris Packham
81b795fadfSChris Packham		internal-regs@7f000000 {
82b795fadfSChris Packham			#address-cells = <1>;
83b795fadfSChris Packham			#size-cells = <1>;
84b795fadfSChris Packham			compatible = "simple-bus";
85b795fadfSChris Packham			/* 16M internal register @ 0x7f00_0000 */
86b795fadfSChris Packham			ranges = <0x0 0x0 0x7f000000 0x1000000>;
87b795fadfSChris Packham			dma-coherent;
88b795fadfSChris Packham
89b795fadfSChris Packham			uart0: serial@12000 {
90b795fadfSChris Packham				compatible = "snps,dw-apb-uart";
91b795fadfSChris Packham				reg = <0x12000 0x100>;
92b795fadfSChris Packham				reg-shift = <2>;
93b795fadfSChris Packham				interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
94b795fadfSChris Packham				reg-io-width = <1>;
95b795fadfSChris Packham				clocks = <&cnm_clock>;
96b795fadfSChris Packham				status = "okay";
97b795fadfSChris Packham			};
98b795fadfSChris Packham
9931be791eSChris Packham			uart1: serial@12100 {
10031be791eSChris Packham				compatible = "snps,dw-apb-uart";
101*80502ffaSChris Packham				reg = <0x12100 0x100>;
10231be791eSChris Packham				reg-shift = <2>;
10331be791eSChris Packham				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
10431be791eSChris Packham				reg-io-width = <1>;
10531be791eSChris Packham				clocks = <&cnm_clock>;
10631be791eSChris Packham				status = "disabled";
10731be791eSChris Packham			};
10831be791eSChris Packham
10931be791eSChris Packham			uart2: serial@12200 {
11031be791eSChris Packham				compatible = "snps,dw-apb-uart";
11131be791eSChris Packham				reg = <0x12200 0x100>;
11231be791eSChris Packham				reg-shift = <2>;
11331be791eSChris Packham				interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
11431be791eSChris Packham				reg-io-width = <1>;
11531be791eSChris Packham				clocks = <&cnm_clock>;
11631be791eSChris Packham				status = "disabled";
11731be791eSChris Packham			};
11831be791eSChris Packham
11931be791eSChris Packham			uart3: serial@12300 {
12031be791eSChris Packham				compatible = "snps,dw-apb-uart";
12131be791eSChris Packham				reg = <0x12300 0x100>;
12231be791eSChris Packham				reg-shift = <2>;
12331be791eSChris Packham				interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
12431be791eSChris Packham				reg-io-width = <1>;
12531be791eSChris Packham				clocks = <&cnm_clock>;
12631be791eSChris Packham				status = "disabled";
12731be791eSChris Packham			};
12831be791eSChris Packham
129b795fadfSChris Packham			mdio: mdio@22004 {
130b795fadfSChris Packham				#address-cells = <1>;
131b795fadfSChris Packham				#size-cells = <0>;
132b795fadfSChris Packham				compatible = "marvell,orion-mdio";
133b795fadfSChris Packham				reg = <0x22004 0x4>;
134b795fadfSChris Packham				clocks = <&cnm_clock>;
135b795fadfSChris Packham			};
136b795fadfSChris Packham
137b795fadfSChris Packham			i2c0: i2c@11000{
138b795fadfSChris Packham				compatible = "marvell,mv78230-i2c";
139b795fadfSChris Packham				reg = <0x11000 0x20>;
140b795fadfSChris Packham				#address-cells = <1>;
141b795fadfSChris Packham				#size-cells = <0>;
142b795fadfSChris Packham
143b795fadfSChris Packham				clocks = <&cnm_clock>;
144b795fadfSChris Packham				clock-names = "core";
145b795fadfSChris Packham				interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
146b795fadfSChris Packham				clock-frequency=<100000>;
147b795fadfSChris Packham
148b795fadfSChris Packham				pinctrl-names = "default", "gpio";
149b795fadfSChris Packham				pinctrl-0 = <&i2c0_pins>;
150b795fadfSChris Packham				pinctrl-1 = <&i2c0_gpio>;
1512b14d382SChris Packham				scl-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
1522b14d382SChris Packham				sda-gpios = <&gpio0 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
153b795fadfSChris Packham				status = "disabled";
154b795fadfSChris Packham			};
155b795fadfSChris Packham
156b795fadfSChris Packham			i2c1: i2c@11100{
157b795fadfSChris Packham				compatible = "marvell,mv78230-i2c";
158b795fadfSChris Packham				reg = <0x11100 0x20>;
159b795fadfSChris Packham				#address-cells = <1>;
160b795fadfSChris Packham				#size-cells = <0>;
161b795fadfSChris Packham
162b795fadfSChris Packham				clocks = <&cnm_clock>;
163b795fadfSChris Packham				clock-names = "core";
164b795fadfSChris Packham				interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
165b795fadfSChris Packham				clock-frequency=<100000>;
166b795fadfSChris Packham
167b795fadfSChris Packham				pinctrl-names = "default", "gpio";
168b795fadfSChris Packham				pinctrl-0 = <&i2c1_pins>;
169b795fadfSChris Packham				pinctrl-1 = <&i2c1_gpio>;
1702b14d382SChris Packham				scl-gpios = <&gpio0 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
1712b14d382SChris Packham				sda-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
172b795fadfSChris Packham				status = "disabled";
173b795fadfSChris Packham			};
174b795fadfSChris Packham
175b795fadfSChris Packham			gpio0: gpio@18100 {
176b795fadfSChris Packham				compatible = "marvell,orion-gpio";
177b795fadfSChris Packham				reg = <0x18100 0x40>;
178b795fadfSChris Packham				ngpios = <32>;
179b795fadfSChris Packham				gpio-controller;
180b795fadfSChris Packham				#gpio-cells = <2>;
181b795fadfSChris Packham				gpio-ranges = <&pinctrl0 0 0 32>;
182b795fadfSChris Packham				marvell,pwm-offset = <0x1f0>;
183b795fadfSChris Packham				interrupt-controller;
184b795fadfSChris Packham				#interrupt-cells = <2>;
185b795fadfSChris Packham				interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
186b795fadfSChris Packham					     <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
187b795fadfSChris Packham					     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
188b795fadfSChris Packham					     <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
189b795fadfSChris Packham			};
190b795fadfSChris Packham
191b795fadfSChris Packham			gpio1: gpio@18140 {
192b795fadfSChris Packham				reg = <0x18140 0x40>;
193b795fadfSChris Packham				compatible = "marvell,orion-gpio";
194b795fadfSChris Packham				ngpios = <14>;
195b795fadfSChris Packham				gpio-controller;
196b795fadfSChris Packham				#gpio-cells = <2>;
197b795fadfSChris Packham				gpio-ranges = <&pinctrl0 0 32 14>;
198b795fadfSChris Packham				marvell,pwm-offset = <0x1f0>;
199b795fadfSChris Packham				interrupt-controller;
200b795fadfSChris Packham				#interrupt-cells = <2>;
201b795fadfSChris Packham				interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>,
202b795fadfSChris Packham					     <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
203b795fadfSChris Packham			};
204b795fadfSChris Packham		};
205b795fadfSChris Packham
206b795fadfSChris Packham		/*
207b795fadfSChris Packham		 * Dedicated section for devices behind 32bit controllers so we
208b795fadfSChris Packham		 * can configure specific DMA mapping for them
209b795fadfSChris Packham		 */
210b795fadfSChris Packham		behind-32bit-controller@7f000000 {
211b795fadfSChris Packham			compatible = "simple-bus";
212b795fadfSChris Packham			#address-cells = <0x2>;
213b795fadfSChris Packham			#size-cells = <0x2>;
214b795fadfSChris Packham			ranges = <0x0 0x0 0x0 0x7f000000 0x0 0x1000000>;
215b795fadfSChris Packham			/* Host phy ram starts at 0x200M */
216b795fadfSChris Packham			dma-ranges = <0x0 0x0 0x2 0x0 0x1 0x0>;
217b795fadfSChris Packham			dma-coherent;
218b795fadfSChris Packham
219b795fadfSChris Packham			eth0: ethernet@20000 {
220b795fadfSChris Packham				compatible = "marvell,armada-ac5-neta";
221b795fadfSChris Packham				reg = <0x0 0x20000 0x0 0x4000>;
222b795fadfSChris Packham				interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
223b795fadfSChris Packham				clocks = <&cnm_clock>;
224b795fadfSChris Packham				phy-mode = "sgmii";
225b795fadfSChris Packham				status = "disabled";
226b795fadfSChris Packham			};
227b795fadfSChris Packham
228b795fadfSChris Packham			eth1: ethernet@24000 {
229b795fadfSChris Packham				compatible = "marvell,armada-ac5-neta";
230b795fadfSChris Packham				reg = <0x0 0x24000 0x0 0x4000>;
231b795fadfSChris Packham				interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
232b795fadfSChris Packham				clocks = <&cnm_clock>;
233b795fadfSChris Packham				phy-mode = "sgmii";
234b795fadfSChris Packham				status = "disabled";
235b795fadfSChris Packham			};
236b795fadfSChris Packham
237b795fadfSChris Packham			usb0: usb@80000 {
238b795fadfSChris Packham				compatible = "marvell,orion-ehci";
239b795fadfSChris Packham				reg = <0x0 0x80000 0x0 0x500>;
240b795fadfSChris Packham				interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
241b795fadfSChris Packham				status = "disabled";
242b795fadfSChris Packham			};
243b795fadfSChris Packham
244b795fadfSChris Packham			usb1: usb@a0000 {
245b795fadfSChris Packham				compatible = "marvell,orion-ehci";
246b795fadfSChris Packham				reg = <0x0 0xa0000 0x0 0x500>;
247b795fadfSChris Packham				interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
248b795fadfSChris Packham				status = "disabled";
249b795fadfSChris Packham			};
250b795fadfSChris Packham		};
251b795fadfSChris Packham
252b795fadfSChris Packham		pinctrl0: pinctrl@80020100 {
253b795fadfSChris Packham			compatible = "marvell,ac5-pinctrl";
254b795fadfSChris Packham			reg = <0 0x80020100 0 0x20>;
255b795fadfSChris Packham
256b795fadfSChris Packham			i2c0_pins: i2c0-pins {
257b795fadfSChris Packham				marvell,pins = "mpp26", "mpp27";
258b795fadfSChris Packham				marvell,function = "i2c0";
259b795fadfSChris Packham			};
260b795fadfSChris Packham
261b795fadfSChris Packham			i2c0_gpio: i2c0-gpio-pins {
262b795fadfSChris Packham				marvell,pins = "mpp26", "mpp27";
263b795fadfSChris Packham				marvell,function = "gpio";
264b795fadfSChris Packham			};
265b795fadfSChris Packham
266b795fadfSChris Packham			i2c1_pins: i2c1-pins {
267b795fadfSChris Packham				marvell,pins = "mpp20", "mpp21";
268b795fadfSChris Packham				marvell,function = "i2c1";
269b795fadfSChris Packham			};
270b795fadfSChris Packham
271b795fadfSChris Packham			i2c1_gpio: i2c1-gpio-pins {
272b795fadfSChris Packham				marvell,pins = "mpp20", "mpp21";
273b795fadfSChris Packham				marvell,function = "i2c1";
274b795fadfSChris Packham			};
275b795fadfSChris Packham		};
276b795fadfSChris Packham
277b795fadfSChris Packham		spi0: spi@805a0000 {
278b795fadfSChris Packham			compatible = "marvell,armada-3700-spi";
279b795fadfSChris Packham			reg = <0x0 0x805a0000 0x0 0x50>;
280b795fadfSChris Packham			#address-cells = <0x1>;
281b795fadfSChris Packham			#size-cells = <0x0>;
282b795fadfSChris Packham			clocks = <&spi_clock>;
283b795fadfSChris Packham			interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
284b795fadfSChris Packham			num-cs = <1>;
285b795fadfSChris Packham			status = "disabled";
286b795fadfSChris Packham		};
287b795fadfSChris Packham
288b795fadfSChris Packham		spi1: spi@805a8000 {
289b795fadfSChris Packham			compatible = "marvell,armada-3700-spi";
290b795fadfSChris Packham			reg = <0x0 0x805a8000 0x0 0x50>;
291b795fadfSChris Packham			#address-cells = <0x1>;
292b795fadfSChris Packham			#size-cells = <0x0>;
293b795fadfSChris Packham			clocks = <&spi_clock>;
294b795fadfSChris Packham			interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
295b795fadfSChris Packham			num-cs = <1>;
296b795fadfSChris Packham			status = "disabled";
297b795fadfSChris Packham		};
298b795fadfSChris Packham
299b795fadfSChris Packham		gic: interrupt-controller@80600000 {
300b795fadfSChris Packham			compatible = "arm,gic-v3";
301b795fadfSChris Packham			#interrupt-cells = <3>;
302b795fadfSChris Packham			interrupt-controller;
303b795fadfSChris Packham			reg = <0x0 0x80600000 0x0 0x10000>, /* GICD */
304b795fadfSChris Packham			      <0x0 0x80660000 0x0 0x40000>; /* GICR */
305b795fadfSChris Packham			interrupts = <GIC_PPI 6 IRQ_TYPE_LEVEL_HIGH>;
306b795fadfSChris Packham		};
307b795fadfSChris Packham	};
308b795fadfSChris Packham
309b795fadfSChris Packham	clocks {
310b795fadfSChris Packham		cnm_clock: cnm-clock {
311b795fadfSChris Packham			compatible = "fixed-clock";
312b795fadfSChris Packham			#clock-cells = <0>;
313b795fadfSChris Packham			clock-frequency = <328000000>;
314b795fadfSChris Packham		};
315b795fadfSChris Packham
316b795fadfSChris Packham		spi_clock: spi-clock {
317b795fadfSChris Packham			compatible = "fixed-clock";
318b795fadfSChris Packham			#clock-cells = <0>;
319b795fadfSChris Packham			clock-frequency = <200000000>;
320b795fadfSChris Packham		};
321b795fadfSChris Packham	};
322b795fadfSChris Packham};
323