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