mvebu: 6.6: adjust 32 bit ARM DTS path
[openwrt/openwrt.git] / target / linux / mvebu / files-6.6 / arch / arm / boot / dts / marvell / armada-370-buffalo-ls421de.dts
1 // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
2 /*
3 * Device Tree file for Buffalo LinkStation LS421DE
4 *
5 * Copyright (C) 2020 Daniel González Cabanelas <dgcbueu@gmail.com>
6 */
7
8 /dts-v1/;
9
10 #include "armada-370.dtsi"
11 #include "mvebu-linkstation-fan.dtsi"
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/input/input.h>
14 #include <dt-bindings/thermal/thermal.h>
15
16 / {
17 model = "Buffalo LinkStation LS421DE";
18 compatible = "buffalo,ls421de", "marvell,armada370", "marvell,armada-370-xp";
19
20 aliases {
21 led-boot = &led_boot;
22 led-failsafe = &led_failsafe;
23 led-running = &led_power;
24 led-upgrade = &led_upgrade;
25 };
26
27 chosen {
28 bootargs = "earlycon";
29 stdout-path = "serial0:115200n8";
30 append-rootblock = "nullparameter="; /* override the bootloader args */
31 };
32
33 memory {
34 device_type = "memory";
35 reg = <0x00000000 0x20000000>; /* 512 MB */
36 };
37
38 soc {
39 ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
40 MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
41 MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
42 };
43
44 system_fan: gpio_fan {
45 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH
46 &gpio0 14 GPIO_ACTIVE_HIGH>;
47 alarm-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
48
49 #cooling-cells = <2>;
50 };
51
52 thermal-zones {
53 hdd-thermal {
54 polling-delay = <20000>;
55 polling-delay-passive = <2000>;
56
57 thermal-sensors = <&hdd0_temp>; /* only one drivetemp sensor is supported */
58
59 trips {
60 hdd_alert1: trip1 {
61 temperature = <36000>;
62 hysteresis = <2000>;
63 type = "active";
64 };
65 hdd_alert2: trip2 {
66 temperature = <44000>;
67 hysteresis = <2000>;
68 type = "active";
69 };
70 hdd_alert3: trip3 {
71 temperature = <52000>;
72 hysteresis = <2000>;
73 type = "passive";
74 };
75 hdd_crit: trip4 {
76 temperature = <60000>;
77 hysteresis = <2000>;
78 type = "critical";
79 };
80 };
81
82 cooling-maps {
83 map1 {
84 trip = <&hdd_alert1>;
85 cooling-device = <&system_fan THERMAL_NO_LIMIT 1>;
86 };
87 map2 {
88 trip = <&hdd_alert2>;
89 cooling-device = <&system_fan 2 2>;
90 };
91 map3 {
92 trip = <&hdd_alert3>;
93 cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>;
94 };
95 };
96 };
97
98 ethphy-thermal {
99 polling-delay = <20000>;
100 polling-delay-passive = <2000>;
101
102 thermal-sensors = <&ethphy0>;
103
104 trips {
105 ethphy_alert1: trip1 {
106 temperature = <65000>;
107 hysteresis = <4000>;
108 type = "passive";
109 };
110
111 ethphy_crit: trip2 {
112 temperature = <100000>;
113 hysteresis = <2000>;
114 type = "critical";
115 };
116 };
117
118 cooling-maps {
119 map1 {
120 trip = <&ethphy_alert1>;
121 cooling-device = <&system_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
122 };
123
124 };
125 };
126 };
127
128 gpio_keys {
129 compatible = "gpio-keys";
130 pinctrl-0 = <&pmx_buttons>;
131 pinctrl-names = "default";
132
133 power {
134 label = "Power Switch";
135 linux,code = <KEY_POWER>;
136 linux,input-type = <EV_SW>;
137 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
138 };
139
140 function {
141 label = "Function Button";
142 linux,code = <KEY_CONFIG>;
143 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
144 };
145 };
146
147 gpio_leds {
148 compatible = "gpio-leds";
149 pinctrl-names = "default";
150 pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
151
152 system_red {
153 label = "ls421de:red:system";
154 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
155 };
156
157 led_power: power_white {
158 label = "ls421de:white:power";
159 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
160 default-state = "on";
161 };
162
163 led_failsafe: power_red {
164 label = "ls421de:red:power";
165 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
166 };
167
168 led_upgrade: power_orange {
169 label = "ls421de:orange:power";
170 gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
171 };
172
173 led_boot: system_white {
174 label = "ls421de:white:system";
175 gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
176 };
177
178 hdd1_red {
179 label = "ls421de:red:hdd1";
180 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
181 linux,default-trigger = "ata1";
182 };
183
184 hdd2_red {
185 label = "ls421de:red:hdd2";
186 gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
187 linux,default-trigger = "ata2";
188 };
189 };
190
191 regulators {
192 compatible = "simple-bus";
193 #address-cells = <1>;
194 #size-cells = <0>;
195 pinctrl-0 = <&pmx_power_usb &pmx_power_hdd1 &pmx_power_hdd2>;
196 pinctrl-names = "default";
197
198 usb_power: regulator@0 {
199 compatible = "regulator-fixed";
200 reg = <0>;
201 regulator-name = "USB";
202 regulator-min-microvolt = <5000000>;
203 regulator-max-microvolt = <5000000>;
204 enable-active-high;
205 regulator-always-on;
206 regulator-boot-on;
207 gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
208 };
209
210 sata1_power: regulator@1 {
211 compatible = "regulator-fixed";
212 reg = <1>;
213 regulator-name = "HDD1";
214 regulator-min-microvolt = <12000000>;
215 regulator-max-microvolt = <12000000>;
216 startup-delay-us = <2000000>;
217 enable-active-high;
218 regulator-always-on;
219 regulator-boot-on;
220 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
221 };
222
223 sata2_power: regulator@2 {
224 compatible = "regulator-fixed";
225 reg = <2>;
226 regulator-name = "HDD2";
227 regulator-min-microvolt = <12000000>;
228 regulator-max-microvolt = <12000000>;
229 startup-delay-us = <4000000>;
230 enable-active-high;
231 regulator-always-on;
232 regulator-boot-on;
233 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
234 };
235 };
236 };
237
238 &coherencyfab {
239 broken-idle;
240 };
241
242 &eth1 {
243 pinctrl-0 = <&ge1_rgmii_pins>;
244 pinctrl-names = "default";
245 status = "okay";
246 phy-handle = <&ethphy0>;
247 phy-connection-type = "rgmii-id";
248 };
249
250 &i2c0 {
251 pinctrl-0 = <&i2c0_pins>;
252 pinctrl-names = "default";
253 clock-frequency = <100000>;
254 status = "okay";
255
256 rs5c372a: rs5c372a@32 {
257 compatible = "ricoh,rs5c372a";
258 reg = <0x32>;
259 wakeup-source;
260 };
261 };
262
263 &mdio {
264 pinctrl-0 = <&mdio_pins>;
265 pinctrl-names = "default";
266
267 ethphy0: ethernet-phy@0 { /* Marvell 88E1518 */
268 reg = <0>;
269 marvell,reg-init = <0x2 0x10 0xffff 0x0006>, /* disable CLK125 */
270 <0x3 0x10 0x0000 0x1991>, /* LED function */
271 <0x3 0x11 0x0000 0x4401>, /* LED polarity */
272 <0x3 0x12 0x0000 0x4905>; /* LED timer */
273 #thermal-sensor-cells = <0>;
274 };
275 };
276
277 &pciec {
278 status = "okay";
279 pinctrl-0 = <&pmx_pcie>;
280 pinctrl-names = "default";
281
282 /* Connected to uPD720202 USB 3.0 Host */
283 pcie@1,0 {
284 status = "okay";
285 };
286 };
287
288 &pmsu {
289 pinctrl-0 = <&pmx_power_cpu>;
290 pinctrl-names = "default";
291 };
292
293 &rtc {
294 status = "disabled";
295 };
296
297 &sata {
298 nr-ports = <2>;
299 status = "okay";
300 #address-cells = <1>;
301 #size-cells = <0>;
302
303 hdd0_temp: sata-port@0 {
304 reg = <0>;
305 #thermal-sensor-cells = <0>;
306 };
307
308 hdd1_temp: sata-port@1 {
309 reg = <1>;
310 #thermal-sensor-cells = <0>;
311 };
312 };
313
314 &sdio {
315 pinctrl-0 = <&sdio_pins2>;
316 pinctrl-names = "default";
317 status = "okay";
318 /* No CD or WP GPIOs */
319 broken-cd;
320 };
321
322 &uart0 {
323 status = "okay";
324 };
325
326 &usb0 {
327 status = "okay";
328 };
329
330 &nand_controller {
331 status = "okay";
332
333 nand@0 {
334 reg = <0>;
335 label = "pxa3xx_nand-0";
336 nand-rb = <0>;
337 marvell,nand-keep-config;
338 nand-on-flash-bbt;
339 nand-ecc-strength = <4>;
340 nand-ecc-step-size = <512>;
341
342 partitions {
343 compatible = "fixed-partitions";
344 #address-cells = <1>;
345 #size-cells = <1>;
346
347 partition@0 {
348 label = "kernel";
349 reg = <0x00000000 0x02000000>; /* 32 MiB */
350 };
351
352 partition@2000000 {
353 label = "ubi";
354 reg = <0x02000000 0x1e000000>; /* 480 MiB */
355 };
356 };
357 };
358 };
359
360 &spi0 {
361 status = "okay";
362 pinctrl-0 = <&spi0_pins2>;
363 pinctrl-names = "default";
364
365 spi-flash@0 {
366 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
367 reg = <0>; /* Chip select 0 */
368 spi-max-frequency = <50000000>;
369
370 partitions {
371 compatible = "fixed-partitions";
372 #address-cells = <1>;
373 #size-cells = <1>;
374
375 partition@0 {
376 reg = <0x00000 0xf0000>; /* 960 KiB*/
377 label = "u-boot";
378 read-only;
379 };
380 partition@f0000 {
381 reg = <0xf0000 0x10000>; /* 64 KiB */
382 label = "u-boot-env";
383 };
384 };
385 };
386 };
387
388 &pinctrl {
389 pmx_power_cpu: pmx-power-cpu {
390 marvell,pins = "mpp4";
391 marvell,function = "vdd";
392 };
393
394 pmx_power_usb: pmx-power-usb {
395 marvell,pins = "mpp5";
396 marvell,function = "gpo";
397 };
398
399 pmx_power_hdd1: pmx-power-hdd1 {
400 marvell,pins = "mpp8";
401 marvell,function = "gpio";
402 };
403
404 pmx_power_hdd2: pmx-power-hdd2 {
405 marvell,pins = "mpp9";
406 marvell,function = "gpo";
407 };
408
409 pmx_fan_lock: pmx-fan-lock {
410 marvell,pins = "mpp10";
411 marvell,function = "gpio";
412 };
413
414 pmx_hdd_present: pmx-hdd-present {
415 marvell,pins = "mpp11", "mpp12";
416 marvell,function = "gpio";
417 };
418
419 pmx_fan_high: pmx-fan-high {
420 marvell,pins = "mpp13";
421 marvell,function = "gpio";
422 };
423
424 pmx_fan_low: pmx-fan-low {
425 marvell,pins = "mpp14";
426 marvell,function = "gpio";
427 };
428
429 pmx_buttons: pmx-buttons {
430 marvell,pins = "mpp15", "mpp16";
431 marvell,function = "gpio";
432 };
433
434 pmx_leds1: pmx-leds {
435 marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
436 marvell,function = "gpo";
437 };
438
439 pmx_leds2: pmx-leds {
440 marvell,pins = "mpp55", "mpp57", "mpp62";
441 marvell,function = "gpio";
442 };
443
444 pmx_pcie: pmx-pcie {
445 marvell,pins = "mpp56", "mpp60";
446 marvell,function = "pcie";
447 };
448 };