mvebu: LS421DE: make cosmetics changes in dts file
[openwrt/staging/wigyori.git] / target / linux / mvebu / files / arch / arm / boot / dts / 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 = <0x3 0x10 0x1 0x1991>, /* LED function */
270 <0x3 0x11 0x1 0x4401>, /* LED polarity */
271 <0x3 0x12 0x1 0x4905>; /* LED timer */
272 #thermal-sensor-cells = <0>;
273 };
274 };
275
276 &pciec {
277 status = "okay";
278 /* Connected to uPD720202 USB 3.0 Host */
279 pcie@1,0 {
280 status = "okay";
281 };
282 };
283
284 &pmsu {
285 pinctrl-0 = <&pmx_power_cpu>;
286 pinctrl-names = "default";
287 };
288
289 &rtc {
290 status = "disabled";
291 };
292
293 &sata {
294 nr-ports = <2>;
295 status = "okay";
296 #address-cells = <1>;
297 #size-cells = <0>;
298
299 hdd0_temp: sata-port@0 {
300 reg = <0>;
301 #thermal-sensor-cells = <0>;
302 };
303
304 hdd1_temp: sata-port@1 {
305 reg = <1>;
306 #thermal-sensor-cells = <0>;
307 };
308 };
309
310 &sdio {
311 pinctrl-0 = <&sdio_pins2>;
312 pinctrl-names = "default";
313 status = "okay";
314 /* No CD or WP GPIOs */
315 broken-cd;
316 };
317
318 &uart0 {
319 status = "okay";
320 };
321
322 &usb0 {
323 status = "okay";
324 };
325
326 &nand_controller {
327 status = "okay";
328
329 nand@0 {
330 reg = <0>;
331 label = "pxa3xx_nand-0";
332 nand-rb = <0>;
333 marvell,nand-keep-config;
334 nand-on-flash-bbt;
335 nand-ecc-strength = <4>;
336 nand-ecc-step-size = <512>;
337
338 partitions {
339 compatible = "fixed-partitions";
340 #address-cells = <1>;
341 #size-cells = <1>;
342
343 partition@0 {
344 label = "kernel";
345 reg = <0x00000000 0x02000000>; /* 32 MiB */
346 };
347
348 partition@2000000 {
349 label = "ubi";
350 reg = <0x02000000 0x1e000000>; /* 480 MiB */
351 };
352 };
353 };
354 };
355
356 &spi0 {
357 status = "okay";
358 pinctrl-0 = <&spi0_pins2>;
359 pinctrl-names = "default";
360
361 spi-flash@0 {
362 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
363 reg = <0>; /* Chip select 0 */
364 spi-max-frequency = <50000000>;
365
366 partitions {
367 compatible = "fixed-partitions";
368 #address-cells = <1>;
369 #size-cells = <1>;
370
371 partition@0 {
372 reg = <0x00000 0xf0000>; /* 960 KiB*/
373 label = "u-boot";
374 read-only;
375 };
376 partition@f0000 {
377 reg = <0xf0000 0x10000>; /* 64 KiB */
378 label = "u-boot-env";
379 };
380 };
381 };
382 };
383
384 &pinctrl {
385 pmx_power_cpu: pmx-power-cpu {
386 marvell,pins = "mpp4";
387 marvell,function = "vdd";
388 };
389
390 pmx_power_usb: pmx-power-usb {
391 marvell,pins = "mpp5";
392 marvell,function = "gpo";
393 };
394
395 pmx_power_hdd1: pmx-power-hdd1 {
396 marvell,pins = "mpp8";
397 marvell,function = "gpio";
398 };
399
400 pmx_power_hdd2: pmx-power-hdd2 {
401 marvell,pins = "mpp9";
402 marvell,function = "gpo";
403 };
404
405 pmx_fan_lock: pmx-fan-lock {
406 marvell,pins = "mpp10";
407 marvell,function = "gpio";
408 };
409
410 pmx_hdd_present: pmx-hdd-present {
411 marvell,pins = "mpp11", "mpp12";
412 marvell,function = "gpio";
413 };
414
415 pmx_fan_high: pmx-fan-high {
416 marvell,pins = "mpp13";
417 marvell,function = "gpio";
418 };
419
420 pmx_fan_low: pmx-fan-low {
421 marvell,pins = "mpp14";
422 marvell,function = "gpio";
423 };
424
425 pmx_buttons: pmx-buttons {
426 marvell,pins = "mpp15", "mpp16";
427 marvell,function = "gpio";
428 };
429
430 pmx_leds1: pmx-leds {
431 marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
432 marvell,function = "gpo";
433 };
434
435 pmx_leds2: pmx-leds {
436 marvell,pins = "mpp55", "mpp57", "mpp62";
437 marvell,function = "gpio";
438 };
439 };