Commit | Line | Data |
---|---|---|
a58d7334 WT |
1 | /* |
2 | * Device Tree file for Synology DS116 NAS | |
3 | * | |
4 | * Copyright (C) 2017 Willy Tarreau <w@1wt.eu> | |
5 | * | |
6 | * This file is dual-licensed: you can use it either under the terms | |
7 | * of the GPL or the X11 license, at your option. Note that this dual | |
8 | * licensing only applies to this file, and not this project as a | |
9 | * whole. | |
10 | * | |
11 | * a) This file is licensed under the terms of the GNU General Public | |
12 | * License version 2. This program is licensed "as is" without | |
13 | * any warranty of any kind, whether express or implied. | |
14 | * | |
15 | * Or, alternatively, | |
16 | * | |
17 | * b) Permission is hereby granted, free of charge, to any person | |
18 | * obtaining a copy of this software and associated documentation | |
19 | * files (the "Software"), to deal in the Software without | |
20 | * restriction, including without limitation the rights to use, | |
21 | * copy, modify, merge, publish, distribute, sublicense, and/or | |
22 | * sell copies of the Software, and to permit persons to whom the | |
23 | * Software is furnished to do so, subject to the following | |
24 | * conditions: | |
25 | * | |
26 | * The above copyright notice and this permission notice shall be | |
27 | * included in all copies or substantial portions of the Software. | |
28 | * | |
29 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
30 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |
31 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
32 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
33 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
34 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
35 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
36 | * OTHER DEALINGS IN THE SOFTWARE. | |
37 | */ | |
38 | ||
39 | /dts-v1/; | |
40 | #include "armada-385.dtsi" | |
41 | #include <dt-bindings/gpio/gpio.h> | |
42 | ||
43 | / { | |
44 | model = "Synology DS116"; | |
45 | compatible = "marvell,a385-gp", "marvell,armada385", "marvell,armada380"; | |
46 | ||
47 | chosen { | |
48 | stdout-path = "serial0:115200n8"; | |
49 | }; | |
50 | ||
51 | memory { | |
52 | device_type = "memory"; | |
53 | reg = <0x00000000 0x40000000>; /* 1 GB */ | |
54 | }; | |
55 | ||
56 | soc { | |
57 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 | |
58 | MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 | |
59 | MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 | |
60 | MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 | |
61 | MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>; | |
62 | ||
63 | internal-regs { | |
64 | i2c@11000 { | |
65 | pinctrl-names = "default"; | |
66 | pinctrl-0 = <&i2c0_pins>; | |
67 | status = "okay"; | |
68 | clock-frequency = <100000>; | |
69 | ||
70 | eeprom@57 { | |
71 | compatible = "atmel,24c64"; | |
72 | reg = <0x57>; | |
73 | }; | |
74 | }; | |
75 | ||
76 | serial@12000 { | |
77 | pinctrl-names = "default"; | |
78 | pinctrl-0 = <&uart0_pins>; | |
79 | status = "okay"; | |
80 | }; | |
81 | ||
82 | serial@12100 { | |
83 | /* A PIC16F1829 is connected to uart1 at 9600 bps, | |
84 | * and takes single-character orders : | |
85 | * "1" : power off // already handled by the poweroff node | |
86 | * "2" : short beep | |
87 | * "3" : long beep | |
88 | * "4" : turn the power LED ON | |
89 | * "5" : flash the power LED | |
90 | * "6" : turn the power LED OFF | |
91 | * "7" : turn the status LED OFF | |
92 | * "8" : turn the status LED ON | |
93 | * "9" : flash the status LED | |
94 | * "A" : flash the motherboard LED (D8) | |
95 | * "B" : turn the motherboard LED OFF | |
96 | * "C" : hard reset | |
97 | */ | |
98 | pinctrl-names = "default"; | |
99 | pinctrl-0 = <&uart1_pins>; | |
100 | status = "okay"; | |
101 | }; | |
102 | ||
103 | poweroff@12100 { | |
104 | compatible = "synology,power-off"; | |
105 | reg = <0x12100 0x100>; | |
106 | clocks = <&coreclk 0>; | |
107 | }; | |
108 | ||
109 | ethernet@70000 { | |
110 | pinctrl-names = "default"; | |
111 | phy = <&phy0>; | |
112 | phy-mode = "sgmii"; | |
113 | buffer-manager = <&bm>; | |
114 | bm,pool-long = <0>; | |
115 | status = "okay"; | |
116 | }; | |
117 | ||
118 | ||
119 | mdio@72004 { | |
120 | pinctrl-names = "default"; | |
121 | pinctrl-0 = <&mdio_pins>; | |
122 | ||
123 | phy0: ethernet-phy@1 { | |
124 | reg = <1>; | |
125 | }; | |
126 | }; | |
127 | ||
128 | sata@a8000 { | |
129 | pinctrl-names = "default"; | |
130 | pinctrl-0 = <&sata0_pins>; | |
131 | status = "okay"; | |
132 | #address-cells = <1>; | |
133 | #size-cells = <0>; | |
134 | ||
135 | sata0: sata-port@0 { | |
136 | reg = <0>; | |
137 | target-supply = <®_5v_sata0>; | |
138 | }; | |
139 | }; | |
140 | ||
141 | bm@c8000 { | |
142 | status = "okay"; | |
143 | }; | |
144 | ||
145 | usb3@f0000 { | |
146 | usb-phy = <&usb3_0_phy>; | |
147 | status = "okay"; | |
148 | }; | |
149 | ||
150 | usb3@f8000 { | |
151 | usb-phy = <&usb3_1_phy>; | |
152 | status = "okay"; | |
153 | }; | |
154 | }; | |
155 | ||
156 | bm-bppi { | |
157 | status = "okay"; | |
158 | }; | |
159 | ||
160 | gpio-fan { | |
161 | compatible = "gpio-fan"; | |
162 | gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>, | |
163 | <&gpio1 17 GPIO_ACTIVE_HIGH>, | |
164 | <&gpio1 16 GPIO_ACTIVE_HIGH>; | |
165 | gpio-fan,speed-map = < 0 0 | |
166 | 1500 1 | |
167 | 2500 2 | |
168 | 3000 3 | |
169 | 3400 4 | |
170 | 3700 5 | |
171 | 3900 6 | |
172 | 4000 7>; | |
173 | cooling-cells = <2>; | |
174 | }; | |
175 | ||
176 | gpio-leds { | |
177 | compatible = "gpio-leds"; | |
178 | ||
179 | /* The green part is on gpio0.20 which is also used by | |
180 | * sata0, and accesses to SATA disk 0 make it blink so it | |
181 | * doesn't need to be declared here. | |
182 | */ | |
183 | orange { | |
184 | gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; | |
185 | label = "ds116:orange:disk"; | |
186 | default-state = "off"; | |
187 | }; | |
188 | }; | |
189 | }; | |
190 | ||
191 | usb3_0_phy: usb3_0_phy { | |
192 | compatible = "usb-nop-xceiv"; | |
193 | vcc-supply = <®_usb3_0_vbus>; | |
44e5dced | 194 | #phy-cells = <0>; |
a58d7334 WT |
195 | }; |
196 | ||
197 | usb3_1_phy: usb3_1_phy { | |
198 | compatible = "usb-nop-xceiv"; | |
199 | vcc-supply = <®_usb3_1_vbus>; | |
44e5dced | 200 | #phy-cells = <0>; |
a58d7334 WT |
201 | }; |
202 | ||
203 | reg_usb3_0_vbus: usb3-vbus0 { | |
204 | compatible = "regulator-fixed"; | |
205 | regulator-name = "usb3-vbus0"; | |
206 | pinctrl-names = "default"; | |
207 | pinctrl-0 = <&xhci0_vbus_pins>; | |
208 | regulator-min-microvolt = <5000000>; | |
209 | regulator-max-microvolt = <5000000>; | |
210 | enable-active-high; | |
211 | gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>; | |
212 | }; | |
213 | ||
214 | reg_usb3_1_vbus: usb3-vbus1 { | |
215 | compatible = "regulator-fixed"; | |
216 | regulator-name = "usb3-vbus1"; | |
217 | pinctrl-names = "default"; | |
218 | pinctrl-0 = <&xhci1_vbus_pins>; | |
219 | regulator-min-microvolt = <5000000>; | |
220 | regulator-max-microvolt = <5000000>; | |
221 | enable-active-high; | |
222 | gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>; | |
223 | }; | |
224 | ||
225 | reg_sata0: pwr-sata0 { | |
226 | compatible = "regulator-fixed"; | |
227 | regulator-name = "pwr_en_sata0"; | |
228 | regulator-min-microvolt = <12000000>; | |
229 | regulator-max-microvolt = <12000000>; | |
230 | enable-active-high; | |
231 | regulator-boot-on; | |
232 | gpio = <&gpio0 15 GPIO_ACTIVE_HIGH>; | |
233 | }; | |
234 | ||
235 | reg_5v_sata0: v5-sata0 { | |
236 | compatible = "regulator-fixed"; | |
237 | regulator-name = "v5.0-sata0"; | |
238 | regulator-min-microvolt = <5000000>; | |
239 | regulator-max-microvolt = <5000000>; | |
240 | vin-supply = <®_sata0>; | |
241 | }; | |
242 | ||
243 | reg_12v_sata0: v12-sata0 { | |
244 | compatible = "regulator-fixed"; | |
245 | regulator-name = "v12.0-sata0"; | |
246 | regulator-min-microvolt = <12000000>; | |
247 | regulator-max-microvolt = <12000000>; | |
248 | vin-supply = <®_sata0>; | |
249 | }; | |
250 | }; | |
251 | ||
252 | &spi0 { | |
253 | pinctrl-names = "default"; | |
254 | pinctrl-0 = <&spi0_pins>; | |
255 | status = "okay"; | |
256 | ||
257 | spi-flash@0 { | |
258 | #address-cells = <1>; | |
259 | #size-cells = <1>; | |
260 | compatible = "macronix,mx25l6405d", "jedec,spi-nor"; | |
261 | reg = <0>; /* Chip select 0 */ | |
262 | spi-max-frequency = <50000000>; | |
263 | m25p,fast-read; | |
264 | ||
265 | /* Note: there is a redboot partition table despite u-boot | |
266 | * being used. The names presented here are the same as those | |
267 | * found in the FIS directory. There is also a small device | |
268 | * tree in the last 64kB of the RedBoot partition which is not | |
269 | * enumerated. The MAC address and the serial number are listed | |
270 | * in the "vendor" partition. | |
271 | */ | |
8dccafaa | 272 | partition@0 { |
a58d7334 WT |
273 | label = "RedBoot"; |
274 | reg = <0x00000000 0x000f0000>; | |
275 | read-only; | |
276 | }; | |
277 | ||
8dccafaa | 278 | partition@c0000 { |
a58d7334 WT |
279 | label = "zImage"; |
280 | reg = <0x000f0000 0x002d0000>; | |
281 | }; | |
282 | ||
8dccafaa | 283 | partition@390000 { |
a58d7334 WT |
284 | label = "rd.gz"; |
285 | reg = <0x003c0000 0x00410000>; | |
286 | }; | |
287 | ||
8dccafaa | 288 | partition@7d0000 { |
a58d7334 WT |
289 | label = "vendor"; |
290 | reg = <0x007d0000 0x00010000>; | |
291 | read-only; | |
292 | }; | |
293 | ||
8dccafaa | 294 | partition@7e0000 { |
a58d7334 WT |
295 | label = "RedBoot config"; |
296 | reg = <0x007e0000 0x00010000>; | |
297 | read-only; | |
298 | }; | |
299 | ||
8dccafaa | 300 | partition@7f0000 { |
a58d7334 WT |
301 | label = "FIS directory"; |
302 | reg = <0x007f0000 0x00010000>; | |
303 | read-only; | |
304 | }; | |
305 | }; | |
306 | }; | |
307 | ||
308 | &pinctrl { | |
309 | /* use only one pin for UART1, as mpp20 is used by sata0 */ | |
310 | uart1_pins: uart-pins-1 { | |
311 | marvell,pins = "mpp19"; | |
312 | marvell,function = "ua1"; | |
313 | }; | |
314 | ||
315 | xhci0_vbus_pins: xhci0_vbus_pins { | |
316 | marvell,pins = "mpp58"; | |
317 | marvell,function = "gpio"; | |
318 | }; | |
319 | xhci1_vbus_pins: xhci1_vbus_pins { | |
320 | marvell,pins = "mpp59"; | |
321 | marvell,function = "gpio"; | |
322 | }; | |
323 | }; |