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 label = "white:power";
138 function = LED_FUNCTION_POWER;
139 color = <LED_COLOR_ID_WHITE>;
140 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
141 default-state = "on";
144 led_failsafe: power_red {
146 function = LED_FUNCTION_POWER;
147 color = <LED_COLOR_ID_RED>;
148 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
151 led_upgrade: power_orange {
152 label = "amber:power";
153 function = LED_FUNCTION_POWER;
154 color = <LED_COLOR_ID_AMBER>;
155 gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
158 led_boot: indicator_white {
159 label = "white:indicator";
160 function = LED_FUNCTION_INDICATOR;
161 color = <LED_COLOR_ID_WHITE>;
162 gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
166 function = LED_FUNCTION_DISK;
167 color = <LED_COLOR_ID_RED>;
168 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
169 linux,default-trigger = "ata1";
170 function-enumerator = <1>;
174 function = LED_FUNCTION_DISK;
175 color = <LED_COLOR_ID_RED>;
176 gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
177 linux,default-trigger = "ata2";
178 function-enumerator = <2>;
183 compatible = "simple-bus";
184 #address-cells = <1>;
186 pinctrl-0 = <&pmx_power_hdd1 &pmx_power_hdd2>;
187 pinctrl-names = "default";
189 sata1_power: regulator@1 {
190 compatible = "regulator-fixed";
192 regulator-name = "HDD1";
193 regulator-min-microvolt = <12000000>;
194 regulator-max-microvolt = <12000000>;
195 startup-delay-us = <2000000>;
199 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
202 sata2_power: regulator@2 {
203 compatible = "regulator-fixed";
205 regulator-name = "HDD2";
206 regulator-min-microvolt = <12000000>;
207 regulator-max-microvolt = <12000000>;
208 startup-delay-us = <4000000>;
212 gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>;
222 pinctrl-0 = <&ge1_rgmii_pins>;
223 pinctrl-names = "default";
225 phy-handle = <ðphy0>;
226 phy-connection-type = "rgmii-id";
230 pinctrl-0 = <&mdio_pins>;
231 pinctrl-names = "default";
233 ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */
235 marvell,reg-init = <0x3 0x10 0xf000 0x091A>, /* LED function */
236 <0x3 0x11 0x0000 0x4401>, /* LED polarity */
237 <0x3 0x12 0x0000 0x4905>; /* LED timer */
238 #thermal-sensor-cells = <0>;
247 label = "pxa3xx_nand-0";
249 marvell,nand-keep-config;
251 nand-ecc-strength = <4>;
252 nand-ecc-step-size = <512>;
255 compatible = "fixed-partitions";
256 #address-cells = <1>;
260 label = "ubi_kernel";
261 reg = <0x00000000 0x02000000>; /* 32 MiB */
266 reg = <0x02000000 0x1df00000>; /* 479 MiB */
275 #address-cells = <1>;
278 hdd0_temp: sata-port@0 {
280 #thermal-sensor-cells = <0>;
283 hdd1_temp: sata-port@1 {
285 #thermal-sensor-cells = <0>;
291 pinctrl-0 = <&spi0_pins2>;
292 pinctrl-names = "default";
295 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
297 spi-max-frequency = <50000000>;
300 compatible = "fixed-partitions";
301 #address-cells = <1>;
305 reg = <0x00000 0xf0000>; /* 960 KiB*/
310 reg = <0xf0000 0x10000>; /* 64 KiB */
311 label = "u-boot-env";
318 pinctrl-0 = <&pmx_power_cpu>;
319 pinctrl-names = "default";
331 pmx_power_hdd2: pmx-power-hdd2 {
332 marvell,pins = "mpp2";
333 marvell,function = "gpio";
336 pmx_power_cpu: pmx-power-cpu {
337 marvell,pins = "mpp4";
338 marvell,function = "vdd";
341 pmx_power_hdd1: pmx-power-hdd1 {
342 marvell,pins = "mpp8";
343 marvell,function = "gpio";
346 pmx_fan_lock: pmx-fan-lock {
347 marvell,pins = "mpp10";
348 marvell,function = "gpio";
351 pmx_hdd_present: pmx-hdd-present {
352 marvell,pins = "mpp11", "mpp12";
353 marvell,function = "gpio";
356 pmx_fan_high: pmx-fan-high {
357 marvell,pins = "mpp13";
358 marvell,function = "gpio";
361 pmx_fan_low: pmx-fan-low {
362 marvell,pins = "mpp14";
363 marvell,function = "gpio";
366 pmx_buttons: pmx-buttons {
367 marvell,pins = "mpp15", "mpp16";
368 marvell,function = "gpio";
371 pmx_leds1: pmx-leds {
372 marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
373 marvell,function = "gpo";
376 pmx_leds2: pmx-leds {
377 marvell,pins = "mpp55", "mpp57", "mpp62";
378 marvell,function = "gpio";