2 * Copyright (C) 2015 Benjamin Cama <benoar@dolka.fr>
3 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4 * Based on the board file arch/arm/mach-orion5x/lsmini-setup.c,
5 * Copyright (C) 2008 Alexey Kopytko <alexey@kopytko.ru>
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
12 * a) This file is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
17 * This file is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
24 * b) Permission is hereby granted, free of charge, to any person
25 * obtaining a copy of this software and associated documentation
26 * files (the "Software"), to deal in the Software without
27 * restriction, including without limitation the rights to use,
28 * copy, modify, merge, publish, distribute, sublicense, and/or
29 * sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following
33 * The above copyright notice and this permission notice shall be
34 * included in all copies or substantial portions of the Software.
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 * OTHER DEALINGS IN THE SOFTWARE.
48 #include <dt-bindings/gpio/gpio.h>
49 #include <dt-bindings/input/input.h>
50 #include <dt-bindings/interrupt-controller/irq.h>
51 #include "orion5x-mv88f5182.dtsi"
54 model = "Buffalo Linkstation Mini (LS-WSGL)";
55 compatible = "buffalo,lswsgl", "marvell,orion5x-88f5182", "marvell,orion5x";
58 device_type = "memory";
59 reg = <0x00000000 0x8000000>; /* 128 MB */
63 bootargs = "console=ttyS0,115200 earlyprintk";
68 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
69 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
70 <MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x40000>;
74 compatible = "gpio-keys";
75 pinctrl-0 = <&pmx_buttons>;
76 pinctrl-names = "default";
80 label = "Function Button";
81 linux,code = <KEY_OPTION>;
82 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
86 label = "Power-on Switch";
87 linux,input-type = <5>; /* EV_SW */
88 linux,code = <KEY_RESERVED>; /* LSMINI_SW_POWER */
89 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
93 label = "Power-auto Switch";
94 linux,input-type = <5>; /* EV_SW */
95 linux,code = <KEY_ESC>; /* LSMINI_SW_AUTOPOWER */
96 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
101 compatible = "gpio-leds";
102 pinctrl-0 = <&pmx_led_alarm &pmx_led_info &pmx_led_func
104 pinctrl-names = "default";
107 label = "lswsgl:alarm:red";
108 gpio = <&gpio0 2 GPIO_ACTIVE_LOW>;
112 label = "lswsgl:info:amber";
113 gpio = <&gpio0 3 GPIO_ACTIVE_LOW>;
117 label = "lswsgl:func:blue:top";
118 gpio = <&gpio0 9 GPIO_ACTIVE_LOW>;
122 label = "lswsgl:power:blue:bottom";
123 gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
124 default-state = "on";
129 compatible = "restart-poweroff";
133 compatible = "simple-bus";
134 #address-cells = <1>;
136 pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power &pmx_usb_power>;
137 pinctrl-names = "default";
139 sata0_power: regulator@0 {
140 compatible = "regulator-fixed";
142 regulator-name = "SATA0 Power";
143 regulator-min-microvolt = <5000000>;
144 regulator-max-microvolt = <5000000>;
148 gpio = <&gpio0 1 GPIO_ACTIVE_HIGH>;
151 sata1_power: regulator@1 {
152 compatible = "regulator-fixed";
154 regulator-name = "SATA1 Power";
155 regulator-min-microvolt = <5000000>;
156 regulator-max-microvolt = <5000000>;
160 gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>;
163 usb_power: regulator@2 {
164 compatible = "regulator-fixed";
166 regulator-name = "USB Power";
167 regulator-min-microvolt = <5000000>;
168 regulator-max-microvolt = <5000000>;
172 gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
183 compatible = "cfi-flash";
186 #address-cells = <1>;
200 ethphy: ethernet-phy {
213 phy-handle = <ðphy>;
219 clock-frequency = <100000>;
220 #address-cells = <1>;
223 compatible = "ricoh,rs5c372a";
229 pmx_buttons: pmx-buttons {
230 marvell,pins = "mpp15", "mpp17", "mpp18";
231 marvell,function = "gpio";
234 pmx_led_alarm: pmx-leds {
235 marvell,pins = "mpp2";
236 marvell,function = "gpio";
239 pmx_led_info: pmx-leds {
240 marvell,pins = "mpp3";
241 marvell,function = "gpio";
244 pmx_led_func: pmx-leds {
245 marvell,pins = "mpp9";
246 marvell,function = "gpio";
249 pmx_led_power: pmx-leds {
250 marvell,pins = "mpp14";
251 marvell,function = "gpio";
254 pmx_sata0_power: pmx-sata0-power {
255 marvell,pins = "mpp1";
256 marvell,function = "gpio";
259 pmx_sata1_power: pmx-sata1-power {
260 marvell,pins = "mpp19";
261 marvell,function = "gpio";
264 pmx_usb_power: pmx-usb-power {
265 marvell,pins = "mpp16";
266 marvell,function = "gpio";