xref: /freebsd/sys/contrib/device-tree/src/arm/marvell/armada-370-rd.dts (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree file for Marvell Armada 370 Reference Design board
4f126890aSEmmanuel Vadot * (RD-88F6710-A1)
5f126890aSEmmanuel Vadot *
6f126890aSEmmanuel Vadot *  Copied from arch/arm/boot/dts/armada-370-db.dts
7f126890aSEmmanuel Vadot *
8f126890aSEmmanuel Vadot *  Copyright (C) 2013 Florian Fainelli <florian@openwrt.org>
9f126890aSEmmanuel Vadot *
10f126890aSEmmanuel Vadot * Note: this Device Tree assumes that the bootloader has remapped the
11f126890aSEmmanuel Vadot * internal registers to 0xf1000000 (instead of the default
12f126890aSEmmanuel Vadot * 0xd0000000). The 0xf1000000 is the default used by the recent,
13f126890aSEmmanuel Vadot * DT-capable, U-Boot bootloaders provided by Marvell. Some earlier
14f126890aSEmmanuel Vadot * boards were delivered with an older version of the bootloader that
15f126890aSEmmanuel Vadot * left internal registers mapped at 0xd0000000. If you are in this
16f126890aSEmmanuel Vadot * situation, you should either update your bootloader (preferred
17f126890aSEmmanuel Vadot * solution) or the below Device Tree should be adjusted.
18f126890aSEmmanuel Vadot */
19f126890aSEmmanuel Vadot
20f126890aSEmmanuel Vadot/dts-v1/;
21f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
22f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
23f126890aSEmmanuel Vadot#include <dt-bindings/leds/common.h>
24f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
25f126890aSEmmanuel Vadot#include "armada-370.dtsi"
26f126890aSEmmanuel Vadot
27f126890aSEmmanuel Vadot/ {
28f126890aSEmmanuel Vadot	model = "Marvell Armada 370 Reference Design";
29f126890aSEmmanuel Vadot	compatible = "marvell,a370-rd", "marvell,armada370", "marvell,armada-370-xp";
30f126890aSEmmanuel Vadot
31f126890aSEmmanuel Vadot	chosen {
32f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
33f126890aSEmmanuel Vadot	};
34f126890aSEmmanuel Vadot
35f126890aSEmmanuel Vadot	memory@0 {
36f126890aSEmmanuel Vadot		device_type = "memory";
37f126890aSEmmanuel Vadot		reg = <0x00000000 0x20000000>; /* 512 MB */
38f126890aSEmmanuel Vadot	};
39f126890aSEmmanuel Vadot
40f126890aSEmmanuel Vadot	soc {
41f126890aSEmmanuel Vadot		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
42f126890aSEmmanuel Vadot			  MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
43f126890aSEmmanuel Vadot			  MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
44f126890aSEmmanuel Vadot
45f126890aSEmmanuel Vadot		internal-regs {
46f126890aSEmmanuel Vadot			serial@12000 {
47f126890aSEmmanuel Vadot				status = "okay";
48f126890aSEmmanuel Vadot			};
49f126890aSEmmanuel Vadot			sata@a0000 {
50f126890aSEmmanuel Vadot				nr-ports = <2>;
51f126890aSEmmanuel Vadot				status = "okay";
52f126890aSEmmanuel Vadot			};
53f126890aSEmmanuel Vadot
54f126890aSEmmanuel Vadot			ethernet@70000 {
55f126890aSEmmanuel Vadot				status = "okay";
56f126890aSEmmanuel Vadot				phy = <&phy0>;
57f126890aSEmmanuel Vadot				phy-mode = "sgmii";
58f126890aSEmmanuel Vadot			};
59f126890aSEmmanuel Vadot			ethernet@74000 {
60f126890aSEmmanuel Vadot				pinctrl-0 = <&ge1_rgmii_pins>;
61f126890aSEmmanuel Vadot				pinctrl-names = "default";
62f126890aSEmmanuel Vadot				status = "okay";
63f126890aSEmmanuel Vadot				phy-mode = "rgmii-id";
64f126890aSEmmanuel Vadot				fixed-link {
65f126890aSEmmanuel Vadot					speed = <1000>;
66f126890aSEmmanuel Vadot					full-duplex;
67f126890aSEmmanuel Vadot				};
68f126890aSEmmanuel Vadot			};
69f126890aSEmmanuel Vadot
70f126890aSEmmanuel Vadot			mvsdio@d4000 {
71f126890aSEmmanuel Vadot				pinctrl-0 = <&sdio_pins1>;
72f126890aSEmmanuel Vadot				pinctrl-names = "default";
73f126890aSEmmanuel Vadot				status = "okay";
74f126890aSEmmanuel Vadot				/* No CD or WP GPIOs */
75f126890aSEmmanuel Vadot				broken-cd;
76f126890aSEmmanuel Vadot			};
77f126890aSEmmanuel Vadot
78f126890aSEmmanuel Vadot			usb@50000 {
79f126890aSEmmanuel Vadot				status = "okay";
80f126890aSEmmanuel Vadot			};
81f126890aSEmmanuel Vadot
82f126890aSEmmanuel Vadot			usb@51000 {
83f126890aSEmmanuel Vadot				status = "okay";
84f126890aSEmmanuel Vadot			};
85f126890aSEmmanuel Vadot
86f126890aSEmmanuel Vadot			gpio-keys {
87f126890aSEmmanuel Vadot				compatible = "gpio-keys";
88f126890aSEmmanuel Vadot				button {
89f126890aSEmmanuel Vadot					label = "Software Button";
90f126890aSEmmanuel Vadot					linux,code = <KEY_POWER>;
91f126890aSEmmanuel Vadot					gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
92f126890aSEmmanuel Vadot				};
93f126890aSEmmanuel Vadot			};
94f126890aSEmmanuel Vadot
95f126890aSEmmanuel Vadot			gpio-fan {
96f126890aSEmmanuel Vadot				compatible = "gpio-fan";
97f126890aSEmmanuel Vadot				gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
98*8d13bc63SEmmanuel Vadot				gpio-fan,speed-map = <0 0>, <3000 1>;
99f126890aSEmmanuel Vadot				pinctrl-0 = <&fan_pins>;
100f126890aSEmmanuel Vadot				pinctrl-names = "default";
101f126890aSEmmanuel Vadot			};
102f126890aSEmmanuel Vadot
103f126890aSEmmanuel Vadot			gpio_leds {
104f126890aSEmmanuel Vadot				compatible = "gpio-leds";
105f126890aSEmmanuel Vadot				pinctrl-names = "default";
106f126890aSEmmanuel Vadot				pinctrl-0 = <&led_pins>;
107f126890aSEmmanuel Vadot
108f126890aSEmmanuel Vadot				sw_led {
109f126890aSEmmanuel Vadot					label = "370rd:green:sw";
110f126890aSEmmanuel Vadot					gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
111f126890aSEmmanuel Vadot					default-state = "keep";
112f126890aSEmmanuel Vadot				};
113f126890aSEmmanuel Vadot			};
114f126890aSEmmanuel Vadot		};
115f126890aSEmmanuel Vadot	};
116f126890aSEmmanuel Vadot};
117f126890aSEmmanuel Vadot
118f126890aSEmmanuel Vadot&pciec {
119f126890aSEmmanuel Vadot	status = "okay";
120f126890aSEmmanuel Vadot
121f126890aSEmmanuel Vadot	/* Internal mini-PCIe connector */
122f126890aSEmmanuel Vadot	pcie@1,0 {
123f126890aSEmmanuel Vadot		/* Port 0, Lane 0 */
124f126890aSEmmanuel Vadot		status = "okay";
125f126890aSEmmanuel Vadot	};
126f126890aSEmmanuel Vadot
127f126890aSEmmanuel Vadot	/* Internal mini-PCIe connector */
128f126890aSEmmanuel Vadot	pcie@2,0 {
129f126890aSEmmanuel Vadot		/* Port 1, Lane 0 */
130f126890aSEmmanuel Vadot		status = "okay";
131f126890aSEmmanuel Vadot	};
132f126890aSEmmanuel Vadot};
133f126890aSEmmanuel Vadot
134f126890aSEmmanuel Vadot&mdio {
135f126890aSEmmanuel Vadot	pinctrl-0 = <&mdio_pins>;
136f126890aSEmmanuel Vadot	pinctrl-names = "default";
137f126890aSEmmanuel Vadot	phy0: ethernet-phy@0 {
138f126890aSEmmanuel Vadot		reg = <0>;
139f126890aSEmmanuel Vadot		leds {
140f126890aSEmmanuel Vadot			#address-cells = <1>;
141f126890aSEmmanuel Vadot			#size-cells = <0>;
142f126890aSEmmanuel Vadot
143f126890aSEmmanuel Vadot			led@0 {
144f126890aSEmmanuel Vadot				reg = <0>;
145f126890aSEmmanuel Vadot				color = <LED_COLOR_ID_WHITE>;
146f126890aSEmmanuel Vadot				function = LED_FUNCTION_WAN;
147f126890aSEmmanuel Vadot				default-state = "keep";
148f126890aSEmmanuel Vadot			};
149f126890aSEmmanuel Vadot		};
150f126890aSEmmanuel Vadot	};
151f126890aSEmmanuel Vadot
152*8d13bc63SEmmanuel Vadot	switch: ethernet-switch@10 {
153f126890aSEmmanuel Vadot		compatible = "marvell,mv88e6085";
154f126890aSEmmanuel Vadot		reg = <0x10>;
155f126890aSEmmanuel Vadot		interrupt-controller;
156f126890aSEmmanuel Vadot		#interrupt-cells = <2>;
157f126890aSEmmanuel Vadot
158*8d13bc63SEmmanuel Vadot		ethernet-ports {
159f126890aSEmmanuel Vadot			#address-cells = <1>;
160f126890aSEmmanuel Vadot			#size-cells = <0>;
161f126890aSEmmanuel Vadot
162*8d13bc63SEmmanuel Vadot			ethernet-port@0 {
163f126890aSEmmanuel Vadot				reg = <0>;
164f126890aSEmmanuel Vadot				label = "lan0";
165f126890aSEmmanuel Vadot			};
166f126890aSEmmanuel Vadot
167*8d13bc63SEmmanuel Vadot			ethernet-port@1 {
168f126890aSEmmanuel Vadot				reg = <1>;
169f126890aSEmmanuel Vadot				label = "lan1";
170f126890aSEmmanuel Vadot			};
171f126890aSEmmanuel Vadot
172*8d13bc63SEmmanuel Vadot			ethernet-port@2 {
173f126890aSEmmanuel Vadot				reg = <2>;
174f126890aSEmmanuel Vadot				label = "lan2";
175f126890aSEmmanuel Vadot			};
176f126890aSEmmanuel Vadot
177*8d13bc63SEmmanuel Vadot			ethernet-port@3 {
178f126890aSEmmanuel Vadot				reg = <3>;
179f126890aSEmmanuel Vadot				label = "lan3";
180f126890aSEmmanuel Vadot			};
181f126890aSEmmanuel Vadot
182*8d13bc63SEmmanuel Vadot			ethernet-port@5 {
183f126890aSEmmanuel Vadot				reg = <5>;
184f126890aSEmmanuel Vadot				ethernet = <&eth1>;
185f126890aSEmmanuel Vadot				phy-mode = "rgmii-id";
186f126890aSEmmanuel Vadot				fixed-link {
187f126890aSEmmanuel Vadot					speed = <1000>;
188f126890aSEmmanuel Vadot					full-duplex;
189f126890aSEmmanuel Vadot				};
190f126890aSEmmanuel Vadot			};
191f126890aSEmmanuel Vadot		};
192f126890aSEmmanuel Vadot
193f126890aSEmmanuel Vadot		mdio {
194f126890aSEmmanuel Vadot			#address-cells = <1>;
195f126890aSEmmanuel Vadot			#size-cells = <0>;
196f126890aSEmmanuel Vadot
197*8d13bc63SEmmanuel Vadot			switchphy0: ethernet-phy@0 {
198f126890aSEmmanuel Vadot				reg = <0>;
199f126890aSEmmanuel Vadot				interrupt-parent = <&switch>;
200f126890aSEmmanuel Vadot				interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
201f126890aSEmmanuel Vadot			};
202f126890aSEmmanuel Vadot
203*8d13bc63SEmmanuel Vadot			switchphy1: ethernet-phy@1 {
204f126890aSEmmanuel Vadot				reg = <1>;
205f126890aSEmmanuel Vadot				interrupt-parent = <&switch>;
206f126890aSEmmanuel Vadot				interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
207f126890aSEmmanuel Vadot			};
208f126890aSEmmanuel Vadot
209*8d13bc63SEmmanuel Vadot			switchphy2: ethernet-phy@2 {
210f126890aSEmmanuel Vadot				reg = <2>;
211f126890aSEmmanuel Vadot				interrupt-parent = <&switch>;
212f126890aSEmmanuel Vadot				interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
213f126890aSEmmanuel Vadot			};
214f126890aSEmmanuel Vadot
215*8d13bc63SEmmanuel Vadot			switchphy3: ethernet-phy@3 {
216f126890aSEmmanuel Vadot				reg = <3>;
217f126890aSEmmanuel Vadot				interrupt-parent = <&switch>;
218f126890aSEmmanuel Vadot				interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
219f126890aSEmmanuel Vadot			};
220f126890aSEmmanuel Vadot		};
221f126890aSEmmanuel Vadot	};
222f126890aSEmmanuel Vadot};
223f126890aSEmmanuel Vadot
224f126890aSEmmanuel Vadot
225f126890aSEmmanuel Vadot&pinctrl {
226f126890aSEmmanuel Vadot	fan_pins: fan-pins {
227f126890aSEmmanuel Vadot		marvell,pins = "mpp8";
228f126890aSEmmanuel Vadot		marvell,function = "gpio";
229f126890aSEmmanuel Vadot	};
230f126890aSEmmanuel Vadot
231f126890aSEmmanuel Vadot	led_pins: led-pins {
232f126890aSEmmanuel Vadot		marvell,pins = "mpp32";
233f126890aSEmmanuel Vadot		marvell,function = "gpio";
234f126890aSEmmanuel Vadot	};
235f126890aSEmmanuel Vadot};
236f126890aSEmmanuel Vadot
237f126890aSEmmanuel Vadot&nand_controller {
238f126890aSEmmanuel Vadot	status = "okay";
239f126890aSEmmanuel Vadot
240f126890aSEmmanuel Vadot	nand@0 {
241f126890aSEmmanuel Vadot		reg = <0>;
242f126890aSEmmanuel Vadot		label = "pxa3xx_nand-0";
243f126890aSEmmanuel Vadot		nand-rb = <0>;
244f126890aSEmmanuel Vadot		marvell,nand-keep-config;
245f126890aSEmmanuel Vadot		nand-on-flash-bbt;
246f126890aSEmmanuel Vadot
247f126890aSEmmanuel Vadot		partitions {
248f126890aSEmmanuel Vadot			compatible = "fixed-partitions";
249f126890aSEmmanuel Vadot			#address-cells = <1>;
250f126890aSEmmanuel Vadot			#size-cells = <1>;
251f126890aSEmmanuel Vadot
252f126890aSEmmanuel Vadot			partition@0 {
253f126890aSEmmanuel Vadot				label = "U-Boot";
254f126890aSEmmanuel Vadot				reg = <0 0x800000>;
255f126890aSEmmanuel Vadot			};
256f126890aSEmmanuel Vadot			partition@800000 {
257f126890aSEmmanuel Vadot				label = "Linux";
258f126890aSEmmanuel Vadot				reg = <0x800000 0x800000>;
259f126890aSEmmanuel Vadot			};
260f126890aSEmmanuel Vadot			partition@1000000 {
261f126890aSEmmanuel Vadot				label = "Filesystem";
262f126890aSEmmanuel Vadot				reg = <0x1000000 0x3f000000>;
263f126890aSEmmanuel Vadot			};
264f126890aSEmmanuel Vadot		};
265f126890aSEmmanuel Vadot	};
266f126890aSEmmanuel Vadot};
267