1 // SPDX-License-Identifier: (GPL-2.0+ 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>
16 model = "Buffalo LinkStation LS421DE";
17 compatible = "buffalo,ls421de", "marvell,armada370", "marvell,armada-370-xp";
21 led-failsafe = &led_failsafe;
22 led-running = &led_power;
23 led-upgrade = &led_upgrade;
27 bootargs = "console=ttyS0,115200 earlyprintk noinitrd rootfstype=squashfs";
28 stdout-path = "serial0:115200n8";
29 append-rootblock = "nullparameter="; /* override the bootloader args */
33 device_type = "memory";
34 reg = <0x00000000 0x20000000>; /* 512 MB */
38 ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
39 MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
40 MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
44 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH
45 &gpio0 14 GPIO_ACTIVE_HIGH>;
46 alarm-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
50 compatible = "gpio-keys";
53 pinctrl-0 = <&pmx_hdd_present &pmx_buttons>;
54 pinctrl-names = "default";
57 label = "HDD1 Present";
58 linux,code = <KEY_PROG1>;
59 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
63 label = "HDD2 Present";
64 linux,code = <KEY_PROG2>;
65 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
70 label = "Power Switch";
71 linux,code = <KEY_POWER>;
72 linux,input-type = <EV_SW>;
73 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
77 label = "Function Button";
78 linux,code = <KEY_OPTION>;
79 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
84 compatible = "gpio-leds";
85 pinctrl-names = "default";
86 pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
89 label = "ls421de:red:system";
90 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
93 led_power: power_white {
94 label = "ls421de:white:power";
95 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
99 led_failsafe: power_red {
100 label = "ls421de:red:power";
101 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
104 led_upgrade: power_orange {
105 label = "ls421de:orange:power";
106 gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
109 led_boot: system_white {
110 label = "ls421de:white:system";
111 gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
115 label = "ls421de:red:hdd1";
116 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
117 default-state = "off";
118 linux,default-trigger = "disk-activity";
122 label = "ls421de:red:hdd2";
123 gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
124 default-state = "off";
125 linux,default-trigger = "disk-activity";
130 compatible = "simple-bus";
131 #address-cells = <1>;
133 pinctrl-0 = <&pmx_power_usb &pmx_power_hdd1 &pmx_power_hdd2>;
135 pinctrl-names = "default";
137 usb_v5_regulator: usb-v5-regulator {
138 compatible = "regulator-fixed";
139 regulator-name = "USB";
140 regulator-min-microvolt = <5000000>;
141 regulator-max-microvolt = <5000000>;
145 gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
148 ata1_regulator: ata1-regulator {
149 compatible = "regulator-fixed";
151 regulator-name = "HDD1";
152 regulator-min-microvolt = <12000000>;
153 regulator-max-microvolt = <12000000>;
154 startup-delay-us = <2000000>;
158 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
161 ata2_regulator: ata2-regulator {
162 compatible = "regulator-fixed";
164 regulator-name = "HDD2";
165 regulator-min-microvolt = <12000000>;
166 regulator-max-microvolt = <12000000>;
167 startup-delay-us = <4000000>;
171 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
175 /* FIXME: this driver needs to be aware of the LED2 eth phy use,
176 which must be set to off state before shutting down the machine */
178 compatible = "restart-poweroff";
183 pinctrl-0 = <&ge1_rgmii_pins>;
184 pinctrl-names = "default";
187 phy-mode = "rgmii-id";
191 clock-frequency = <100000>;
194 rs5c372a: rs5c372a@32 {
195 compatible = "ricoh,rs5c372a";
201 pinctrl-0 = <&mdio_pins>;
202 pinctrl-names = "default";
204 phy0: ethernet-phy@0 { /* Marvell 88E1518 */
206 /* LED2 is used to inform uBoot if the power-switch was slided
207 to the "off" position, and then power off the machine.
208 Page 0x3, Register 0x10, bit 8:
209 0x800: LED2 off, power off the machine
210 0x900: LED2 on, boot the machine */
211 marvell,reg-init = <0x3 0x10 0x1 0x1991>, /* LED Function */
212 <0x3 0x11 0x1 0x4401>, /* LED polarity */
213 <0x3 0x12 0x1 0x4905>; /* LED Timer */
219 /* Connected to uPD720202 USB 3.0 Host */
226 pinctrl-0 = <&pmx_power_cpu>;
227 pinctrl-names = "default";
240 pinctrl-0 = <&sdio_pins2>;
241 pinctrl-names = "default";
243 /* No CD or WP GPIOs */
260 label = "pxa3xx_nand-0";
262 marvell,nand-keep-config;
264 nand-ecc-strength = <4>;
265 nand-ecc-step-size = <512>;
268 compatible = "fixed-partitions";
269 #address-cells = <1>;
274 reg = <0x00000000 0x02000000>; /* 32 MiB */
279 reg = <0x02000000 0x1e000000>; /* 480 MiB */
287 pinctrl-0 = <&spi0_pins2>;
288 pinctrl-names = "default";
291 #address-cells = <1>;
293 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
294 reg = <0>; /* Chip select 0 */
295 spi-max-frequency = <50000000>;
298 compatible = "fixed-partitions";
299 #address-cells = <1>;
303 reg = <0x00000 0xf0000>; /* 960 KiB*/
308 reg = <0xf0000 0x10000>; /* 64 KiB */
309 label = "u-boot-env";
316 pmx_power_cpu: pmx-power-cpu {
317 marvell,pins = "mpp4";
318 marvell,function = "vdd";
320 pmx_power_usb: pmx-power-usb {
321 marvell,pins = "mpp5";
322 marvell,function = "gpo";
324 pmx_power_hdd1: pmx-power-hdd1 {
325 marvell,pins = "mpp8";
326 marvell,function = "gpio";
328 pmx_power_hdd2: pmx-power-hdd2 {
329 marvell,pins = "mpp9";
330 marvell,function = "gpo";
332 pmx_fan_lock: pmx-fan-lock {
333 marvell,pins = "mpp10";
334 marvell,function = "gpio";
336 pmx_hdd_present: pmx-hdd-present {
337 marvell,pins = "mpp11", "mpp12";
338 marvell,function = "gpio";
340 pmx_fan_high: pmx-fan-high {
341 marvell,pins = "mpp13";
342 marvell,function = "gpio";
344 pmx_fan_low: pmx-fan-low {
345 marvell,pins = "mpp14";
346 marvell,function = "gpio";
348 pmx_buttons: pmx-buttons {
349 marvell,pins = "mpp15", "mpp16";
350 marvell,function = "gpio";
352 pmx_leds1: pmx-leds {
353 marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
354 marvell,function = "gpo";
356 pmx_leds2: pmx-leds {
357 marvell,pins = "mpp55", "mpp57", "mpp62";
358 marvell,function = "gpio";