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 = "earlycon";
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 pinctrl-0 = <&pmx_buttons>;
131 pinctrl-names = "default";
134 label = "Power Switch";
135 linux,code = <KEY_POWER>;
136 linux,input-type = <EV_SW>;
137 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
141 label = "Function Button";
142 linux,code = <KEY_CONFIG>;
143 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
148 compatible = "gpio-leds";
149 pinctrl-names = "default";
150 pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
153 label = "ls421de:red:system";
154 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
157 led_power: power_white {
158 label = "ls421de:white:power";
159 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
160 default-state = "on";
163 led_failsafe: power_red {
164 label = "ls421de:red:power";
165 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
168 led_upgrade: power_orange {
169 label = "ls421de:orange:power";
170 gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
173 led_boot: system_white {
174 label = "ls421de:white:system";
175 gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
179 label = "ls421de:red:hdd1";
180 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
181 linux,default-trigger = "ata1";
185 label = "ls421de:red:hdd2";
186 gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
187 linux,default-trigger = "ata2";
192 compatible = "simple-bus";
193 #address-cells = <1>;
195 pinctrl-0 = <&pmx_power_usb &pmx_power_hdd1 &pmx_power_hdd2>;
196 pinctrl-names = "default";
198 usb_power: regulator@0 {
199 compatible = "regulator-fixed";
201 regulator-name = "USB";
202 regulator-min-microvolt = <5000000>;
203 regulator-max-microvolt = <5000000>;
207 gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
210 sata1_power: regulator@1 {
211 compatible = "regulator-fixed";
213 regulator-name = "HDD1";
214 regulator-min-microvolt = <12000000>;
215 regulator-max-microvolt = <12000000>;
216 startup-delay-us = <2000000>;
220 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
223 sata2_power: regulator@2 {
224 compatible = "regulator-fixed";
226 regulator-name = "HDD2";
227 regulator-min-microvolt = <12000000>;
228 regulator-max-microvolt = <12000000>;
229 startup-delay-us = <4000000>;
233 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
243 pinctrl-0 = <&ge1_rgmii_pins>;
244 pinctrl-names = "default";
246 phy-handle = <ðphy0>;
247 phy-connection-type = "rgmii-id";
251 pinctrl-0 = <&i2c0_pins>;
252 pinctrl-names = "default";
253 clock-frequency = <100000>;
256 rs5c372a: rs5c372a@32 {
257 compatible = "ricoh,rs5c372a";
264 pinctrl-0 = <&mdio_pins>;
265 pinctrl-names = "default";
267 ethphy0: ethernet-phy@0 { /* Marvell 88E1518 */
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>;
278 /* Connected to uPD720202 USB 3.0 Host */
285 pinctrl-0 = <&pmx_power_cpu>;
286 pinctrl-names = "default";
296 #address-cells = <1>;
299 hdd0_temp: sata-port@0 {
301 #thermal-sensor-cells = <0>;
304 hdd1_temp: sata-port@1 {
306 #thermal-sensor-cells = <0>;
311 pinctrl-0 = <&sdio_pins2>;
312 pinctrl-names = "default";
314 /* No CD or WP GPIOs */
331 label = "pxa3xx_nand-0";
333 marvell,nand-keep-config;
335 nand-ecc-strength = <4>;
336 nand-ecc-step-size = <512>;
339 compatible = "fixed-partitions";
340 #address-cells = <1>;
345 reg = <0x00000000 0x02000000>; /* 32 MiB */
350 reg = <0x02000000 0x1e000000>; /* 480 MiB */
358 pinctrl-0 = <&spi0_pins2>;
359 pinctrl-names = "default";
362 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
363 reg = <0>; /* Chip select 0 */
364 spi-max-frequency = <50000000>;
367 compatible = "fixed-partitions";
368 #address-cells = <1>;
372 reg = <0x00000 0xf0000>; /* 960 KiB*/
377 reg = <0xf0000 0x10000>; /* 64 KiB */
378 label = "u-boot-env";
385 pmx_power_cpu: pmx-power-cpu {
386 marvell,pins = "mpp4";
387 marvell,function = "vdd";
390 pmx_power_usb: pmx-power-usb {
391 marvell,pins = "mpp5";
392 marvell,function = "gpo";
395 pmx_power_hdd1: pmx-power-hdd1 {
396 marvell,pins = "mpp8";
397 marvell,function = "gpio";
400 pmx_power_hdd2: pmx-power-hdd2 {
401 marvell,pins = "mpp9";
402 marvell,function = "gpo";
405 pmx_fan_lock: pmx-fan-lock {
406 marvell,pins = "mpp10";
407 marvell,function = "gpio";
410 pmx_hdd_present: pmx-hdd-present {
411 marvell,pins = "mpp11", "mpp12";
412 marvell,function = "gpio";
415 pmx_fan_high: pmx-fan-high {
416 marvell,pins = "mpp13";
417 marvell,function = "gpio";
420 pmx_fan_low: pmx-fan-low {
421 marvell,pins = "mpp14";
422 marvell,function = "gpio";
425 pmx_buttons: pmx-buttons {
426 marvell,pins = "mpp15", "mpp16";
427 marvell,function = "gpio";
430 pmx_leds1: pmx-leds {
431 marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
432 marvell,function = "gpo";
435 pmx_leds2: pmx-leds {
436 marvell,pins = "mpp55", "mpp57", "mpp62";
437 marvell,function = "gpio";