xref: /freebsd/sys/contrib/device-tree/src/arm/marvell/armada-370-dlink-dns327l.dts (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree file for D-Link DNS-327L
4f126890aSEmmanuel Vadot *
5f126890aSEmmanuel Vadot * Copyright (C) 2015, Andrew Andrianov <andrew@ncrmnt.org>
6f126890aSEmmanuel Vadot */
7f126890aSEmmanuel Vadot
8f126890aSEmmanuel Vadot/* Remaining unsolved:
9f126890aSEmmanuel Vadot * There's still some unknown device on i2c address 0x13
10f126890aSEmmanuel Vadot */
11f126890aSEmmanuel Vadot
12f126890aSEmmanuel Vadot/dts-v1/;
13f126890aSEmmanuel Vadot
14f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
15f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
16f126890aSEmmanuel Vadot#include "armada-370.dtsi"
17f126890aSEmmanuel Vadot
18f126890aSEmmanuel Vadot/ {
19f126890aSEmmanuel Vadot	model = "D-Link DNS-327L";
20f126890aSEmmanuel Vadot	compatible = "dlink,dns327l",
21f126890aSEmmanuel Vadot		"marvell,armada370",
22f126890aSEmmanuel Vadot		"marvell,armada-370-xp";
23f126890aSEmmanuel Vadot
24f126890aSEmmanuel Vadot	chosen {
25f126890aSEmmanuel Vadot		stdout-path = &uart0;
26f126890aSEmmanuel Vadot	};
27f126890aSEmmanuel Vadot
28f126890aSEmmanuel Vadot	memory@0 {
29f126890aSEmmanuel Vadot		device_type = "memory";
30f126890aSEmmanuel Vadot		reg = <0x00000000 0x20000000>; /* 512 MiB */
31f126890aSEmmanuel Vadot	};
32f126890aSEmmanuel Vadot
33f126890aSEmmanuel Vadot	soc {
34f126890aSEmmanuel Vadot		ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
35f126890aSEmmanuel Vadot			MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
36f126890aSEmmanuel Vadot			MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
37f126890aSEmmanuel Vadot
38f126890aSEmmanuel Vadot		internal-regs {
39f126890aSEmmanuel Vadot			sata@a0000 {
40f126890aSEmmanuel Vadot				nr-ports = <2>;
41f126890aSEmmanuel Vadot				status = "okay";
42f126890aSEmmanuel Vadot			};
43f126890aSEmmanuel Vadot
44f126890aSEmmanuel Vadot			usb@50000 {
45f126890aSEmmanuel Vadot				status = "okay";
46f126890aSEmmanuel Vadot			};
47f126890aSEmmanuel Vadot		};
48f126890aSEmmanuel Vadot	};
49f126890aSEmmanuel Vadot
50f126890aSEmmanuel Vadot	gpio-keys {
51f126890aSEmmanuel Vadot		compatible = "gpio-keys";
52f126890aSEmmanuel Vadot		pinctrl-0 = <
53f126890aSEmmanuel Vadot			&backup_button_pin
54f126890aSEmmanuel Vadot			&power_button_pin
55f126890aSEmmanuel Vadot			&reset_button_pin>;
56f126890aSEmmanuel Vadot		pinctrl-names = "default";
57f126890aSEmmanuel Vadot
58f126890aSEmmanuel Vadot		power-button {
59f126890aSEmmanuel Vadot			label = "Power Button";
60f126890aSEmmanuel Vadot			linux,code = <KEY_POWER>;
61f126890aSEmmanuel Vadot			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
62f126890aSEmmanuel Vadot		};
63f126890aSEmmanuel Vadot
64f126890aSEmmanuel Vadot		backup-button {
65f126890aSEmmanuel Vadot			label = "Backup Button";
66f126890aSEmmanuel Vadot			linux,code = <KEY_COPY>;
67f126890aSEmmanuel Vadot			gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
68f126890aSEmmanuel Vadot		};
69f126890aSEmmanuel Vadot
70f126890aSEmmanuel Vadot		reset-button {
71f126890aSEmmanuel Vadot			label = "Reset Button";
72f126890aSEmmanuel Vadot			linux,code = <KEY_RESTART>;
73f126890aSEmmanuel Vadot			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
74f126890aSEmmanuel Vadot		};
75f126890aSEmmanuel Vadot	};
76f126890aSEmmanuel Vadot
77f126890aSEmmanuel Vadot	gpio-leds {
78f126890aSEmmanuel Vadot		compatible = "gpio-leds";
79f126890aSEmmanuel Vadot		pinctrl-0 = <
80f126890aSEmmanuel Vadot			&sata_l_amber_pin
81f126890aSEmmanuel Vadot			&sata_r_amber_pin
82f126890aSEmmanuel Vadot			&backup_led_pin
83f126890aSEmmanuel Vadot			/* Ensure these are managed by hardware */
84f126890aSEmmanuel Vadot			&sata_l_white_pin
85f126890aSEmmanuel Vadot			&sata_r_white_pin>;
86f126890aSEmmanuel Vadot
87f126890aSEmmanuel Vadot		pinctrl-names = "default";
88f126890aSEmmanuel Vadot
89f126890aSEmmanuel Vadot		led-sata-r-amber {
90f126890aSEmmanuel Vadot			label = "dns327l:amber:sata-r";
91f126890aSEmmanuel Vadot			gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
92f126890aSEmmanuel Vadot			default-state = "keep";
93f126890aSEmmanuel Vadot		};
94f126890aSEmmanuel Vadot
95f126890aSEmmanuel Vadot		led-sata-l-amber {
96f126890aSEmmanuel Vadot			label = "dns327l:amber:sata-l";
97f126890aSEmmanuel Vadot			gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
98f126890aSEmmanuel Vadot			default-state = "keep";
99f126890aSEmmanuel Vadot		};
100f126890aSEmmanuel Vadot
101f126890aSEmmanuel Vadot		led-backup {
102f126890aSEmmanuel Vadot			label = "dns327l:white:usb";
103f126890aSEmmanuel Vadot			gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
104f126890aSEmmanuel Vadot			default-state = "keep";
105f126890aSEmmanuel Vadot		};
106f126890aSEmmanuel Vadot	};
107f126890aSEmmanuel Vadot
108*aa1a8ff2SEmmanuel Vadot	usb_power: regulator-1 {
109f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
110f126890aSEmmanuel Vadot		pinctrl-0 = <&xhci_pwr_pin>;
111f126890aSEmmanuel Vadot		pinctrl-names = "default";
112f126890aSEmmanuel Vadot		regulator-name = "USB3.0 Port Power";
113f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
114f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
115f126890aSEmmanuel Vadot		enable-active-high;
116f126890aSEmmanuel Vadot		regulator-boot-on;
117f126890aSEmmanuel Vadot		regulator-always-on;
118f126890aSEmmanuel Vadot		gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
119f126890aSEmmanuel Vadot	};
120f126890aSEmmanuel Vadot
121*aa1a8ff2SEmmanuel Vadot	sata_r_power: regulator-2 {
122f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
123f126890aSEmmanuel Vadot		pinctrl-0 = <&sata_r_pwr_pin>;
124f126890aSEmmanuel Vadot		pinctrl-names = "default";
125f126890aSEmmanuel Vadot		regulator-name = "SATA-R Power";
126f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
127f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
128f126890aSEmmanuel Vadot		startup-delay-us = <2000000>;
129f126890aSEmmanuel Vadot		enable-active-high;
130f126890aSEmmanuel Vadot		regulator-always-on;
131f126890aSEmmanuel Vadot		regulator-boot-on;
132f126890aSEmmanuel Vadot		gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
133f126890aSEmmanuel Vadot	};
134f126890aSEmmanuel Vadot
135*aa1a8ff2SEmmanuel Vadot	sata_l_power: regulator-3 {
136f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
137f126890aSEmmanuel Vadot		pinctrl-0 = <&sata_l_pwr_pin>;
138f126890aSEmmanuel Vadot		pinctrl-names = "default";
139f126890aSEmmanuel Vadot		regulator-name = "SATA-L Power";
140f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
141f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
142f126890aSEmmanuel Vadot		startup-delay-us = <4000000>;
143f126890aSEmmanuel Vadot		enable-active-high;
144f126890aSEmmanuel Vadot		regulator-always-on;
145f126890aSEmmanuel Vadot		regulator-boot-on;
146f126890aSEmmanuel Vadot		gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
147f126890aSEmmanuel Vadot	};
148f126890aSEmmanuel Vadot};
149f126890aSEmmanuel Vadot
150f126890aSEmmanuel Vadot&pciec {
151f126890aSEmmanuel Vadot	status = "okay";
152f126890aSEmmanuel Vadot
153f126890aSEmmanuel Vadot	pcie@1,0 {
154f126890aSEmmanuel Vadot		/* Port 0, Lane 0 */
155f126890aSEmmanuel Vadot		status = "okay";
156f126890aSEmmanuel Vadot	};
157f126890aSEmmanuel Vadot
158f126890aSEmmanuel Vadot	pcie@2,0 {
159f126890aSEmmanuel Vadot		/* Port 1, Lane 0 */
160f126890aSEmmanuel Vadot		status = "okay";
161f126890aSEmmanuel Vadot	};
162f126890aSEmmanuel Vadot};
163f126890aSEmmanuel Vadot
164f126890aSEmmanuel Vadot&pinctrl {
165f126890aSEmmanuel Vadot	sata_l_white_pin: sata-l-white-pin {
166f126890aSEmmanuel Vadot		marvell,pins = "mpp57";
167f126890aSEmmanuel Vadot		marvell,function = "sata0";
168f126890aSEmmanuel Vadot	};
169f126890aSEmmanuel Vadot
170f126890aSEmmanuel Vadot	sata_r_white_pin: sata-r-white-pin {
171f126890aSEmmanuel Vadot		marvell,pins = "mpp55";
172f126890aSEmmanuel Vadot		marvell,function = "sata1";
173f126890aSEmmanuel Vadot	};
174f126890aSEmmanuel Vadot
175f126890aSEmmanuel Vadot	sata_r_amber_pin: sata-r-amber-pin {
176f126890aSEmmanuel Vadot		marvell,pins = "mpp52";
177f126890aSEmmanuel Vadot		marvell,function = "gpio";
178f126890aSEmmanuel Vadot	};
179f126890aSEmmanuel Vadot
180f126890aSEmmanuel Vadot	sata_l_amber_pin: sata-l-amber-pin {
181f126890aSEmmanuel Vadot		marvell,pins = "mpp53";
182f126890aSEmmanuel Vadot		marvell,function = "gpio";
183f126890aSEmmanuel Vadot	};
184f126890aSEmmanuel Vadot
185f126890aSEmmanuel Vadot	backup_led_pin: backup-led-pin {
186f126890aSEmmanuel Vadot		marvell,pins = "mpp61";
187f126890aSEmmanuel Vadot		marvell,function = "gpo";
188f126890aSEmmanuel Vadot	};
189f126890aSEmmanuel Vadot
190f126890aSEmmanuel Vadot	xhci_pwr_pin: xhci-pwr-pin {
191f126890aSEmmanuel Vadot		marvell,pins = "mpp13";
192f126890aSEmmanuel Vadot		marvell,function = "gpio";
193f126890aSEmmanuel Vadot	};
194f126890aSEmmanuel Vadot
195f126890aSEmmanuel Vadot	sata_r_pwr_pin: sata-r-pwr-pin {
196f126890aSEmmanuel Vadot		marvell,pins = "mpp54";
197f126890aSEmmanuel Vadot		marvell,function = "gpio";
198f126890aSEmmanuel Vadot	};
199f126890aSEmmanuel Vadot
200f126890aSEmmanuel Vadot	sata_l_pwr_pin: sata-l-pwr-pin {
201f126890aSEmmanuel Vadot		marvell,pins = "mpp56";
202f126890aSEmmanuel Vadot		marvell,function = "gpio";
203f126890aSEmmanuel Vadot	};
204f126890aSEmmanuel Vadot
205f126890aSEmmanuel Vadot	uart1_pins: uart1-pins {
206f126890aSEmmanuel Vadot		marvell,pins = "mpp60", "mpp61";
207f126890aSEmmanuel Vadot		marvell,function = "uart1";
208f126890aSEmmanuel Vadot	};
209f126890aSEmmanuel Vadot
210f126890aSEmmanuel Vadot	power_button_pin: power-button-pin {
211f126890aSEmmanuel Vadot		marvell,pins = "mpp65";
212f126890aSEmmanuel Vadot		marvell,function = "gpio";
213f126890aSEmmanuel Vadot	};
214f126890aSEmmanuel Vadot
215f126890aSEmmanuel Vadot	backup_button_pin: backup-button-pin {
216f126890aSEmmanuel Vadot		marvell,pins = "mpp63";
217f126890aSEmmanuel Vadot		marvell,function = "gpio";
218f126890aSEmmanuel Vadot	};
219f126890aSEmmanuel Vadot
220f126890aSEmmanuel Vadot	reset_button_pin: reset-button-pin {
221f126890aSEmmanuel Vadot		marvell,pins = "mpp64";
222f126890aSEmmanuel Vadot		marvell,function = "gpio";
223f126890aSEmmanuel Vadot	};
224f126890aSEmmanuel Vadot};
225f126890aSEmmanuel Vadot
226f126890aSEmmanuel Vadot/* Serial console */
227f126890aSEmmanuel Vadot&uart0 {
228f126890aSEmmanuel Vadot	status = "okay";
229f126890aSEmmanuel Vadot};
230f126890aSEmmanuel Vadot
231f126890aSEmmanuel Vadot/* Connected to Weltrend MCU */
232f126890aSEmmanuel Vadot&uart1 {
233f126890aSEmmanuel Vadot	pinctrl-0 = <&uart1_pins>;
234f126890aSEmmanuel Vadot	pinctrl-names = "default";
235f126890aSEmmanuel Vadot	status = "okay";
236f126890aSEmmanuel Vadot};
237f126890aSEmmanuel Vadot
238f126890aSEmmanuel Vadot&mdio {
239f126890aSEmmanuel Vadot	phy0: ethernet-phy@0 { /* Marvell 88E1318 */
240f126890aSEmmanuel Vadot		reg = <0>;
241f126890aSEmmanuel Vadot		marvell,reg-init = <0x2 0x19 0x0 0x0077>,
242f126890aSEmmanuel Vadot				   <0x2 0x18 0x0 0x5747>;
243f126890aSEmmanuel Vadot	};
244f126890aSEmmanuel Vadot};
245f126890aSEmmanuel Vadot
246f126890aSEmmanuel Vadot&eth1 {
247f126890aSEmmanuel Vadot	phy = <&phy0>;
248f126890aSEmmanuel Vadot	phy-mode = "rgmii-id";
249f126890aSEmmanuel Vadot	status = "okay";
250f126890aSEmmanuel Vadot};
251f126890aSEmmanuel Vadot
252f126890aSEmmanuel Vadot&i2c0 {
253f126890aSEmmanuel Vadot	compatible = "marvell,mv64xxx-i2c";
254f126890aSEmmanuel Vadot	clock-frequency = <100000>;
255f126890aSEmmanuel Vadot	status = "okay";
256f126890aSEmmanuel Vadot};
257f126890aSEmmanuel Vadot
258f126890aSEmmanuel Vadot&nand_controller {
259f126890aSEmmanuel Vadot	status = "okay";
260f126890aSEmmanuel Vadot
261f126890aSEmmanuel Vadot	nand@0 {
262f126890aSEmmanuel Vadot		reg = <0>;
263f126890aSEmmanuel Vadot		label = "pxa3xx_nand-0";
264f126890aSEmmanuel Vadot		nand-rb = <0>;
265f126890aSEmmanuel Vadot		marvell,nand-keep-config;
266f126890aSEmmanuel Vadot		nand-on-flash-bbt;
267f126890aSEmmanuel Vadot		nand-ecc-strength = <4>;
268f126890aSEmmanuel Vadot		nand-ecc-step-size = <512>;
269f126890aSEmmanuel Vadot
270f126890aSEmmanuel Vadot		partitions {
271f126890aSEmmanuel Vadot			compatible = "fixed-partitions";
272f126890aSEmmanuel Vadot			#address-cells = <1>;
273f126890aSEmmanuel Vadot			#size-cells = <1>;
274f126890aSEmmanuel Vadot
275f126890aSEmmanuel Vadot			partition@0 {
276f126890aSEmmanuel Vadot				label = "u-boot";
277f126890aSEmmanuel Vadot				/* 1.0 MiB */
278f126890aSEmmanuel Vadot				reg = <0x0000000 0x100000>;
279f126890aSEmmanuel Vadot				read-only;
280f126890aSEmmanuel Vadot			};
281f126890aSEmmanuel Vadot
282f126890aSEmmanuel Vadot			partition@100000 {
283f126890aSEmmanuel Vadot				label = "u-boot-env";
284f126890aSEmmanuel Vadot				/* 128 KiB */
285f126890aSEmmanuel Vadot				reg = <0x100000 0x20000>;
286f126890aSEmmanuel Vadot				read-only;
287f126890aSEmmanuel Vadot			};
288f126890aSEmmanuel Vadot
289f126890aSEmmanuel Vadot			partition@120000 {
290f126890aSEmmanuel Vadot				label = "uImage";
291f126890aSEmmanuel Vadot				/* 7 MiB */
292f126890aSEmmanuel Vadot				reg = <0x120000 0x700000>;
293f126890aSEmmanuel Vadot			};
294f126890aSEmmanuel Vadot
295f126890aSEmmanuel Vadot			partition@820000 {
296f126890aSEmmanuel Vadot				label = "ubifs";
297f126890aSEmmanuel Vadot				/* ~ 84 MiB */
298f126890aSEmmanuel Vadot				reg = <0x820000 0x54e0000>;
299f126890aSEmmanuel Vadot			};
300f126890aSEmmanuel Vadot
301f126890aSEmmanuel Vadot			/* Hardcoded into stock bootloader */
302f126890aSEmmanuel Vadot			partition@5d00000 {
303f126890aSEmmanuel Vadot				label = "failsafe-uImage";
304f126890aSEmmanuel Vadot				/* 5 MiB */
305f126890aSEmmanuel Vadot				reg = <0x5d00000 0x500000>;
306f126890aSEmmanuel Vadot			};
307f126890aSEmmanuel Vadot
308f126890aSEmmanuel Vadot			partition@6200000 {
309f126890aSEmmanuel Vadot				label = "failsafe-fs";
310f126890aSEmmanuel Vadot				/* 29 MiB */
311f126890aSEmmanuel Vadot				reg = <0x6200000 0x1d00000>;
312f126890aSEmmanuel Vadot			};
313f126890aSEmmanuel Vadot
314f126890aSEmmanuel Vadot			partition@7f00000 {
315f126890aSEmmanuel Vadot				label = "bbt";
316f126890aSEmmanuel Vadot				/* 1 MiB for BBT */
317f126890aSEmmanuel Vadot				reg = <0x7f00000 0x100000>;
318f126890aSEmmanuel Vadot			};
319f126890aSEmmanuel Vadot		};
320f126890aSEmmanuel Vadot	};
321f126890aSEmmanuel Vadot};
322