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_buttons>;
54 pinctrl-names = "default";
57 label = "Power Switch";
58 linux,code = <KEY_POWER>;
59 linux,input-type = <EV_SW>;
60 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
64 label = "Function Button";
65 linux,code = <KEY_CONFIG>;
66 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
71 compatible = "gpio-leds";
72 pinctrl-names = "default";
73 pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
76 label = "ls421de:red:system";
77 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
80 led_power: power_white {
81 label = "ls421de:white:power";
82 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
86 led_failsafe: power_red {
87 label = "ls421de:red:power";
88 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
91 led_upgrade: power_orange {
92 label = "ls421de:orange:power";
93 gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
96 led_boot: system_white {
97 label = "ls421de:white:system";
98 gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
102 label = "ls421de:red:hdd1";
103 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
104 default-state = "off";
105 linux,default-trigger = "disk-activity";
109 label = "ls421de:red:hdd2";
110 gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
111 default-state = "off";
112 linux,default-trigger = "disk-activity";
117 compatible = "simple-bus";
118 #address-cells = <1>;
120 pinctrl-0 = <&pmx_power_usb &pmx_power_hdd1 &pmx_power_hdd2>;
121 pinctrl-names = "default";
123 usb_power: regulator@0 {
124 compatible = "regulator-fixed";
126 regulator-name = "USB";
127 regulator-min-microvolt = <5000000>;
128 regulator-max-microvolt = <5000000>;
132 gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
135 sata1_power: regulator@1 {
136 compatible = "regulator-fixed";
138 regulator-name = "HDD1";
139 regulator-min-microvolt = <12000000>;
140 regulator-max-microvolt = <12000000>;
141 startup-delay-us = <2000000>;
145 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
148 sata2_power: regulator@2 {
149 compatible = "regulator-fixed";
151 regulator-name = "HDD2";
152 regulator-min-microvolt = <12000000>;
153 regulator-max-microvolt = <12000000>;
154 startup-delay-us = <4000000>;
158 gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
162 /* FIXME: this driver needs to be aware of the LED2 eth phy use,
163 which must be set to off state before shutting down the machine */
165 compatible = "restart-poweroff";
170 pinctrl-0 = <&ge1_rgmii_pins>;
171 pinctrl-names = "default";
173 phy-handle = <ðphy0>;
174 phy-connection-type = "rgmii-id";
178 pinctrl-0 = <&i2c0_pins>;
179 pinctrl-names = "default";
180 clock-frequency = <100000>;
183 rs5c372a: rs5c372a@32 {
184 compatible = "ricoh,rs5c372a";
190 pinctrl-0 = <&mdio_pins>;
191 pinctrl-names = "default";
193 ethphy0: ethernet-phy@0 { /* Marvell 88E1518 */
196 * LED2 is used to inform, at restart time, if the power
197 * switch was slided to the "off" position.
198 * Page 0x3, Register 0x10, bits 8-11:
199 * 0x800: LED2 off, power off the machine
200 * 0x900: LED2 on, boot the machine
202 marvell,reg-init = <0x3 0x10 0x1 0x1991>, /* LED function */
203 <0x3 0x11 0x1 0x4401>, /* LED polarity */
204 <0x3 0x12 0x1 0x4905>; /* LED timer */
210 /* Connected to uPD720202 USB 3.0 Host */
217 pinctrl-0 = <&pmx_power_cpu>;
218 pinctrl-names = "default";
231 pinctrl-0 = <&sdio_pins2>;
232 pinctrl-names = "default";
234 /* No CD or WP GPIOs */
251 label = "pxa3xx_nand-0";
253 marvell,nand-keep-config;
255 nand-ecc-strength = <4>;
256 nand-ecc-step-size = <512>;
259 compatible = "fixed-partitions";
260 #address-cells = <1>;
265 reg = <0x00000000 0x02000000>; /* 32 MiB */
270 reg = <0x02000000 0x1e000000>; /* 480 MiB */
278 pinctrl-0 = <&spi0_pins2>;
279 pinctrl-names = "default";
282 #address-cells = <1>;
284 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
285 reg = <0>; /* Chip select 0 */
286 spi-max-frequency = <50000000>;
289 compatible = "fixed-partitions";
290 #address-cells = <1>;
294 reg = <0x00000 0xf0000>; /* 960 KiB*/
299 reg = <0xf0000 0x10000>; /* 64 KiB */
300 label = "u-boot-env";
307 pmx_power_cpu: pmx-power-cpu {
308 marvell,pins = "mpp4";
309 marvell,function = "vdd";
311 pmx_power_usb: pmx-power-usb {
312 marvell,pins = "mpp5";
313 marvell,function = "gpo";
315 pmx_power_hdd1: pmx-power-hdd1 {
316 marvell,pins = "mpp8";
317 marvell,function = "gpio";
319 pmx_power_hdd2: pmx-power-hdd2 {
320 marvell,pins = "mpp9";
321 marvell,function = "gpo";
323 pmx_fan_lock: pmx-fan-lock {
324 marvell,pins = "mpp10";
325 marvell,function = "gpio";
327 pmx_hdd_present: pmx-hdd-present {
328 marvell,pins = "mpp11", "mpp12";
329 marvell,function = "gpio";
331 pmx_fan_high: pmx-fan-high {
332 marvell,pins = "mpp13";
333 marvell,function = "gpio";
335 pmx_fan_low: pmx-fan-low {
336 marvell,pins = "mpp14";
337 marvell,function = "gpio";
339 pmx_buttons: pmx-buttons {
340 marvell,pins = "mpp15", "mpp16";
341 marvell,function = "gpio";
343 pmx_leds1: pmx-leds {
344 marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
345 marvell,function = "gpo";
347 pmx_leds2: pmx-leds {
348 marvell,pins = "mpp55", "mpp57", "mpp62";
349 marvell,function = "gpio";