xref: /linux/scripts/dtc/include-prefixes/arm/marvell/orion5x-lswsgl.dts (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1724ba675SRob Herring/*
2724ba675SRob Herring * Copyright (C) 2015 Benjamin Cama <benoar@dolka.fr>
3724ba675SRob Herring * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4724ba675SRob Herring * Based on the board file arch/arm/mach-orion5x/lsmini-setup.c,
5724ba675SRob Herring * Copyright (C) 2008 Alexey Kopytko <alexey@kopytko.ru>
6724ba675SRob Herring *
7724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms
8724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual
9724ba675SRob Herring * licensing only applies to this file, and not this project as a
10724ba675SRob Herring * whole.
11724ba675SRob Herring *
12724ba675SRob Herring *  a) This file is free software; you can redistribute it and/or
13724ba675SRob Herring *     modify it under the terms of the GNU General Public License as
14724ba675SRob Herring *     published by the Free Software Foundation; either version 2 of the
15724ba675SRob Herring *     License, or (at your option) any later version.
16724ba675SRob Herring *
17724ba675SRob Herring *     This file is distributed in the hope that it will be useful,
18724ba675SRob Herring *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19724ba675SRob Herring *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20724ba675SRob Herring *     GNU General Public License for more details.
21724ba675SRob Herring *
22724ba675SRob Herring * Or, alternatively,
23724ba675SRob Herring *
24724ba675SRob Herring *  b) Permission is hereby granted, free of charge, to any person
25724ba675SRob Herring *     obtaining a copy of this software and associated documentation
26724ba675SRob Herring *     files (the "Software"), to deal in the Software without
27724ba675SRob Herring *     restriction, including without limitation the rights to use,
28724ba675SRob Herring *     copy, modify, merge, publish, distribute, sublicense, and/or
29724ba675SRob Herring *     sell copies of the Software, and to permit persons to whom the
30724ba675SRob Herring *     Software is furnished to do so, subject to the following
31724ba675SRob Herring *     conditions:
32724ba675SRob Herring *
33724ba675SRob Herring *     The above copyright notice and this permission notice shall be
34724ba675SRob Herring *     included in all copies or substantial portions of the Software.
35724ba675SRob Herring *
36724ba675SRob Herring *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37724ba675SRob Herring *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38724ba675SRob Herring *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39724ba675SRob Herring *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40724ba675SRob Herring *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41724ba675SRob Herring *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42724ba675SRob Herring *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43724ba675SRob Herring *     OTHER DEALINGS IN THE SOFTWARE.
44724ba675SRob Herring */
45724ba675SRob Herring
46724ba675SRob Herring/dts-v1/;
47724ba675SRob Herring
48724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
49724ba675SRob Herring#include <dt-bindings/input/input.h>
50724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h>
51724ba675SRob Herring#include "orion5x-mv88f5182.dtsi"
52724ba675SRob Herring
53724ba675SRob Herring/ {
54724ba675SRob Herring	model = "Buffalo Linkstation Mini (LS-WSGL)";
55724ba675SRob Herring	compatible = "buffalo,lswsgl", "marvell,orion5x-88f5182", "marvell,orion5x";
56724ba675SRob Herring
57724ba675SRob Herring	memory {
58724ba675SRob Herring		device_type = "memory";
59724ba675SRob Herring		reg = <0x00000000 0x8000000>; /* 128 MB */
60724ba675SRob Herring	};
61724ba675SRob Herring
62724ba675SRob Herring	chosen {
63724ba675SRob Herring		bootargs = "console=ttyS0,115200 earlyprintk";
64724ba675SRob Herring		stdout-path = &uart0;
65724ba675SRob Herring	};
66724ba675SRob Herring
67724ba675SRob Herring	soc {
68724ba675SRob Herring		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
69724ba675SRob Herring			 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
70724ba675SRob Herring			 <MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x40000>;
71724ba675SRob Herring	};
72724ba675SRob Herring
73724ba675SRob Herring	gpio-keys {
74724ba675SRob Herring		compatible = "gpio-keys";
75724ba675SRob Herring		pinctrl-0 = <&pmx_buttons>;
76724ba675SRob Herring		pinctrl-names = "default";
7785860863SKrzysztof Kozlowski
7885860863SKrzysztof Kozlowski		key-func {
79724ba675SRob Herring			label = "Function Button";
80724ba675SRob Herring			linux,code = <KEY_OPTION>;
81724ba675SRob Herring			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
82724ba675SRob Herring		};
83724ba675SRob Herring
8485860863SKrzysztof Kozlowski		key-power {
85724ba675SRob Herring			label = "Power-on Switch";
86724ba675SRob Herring			linux,input-type = <5>; /* EV_SW */
87724ba675SRob Herring			linux,code = <KEY_RESERVED>; /* LSMINI_SW_POWER */
88724ba675SRob Herring			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
89724ba675SRob Herring		};
90724ba675SRob Herring
9185860863SKrzysztof Kozlowski		key-autopower {
92724ba675SRob Herring			label = "Power-auto Switch";
93724ba675SRob Herring			linux,input-type = <5>; /* EV_SW */
94724ba675SRob Herring			linux,code = <KEY_ESC>; /* LSMINI_SW_AUTOPOWER */
95724ba675SRob Herring			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
96724ba675SRob Herring		};
97724ba675SRob Herring	};
98724ba675SRob Herring
99724ba675SRob Herring	gpio-leds {
100724ba675SRob Herring		compatible = "gpio-leds";
101724ba675SRob Herring		pinctrl-0 = <&pmx_led_alarm &pmx_led_info &pmx_led_func
102724ba675SRob Herring			     &pmx_led_power>;
103724ba675SRob Herring		pinctrl-names = "default";
104724ba675SRob Herring
105*5b3566a7SKrzysztof Kozlowski		led-alarm {
106724ba675SRob Herring			label = "lswsgl:alarm:red";
107d8fff5efSKrzysztof Kozlowski			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
108724ba675SRob Herring		};
109724ba675SRob Herring
110*5b3566a7SKrzysztof Kozlowski		led-info {
111724ba675SRob Herring			label = "lswsgl:info:amber";
112d8fff5efSKrzysztof Kozlowski			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
113724ba675SRob Herring		};
114724ba675SRob Herring
115*5b3566a7SKrzysztof Kozlowski		led-func {
116724ba675SRob Herring			label = "lswsgl:func:blue:top";
117d8fff5efSKrzysztof Kozlowski			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
118724ba675SRob Herring		};
119724ba675SRob Herring
120*5b3566a7SKrzysztof Kozlowski		led-power {
121724ba675SRob Herring			label = "lswsgl:power:blue:bottom";
122d8fff5efSKrzysztof Kozlowski			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
123724ba675SRob Herring			default-state = "on";
124724ba675SRob Herring		};
125724ba675SRob Herring	};
126724ba675SRob Herring
127724ba675SRob Herring	restart_poweroff {
128724ba675SRob Herring		compatible = "restart-poweroff";
129724ba675SRob Herring	};
130724ba675SRob Herring
131724ba675SRob Herring	regulators {
132724ba675SRob Herring		compatible = "simple-bus";
133724ba675SRob Herring		#address-cells = <1>;
134724ba675SRob Herring		#size-cells = <0>;
135724ba675SRob Herring		pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power &pmx_usb_power>;
136724ba675SRob Herring		pinctrl-names = "default";
137724ba675SRob Herring
138724ba675SRob Herring		sata0_power: regulator@0 {
139724ba675SRob Herring			compatible = "regulator-fixed";
140724ba675SRob Herring			reg = <0>;
141724ba675SRob Herring			regulator-name = "SATA0 Power";
142724ba675SRob Herring			regulator-min-microvolt = <5000000>;
143724ba675SRob Herring			regulator-max-microvolt = <5000000>;
144724ba675SRob Herring			enable-active-high;
145724ba675SRob Herring			regulator-always-on;
146724ba675SRob Herring			regulator-boot-on;
147724ba675SRob Herring			gpio = <&gpio0 1 GPIO_ACTIVE_HIGH>;
148724ba675SRob Herring		};
149724ba675SRob Herring
150724ba675SRob Herring		sata1_power: regulator@1 {
151724ba675SRob Herring			compatible = "regulator-fixed";
152724ba675SRob Herring			reg = <1>;
153724ba675SRob Herring			regulator-name = "SATA1 Power";
154724ba675SRob Herring			regulator-min-microvolt = <5000000>;
155724ba675SRob Herring			regulator-max-microvolt = <5000000>;
156724ba675SRob Herring			enable-active-high;
157724ba675SRob Herring			regulator-always-on;
158724ba675SRob Herring			regulator-boot-on;
159724ba675SRob Herring			gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>;
160724ba675SRob Herring		};
161724ba675SRob Herring
162724ba675SRob Herring		usb_power: regulator@2 {
163724ba675SRob Herring			compatible = "regulator-fixed";
164724ba675SRob Herring			reg = <2>;
165724ba675SRob Herring			regulator-name = "USB Power";
166724ba675SRob Herring			regulator-min-microvolt = <5000000>;
167724ba675SRob Herring			regulator-max-microvolt = <5000000>;
168724ba675SRob Herring			enable-active-high;
169724ba675SRob Herring			regulator-always-on;
170724ba675SRob Herring			regulator-boot-on;
171724ba675SRob Herring			gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
172724ba675SRob Herring		};
173724ba675SRob Herring	};
174724ba675SRob Herring};
175724ba675SRob Herring
176724ba675SRob Herring&devbus_bootcs {
177724ba675SRob Herring	status = "okay";
178724ba675SRob Herring
179724ba675SRob Herring	devbus,keep-config;
180724ba675SRob Herring
181724ba675SRob Herring	flash@0 {
182724ba675SRob Herring		compatible = "cfi-flash";
183724ba675SRob Herring		reg = <0 0x40000>;
184724ba675SRob Herring		bank-width = <1>;
185724ba675SRob Herring		#address-cells = <1>;
186724ba675SRob Herring		#size-cells = <1>;
187724ba675SRob Herring
188724ba675SRob Herring		partition@0 {
189724ba675SRob Herring			label = "Full256Kb";
190724ba675SRob Herring			reg = <0 0x40000>;
191724ba675SRob Herring			read-only;
192724ba675SRob Herring		};
193724ba675SRob Herring	};
194724ba675SRob Herring};
195724ba675SRob Herring
196724ba675SRob Herring&mdio {
197724ba675SRob Herring	status = "okay";
198724ba675SRob Herring
199724ba675SRob Herring	ethphy: ethernet-phy {
200724ba675SRob Herring		reg = <8>;
201724ba675SRob Herring	};
202724ba675SRob Herring};
203724ba675SRob Herring
204724ba675SRob Herring&ehci0 {
205724ba675SRob Herring	status = "okay";
206724ba675SRob Herring};
207724ba675SRob Herring
208724ba675SRob Herring&eth {
209724ba675SRob Herring	status = "okay";
210724ba675SRob Herring
211724ba675SRob Herring	ethernet-port@0 {
212724ba675SRob Herring		phy-handle = <&ethphy>;
213724ba675SRob Herring	};
214724ba675SRob Herring};
215724ba675SRob Herring
216724ba675SRob Herring&i2c {
217724ba675SRob Herring	status = "okay";
218724ba675SRob Herring	clock-frequency = <100000>;
219724ba675SRob Herring	#address-cells = <1>;
220724ba675SRob Herring
221724ba675SRob Herring	rtc@32 {
222724ba675SRob Herring		compatible = "ricoh,rs5c372a";
223724ba675SRob Herring		reg = <0x32>;
224724ba675SRob Herring	};
225724ba675SRob Herring};
226724ba675SRob Herring
227724ba675SRob Herring&pinctrl {
228724ba675SRob Herring	pmx_buttons: pmx-buttons {
229724ba675SRob Herring		marvell,pins = "mpp15", "mpp17", "mpp18";
230724ba675SRob Herring		marvell,function = "gpio";
231724ba675SRob Herring	};
232724ba675SRob Herring
233724ba675SRob Herring	pmx_led_alarm: pmx-leds {
234724ba675SRob Herring		marvell,pins = "mpp2";
235724ba675SRob Herring		marvell,function = "gpio";
236724ba675SRob Herring	};
237724ba675SRob Herring
238724ba675SRob Herring	pmx_led_info: pmx-leds {
239724ba675SRob Herring		marvell,pins = "mpp3";
240724ba675SRob Herring		marvell,function = "gpio";
241724ba675SRob Herring	};
242724ba675SRob Herring
243724ba675SRob Herring	pmx_led_func: pmx-leds {
244724ba675SRob Herring		marvell,pins = "mpp9";
245724ba675SRob Herring		marvell,function = "gpio";
246724ba675SRob Herring	};
247724ba675SRob Herring
248724ba675SRob Herring	pmx_led_power: pmx-leds {
249724ba675SRob Herring		marvell,pins = "mpp14";
250724ba675SRob Herring		marvell,function = "gpio";
251724ba675SRob Herring	};
252724ba675SRob Herring
253724ba675SRob Herring	pmx_sata0_power: pmx-sata0-power {
254724ba675SRob Herring		marvell,pins = "mpp1";
255724ba675SRob Herring		marvell,function = "gpio";
256724ba675SRob Herring	};
257724ba675SRob Herring
258724ba675SRob Herring	pmx_sata1_power: pmx-sata1-power {
259724ba675SRob Herring		marvell,pins = "mpp19";
260724ba675SRob Herring		marvell,function = "gpio";
261724ba675SRob Herring	};
262724ba675SRob Herring
263724ba675SRob Herring	pmx_usb_power: pmx-usb-power {
264724ba675SRob Herring		marvell,pins = "mpp16";
265724ba675SRob Herring		marvell,function = "gpio";
266724ba675SRob Herring	};
267724ba675SRob Herring};
268724ba675SRob Herring
269724ba675SRob Herring&sata {
270724ba675SRob Herring	status = "okay";
271724ba675SRob Herring	nr-ports = <2>;
272724ba675SRob Herring};
273724ba675SRob Herring
274724ba675SRob Herring&uart0 {
275724ba675SRob Herring	status = "okay";
276724ba675SRob Herring};
277