1 // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
3 * Device Tree file for Buffalo LinkStation LS421DE
5 * Copyright (C) 2020 Daniel González Cabanelas <dgcbueu@gmail.com>
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>
17 model = "Buffalo LinkStation LS421DE";
18 compatible = "buffalo,ls421de", "marvell,armada370", "marvell,armada-370-xp";
22 led-failsafe = &led_failsafe;
23 led-running = &led_power;
24 led-upgrade = &led_upgrade;
28 bootargs = "console=ttyS0,115200 earlyprintk noinitrd rootfstype=squashfs";
29 stdout-path = "serial0:115200n8";
30 append-rootblock = "nullparameter="; /* override the bootloader args */
34 device_type = "memory";
35 reg = <0x00000000 0x20000000>; /* 512 MB */
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>;
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>;
54 polling-delay = <20000>;
55 polling-delay-passive = <2000>;
57 thermal-sensors = <&hdd0_temp>; /* only one drivetemp sensor is supported */
61 temperature = <36000>;
66 temperature = <44000>;
71 temperature = <52000>;
76 temperature = <60000>;
85 cooling-device = <&system_fan THERMAL_NO_LIMIT 1>;
89 cooling-device = <&system_fan 2 2>;
93 cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>;
99 polling-delay = <20000>;
100 polling-delay-passive = <2000>;
102 thermal-sensors = <ðphy0>;
105 ethphy_alert1: trip1 {
106 temperature = <65000>;
112 temperature = <100000>;
120 trip = <ðphy_alert1>;
121 cooling-device = <&system_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
129 compatible = "gpio-keys";
130 #address-cells = <1>;
132 pinctrl-0 = <&pmx_buttons>;
133 pinctrl-names = "default";
136 label = "Power Switch";
137 linux,code = <KEY_POWER>;
138 linux,input-type = <EV_SW>;
139 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
143 label = "Function Button";
144 linux,code = <KEY_CONFIG>;
145 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
150 compatible = "gpio-leds";
151 pinctrl-names = "default";
152 pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
155 label = "ls421de:red:system";
156 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
159 led_power: power_white {
160 label = "ls421de:white:power";
161 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
162 default-state = "on";
165 led_failsafe: power_red {
166 label = "ls421de:red:power";
167 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
170 led_upgrade: power_orange {
171 label = "ls421de:orange:power";
172 gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
175 led_boot: system_white {
176 label = "ls421de:white:system";
177 gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
181 label = "ls421de:red:hdd1";
182 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
183 linux,default-trigger = "ata1";
187 label = "ls421de:red:hdd2";
188 gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
189 linux,default-trigger = "ata2";
194 compatible = "simple-bus";
195 #address-cells = <1>;
197 pinctrl-0 = <&pmx_power_usb &pmx_power_hdd1 &pmx_power_hdd2>;
198 pinctrl-names = "default";
200 usb_power: regulator@0 {
201 compatible = "regulator-fixed";
203 regulator-name = "USB";
204 regulator-min-microvolt = <5000000>;
205 regulator-max-microvolt = <5000000>;
209 gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
212 sata1_power: regulator@1 {
213 compatible = "regulator-fixed";
215 regulator-name = "HDD1";
216 regulator-min-microvolt = <12000000>;
217 regulator-max-microvolt = <12000000>;
218 startup-delay-us = <2000000>;
222 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
225 sata2_power: regulator@2 {
226 compatible = "regulator-fixed";
228 regulator-name = "HDD2";
229 regulator-min-microvolt = <12000000>;
230 regulator-max-microvolt = <12000000>;
231 startup-delay-us = <4000000>;
235 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
245 pinctrl-0 = <&ge1_rgmii_pins>;
246 pinctrl-names = "default";
248 phy-handle = <ðphy0>;
249 phy-connection-type = "rgmii-id";
253 pinctrl-0 = <&i2c0_pins>;
254 pinctrl-names = "default";
255 clock-frequency = <100000>;
258 rs5c372a: rs5c372a@32 {
259 compatible = "ricoh,rs5c372a";
266 pinctrl-0 = <&mdio_pins>;
267 pinctrl-names = "default";
269 ethphy0: ethernet-phy@0 { /* Marvell 88E1518 */
271 marvell,reg-init = <0x3 0x10 0x1 0x1991>, /* LED function */
272 <0x3 0x11 0x1 0x4401>, /* LED polarity */
273 <0x3 0x12 0x1 0x4905>; /* LED timer */
274 #thermal-sensor-cells = <0>;
280 /* Connected to uPD720202 USB 3.0 Host */
287 pinctrl-0 = <&pmx_power_cpu>;
288 pinctrl-names = "default";
298 #address-cells = <1>;
301 hdd0_temp: sata-port@0 {
303 #thermal-sensor-cells = <0>;
306 hdd1_temp: sata-port@1 {
308 #thermal-sensor-cells = <0>;
313 pinctrl-0 = <&sdio_pins2>;
314 pinctrl-names = "default";
316 /* No CD or WP GPIOs */
333 label = "pxa3xx_nand-0";
335 marvell,nand-keep-config;
337 nand-ecc-strength = <4>;
338 nand-ecc-step-size = <512>;
341 compatible = "fixed-partitions";
342 #address-cells = <1>;
347 reg = <0x00000000 0x02000000>; /* 32 MiB */
352 reg = <0x02000000 0x1e000000>; /* 480 MiB */
360 pinctrl-0 = <&spi0_pins2>;
361 pinctrl-names = "default";
364 #address-cells = <1>;
366 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
367 reg = <0>; /* Chip select 0 */
368 spi-max-frequency = <50000000>;
371 compatible = "fixed-partitions";
372 #address-cells = <1>;
376 reg = <0x00000 0xf0000>; /* 960 KiB*/
381 reg = <0xf0000 0x10000>; /* 64 KiB */
382 label = "u-boot-env";
389 pmx_power_cpu: pmx-power-cpu {
390 marvell,pins = "mpp4";
391 marvell,function = "vdd";
393 pmx_power_usb: pmx-power-usb {
394 marvell,pins = "mpp5";
395 marvell,function = "gpo";
397 pmx_power_hdd1: pmx-power-hdd1 {
398 marvell,pins = "mpp8";
399 marvell,function = "gpio";
401 pmx_power_hdd2: pmx-power-hdd2 {
402 marvell,pins = "mpp9";
403 marvell,function = "gpo";
405 pmx_fan_lock: pmx-fan-lock {
406 marvell,pins = "mpp10";
407 marvell,function = "gpio";
409 pmx_hdd_present: pmx-hdd-present {
410 marvell,pins = "mpp11", "mpp12";
411 marvell,function = "gpio";
413 pmx_fan_high: pmx-fan-high {
414 marvell,pins = "mpp13";
415 marvell,function = "gpio";
417 pmx_fan_low: pmx-fan-low {
418 marvell,pins = "mpp14";
419 marvell,function = "gpio";
421 pmx_buttons: pmx-buttons {
422 marvell,pins = "mpp15", "mpp16";
423 marvell,function = "gpio";
425 pmx_leds1: pmx-leds {
426 marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
427 marvell,function = "gpo";
429 pmx_leds2: pmx-leds {
430 marvell,pins = "mpp55", "mpp57", "mpp62";
431 marvell,function = "gpio";