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