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>, <&hdd1_temp>;
61 chassis_alert1: chassis-alert1 {
62 temperature = <36000>;
66 chassis_alert2: chassis-alert2 {
67 temperature = <46000>;
71 chassis_alert3: chassis-alert3 {
72 temperature = <56000>;
76 chassis_crit: chassis-crit {
77 temperature = <66000>;
85 trip = <&chassis_alert1>;
86 cooling-device = <&system_fan THERMAL_NO_LIMIT 1>;
89 trip = <&chassis_alert2>;
90 cooling-device = <&system_fan 2 2>;
93 trip = <&chassis_alert3>;
94 cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>;
101 compatible = "gpio-keys";
102 #address-cells = <1>;
104 pinctrl-0 = <&pmx_buttons>;
105 pinctrl-names = "default";
108 label = "Power Switch";
109 linux,code = <KEY_POWER>;
110 linux,input-type = <EV_SW>;
111 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
115 label = "Function Button";
116 linux,code = <KEY_CONFIG>;
117 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
122 compatible = "gpio-leds";
123 pinctrl-names = "default";
124 pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
127 label = "ls421de:red:system";
128 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
131 led_power: power_white {
132 label = "ls421de:white:power";
133 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
134 default-state = "on";
137 led_failsafe: power_red {
138 label = "ls421de:red:power";
139 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
142 led_upgrade: power_orange {
143 label = "ls421de:orange:power";
144 gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
147 led_boot: system_white {
148 label = "ls421de:white:system";
149 gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
153 label = "ls421de:red:hdd1";
154 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
155 default-state = "off";
156 linux,default-trigger = "disk-activity";
160 label = "ls421de:red:hdd2";
161 gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
162 default-state = "off";
163 linux,default-trigger = "disk-activity";
168 compatible = "simple-bus";
169 #address-cells = <1>;
171 pinctrl-0 = <&pmx_power_usb &pmx_power_hdd1 &pmx_power_hdd2>;
172 pinctrl-names = "default";
174 usb_power: regulator@0 {
175 compatible = "regulator-fixed";
177 regulator-name = "USB";
178 regulator-min-microvolt = <5000000>;
179 regulator-max-microvolt = <5000000>;
183 gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
186 sata1_power: regulator@1 {
187 compatible = "regulator-fixed";
189 regulator-name = "HDD1";
190 regulator-min-microvolt = <12000000>;
191 regulator-max-microvolt = <12000000>;
192 startup-delay-us = <2000000>;
196 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
199 sata2_power: regulator@2 {
200 compatible = "regulator-fixed";
202 regulator-name = "HDD2";
203 regulator-min-microvolt = <12000000>;
204 regulator-max-microvolt = <12000000>;
205 startup-delay-us = <4000000>;
209 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
215 pinctrl-0 = <&ge1_rgmii_pins>;
216 pinctrl-names = "default";
218 phy-handle = <ðphy0>;
219 phy-connection-type = "rgmii-id";
223 pinctrl-0 = <&i2c0_pins>;
224 pinctrl-names = "default";
225 clock-frequency = <100000>;
228 rs5c372a: rs5c372a@32 {
229 compatible = "ricoh,rs5c372a";
235 pinctrl-0 = <&mdio_pins>;
236 pinctrl-names = "default";
238 ethphy0: ethernet-phy@0 { /* Marvell 88E1518 */
240 marvell,reg-init = <0x3 0x10 0x1 0x1991>, /* LED function */
241 <0x3 0x11 0x1 0x4401>, /* LED polarity */
242 <0x3 0x12 0x1 0x4905>; /* LED timer */
248 /* Connected to uPD720202 USB 3.0 Host */
255 pinctrl-0 = <&pmx_power_cpu>;
256 pinctrl-names = "default";
266 #address-cells = <1>;
269 hdd0_temp: sata-port@0 {
271 #thermal-sensor-cells = <0>;
274 hdd1_temp: sata-port@1 {
276 #thermal-sensor-cells = <0>;
281 pinctrl-0 = <&sdio_pins2>;
282 pinctrl-names = "default";
284 /* No CD or WP GPIOs */
301 label = "pxa3xx_nand-0";
303 marvell,nand-keep-config;
305 nand-ecc-strength = <4>;
306 nand-ecc-step-size = <512>;
309 compatible = "fixed-partitions";
310 #address-cells = <1>;
315 reg = <0x00000000 0x02000000>; /* 32 MiB */
320 reg = <0x02000000 0x1e000000>; /* 480 MiB */
328 pinctrl-0 = <&spi0_pins2>;
329 pinctrl-names = "default";
332 #address-cells = <1>;
334 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
335 reg = <0>; /* Chip select 0 */
336 spi-max-frequency = <50000000>;
339 compatible = "fixed-partitions";
340 #address-cells = <1>;
344 reg = <0x00000 0xf0000>; /* 960 KiB*/
349 reg = <0xf0000 0x10000>; /* 64 KiB */
350 label = "u-boot-env";
357 pmx_power_cpu: pmx-power-cpu {
358 marvell,pins = "mpp4";
359 marvell,function = "vdd";
361 pmx_power_usb: pmx-power-usb {
362 marvell,pins = "mpp5";
363 marvell,function = "gpo";
365 pmx_power_hdd1: pmx-power-hdd1 {
366 marvell,pins = "mpp8";
367 marvell,function = "gpio";
369 pmx_power_hdd2: pmx-power-hdd2 {
370 marvell,pins = "mpp9";
371 marvell,function = "gpo";
373 pmx_fan_lock: pmx-fan-lock {
374 marvell,pins = "mpp10";
375 marvell,function = "gpio";
377 pmx_hdd_present: pmx-hdd-present {
378 marvell,pins = "mpp11", "mpp12";
379 marvell,function = "gpio";
381 pmx_fan_high: pmx-fan-high {
382 marvell,pins = "mpp13";
383 marvell,function = "gpio";
385 pmx_fan_low: pmx-fan-low {
386 marvell,pins = "mpp14";
387 marvell,function = "gpio";
389 pmx_buttons: pmx-buttons {
390 marvell,pins = "mpp15", "mpp16";
391 marvell,function = "gpio";
393 pmx_leds1: pmx-leds {
394 marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
395 marvell,function = "gpo";
397 pmx_leds2: pmx-leds {
398 marvell,pins = "mpp55", "mpp57", "mpp62";
399 marvell,function = "gpio";