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 };
49
50 gpio-keys {
51 compatible = "gpio-keys";
52 pinctrl-0 = <
53 &backup_button_pin
54 &power_button_pin
55 &reset_button_pin>;
56 pinctrl-names = "default";
57
58 power-button {
59 label = "Power Button";
60 linux,code = <KEY_POWER>;
61 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
62 };
63
64 backup-button {
65 label = "Backup Button";
66 linux,code = <KEY_COPY>;
67 gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
68 };
69
70 reset-button {
71 label = "Reset Button";
72 linux,code = <KEY_RESTART>;
73 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
74 };
75 };
76
77 gpio-leds {
78 compatible = "gpio-leds";
79 pinctrl-0 = <
80 &sata_l_amber_pin
81 &sata_r_amber_pin
82 &backup_led_pin
83 /* Ensure these are managed by hardware */
84 &sata_l_white_pin
85 &sata_r_white_pin>;
86
87 pinctrl-names = "default";
88
89 sata-r-amber-pin {
90 label = "dns327l:amber:sata-r";
91 gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
92 default-state = "keep";
93 };
94
95 sata-l-amber-pin {
96 label = "dns327l:amber:sata-l";
97 gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
98 default-state = "keep";
99 };
100
101 backup-led-pin {
102 label = "dns327l:white:usb";
103 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
104 default-state = "keep";
105 };
106 };
107
108 regulators {
109 compatible = "simple-bus";
110 #address-cells = <1>;
111 #size-cells = <0>;
112
113 usb_power: regulator@1 {
114 compatible = "regulator-fixed";
115 reg = <1>;
116 pinctrl-0 = <&xhci_pwr_pin>;
117 pinctrl-names = "default";
118 regulator-name = "USB3.0 Port Power";
119 regulator-min-microvolt = <5000000>;
120 regulator-max-microvolt = <5000000>;
121 enable-active-high;
122 regulator-boot-on;
123 regulator-always-on;
124 gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
125 };
126
127 sata_r_power: regulator@2 {
128 compatible = "regulator-fixed";
129 reg = <2>;
130 pinctrl-0 = <&sata_r_pwr_pin>;
131 pinctrl-names = "default";
132 regulator-name = "SATA-R Power";
133 regulator-min-microvolt = <5000000>;
134 regulator-max-microvolt = <5000000>;
135 startup-delay-us = <2000000>;
136 enable-active-high;
137 regulator-always-on;
138 regulator-boot-on;
139 gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
140 };
141
142 sata_l_power: regulator@3 {
143 compatible = "regulator-fixed";
144 reg = <3>;
145 pinctrl-0 = <&sata_l_pwr_pin>;
146 pinctrl-names = "default";
147 regulator-name = "SATA-L Power";
148 regulator-min-microvolt = <5000000>;
149 regulator-max-microvolt = <5000000>;
150 startup-delay-us = <4000000>;
151 enable-active-high;
152 regulator-always-on;
153 regulator-boot-on;
154 gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
155 };
156 };
157};
158
159&pciec {
160 status = "okay";
161
162 pcie@1,0 {
163 /* Port 0, Lane 0 */
164 status = "okay";
165 };
166
167 pcie@2,0 {
168 /* Port 1, Lane 0 */
169 status = "okay";
170 };
171};
172
173&pinctrl {
174 sata_l_white_pin: sata-l-white-pin {
175 marvell,pins = "mpp57";
176 marvell,function = "sata0";
177 };
178
179 sata_r_white_pin: sata-r-white-pin {
180 marvell,pins = "mpp55";
181 marvell,function = "sata1";
182 };
183
184 sata_r_amber_pin: sata-r-amber-pin {
185 marvell,pins = "mpp52";
186 marvell,function = "gpio";
187 };
188
189 sata_l_amber_pin: sata-l-amber-pin {
190 marvell,pins = "mpp53";
191 marvell,function = "gpio";
192 };
193
194 backup_led_pin: backup-led-pin {
195 marvell,pins = "mpp61";
196 marvell,function = "gpo";
197 };
198
199 xhci_pwr_pin: xhci-pwr-pin {
200 marvell,pins = "mpp13";
201 marvell,function = "gpio";
202 };
203
204 sata_r_pwr_pin: sata-r-pwr-pin {
205 marvell,pins = "mpp54";
206 marvell,function = "gpio";
207 };
208
209 sata_l_pwr_pin: sata-l-pwr-pin {
210 marvell,pins = "mpp56";
211 marvell,function = "gpio";
212 };
213
214 uart1_pins: uart1-pins {
215 marvell,pins = "mpp60", "mpp61";
216 marvell,function = "uart1";
217 };
218
219 power_button_pin: power-button-pin {
220 marvell,pins = "mpp65";
221 marvell,function = "gpio";
222 };
223
224 backup_button_pin: backup-button-pin {
225 marvell,pins = "mpp63";
226 marvell,function = "gpio";
227 };
228
229 reset_button_pin: reset-button-pin {
230 marvell,pins = "mpp64";
231 marvell,function = "gpio";
232 };
233};
234
235/* Serial console */
236&uart0 {
237 status = "okay";
238};
239
240/* Connected to Weltrend MCU */
241&uart1 {
242 pinctrl-0 = <&uart1_pins>;
243 pinctrl-names = "default";
244 status = "okay";
245};
246
247&mdio {
248 phy0: ethernet-phy@0 { /* Marvell 88E1318 */
249 reg = <0>;
250 marvell,reg-init = <0x2 0x19 0x0 0x0077>,
251 <0x2 0x18 0x0 0x5747>;
252 };
253};
254
255ð1 {
256 phy = <&phy0>;
257 phy-mode = "rgmii-id";
258 status = "okay";
259};
260
261&i2c0 {
262 compatible = "marvell,mv64xxx-i2c";
263 clock-frequency = <100000>;
264 status = "okay";
265};
266
267&nand_controller {
268 status = "okay";
269
270 nand@0 {
271 reg = <0>;
272 label = "pxa3xx_nand-0";
273 nand-rb = <0>;
274 marvell,nand-keep-config;
275 nand-on-flash-bbt;
276 nand-ecc-strength = <4>;
277 nand-ecc-step-size = <512>;
278
279 partitions {
280 compatible = "fixed-partitions";
281 #address-cells = <1>;
282 #size-cells = <1>;
283
284 partition@0 {
285 label = "u-boot";
286 /* 1.0 MiB */
287 reg = <0x0000000 0x100000>;
288 read-only;
289 };
290
291 partition@100000 {
292 label = "u-boot-env";
293 /* 128 KiB */
294 reg = <0x100000 0x20000>;
295 read-only;
296 };
297
298 partition@120000 {
299 label = "uImage";
300 /* 7 MiB */
301 reg = <0x120000 0x700000>;
302 };
303
304 partition@820000 {
305 label = "ubifs";
306 /* ~ 84 MiB */
307 reg = <0x820000 0x54e0000>;
308 };
309
310 /* Hardcoded into stock bootloader */
311 partition@5d00000 {
312 label = "failsafe-uImage";
313 /* 5 MiB */
314 reg = <0x5d00000 0x500000>;
315 };
316
317 partition@6200000 {
318 label = "failsafe-fs";
319 /* 29 MiB */
320 reg = <0x6200000 0x1d00000>;
321 };
322
323 partition@7f00000 {
324 label = "bbt";
325 /* 1 MiB for BBT */
326 reg = <0x7f00000 0x100000>;
327 };
328 };
329 };
330};
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 MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
74
75 pcie-controller {
76 status = "okay";
77
78 pcie@1,0 {
79 /* Port 0, Lane 0 */
80 status = "okay";
81 };
82
83 pcie@2,0 {
84 /* Port 1, Lane 0 */
85 status = "okay";
86 };
87 };
88
89 internal-regs {
90 sata@a0000 {
91 nr-ports = <2>;
92 status = "okay";
93 };
94
95 usb@50000 {
96 status = "okay";
97 };
98
99 nand@d0000 {
100 status = "okay";
101 num-cs = <1>;
102 marvell,nand-keep-config;
103 marvell,nand-enable-arbiter;
104 nand-on-flash-bbt;
105 nand-ecc-strength = <4>;
106 nand-ecc-step-size = <512>;
107
108 partition@0 {
109 label = "u-boot";
110 /* 1.0 MiB */
111 reg = <0x0000000 0x100000>;
112 read-only;
113 };
114
115 partition@100000 {
116 label = "u-boot-env";
117 /* 128 KiB */
118 reg = <0x100000 0x20000>;
119 read-only;
120 };
121
122 partition@120000 {
123 label = "uImage";
124 /* 7 MiB */
125 reg = <0x120000 0x700000>;
126 };
127
128 partition@820000 {
129 label = "ubifs";
130 /* ~ 84 MiB */
131 reg = <0x820000 0x54e0000>;
132 };
133
134 /* Hardcoded into stock bootloader */
135 partition@5d00000 {
136 label = "failsafe-uImage";
137 /* 5 MiB */
138 reg = <0x5d00000 0x500000>;
139 };
140
141 partition@6200000 {
142 label = "failsafe-fs";
143 /* 29 MiB */
144 reg = <0x6200000 0x1d00000>;
145 };
146
147 partition@7f00000 {
148 label = "bbt";
149 /* 1 MiB for BBT */
150 reg = <0x7f00000 0x100000>;
151 };
152 };
153 };
154 };
155
156 gpio-keys {
157 compatible = "gpio-keys";
158 pinctrl-0 = <
159 &backup_button_pin
160 &power_button_pin
161 &reset_button_pin>;
162 pinctrl-names = "default";
163
164 power-button {
165 label = "Power Button";
166 linux,code = <KEY_POWER>;
167 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
168 };
169
170 backup-button {
171 label = "Backup Button";
172 linux,code = <KEY_COPY>;
173 gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
174 };
175
176 reset-button {
177 label = "Reset Button";
178 linux,code = <KEY_RESTART>;
179 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
180 };
181 };
182
183 gpio-leds {
184 compatible = "gpio-leds";
185 pinctrl-0 = <
186 &sata_l_amber_pin
187 &sata_r_amber_pin
188 &backup_led_pin
189 /* Ensure these are managed by hardware */
190 &sata_l_white_pin
191 &sata_r_white_pin>;
192
193 pinctrl-names = "default";
194
195 sata-r-amber-pin {
196 label = "dns327l:amber:sata-r";
197 gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
198 default-state = "keep";
199 };
200
201 sata-l-amber-pin {
202 label = "dns327l:amber:sata-l";
203 gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
204 default-state = "keep";
205 };
206
207 backup-led-pin {
208 label = "dns327l:white:usb";
209 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
210 default-state = "keep";
211 };
212 };
213
214 regulators {
215 compatible = "simple-bus";
216 #address-cells = <1>;
217 #size-cells = <0>;
218
219 usb_power: regulator@1 {
220 compatible = "regulator-fixed";
221 reg = <1>;
222 pinctrl-0 = <&xhci_pwr_pin>;
223 pinctrl-names = "default";
224 regulator-name = "USB3.0 Port Power";
225 regulator-min-microvolt = <5000000>;
226 regulator-max-microvolt = <5000000>;
227 enable-active-high;
228 regulator-boot-on;
229 regulator-always-on;
230 gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
231 };
232
233 sata_r_power: regulator@2 {
234 compatible = "regulator-fixed";
235 reg = <2>;
236 pinctrl-0 = <&sata_r_pwr_pin>;
237 pinctrl-names = "default";
238 regulator-name = "SATA-R Power";
239 regulator-min-microvolt = <5000000>;
240 regulator-max-microvolt = <5000000>;
241 startup-delay-us = <2000000>;
242 enable-active-high;
243 regulator-always-on;
244 regulator-boot-on;
245 gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
246 };
247
248 sata_l_power: regulator@3 {
249 compatible = "regulator-fixed";
250 reg = <3>;
251 pinctrl-0 = <&sata_l_pwr_pin>;
252 pinctrl-names = "default";
253 regulator-name = "SATA-L Power";
254 regulator-min-microvolt = <5000000>;
255 regulator-max-microvolt = <5000000>;
256 startup-delay-us = <4000000>;
257 enable-active-high;
258 regulator-always-on;
259 regulator-boot-on;
260 gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
261 };
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};