xref: /freebsd-src/sys/contrib/device-tree/src/arm/marvell/armada-xp-synology-ds414.dts (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree file for Synology DS414
4f126890aSEmmanuel Vadot *
5f126890aSEmmanuel Vadot * Copyright (C) 2014, Arnaud EBALARD <arno@natisbad.org>
6f126890aSEmmanuel Vadot *
7f126890aSEmmanuel Vadot * Note: this Device Tree assumes that the bootloader has remapped the
8f126890aSEmmanuel Vadot * internal registers to 0xf1000000 (instead of the old 0xd0000000).
9f126890aSEmmanuel Vadot * The 0xf1000000 is the default used by the recent, DT-capable, U-Boot
10f126890aSEmmanuel Vadot * bootloaders provided by Marvell. It is used in recent versions of
11f126890aSEmmanuel Vadot * DSM software provided by Synology. Nonetheless, some earlier boards
12f126890aSEmmanuel Vadot * were delivered with an older version of u-boot that left internal
13f126890aSEmmanuel Vadot * registers mapped at 0xd0000000. If you have such a device you will
14f126890aSEmmanuel Vadot * not be able to directly boot a kernel based on this Device Tree. In
15f126890aSEmmanuel Vadot * that case, the preferred solution is to update your bootloader (e.g.
16f126890aSEmmanuel Vadot * by upgrading to latest version of DSM, or building a new one and
17f126890aSEmmanuel Vadot * installing it from u-boot prompt) or adjust the Devive Tree
18f126890aSEmmanuel Vadot * (s/0xf1000000/0xd0000000/ in 'ranges' below).
19f126890aSEmmanuel Vadot */
20f126890aSEmmanuel Vadot
21f126890aSEmmanuel Vadot/dts-v1/;
22f126890aSEmmanuel Vadot
23f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
24f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
25f126890aSEmmanuel Vadot#include "armada-xp-mv78230.dtsi"
26f126890aSEmmanuel Vadot
27f126890aSEmmanuel Vadot/ {
28f126890aSEmmanuel Vadot	model = "Synology DS414";
29f126890aSEmmanuel Vadot	compatible = "synology,ds414", "marvell,armadaxp-mv78230",
30f126890aSEmmanuel Vadot		     "marvell,armadaxp", "marvell,armada-370-xp";
31f126890aSEmmanuel Vadot
32f126890aSEmmanuel Vadot	chosen {
33f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
34f126890aSEmmanuel Vadot	};
35f126890aSEmmanuel Vadot
36f126890aSEmmanuel Vadot	memory@0 {
37f126890aSEmmanuel Vadot		device_type = "memory";
38f126890aSEmmanuel Vadot		reg = <0 0x00000000 0 0x40000000>; /* 1GB */
39f126890aSEmmanuel Vadot	};
40f126890aSEmmanuel Vadot
41f126890aSEmmanuel Vadot	soc {
42f126890aSEmmanuel Vadot		ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
43f126890aSEmmanuel Vadot			  MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
44f126890aSEmmanuel Vadot			  MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
45f126890aSEmmanuel Vadot			  MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
46f126890aSEmmanuel Vadot
47f126890aSEmmanuel Vadot		internal-regs {
48f126890aSEmmanuel Vadot
49f126890aSEmmanuel Vadot			/* RTC is provided by Seiko S-35390A below */
50f126890aSEmmanuel Vadot			rtc@10300 {
51f126890aSEmmanuel Vadot				status = "disabled";
52f126890aSEmmanuel Vadot			};
53f126890aSEmmanuel Vadot
54f126890aSEmmanuel Vadot			i2c@11000 {
55f126890aSEmmanuel Vadot				clock-frequency = <400000>;
56f126890aSEmmanuel Vadot				status = "okay";
57f126890aSEmmanuel Vadot
58f126890aSEmmanuel Vadot				s35390a: s35390a@30 {
59f126890aSEmmanuel Vadot					 compatible = "sii,s35390a";
60f126890aSEmmanuel Vadot					 reg = <0x30>;
61f126890aSEmmanuel Vadot				};
62f126890aSEmmanuel Vadot			};
63f126890aSEmmanuel Vadot
64f126890aSEmmanuel Vadot			/* Connected to a header on device's PCB. This
65f126890aSEmmanuel Vadot			 * provides the main console for the device.
66f126890aSEmmanuel Vadot			 *
67f126890aSEmmanuel Vadot			 * Warning: the device may not boot with a 3.3V
68f126890aSEmmanuel Vadot			 * USB-serial converter connected when the power
69f126890aSEmmanuel Vadot			 * button is pressed. The converter needs to be
70f126890aSEmmanuel Vadot			 * connected a few seconds after pressing the
71f126890aSEmmanuel Vadot			 * power button. This is possibly due to UART0_TXD
72f126890aSEmmanuel Vadot			 * pin being sampled at reset (bit 0 of SAR).
73f126890aSEmmanuel Vadot			 */
74f126890aSEmmanuel Vadot			serial@12000 {
75f126890aSEmmanuel Vadot				status = "okay";
76f126890aSEmmanuel Vadot			};
77f126890aSEmmanuel Vadot
78f126890aSEmmanuel Vadot			/* Connected to a Microchip PIC16F883 for power control */
79f126890aSEmmanuel Vadot			serial@12100 {
80f126890aSEmmanuel Vadot				status = "okay";
81f126890aSEmmanuel Vadot			};
82f126890aSEmmanuel Vadot
83f126890aSEmmanuel Vadot			poweroff@12100 {
84f126890aSEmmanuel Vadot				compatible = "synology,power-off";
85f126890aSEmmanuel Vadot				reg = <0x12100 0x100>;
86f126890aSEmmanuel Vadot				clocks = <&coreclk 0>;
87f126890aSEmmanuel Vadot			};
88f126890aSEmmanuel Vadot
89f126890aSEmmanuel Vadot			/* Front USB 2.0 port */
90f126890aSEmmanuel Vadot			usb@50000 {
91f126890aSEmmanuel Vadot				status = "okay";
92f126890aSEmmanuel Vadot			};
93f126890aSEmmanuel Vadot
94f126890aSEmmanuel Vadot			ethernet@70000 {
95f126890aSEmmanuel Vadot				status = "okay";
96f126890aSEmmanuel Vadot				pinctrl-0 = <&ge0_rgmii_pins>;
97f126890aSEmmanuel Vadot				pinctrl-names = "default";
98f126890aSEmmanuel Vadot				phy = <&phy1>;
99f126890aSEmmanuel Vadot				phy-mode = "rgmii-id";
100f126890aSEmmanuel Vadot			};
101f126890aSEmmanuel Vadot
102f126890aSEmmanuel Vadot			ethernet@74000 {
103f126890aSEmmanuel Vadot				pinctrl-0 = <&ge1_rgmii_pins>;
104f126890aSEmmanuel Vadot				pinctrl-names = "default";
105f126890aSEmmanuel Vadot				status = "okay";
106f126890aSEmmanuel Vadot				phy = <&phy0>;
107f126890aSEmmanuel Vadot				phy-mode = "rgmii-id";
108f126890aSEmmanuel Vadot			};
109f126890aSEmmanuel Vadot		};
110f126890aSEmmanuel Vadot	};
111f126890aSEmmanuel Vadot
112*aa1a8ff2SEmmanuel Vadot	sata1_regulator: sata1-regulator-1 {
113f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
114f126890aSEmmanuel Vadot		regulator-name = "SATA1 Power";
115f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
116f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
117f126890aSEmmanuel Vadot		startup-delay-us = <2000000>;
118f126890aSEmmanuel Vadot		enable-active-high;
119f126890aSEmmanuel Vadot		regulator-always-on;
120f126890aSEmmanuel Vadot		regulator-boot-on;
121f126890aSEmmanuel Vadot		gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
122*aa1a8ff2SEmmanuel Vadot		pinctrl-0 = <&sata1_pwr_pin>;
123*aa1a8ff2SEmmanuel Vadot		pinctrl-names = "default";
124f126890aSEmmanuel Vadot	};
125f126890aSEmmanuel Vadot
126*aa1a8ff2SEmmanuel Vadot	sata2_regulator: sata2-regulator-2 {
127f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
128f126890aSEmmanuel Vadot		regulator-name = "SATA2 Power";
129f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
130f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
131f126890aSEmmanuel Vadot		startup-delay-us = <4000000>;
132f126890aSEmmanuel Vadot		enable-active-high;
133f126890aSEmmanuel Vadot		regulator-always-on;
134f126890aSEmmanuel Vadot		regulator-boot-on;
135f126890aSEmmanuel Vadot		gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
136*aa1a8ff2SEmmanuel Vadot		pinctrl-0 = <&sata2_pwr_pin>;
137*aa1a8ff2SEmmanuel Vadot		pinctrl-names = "default";
138f126890aSEmmanuel Vadot	};
139f126890aSEmmanuel Vadot
140*aa1a8ff2SEmmanuel Vadot	sata3_regulator: sata3-regulator-3 {
141f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
142f126890aSEmmanuel Vadot		regulator-name = "SATA3 Power";
143f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
144f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
145f126890aSEmmanuel Vadot		startup-delay-us = <6000000>;
146f126890aSEmmanuel Vadot		enable-active-high;
147f126890aSEmmanuel Vadot		regulator-always-on;
148f126890aSEmmanuel Vadot		regulator-boot-on;
149f126890aSEmmanuel Vadot		gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
150*aa1a8ff2SEmmanuel Vadot		pinctrl-0 = <&sata3_pwr_pin>;
151*aa1a8ff2SEmmanuel Vadot		pinctrl-names = "default";
152f126890aSEmmanuel Vadot	};
153f126890aSEmmanuel Vadot
154*aa1a8ff2SEmmanuel Vadot	sata4_regulator: sata4-regulator-4 {
155f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
156f126890aSEmmanuel Vadot		regulator-name = "SATA4 Power";
157f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
158f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
159f126890aSEmmanuel Vadot		startup-delay-us = <8000000>;
160f126890aSEmmanuel Vadot		enable-active-high;
161f126890aSEmmanuel Vadot		regulator-always-on;
162f126890aSEmmanuel Vadot		regulator-boot-on;
163f126890aSEmmanuel Vadot		gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
164*aa1a8ff2SEmmanuel Vadot		pinctrl-0 = <&sata4_pwr_pin>;
165*aa1a8ff2SEmmanuel Vadot		pinctrl-names = "default";
166f126890aSEmmanuel Vadot	};
167f126890aSEmmanuel Vadot};
168f126890aSEmmanuel Vadot
169f126890aSEmmanuel Vadot&pciec {
170f126890aSEmmanuel Vadot	status = "okay";
171f126890aSEmmanuel Vadot
172f126890aSEmmanuel Vadot	/*
173f126890aSEmmanuel Vadot	 * Connected to Marvell 88SX7042 SATA-II controller
174f126890aSEmmanuel Vadot	 * handling the four disks.
175f126890aSEmmanuel Vadot	 */
176f126890aSEmmanuel Vadot	pcie@1,0 {
177f126890aSEmmanuel Vadot		/* Port 0, Lane 0 */
178f126890aSEmmanuel Vadot		status = "okay";
179f126890aSEmmanuel Vadot	};
180f126890aSEmmanuel Vadot
181f126890aSEmmanuel Vadot	/*
182f126890aSEmmanuel Vadot	 * Connected to EtronTech EJ168A XHCI controller
183f126890aSEmmanuel Vadot	 * providing the two rear USB 3.0 ports.
184f126890aSEmmanuel Vadot	 */
185f126890aSEmmanuel Vadot	pcie@5,0 {
186f126890aSEmmanuel Vadot		/* Port 1, Lane 0 */
187f126890aSEmmanuel Vadot		status = "okay";
188f126890aSEmmanuel Vadot	};
189f126890aSEmmanuel Vadot};
190f126890aSEmmanuel Vadot
191f126890aSEmmanuel Vadot
192f126890aSEmmanuel Vadot&mdio {
193f126890aSEmmanuel Vadot	phy0: ethernet-phy@0 { /* Marvell 88E1512 */
194f126890aSEmmanuel Vadot		reg = <0>;
195f126890aSEmmanuel Vadot	};
196f126890aSEmmanuel Vadot
197f126890aSEmmanuel Vadot	phy1: ethernet-phy@1 { /* Marvell 88E1512 */
198f126890aSEmmanuel Vadot		reg = <1>;
199f126890aSEmmanuel Vadot	};
200f126890aSEmmanuel Vadot};
201f126890aSEmmanuel Vadot
202f126890aSEmmanuel Vadot&pinctrl {
203f126890aSEmmanuel Vadot	sata1_pwr_pin: sata1-pwr-pin {
204f126890aSEmmanuel Vadot		marvell,pins = "mpp42";
205f126890aSEmmanuel Vadot		marvell,function = "gpio";
206f126890aSEmmanuel Vadot	};
207f126890aSEmmanuel Vadot
208f126890aSEmmanuel Vadot	sata2_pwr_pin: sata2-pwr-pin {
209f126890aSEmmanuel Vadot		marvell,pins = "mpp44";
210f126890aSEmmanuel Vadot		marvell,function = "gpio";
211f126890aSEmmanuel Vadot	};
212f126890aSEmmanuel Vadot
213f126890aSEmmanuel Vadot	sata3_pwr_pin: sata3-pwr-pin {
214f126890aSEmmanuel Vadot		marvell,pins = "mpp45";
215f126890aSEmmanuel Vadot		marvell,function = "gpio";
216f126890aSEmmanuel Vadot	};
217f126890aSEmmanuel Vadot
218f126890aSEmmanuel Vadot	sata4_pwr_pin: sata4-pwr-pin {
219f126890aSEmmanuel Vadot		marvell,pins = "mpp46";
220f126890aSEmmanuel Vadot		marvell,function = "gpio";
221f126890aSEmmanuel Vadot	};
222f126890aSEmmanuel Vadot
223f126890aSEmmanuel Vadot	sata1_pres_pin: sata1-pres-pin {
224f126890aSEmmanuel Vadot		marvell,pins = "mpp34";
225f126890aSEmmanuel Vadot		marvell,function = "gpio";
226f126890aSEmmanuel Vadot	};
227f126890aSEmmanuel Vadot
228f126890aSEmmanuel Vadot	sata2_pres_pin: sata2-pres-pin {
229f126890aSEmmanuel Vadot		marvell,pins = "mpp35";
230f126890aSEmmanuel Vadot		marvell,function = "gpio";
231f126890aSEmmanuel Vadot	};
232f126890aSEmmanuel Vadot
233f126890aSEmmanuel Vadot	sata3_pres_pin: sata3-pres-pin {
234f126890aSEmmanuel Vadot		marvell,pins = "mpp40";
235f126890aSEmmanuel Vadot		marvell,function = "gpio";
236f126890aSEmmanuel Vadot	};
237f126890aSEmmanuel Vadot
238f126890aSEmmanuel Vadot	sata4_pres_pin: sata4-pres-pin {
239f126890aSEmmanuel Vadot		marvell,pins = "mpp41";
240f126890aSEmmanuel Vadot		marvell,function = "gpio";
241f126890aSEmmanuel Vadot	};
242f126890aSEmmanuel Vadot
243f126890aSEmmanuel Vadot	syno_id_bit0_pin: syno-id-bit0-pin {
244f126890aSEmmanuel Vadot		marvell,pins = "mpp26";
245f126890aSEmmanuel Vadot		marvell,function = "gpio";
246f126890aSEmmanuel Vadot	};
247f126890aSEmmanuel Vadot
248f126890aSEmmanuel Vadot	syno_id_bit1_pin: syno-id-bit1-pin {
249f126890aSEmmanuel Vadot		marvell,pins = "mpp28";
250f126890aSEmmanuel Vadot		marvell,function = "gpio";
251f126890aSEmmanuel Vadot	};
252f126890aSEmmanuel Vadot
253f126890aSEmmanuel Vadot	syno_id_bit2_pin: syno-id-bit2-pin {
254f126890aSEmmanuel Vadot		marvell,pins = "mpp29";
255f126890aSEmmanuel Vadot		marvell,function = "gpio";
256f126890aSEmmanuel Vadot	};
257f126890aSEmmanuel Vadot
258f126890aSEmmanuel Vadot	fan1_alarm_pin: fan1-alarm-pin {
259f126890aSEmmanuel Vadot		marvell,pins = "mpp33";
260f126890aSEmmanuel Vadot		marvell,function = "gpio";
261f126890aSEmmanuel Vadot	};
262f126890aSEmmanuel Vadot
263f126890aSEmmanuel Vadot	fan2_alarm_pin: fan2-alarm-pin {
264f126890aSEmmanuel Vadot		marvell,pins = "mpp32";
265f126890aSEmmanuel Vadot		marvell,function = "gpio";
266f126890aSEmmanuel Vadot	};
267f126890aSEmmanuel Vadot};
268f126890aSEmmanuel Vadot
269f126890aSEmmanuel Vadot&spi0 {
270f126890aSEmmanuel Vadot	status = "okay";
271f126890aSEmmanuel Vadot
272f126890aSEmmanuel Vadot	flash@0 {
273f126890aSEmmanuel Vadot		#address-cells = <1>;
274f126890aSEmmanuel Vadot		#size-cells = <1>;
275f126890aSEmmanuel Vadot		compatible = "micron,n25q064", "jedec,spi-nor";
276f126890aSEmmanuel Vadot		reg = <0>; /* Chip select 0 */
277f126890aSEmmanuel Vadot		spi-max-frequency = <20000000>;
278f126890aSEmmanuel Vadot
279f126890aSEmmanuel Vadot		/*
280f126890aSEmmanuel Vadot		 * Warning!
281f126890aSEmmanuel Vadot		 *
282f126890aSEmmanuel Vadot		 * Synology u-boot uses its compiled-in environment
283f126890aSEmmanuel Vadot		 * and it seems Synology did not care to change u-boot
284f126890aSEmmanuel Vadot		 * default configuration in order to allow saving a
285f126890aSEmmanuel Vadot		 * modified environment at a sensible location. So,
286f126890aSEmmanuel Vadot		 * if you do a 'saveenv' under u-boot, your modified
287f126890aSEmmanuel Vadot		 * environment will be saved at 1MB after the start
288f126890aSEmmanuel Vadot		 * of the flash, i.e. in the middle of the uImage.
289f126890aSEmmanuel Vadot		 * For that reason, it is strongly advised not to
290f126890aSEmmanuel Vadot		 * change the default environment, unless you know
291f126890aSEmmanuel Vadot		 * what you are doing.
292f126890aSEmmanuel Vadot		 */
293f126890aSEmmanuel Vadot		partition@0 { /* u-boot */
294f126890aSEmmanuel Vadot			label = "RedBoot";
295f126890aSEmmanuel Vadot			reg = <0x00000000 0x000d0000>; /* 832KB */
296f126890aSEmmanuel Vadot		};
297f126890aSEmmanuel Vadot
298f126890aSEmmanuel Vadot		partition@c0000 { /* uImage */
299f126890aSEmmanuel Vadot			label = "zImage";
300f126890aSEmmanuel Vadot			reg = <0x000d0000 0x002d0000>; /* 2880KB */
301f126890aSEmmanuel Vadot		};
302f126890aSEmmanuel Vadot
303f126890aSEmmanuel Vadot		partition@3a0000 { /* uInitramfs */
304f126890aSEmmanuel Vadot			label = "rd.gz";
305f126890aSEmmanuel Vadot			reg = <0x003a0000 0x00430000>; /* 4250KB */
306f126890aSEmmanuel Vadot		};
307f126890aSEmmanuel Vadot
308f126890aSEmmanuel Vadot		partition@7d0000 { /* MAC address and serial number */
309f126890aSEmmanuel Vadot			label = "vendor";
310f126890aSEmmanuel Vadot			reg = <0x007d0000 0x00010000>; /* 64KB */
311f126890aSEmmanuel Vadot		};
312f126890aSEmmanuel Vadot
313f126890aSEmmanuel Vadot		partition@7e0000 {
314f126890aSEmmanuel Vadot			label = "RedBoot config";
315f126890aSEmmanuel Vadot			reg = <0x007e0000 0x00010000>; /* 64KB */
316f126890aSEmmanuel Vadot		};
317f126890aSEmmanuel Vadot
318f126890aSEmmanuel Vadot		partition@7f0000 {
319f126890aSEmmanuel Vadot			label = "FIS directory";
320f126890aSEmmanuel Vadot			reg = <0x007f0000 0x00010000>; /* 64KB */
321f126890aSEmmanuel Vadot		};
322f126890aSEmmanuel Vadot	};
323f126890aSEmmanuel Vadot};
324