xref: /linux/scripts/dtc/include-prefixes/arm/marvell/orion5x-lswsgl.dts (revision 85860863a4b2c216f399896d4fb1ec75b2dea64f)
1/*
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>
6 *
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
10 * whole.
11 *
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.
16 *
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.
21 *
22 * Or, alternatively,
23 *
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
31 *     conditions:
32 *
33 *     The above copyright notice and this permission notice shall be
34 *     included in all copies or substantial portions of the Software.
35 *
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.
44 */
45
46/dts-v1/;
47
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"
52
53/ {
54	model = "Buffalo Linkstation Mini (LS-WSGL)";
55	compatible = "buffalo,lswsgl", "marvell,orion5x-88f5182", "marvell,orion5x";
56
57	memory {
58		device_type = "memory";
59		reg = <0x00000000 0x8000000>; /* 128 MB */
60	};
61
62	chosen {
63		bootargs = "console=ttyS0,115200 earlyprintk";
64		stdout-path = &uart0;
65	};
66
67	soc {
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>;
71	};
72
73	gpio-keys {
74		compatible = "gpio-keys";
75		pinctrl-0 = <&pmx_buttons>;
76		pinctrl-names = "default";
77		#address-cells = <1>;
78		#size-cells = <0>;
79
80		key-func {
81			label = "Function Button";
82			linux,code = <KEY_OPTION>;
83			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
84		};
85
86		key-power {
87			label = "Power-on Switch";
88			linux,input-type = <5>; /* EV_SW */
89			linux,code = <KEY_RESERVED>; /* LSMINI_SW_POWER */
90			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
91		};
92
93		key-autopower {
94			label = "Power-auto Switch";
95			linux,input-type = <5>; /* EV_SW */
96			linux,code = <KEY_ESC>; /* LSMINI_SW_AUTOPOWER */
97			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
98		};
99	};
100
101	gpio-leds {
102		compatible = "gpio-leds";
103		pinctrl-0 = <&pmx_led_alarm &pmx_led_info &pmx_led_func
104			     &pmx_led_power>;
105		pinctrl-names = "default";
106
107		alarm {
108			label = "lswsgl:alarm:red";
109			gpio = <&gpio0 2 GPIO_ACTIVE_LOW>;
110		};
111
112		info {
113			label = "lswsgl:info:amber";
114			gpio = <&gpio0 3 GPIO_ACTIVE_LOW>;
115		};
116
117		func {
118			label = "lswsgl:func:blue:top";
119			gpio = <&gpio0 9 GPIO_ACTIVE_LOW>;
120		};
121
122		power {
123			label = "lswsgl:power:blue:bottom";
124			gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
125			default-state = "on";
126		};
127	};
128
129	restart_poweroff {
130		compatible = "restart-poweroff";
131	};
132
133	regulators {
134		compatible = "simple-bus";
135		#address-cells = <1>;
136		#size-cells = <0>;
137		pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power &pmx_usb_power>;
138		pinctrl-names = "default";
139
140		sata0_power: regulator@0 {
141			compatible = "regulator-fixed";
142			reg = <0>;
143			regulator-name = "SATA0 Power";
144			regulator-min-microvolt = <5000000>;
145			regulator-max-microvolt = <5000000>;
146			enable-active-high;
147			regulator-always-on;
148			regulator-boot-on;
149			gpio = <&gpio0 1 GPIO_ACTIVE_HIGH>;
150		};
151
152		sata1_power: regulator@1 {
153			compatible = "regulator-fixed";
154			reg = <1>;
155			regulator-name = "SATA1 Power";
156			regulator-min-microvolt = <5000000>;
157			regulator-max-microvolt = <5000000>;
158			enable-active-high;
159			regulator-always-on;
160			regulator-boot-on;
161			gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>;
162		};
163
164		usb_power: regulator@2 {
165			compatible = "regulator-fixed";
166			reg = <2>;
167			regulator-name = "USB Power";
168			regulator-min-microvolt = <5000000>;
169			regulator-max-microvolt = <5000000>;
170			enable-active-high;
171			regulator-always-on;
172			regulator-boot-on;
173			gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
174		};
175	};
176};
177
178&devbus_bootcs {
179	status = "okay";
180
181	devbus,keep-config;
182
183	flash@0 {
184		compatible = "cfi-flash";
185		reg = <0 0x40000>;
186		bank-width = <1>;
187		#address-cells = <1>;
188		#size-cells = <1>;
189
190		partition@0 {
191			label = "Full256Kb";
192			reg = <0 0x40000>;
193			read-only;
194		};
195	};
196};
197
198&mdio {
199	status = "okay";
200
201	ethphy: ethernet-phy {
202		reg = <8>;
203	};
204};
205
206&ehci0 {
207	status = "okay";
208};
209
210&eth {
211	status = "okay";
212
213	ethernet-port@0 {
214		phy-handle = <&ethphy>;
215	};
216};
217
218&i2c {
219	status = "okay";
220	clock-frequency = <100000>;
221	#address-cells = <1>;
222
223	rtc@32 {
224		compatible = "ricoh,rs5c372a";
225		reg = <0x32>;
226	};
227};
228
229&pinctrl {
230	pmx_buttons: pmx-buttons {
231		marvell,pins = "mpp15", "mpp17", "mpp18";
232		marvell,function = "gpio";
233	};
234
235	pmx_led_alarm: pmx-leds {
236		marvell,pins = "mpp2";
237		marvell,function = "gpio";
238	};
239
240	pmx_led_info: pmx-leds {
241		marvell,pins = "mpp3";
242		marvell,function = "gpio";
243	};
244
245	pmx_led_func: pmx-leds {
246		marvell,pins = "mpp9";
247		marvell,function = "gpio";
248	};
249
250	pmx_led_power: pmx-leds {
251		marvell,pins = "mpp14";
252		marvell,function = "gpio";
253	};
254
255	pmx_sata0_power: pmx-sata0-power {
256		marvell,pins = "mpp1";
257		marvell,function = "gpio";
258	};
259
260	pmx_sata1_power: pmx-sata1-power {
261		marvell,pins = "mpp19";
262		marvell,function = "gpio";
263	};
264
265	pmx_usb_power: pmx-usb-power {
266		marvell,pins = "mpp16";
267		marvell,function = "gpio";
268	};
269};
270
271&sata {
272	status = "okay";
273	nr-ports = <2>;
274};
275
276&uart0 {
277	status = "okay";
278};
279