Commit | Line | Data |
---|---|---|
16b79921 AA |
1 | /* |
2 | * Device Tree file for D-Link DNS-327L | |
3 | * | |
4 | * Copyright (C) 2015, Andrew Andrianov <andrew@ncrmnt.org> | |
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 free software; you can redistribute it and/or | |
12 | * modify it under the terms of the GNU General Public License as | |
13 | * published by the Free Software Foundation; either version 2 of the | |
14 | * License, or (at your option) any later version. | |
15 | * | |
16 | * This file is distributed in the hope that it will be useful | |
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | * GNU General Public License for more details. | |
20 | * | |
21 | * Or, alternatively | |
22 | * | |
23 | * b) Permission is hereby granted, free of charge, to any person | |
24 | * obtaining a copy of this software and associated documentation | |
25 | * files (the "Software"), to deal in the Software without | |
26 | * restriction, including without limitation the rights to use | |
27 | * copy, modify, merge, publish, distribute, sublicense, and/or | |
28 | * sell copies of the Software, and to permit persons to whom the | |
29 | * Software is furnished to do so, subject to the following | |
30 | * conditions: | |
31 | * | |
32 | * The above copyright notice and this permission notice shall be | |
33 | * included in all copies or substantial portions of the Software. | |
34 | * | |
35 | * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND | |
36 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |
37 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
38 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
39 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY | |
40 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
41 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
42 | * OTHER DEALINGS IN THE SOFTWARE. | |
43 | */ | |
44 | ||
45 | /* Remaining unsolved: | |
46 | * There's still some unknown device on i2c address 0x13 | |
47 | */ | |
48 | ||
49 | /dts-v1/; | |
50 | ||
51 | #include <dt-bindings/input/input.h> | |
52 | #include <dt-bindings/gpio/gpio.h> | |
53 | #include "armada-370.dtsi" | |
54 | ||
55 | / { | |
56 | model = "D-Link DNS-327L"; | |
57 | compatible = "dlink,dns327l", | |
58 | "marvell,armada370", | |
59 | "marvell,armada-370-xp"; | |
60 | ||
61 | chosen { | |
62 | stdout-path = &uart0; | |
63 | }; | |
64 | ||
65 | memory { | |
66 | device_type = "memory"; | |
67 | reg = <0x00000000 0x20000000>; /* 512 MiB */ | |
68 | }; | |
69 | ||
70 | soc { | |
71 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 | |
72 | MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; | |
73 | ||
74 | pcie-controller { | |
75 | status = "okay"; | |
76 | ||
77 | pcie@1,0 { | |
78 | /* Port 0, Lane 0 */ | |
79 | status = "okay"; | |
80 | }; | |
81 | ||
82 | pcie@2,0 { | |
83 | /* Port 1, Lane 0 */ | |
84 | status = "okay"; | |
85 | }; | |
86 | }; | |
87 | ||
88 | internal-regs { | |
89 | sata@a0000 { | |
90 | nr-ports = <2>; | |
91 | status = "okay"; | |
92 | }; | |
93 | ||
94 | usb@50000 { | |
95 | status = "okay"; | |
96 | }; | |
97 | ||
98 | nand@d0000 { | |
99 | status = "okay"; | |
100 | num-cs = <1>; | |
101 | marvell,nand-keep-config; | |
102 | marvell,nand-enable-arbiter; | |
103 | nand-on-flash-bbt; | |
104 | nand-ecc-strength = <4>; | |
105 | nand-ecc-step-size = <512>; | |
106 | ||
107 | partition@0 { | |
108 | label = "u-boot"; | |
109 | /* 1.0 MiB */ | |
110 | reg = <0x0000000 0x100000>; | |
111 | read-only; | |
112 | }; | |
113 | ||
114 | partition@100000 { | |
115 | label = "u-boot-env"; | |
116 | /* 128 KiB */ | |
117 | reg = <0x100000 0x20000>; | |
118 | read-only; | |
119 | }; | |
120 | ||
121 | partition@120000 { | |
122 | label = "uImage"; | |
123 | /* 7 MiB */ | |
124 | reg = <0x120000 0x700000>; | |
125 | }; | |
126 | ||
127 | partition@820000 { | |
128 | label = "ubifs"; | |
129 | /* ~ 84 MiB */ | |
130 | reg = <0x820000 0x54e0000>; | |
131 | }; | |
132 | ||
133 | /* Hardcoded into stock bootloader */ | |
134 | partition@5d00000 { | |
135 | label = "failsafe-uImage"; | |
136 | /* 5 MiB */ | |
137 | reg = <0x5d00000 0x500000>; | |
138 | }; | |
139 | ||
140 | partition@6200000 { | |
141 | label = "failsafe-fs"; | |
142 | /* 29 MiB */ | |
143 | reg = <0x6200000 0x1d00000>; | |
144 | }; | |
145 | ||
146 | partition@7f00000 { | |
147 | label = "bbt"; | |
148 | /* 1 MiB for BBT */ | |
149 | reg = <0x7f00000 0x100000>; | |
150 | }; | |
151 | }; | |
152 | }; | |
153 | }; | |
154 | ||
155 | gpio-keys { | |
156 | compatible = "gpio-keys"; | |
157 | pinctrl-0 = < | |
158 | &backup_button_pin | |
159 | &power_button_pin | |
160 | &reset_button_pin>; | |
161 | pinctrl-names = "default"; | |
162 | ||
163 | power-button { | |
164 | label = "Power Button"; | |
165 | linux,code = <KEY_POWER>; | |
166 | gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; | |
167 | }; | |
168 | ||
169 | backup-button { | |
170 | label = "Backup Button"; | |
171 | linux,code = <KEY_COPY>; | |
172 | gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; | |
173 | }; | |
174 | ||
175 | reset-button { | |
176 | label = "Reset Button"; | |
177 | linux,code = <KEY_RESTART>; | |
178 | gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; | |
179 | }; | |
180 | }; | |
181 | ||
182 | gpio-leds { | |
183 | compatible = "gpio-leds"; | |
184 | pinctrl-0 = < | |
185 | &sata_l_amber_pin | |
186 | &sata_r_amber_pin | |
187 | &backup_led_pin | |
188 | /* Ensure these are managed by hardware */ | |
189 | &sata_l_white_pin | |
190 | &sata_r_white_pin>; | |
191 | ||
192 | pinctrl-names = "default"; | |
193 | ||
194 | sata-r-amber-pin { | |
195 | label = "dns327l:amber:sata-r"; | |
196 | gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>; | |
197 | default-state = "keep"; | |
198 | }; | |
199 | ||
200 | sata-l-amber-pin { | |
201 | label = "dns327l:amber:sata-l"; | |
202 | gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; | |
203 | default-state = "keep"; | |
204 | }; | |
205 | ||
206 | backup-led-pin { | |
207 | label = "dns327l:white:usb"; | |
208 | gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; | |
209 | default-state = "keep"; | |
210 | }; | |
211 | }; | |
212 | ||
213 | regulators { | |
214 | compatible = "simple-bus"; | |
215 | #address-cells = <1>; | |
216 | #size-cells = <0>; | |
217 | ||
218 | usb_power: regulator@1 { | |
219 | compatible = "regulator-fixed"; | |
220 | reg = <1>; | |
221 | pinctrl-0 = <&xhci_pwr_pin>; | |
222 | pinctrl-names = "default"; | |
223 | regulator-name = "USB3.0 Port Power"; | |
224 | regulator-min-microvolt = <5000000>; | |
225 | regulator-max-microvolt = <5000000>; | |
226 | enable-active-high; | |
227 | regulator-boot-on; | |
228 | regulator-always-on; | |
229 | gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>; | |
230 | }; | |
231 | ||
232 | sata_r_power: regulator@2 { | |
233 | compatible = "regulator-fixed"; | |
234 | reg = <2>; | |
235 | pinctrl-0 = <&sata_r_pwr_pin>; | |
236 | pinctrl-names = "default"; | |
237 | regulator-name = "SATA-R Power"; | |
238 | regulator-min-microvolt = <5000000>; | |
239 | regulator-max-microvolt = <5000000>; | |
240 | startup-delay-us = <2000000>; | |
241 | enable-active-high; | |
242 | regulator-always-on; | |
243 | regulator-boot-on; | |
244 | gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>; | |
245 | }; | |
246 | ||
247 | sata_l_power: regulator@3 { | |
248 | compatible = "regulator-fixed"; | |
249 | reg = <3>; | |
250 | pinctrl-0 = <&sata_l_pwr_pin>; | |
251 | pinctrl-names = "default"; | |
252 | regulator-name = "SATA-L Power"; | |
253 | regulator-min-microvolt = <5000000>; | |
254 | regulator-max-microvolt = <5000000>; | |
255 | startup-delay-us = <4000000>; | |
256 | enable-active-high; | |
257 | regulator-always-on; | |
258 | regulator-boot-on; | |
259 | gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; | |
260 | }; | |
261 | }; | |
262 | }; | |
263 | ||
264 | &pinctrl { | |
265 | sata_l_white_pin: sata-l-white-pin { | |
266 | marvell,pins = "mpp57"; | |
267 | marvell,function = "sata0"; | |
268 | }; | |
269 | ||
270 | sata_r_white_pin: sata-r-white-pin { | |
271 | marvell,pins = "mpp55"; | |
272 | marvell,function = "sata1"; | |
273 | }; | |
274 | ||
275 | sata_r_amber_pin: sata-r-amber-pin { | |
276 | marvell,pins = "mpp52"; | |
277 | marvell,function = "gpio"; | |
278 | }; | |
279 | ||
280 | sata_l_amber_pin: sata-l-amber-pin { | |
281 | marvell,pins = "mpp53"; | |
282 | marvell,function = "gpio"; | |
283 | }; | |
284 | ||
285 | backup_led_pin: backup-led-pin { | |
286 | marvell,pins = "mpp61"; | |
287 | marvell,function = "gpo"; | |
288 | }; | |
289 | ||
290 | xhci_pwr_pin: xhci-pwr-pin { | |
291 | marvell,pins = "mpp13"; | |
292 | marvell,function = "gpio"; | |
293 | }; | |
294 | ||
295 | sata_r_pwr_pin: sata-r-pwr-pin { | |
296 | marvell,pins = "mpp54"; | |
297 | marvell,function = "gpio"; | |
298 | }; | |
299 | ||
300 | sata_l_pwr_pin: sata-l-pwr-pin { | |
301 | marvell,pins = "mpp56"; | |
302 | marvell,function = "gpio"; | |
303 | }; | |
304 | ||
305 | uart1_pins: uart1-pins { | |
306 | marvell,pins = "mpp60", "mpp61"; | |
307 | marvell,function = "uart1"; | |
308 | }; | |
309 | ||
310 | power_button_pin: power-button-pin { | |
311 | marvell,pins = "mpp65"; | |
312 | marvell,function = "gpio"; | |
313 | }; | |
314 | ||
315 | backup_button_pin: backup-button-pin { | |
316 | marvell,pins = "mpp63"; | |
317 | marvell,function = "gpio"; | |
318 | }; | |
319 | ||
320 | reset_button_pin: reset-button-pin { | |
321 | marvell,pins = "mpp64"; | |
322 | marvell,function = "gpio"; | |
323 | }; | |
324 | }; | |
325 | ||
326 | /* Serial console */ | |
327 | &uart0 { | |
328 | status = "okay"; | |
329 | }; | |
330 | ||
331 | /* Connected to Weltrend MCU */ | |
332 | &uart1 { | |
333 | pinctrl-0 = <&uart1_pins>; | |
334 | pinctrl-names = "default"; | |
335 | status = "okay"; | |
336 | }; | |
337 | ||
338 | &mdio { | |
339 | phy0: ethernet-phy@0 { /* Marvell 88E1318 */ | |
340 | reg = <0>; | |
341 | marvell,reg-init = <0x0 0x16 0x0 0x0002>, | |
342 | <0x0 0x19 0x0 0x0077>, | |
343 | <0x0 0x18 0x0 0x5747>; | |
344 | }; | |
345 | }; | |
346 | ||
347 | ð1 { | |
348 | phy = <&phy0>; | |
349 | phy-mode = "rgmii-id"; | |
350 | status = "okay"; | |
351 | }; | |
352 | ||
353 | &i2c0 { | |
354 | compatible = "marvell,mv64xxx-i2c"; | |
355 | clock-frequency = <100000>; | |
356 | status = "okay"; | |
357 | }; |