1 // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
3 * Device Tree file for Buffalo LinkStation LS220DE
5 * Copyright (C) 2023 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/leds/common.h>
15 #include <dt-bindings/thermal/thermal.h>
18 model = "Buffalo LinkStation LS220DE";
19 compatible = "buffalo,ls220de", "marvell,armada370", "marvell,armada-370-xp";
23 led-failsafe = &led_failsafe;
24 led-running = &led_power;
25 led-upgrade = &led_upgrade;
29 bootargs = "earlycon";
30 stdout-path = "serial0:115200n8";
31 append-rootblock = "nullparameter="; /* override the bootloader args */
35 device_type = "memory";
36 reg = <0x00000000 0x10000000>; /* 256 MB */
40 ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
41 MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
42 MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
45 system_fan: gpio_fan {
46 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH
47 &gpio0 14 GPIO_ACTIVE_HIGH>;
48 alarm-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
55 polling-delay = <20000>;
56 polling-delay-passive = <2000>;
58 thermal-sensors = <&hdd0_temp>; /* only one drivetemp sensor is supported */
62 temperature = <34000>;
67 temperature = <40000>;
72 temperature = <45000>;
77 temperature = <50000>;
82 temperature = <60000>;
91 cooling-device = <&system_fan THERMAL_NO_LIMIT 1>;
95 cooling-device = <&system_fan 2 2>;
99 cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>;
106 compatible = "gpio-keys";
107 pinctrl-0 = <&pmx_buttons>;
108 pinctrl-names = "default";
111 label = "Power Switch";
112 linux,code = <KEY_POWER>;
113 linux,input-type = <EV_SW>;
114 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
118 label = "Function Button";
119 linux,code = <KEY_CONFIG>;
120 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
125 compatible = "gpio-leds";
126 pinctrl-names = "default";
127 pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
130 function = LED_FUNCTION_INDICATOR;
131 color = <LED_COLOR_ID_RED>;
132 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
136 led_power: power_white {
137 function = LED_FUNCTION_POWER;
138 color = <LED_COLOR_ID_WHITE>;
139 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
140 default-state = "on";
143 led_failsafe: power_red {
144 function = LED_FUNCTION_POWER;
145 color = <LED_COLOR_ID_RED>;
146 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
149 led_upgrade: power_orange {
150 function = LED_FUNCTION_POWER;
151 color = <LED_COLOR_ID_AMBER>;
152 gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
155 led_boot: indicator_white {
156 function = LED_FUNCTION_INDICATOR;
157 color = <LED_COLOR_ID_WHITE>;
158 gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
162 function = LED_FUNCTION_DISK;
163 color = <LED_COLOR_ID_RED>;
164 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
165 linux,default-trigger = "ata1";
166 function-enumerator = <1>;
170 function = LED_FUNCTION_DISK;
171 color = <LED_COLOR_ID_RED>;
172 gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
173 linux,default-trigger = "ata2";
174 function-enumerator = <2>;
179 compatible = "simple-bus";
180 #address-cells = <1>;
182 pinctrl-0 = <&pmx_power_hdd1 &pmx_power_hdd2>;
183 pinctrl-names = "default";
185 sata1_power: regulator@1 {
186 compatible = "regulator-fixed";
188 regulator-name = "HDD1";
189 regulator-min-microvolt = <12000000>;
190 regulator-max-microvolt = <12000000>;
191 startup-delay-us = <2000000>;
195 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
198 sata2_power: regulator@2 {
199 compatible = "regulator-fixed";
201 regulator-name = "HDD2";
202 regulator-min-microvolt = <12000000>;
203 regulator-max-microvolt = <12000000>;
204 startup-delay-us = <4000000>;
208 gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>;
218 pinctrl-0 = <&ge1_rgmii_pins>;
219 pinctrl-names = "default";
221 phy-handle = <ðphy0>;
222 phy-connection-type = "rgmii-id";
226 pinctrl-0 = <&mdio_pins>;
227 pinctrl-names = "default";
229 ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */
231 marvell,reg-init = <0x3 0x10 0xf000 0x091A>, /* LED function */
232 <0x3 0x11 0x0000 0x4401>, /* LED polarity */
233 <0x3 0x12 0x0000 0x4905>; /* LED timer */
234 #thermal-sensor-cells = <0>;
243 label = "pxa3xx_nand-0";
245 marvell,nand-keep-config;
247 nand-ecc-strength = <4>;
248 nand-ecc-step-size = <512>;
251 compatible = "fixed-partitions";
252 #address-cells = <1>;
256 label = "ubi_kernel";
257 reg = <0x00000000 0x02000000>; /* 32 MiB */
262 reg = <0x02000000 0x1df00000>; /* 479 MiB */
271 #address-cells = <1>;
274 hdd0_temp: sata-port@0 {
276 #thermal-sensor-cells = <0>;
279 hdd1_temp: sata-port@1 {
281 #thermal-sensor-cells = <0>;
287 pinctrl-0 = <&spi0_pins2>;
288 pinctrl-names = "default";
291 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
293 spi-max-frequency = <50000000>;
296 compatible = "fixed-partitions";
297 #address-cells = <1>;
301 reg = <0x00000 0xf0000>; /* 960 KiB*/
306 reg = <0xf0000 0x10000>; /* 64 KiB */
307 label = "u-boot-env";
314 pinctrl-0 = <&pmx_power_cpu>;
315 pinctrl-names = "default";
327 pmx_power_hdd2: pmx-power-hdd2 {
328 marvell,pins = "mpp2";
329 marvell,function = "gpio";
332 pmx_power_cpu: pmx-power-cpu {
333 marvell,pins = "mpp4";
334 marvell,function = "vdd";
337 pmx_power_hdd1: pmx-power-hdd1 {
338 marvell,pins = "mpp8";
339 marvell,function = "gpio";
342 pmx_fan_lock: pmx-fan-lock {
343 marvell,pins = "mpp10";
344 marvell,function = "gpio";
347 pmx_hdd_present: pmx-hdd-present {
348 marvell,pins = "mpp11", "mpp12";
349 marvell,function = "gpio";
352 pmx_fan_high: pmx-fan-high {
353 marvell,pins = "mpp13";
354 marvell,function = "gpio";
357 pmx_fan_low: pmx-fan-low {
358 marvell,pins = "mpp14";
359 marvell,function = "gpio";
362 pmx_buttons: pmx-buttons {
363 marvell,pins = "mpp15", "mpp16";
364 marvell,function = "gpio";
367 pmx_leds1: pmx-leds {
368 marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
369 marvell,function = "gpo";
372 pmx_leds2: pmx-leds {
373 marvell,pins = "mpp55", "mpp57", "mpp62";
374 marvell,function = "gpio";