blob: 82a0373f7fb116e6f450ac11943830846dcc216b [file] [log] [blame]
Tony Dinh6aebc1a2023-02-09 14:00:03 -08001// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Device Tree file for Synology DS116 NAS
4 *
5 * Copyright (C) 2017 Willy Tarreau <w@1wt.eu>
6 */
7
8/dts-v1/;
9#include "armada-385.dtsi"
10#include <dt-bindings/gpio/gpio.h>
11
12/ {
13 model = "Synology DS116";
14 compatible = "marvell,a385-gp", "marvell,armada385", "marvell,armada380";
15
16 chosen {
17 stdout-path = "serial0:115200n8";
18 };
19
20 memory {
21 device_type = "memory";
22 reg = <0x00000000 0x40000000>; /* 1 GB */
23 };
24
25 soc {
26 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
27 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
28 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
29 MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
30 MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
31
32 internal-regs {
33 i2c@11000 {
34 pinctrl-names = "default";
35 pinctrl-0 = <&i2c0_pins>;
36 status = "okay";
37 clock-frequency = <100000>;
38
39 eeprom@57 {
40 compatible = "atmel,24c64";
41 reg = <0x57>;
42 };
43 };
44
45 serial@12000 {
46 pinctrl-names = "default";
47 pinctrl-0 = <&uart0_pins>;
48 status = "okay";
49 };
50
51 serial@12100 {
52 /* A PIC16F1829 is connected to uart1 at 9600 bps,
53 * and takes single-character orders :
54 * "1" : power off // already handled by the poweroff node
55 * "2" : short beep
56 * "3" : long beep
57 * "4" : turn the power LED ON
58 * "5" : flash the power LED
59 * "6" : turn the power LED OFF
60 * "7" : turn the status LED OFF
61 * "8" : turn the status LED ON
62 * "9" : flash the status LED
63 * "A" : flash the motherboard LED (D8)
64 * "B" : turn the motherboard LED OFF
65 * "C" : hard reset
66 */
67 pinctrl-names = "default";
68 pinctrl-0 = <&uart1_pins>;
69 status = "okay";
70 };
71
72 poweroff@12100 {
73 compatible = "synology,power-off";
74 reg = <0x12100 0x100>;
75 clocks = <&coreclk 0>;
76 };
77
78 ethernet@70000 {
79 pinctrl-names = "default";
80 phy = <&phy0>;
81 phy-mode = "sgmii";
82 buffer-manager = <&bm>;
83 bm,pool-long = <0>;
84 status = "okay";
85 };
86
87 mdio@72004 {
88 pinctrl-names = "default";
89 pinctrl-0 = <&mdio_pins>;
90
91 phy0: ethernet-phy@1 {
92 reg = <1>;
93 };
94 };
95
96 sata@a8000 {
97 pinctrl-names = "default";
98 pinctrl-0 = <&sata0_pins>;
99 status = "okay";
100 #address-cells = <1>;
101 #size-cells = <0>;
102
103 sata0: sata-port@0 {
104 reg = <0>;
105 target-supply = <&reg_5v_sata0>;
106 };
107 };
108
109 bm@c8000 {
110 status = "okay";
111 };
112
113 usb3@f0000 {
114 usb-phy = <&usb3_0_phy>;
115 status = "okay";
116 };
117
118 usb3@f8000 {
119 usb-phy = <&usb3_1_phy>;
120 status = "okay";
121 };
122 };
123
124 bm-bppi {
125 status = "okay";
126 };
127
128 gpio-fan {
129 compatible = "gpio-fan";
130 gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>,
131 <&gpio1 17 GPIO_ACTIVE_HIGH>,
132 <&gpio1 16 GPIO_ACTIVE_HIGH>;
133 gpio-fan,speed-map = < 0 0
134 1500 1
135 2500 2
136 3000 3
137 3400 4
138 3700 5
139 3900 6
140 4000 7>;
141 #cooling-cells = <2>;
142 };
143
144 gpio-leds {
145 compatible = "gpio-leds";
146
147 /* The green part is on gpio0.20 which is also used by
148 * sata0, and accesses to SATA disk 0 make it blink so it
149 * doesn't need to be declared here.
150 */
151 orange {
152 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
153 label = "ds116:orange:disk";
154 default-state = "off";
155 };
156 };
157 };
158
159 usb3_0_phy: usb3_0_phy {
160 compatible = "usb-nop-xceiv";
161 vcc-supply = <&reg_usb3_0_vbus>;
162 #phy-cells = <0>;
163 };
164
165 usb3_1_phy: usb3_1_phy {
166 compatible = "usb-nop-xceiv";
167 vcc-supply = <&reg_usb3_1_vbus>;
168 #phy-cells = <0>;
169 };
170
171 reg_usb3_0_vbus: usb3-vbus0 {
172 compatible = "regulator-fixed";
173 regulator-name = "usb3-vbus0";
174 pinctrl-names = "default";
175 pinctrl-0 = <&xhci0_vbus_pins>;
176 regulator-min-microvolt = <5000000>;
177 regulator-max-microvolt = <5000000>;
178 enable-active-high;
179 gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
180 };
181
182 reg_usb3_1_vbus: usb3-vbus1 {
183 compatible = "regulator-fixed";
184 regulator-name = "usb3-vbus1";
185 pinctrl-names = "default";
186 pinctrl-0 = <&xhci1_vbus_pins>;
187 regulator-min-microvolt = <5000000>;
188 regulator-max-microvolt = <5000000>;
189 enable-active-high;
190 gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
191 };
192
193 reg_sata0: pwr-sata0 {
194 compatible = "regulator-fixed";
195 regulator-name = "pwr_en_sata0";
196 regulator-min-microvolt = <12000000>;
197 regulator-max-microvolt = <12000000>;
198 enable-active-high;
199 regulator-boot-on;
200 gpio = <&gpio0 15 GPIO_ACTIVE_HIGH>;
201 };
202
203 reg_5v_sata0: v5-sata0 {
204 compatible = "regulator-fixed";
205 regulator-name = "v5.0-sata0";
206 regulator-min-microvolt = <5000000>;
207 regulator-max-microvolt = <5000000>;
208 vin-supply = <&reg_sata0>;
209 };
210
211 reg_12v_sata0: v12-sata0 {
212 compatible = "regulator-fixed";
213 regulator-name = "v12.0-sata0";
214 regulator-min-microvolt = <12000000>;
215 regulator-max-microvolt = <12000000>;
216 vin-supply = <&reg_sata0>;
217 };
218};
219
220&spi0 {
221 pinctrl-names = "default";
222 pinctrl-0 = <&spi0_pins>;
223 status = "okay";
224
225 spi-flash@0 {
226 #address-cells = <1>;
227 #size-cells = <1>;
228 compatible = "macronix,mx25l6405d", "jedec,spi-nor";
229 reg = <0>; /* Chip select 0 */
230 spi-max-frequency = <50000000>;
231 m25p,fast-read;
232
233 /* Note: there is a redboot partition table despite u-boot
234 * being used. The names presented here are the same as those
235 * found in the FIS directory. There is also a small device
236 * tree in the last 64kB of the RedBoot partition which is not
237 * enumerated. The MAC address and the serial number are listed
238 * in the "vendor" partition.
239 */
240 partition@0 {
241 label = "RedBoot";
242 reg = <0x00000000 0x000f0000>;
243 read-only;
244 };
245
246 partition@c0000 {
247 label = "zImage";
248 reg = <0x000f0000 0x002d0000>;
249 };
250
251 partition@390000 {
252 label = "rd.gz";
253 reg = <0x003c0000 0x00410000>;
254 };
255
256 partition@7d0000 {
257 label = "vendor";
258 reg = <0x007d0000 0x00010000>;
259 read-only;
260 };
261
262 partition@7e0000 {
263 label = "RedBoot config";
264 reg = <0x007e0000 0x00010000>;
265 read-only;
266 };
267
268 partition@7f0000 {
269 label = "FIS directory";
270 reg = <0x007f0000 0x00010000>;
271 read-only;
272 };
273 };
274};
275
276&pinctrl {
277 /* use only one pin for UART1, as mpp20 is used by sata0 */
278 uart1_pins: uart-pins-1 {
279 marvell,pins = "mpp19";
280 marvell,function = "ua1";
281 };
282
283 xhci0_vbus_pins: xhci0_vbus_pins {
284 marvell,pins = "mpp58";
285 marvell,function = "gpio";
286 };
287 xhci1_vbus_pins: xhci1_vbus_pins {
288 marvell,pins = "mpp59";
289 marvell,function = "gpio";
290 };
291};