xref: /freebsd/sys/contrib/device-tree/src/arm/marvell/orion5x-lswsgl.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot/*
2*f126890aSEmmanuel Vadot * Copyright (C) 2015 Benjamin Cama <benoar@dolka.fr>
3*f126890aSEmmanuel Vadot * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4*f126890aSEmmanuel Vadot * Based on the board file arch/arm/mach-orion5x/lsmini-setup.c,
5*f126890aSEmmanuel Vadot * Copyright (C) 2008 Alexey Kopytko <alexey@kopytko.ru>
6*f126890aSEmmanuel Vadot *
7*f126890aSEmmanuel Vadot * This file is dual-licensed: you can use it either under the terms
8*f126890aSEmmanuel Vadot * of the GPL or the X11 license, at your option. Note that this dual
9*f126890aSEmmanuel Vadot * licensing only applies to this file, and not this project as a
10*f126890aSEmmanuel Vadot * whole.
11*f126890aSEmmanuel Vadot *
12*f126890aSEmmanuel Vadot *  a) This file is free software; you can redistribute it and/or
13*f126890aSEmmanuel Vadot *     modify it under the terms of the GNU General Public License as
14*f126890aSEmmanuel Vadot *     published by the Free Software Foundation; either version 2 of the
15*f126890aSEmmanuel Vadot *     License, or (at your option) any later version.
16*f126890aSEmmanuel Vadot *
17*f126890aSEmmanuel Vadot *     This file is distributed in the hope that it will be useful,
18*f126890aSEmmanuel Vadot *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19*f126890aSEmmanuel Vadot *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20*f126890aSEmmanuel Vadot *     GNU General Public License for more details.
21*f126890aSEmmanuel Vadot *
22*f126890aSEmmanuel Vadot * Or, alternatively,
23*f126890aSEmmanuel Vadot *
24*f126890aSEmmanuel Vadot *  b) Permission is hereby granted, free of charge, to any person
25*f126890aSEmmanuel Vadot *     obtaining a copy of this software and associated documentation
26*f126890aSEmmanuel Vadot *     files (the "Software"), to deal in the Software without
27*f126890aSEmmanuel Vadot *     restriction, including without limitation the rights to use,
28*f126890aSEmmanuel Vadot *     copy, modify, merge, publish, distribute, sublicense, and/or
29*f126890aSEmmanuel Vadot *     sell copies of the Software, and to permit persons to whom the
30*f126890aSEmmanuel Vadot *     Software is furnished to do so, subject to the following
31*f126890aSEmmanuel Vadot *     conditions:
32*f126890aSEmmanuel Vadot *
33*f126890aSEmmanuel Vadot *     The above copyright notice and this permission notice shall be
34*f126890aSEmmanuel Vadot *     included in all copies or substantial portions of the Software.
35*f126890aSEmmanuel Vadot *
36*f126890aSEmmanuel Vadot *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37*f126890aSEmmanuel Vadot *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38*f126890aSEmmanuel Vadot *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39*f126890aSEmmanuel Vadot *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40*f126890aSEmmanuel Vadot *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41*f126890aSEmmanuel Vadot *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42*f126890aSEmmanuel Vadot *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43*f126890aSEmmanuel Vadot *     OTHER DEALINGS IN THE SOFTWARE.
44*f126890aSEmmanuel Vadot */
45*f126890aSEmmanuel Vadot
46*f126890aSEmmanuel Vadot/dts-v1/;
47*f126890aSEmmanuel Vadot
48*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
49*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
50*f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
51*f126890aSEmmanuel Vadot#include "orion5x-mv88f5182.dtsi"
52*f126890aSEmmanuel Vadot
53*f126890aSEmmanuel Vadot/ {
54*f126890aSEmmanuel Vadot	model = "Buffalo Linkstation Mini (LS-WSGL)";
55*f126890aSEmmanuel Vadot	compatible = "buffalo,lswsgl", "marvell,orion5x-88f5182", "marvell,orion5x";
56*f126890aSEmmanuel Vadot
57*f126890aSEmmanuel Vadot	memory {
58*f126890aSEmmanuel Vadot		device_type = "memory";
59*f126890aSEmmanuel Vadot		reg = <0x00000000 0x8000000>; /* 128 MB */
60*f126890aSEmmanuel Vadot	};
61*f126890aSEmmanuel Vadot
62*f126890aSEmmanuel Vadot	chosen {
63*f126890aSEmmanuel Vadot		bootargs = "console=ttyS0,115200 earlyprintk";
64*f126890aSEmmanuel Vadot		stdout-path = &uart0;
65*f126890aSEmmanuel Vadot	};
66*f126890aSEmmanuel Vadot
67*f126890aSEmmanuel Vadot	soc {
68*f126890aSEmmanuel Vadot		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
69*f126890aSEmmanuel Vadot			 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
70*f126890aSEmmanuel Vadot			 <MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x40000>;
71*f126890aSEmmanuel Vadot	};
72*f126890aSEmmanuel Vadot
73*f126890aSEmmanuel Vadot	gpio-keys {
74*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
75*f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_buttons>;
76*f126890aSEmmanuel Vadot		pinctrl-names = "default";
77*f126890aSEmmanuel Vadot		#address-cells = <1>;
78*f126890aSEmmanuel Vadot		#size-cells = <0>;
79*f126890aSEmmanuel Vadot		func {
80*f126890aSEmmanuel Vadot			label = "Function Button";
81*f126890aSEmmanuel Vadot			linux,code = <KEY_OPTION>;
82*f126890aSEmmanuel Vadot			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
83*f126890aSEmmanuel Vadot		};
84*f126890aSEmmanuel Vadot
85*f126890aSEmmanuel Vadot		power {
86*f126890aSEmmanuel Vadot			label = "Power-on Switch";
87*f126890aSEmmanuel Vadot			linux,input-type = <5>; /* EV_SW */
88*f126890aSEmmanuel Vadot			linux,code = <KEY_RESERVED>; /* LSMINI_SW_POWER */
89*f126890aSEmmanuel Vadot			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
90*f126890aSEmmanuel Vadot		};
91*f126890aSEmmanuel Vadot
92*f126890aSEmmanuel Vadot		autopower {
93*f126890aSEmmanuel Vadot			label = "Power-auto Switch";
94*f126890aSEmmanuel Vadot			linux,input-type = <5>; /* EV_SW */
95*f126890aSEmmanuel Vadot			linux,code = <KEY_ESC>; /* LSMINI_SW_AUTOPOWER */
96*f126890aSEmmanuel Vadot			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
97*f126890aSEmmanuel Vadot		};
98*f126890aSEmmanuel Vadot	};
99*f126890aSEmmanuel Vadot
100*f126890aSEmmanuel Vadot	gpio-leds {
101*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
102*f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_led_alarm &pmx_led_info &pmx_led_func
103*f126890aSEmmanuel Vadot			     &pmx_led_power>;
104*f126890aSEmmanuel Vadot		pinctrl-names = "default";
105*f126890aSEmmanuel Vadot
106*f126890aSEmmanuel Vadot		alarm {
107*f126890aSEmmanuel Vadot			label = "lswsgl:alarm:red";
108*f126890aSEmmanuel Vadot			gpio = <&gpio0 2 GPIO_ACTIVE_LOW>;
109*f126890aSEmmanuel Vadot		};
110*f126890aSEmmanuel Vadot
111*f126890aSEmmanuel Vadot		info {
112*f126890aSEmmanuel Vadot			label = "lswsgl:info:amber";
113*f126890aSEmmanuel Vadot			gpio = <&gpio0 3 GPIO_ACTIVE_LOW>;
114*f126890aSEmmanuel Vadot		};
115*f126890aSEmmanuel Vadot
116*f126890aSEmmanuel Vadot		func {
117*f126890aSEmmanuel Vadot			label = "lswsgl:func:blue:top";
118*f126890aSEmmanuel Vadot			gpio = <&gpio0 9 GPIO_ACTIVE_LOW>;
119*f126890aSEmmanuel Vadot		};
120*f126890aSEmmanuel Vadot
121*f126890aSEmmanuel Vadot		power {
122*f126890aSEmmanuel Vadot			label = "lswsgl:power:blue:bottom";
123*f126890aSEmmanuel Vadot			gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
124*f126890aSEmmanuel Vadot			default-state = "on";
125*f126890aSEmmanuel Vadot		};
126*f126890aSEmmanuel Vadot	};
127*f126890aSEmmanuel Vadot
128*f126890aSEmmanuel Vadot	restart_poweroff {
129*f126890aSEmmanuel Vadot		compatible = "restart-poweroff";
130*f126890aSEmmanuel Vadot	};
131*f126890aSEmmanuel Vadot
132*f126890aSEmmanuel Vadot	regulators {
133*f126890aSEmmanuel Vadot		compatible = "simple-bus";
134*f126890aSEmmanuel Vadot		#address-cells = <1>;
135*f126890aSEmmanuel Vadot		#size-cells = <0>;
136*f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power &pmx_usb_power>;
137*f126890aSEmmanuel Vadot		pinctrl-names = "default";
138*f126890aSEmmanuel Vadot
139*f126890aSEmmanuel Vadot		sata0_power: regulator@0 {
140*f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
141*f126890aSEmmanuel Vadot			reg = <0>;
142*f126890aSEmmanuel Vadot			regulator-name = "SATA0 Power";
143*f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
144*f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
145*f126890aSEmmanuel Vadot			enable-active-high;
146*f126890aSEmmanuel Vadot			regulator-always-on;
147*f126890aSEmmanuel Vadot			regulator-boot-on;
148*f126890aSEmmanuel Vadot			gpio = <&gpio0 1 GPIO_ACTIVE_HIGH>;
149*f126890aSEmmanuel Vadot		};
150*f126890aSEmmanuel Vadot
151*f126890aSEmmanuel Vadot		sata1_power: regulator@1 {
152*f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
153*f126890aSEmmanuel Vadot			reg = <1>;
154*f126890aSEmmanuel Vadot			regulator-name = "SATA1 Power";
155*f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
156*f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
157*f126890aSEmmanuel Vadot			enable-active-high;
158*f126890aSEmmanuel Vadot			regulator-always-on;
159*f126890aSEmmanuel Vadot			regulator-boot-on;
160*f126890aSEmmanuel Vadot			gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>;
161*f126890aSEmmanuel Vadot		};
162*f126890aSEmmanuel Vadot
163*f126890aSEmmanuel Vadot		usb_power: regulator@2 {
164*f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
165*f126890aSEmmanuel Vadot			reg = <2>;
166*f126890aSEmmanuel Vadot			regulator-name = "USB Power";
167*f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
168*f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
169*f126890aSEmmanuel Vadot			enable-active-high;
170*f126890aSEmmanuel Vadot			regulator-always-on;
171*f126890aSEmmanuel Vadot			regulator-boot-on;
172*f126890aSEmmanuel Vadot			gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
173*f126890aSEmmanuel Vadot		};
174*f126890aSEmmanuel Vadot	};
175*f126890aSEmmanuel Vadot};
176*f126890aSEmmanuel Vadot
177*f126890aSEmmanuel Vadot&devbus_bootcs {
178*f126890aSEmmanuel Vadot	status = "okay";
179*f126890aSEmmanuel Vadot
180*f126890aSEmmanuel Vadot	devbus,keep-config;
181*f126890aSEmmanuel Vadot
182*f126890aSEmmanuel Vadot	flash@0 {
183*f126890aSEmmanuel Vadot		compatible = "cfi-flash";
184*f126890aSEmmanuel Vadot		reg = <0 0x40000>;
185*f126890aSEmmanuel Vadot		bank-width = <1>;
186*f126890aSEmmanuel Vadot		#address-cells = <1>;
187*f126890aSEmmanuel Vadot		#size-cells = <1>;
188*f126890aSEmmanuel Vadot
189*f126890aSEmmanuel Vadot		partition@0 {
190*f126890aSEmmanuel Vadot			label = "Full256Kb";
191*f126890aSEmmanuel Vadot			reg = <0 0x40000>;
192*f126890aSEmmanuel Vadot			read-only;
193*f126890aSEmmanuel Vadot		};
194*f126890aSEmmanuel Vadot	};
195*f126890aSEmmanuel Vadot};
196*f126890aSEmmanuel Vadot
197*f126890aSEmmanuel Vadot&mdio {
198*f126890aSEmmanuel Vadot	status = "okay";
199*f126890aSEmmanuel Vadot
200*f126890aSEmmanuel Vadot	ethphy: ethernet-phy {
201*f126890aSEmmanuel Vadot		reg = <8>;
202*f126890aSEmmanuel Vadot	};
203*f126890aSEmmanuel Vadot};
204*f126890aSEmmanuel Vadot
205*f126890aSEmmanuel Vadot&ehci0 {
206*f126890aSEmmanuel Vadot	status = "okay";
207*f126890aSEmmanuel Vadot};
208*f126890aSEmmanuel Vadot
209*f126890aSEmmanuel Vadot&eth {
210*f126890aSEmmanuel Vadot	status = "okay";
211*f126890aSEmmanuel Vadot
212*f126890aSEmmanuel Vadot	ethernet-port@0 {
213*f126890aSEmmanuel Vadot		phy-handle = <&ethphy>;
214*f126890aSEmmanuel Vadot	};
215*f126890aSEmmanuel Vadot};
216*f126890aSEmmanuel Vadot
217*f126890aSEmmanuel Vadot&i2c {
218*f126890aSEmmanuel Vadot	status = "okay";
219*f126890aSEmmanuel Vadot	clock-frequency = <100000>;
220*f126890aSEmmanuel Vadot	#address-cells = <1>;
221*f126890aSEmmanuel Vadot
222*f126890aSEmmanuel Vadot	rtc@32 {
223*f126890aSEmmanuel Vadot		compatible = "ricoh,rs5c372a";
224*f126890aSEmmanuel Vadot		reg = <0x32>;
225*f126890aSEmmanuel Vadot	};
226*f126890aSEmmanuel Vadot};
227*f126890aSEmmanuel Vadot
228*f126890aSEmmanuel Vadot&pinctrl {
229*f126890aSEmmanuel Vadot	pmx_buttons: pmx-buttons {
230*f126890aSEmmanuel Vadot		marvell,pins = "mpp15", "mpp17", "mpp18";
231*f126890aSEmmanuel Vadot		marvell,function = "gpio";
232*f126890aSEmmanuel Vadot	};
233*f126890aSEmmanuel Vadot
234*f126890aSEmmanuel Vadot	pmx_led_alarm: pmx-leds {
235*f126890aSEmmanuel Vadot		marvell,pins = "mpp2";
236*f126890aSEmmanuel Vadot		marvell,function = "gpio";
237*f126890aSEmmanuel Vadot	};
238*f126890aSEmmanuel Vadot
239*f126890aSEmmanuel Vadot	pmx_led_info: pmx-leds {
240*f126890aSEmmanuel Vadot		marvell,pins = "mpp3";
241*f126890aSEmmanuel Vadot		marvell,function = "gpio";
242*f126890aSEmmanuel Vadot	};
243*f126890aSEmmanuel Vadot
244*f126890aSEmmanuel Vadot	pmx_led_func: pmx-leds {
245*f126890aSEmmanuel Vadot		marvell,pins = "mpp9";
246*f126890aSEmmanuel Vadot		marvell,function = "gpio";
247*f126890aSEmmanuel Vadot	};
248*f126890aSEmmanuel Vadot
249*f126890aSEmmanuel Vadot	pmx_led_power: pmx-leds {
250*f126890aSEmmanuel Vadot		marvell,pins = "mpp14";
251*f126890aSEmmanuel Vadot		marvell,function = "gpio";
252*f126890aSEmmanuel Vadot	};
253*f126890aSEmmanuel Vadot
254*f126890aSEmmanuel Vadot	pmx_sata0_power: pmx-sata0-power {
255*f126890aSEmmanuel Vadot		marvell,pins = "mpp1";
256*f126890aSEmmanuel Vadot		marvell,function = "gpio";
257*f126890aSEmmanuel Vadot	};
258*f126890aSEmmanuel Vadot
259*f126890aSEmmanuel Vadot	pmx_sata1_power: pmx-sata1-power {
260*f126890aSEmmanuel Vadot		marvell,pins = "mpp19";
261*f126890aSEmmanuel Vadot		marvell,function = "gpio";
262*f126890aSEmmanuel Vadot	};
263*f126890aSEmmanuel Vadot
264*f126890aSEmmanuel Vadot	pmx_usb_power: pmx-usb-power {
265*f126890aSEmmanuel Vadot		marvell,pins = "mpp16";
266*f126890aSEmmanuel Vadot		marvell,function = "gpio";
267*f126890aSEmmanuel Vadot	};
268*f126890aSEmmanuel Vadot};
269*f126890aSEmmanuel Vadot
270*f126890aSEmmanuel Vadot&sata {
271*f126890aSEmmanuel Vadot	status = "okay";
272*f126890aSEmmanuel Vadot	nr-ports = <2>;
273*f126890aSEmmanuel Vadot};
274*f126890aSEmmanuel Vadot
275*f126890aSEmmanuel Vadot&uart0 {
276*f126890aSEmmanuel Vadot	status = "okay";
277*f126890aSEmmanuel Vadot};
278