xref: /openbmc/u-boot/arch/arm/dts/kirkwood-netxbig.dtsi (revision 9c2369a554437f072733c53ba0f5f5384f35b6d3)
1*fbe502e9SChris Packham// SPDX-License-Identifier: GPL-2.0
2*fbe502e9SChris Packham/*
3*fbe502e9SChris Packham * Device Tree common file for LaCie 2Big and 5Big Network v2
4*fbe502e9SChris Packham *
5*fbe502e9SChris Packham * Copyright (C) 2014
6*fbe502e9SChris Packham *
7*fbe502e9SChris Packham * Andrew Lunn <andrew@lunn.ch>
8*fbe502e9SChris Packham *
9*fbe502e9SChris Packham * Based on netxbig_v2-setup.c,
10*fbe502e9SChris Packham * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
11*fbe502e9SChris Packham *
12*fbe502e9SChris Packham*/
13*fbe502e9SChris Packham
14*fbe502e9SChris Packham#include <dt-bindings/leds/leds-netxbig.h>
15*fbe502e9SChris Packham#include "kirkwood.dtsi"
16*fbe502e9SChris Packham#include "kirkwood-6281.dtsi"
17*fbe502e9SChris Packham
18*fbe502e9SChris Packham/ {
19*fbe502e9SChris Packham	chosen {
20*fbe502e9SChris Packham		bootargs = "console=ttyS0,115200n8";
21*fbe502e9SChris Packham		stdout-path = &uart0;
22*fbe502e9SChris Packham	};
23*fbe502e9SChris Packham
24*fbe502e9SChris Packham	ocp@f1000000 {
25*fbe502e9SChris Packham		serial@12000 {
26*fbe502e9SChris Packham			status = "okay";
27*fbe502e9SChris Packham		};
28*fbe502e9SChris Packham
29*fbe502e9SChris Packham		spi@10600 {
30*fbe502e9SChris Packham			status = "okay";
31*fbe502e9SChris Packham
32*fbe502e9SChris Packham			flash@0 {
33*fbe502e9SChris Packham				#address-cells = <1>;
34*fbe502e9SChris Packham				#size-cells = <1>;
35*fbe502e9SChris Packham				compatible = "mxicy,mx25l4005a", "jedec,spi-nor", "spi-flash";
36*fbe502e9SChris Packham				reg = <0>;
37*fbe502e9SChris Packham				spi-max-frequency = <20000000>;
38*fbe502e9SChris Packham				mode = <0>;
39*fbe502e9SChris Packham
40*fbe502e9SChris Packham				partition@0 {
41*fbe502e9SChris Packham					reg = <0x0 0x80000>;
42*fbe502e9SChris Packham					label = "u-boot";
43*fbe502e9SChris Packham				};
44*fbe502e9SChris Packham			};
45*fbe502e9SChris Packham		};
46*fbe502e9SChris Packham
47*fbe502e9SChris Packham		sata@80000 {
48*fbe502e9SChris Packham			status = "okay";
49*fbe502e9SChris Packham			nr-ports = <2>;
50*fbe502e9SChris Packham		};
51*fbe502e9SChris Packham
52*fbe502e9SChris Packham	};
53*fbe502e9SChris Packham
54*fbe502e9SChris Packham	gpio-keys {
55*fbe502e9SChris Packham		compatible = "gpio-keys";
56*fbe502e9SChris Packham		#address-cells = <1>;
57*fbe502e9SChris Packham		#size-cells = <0>;
58*fbe502e9SChris Packham
59*fbe502e9SChris Packham		/*
60*fbe502e9SChris Packham		 * esc and power represent a three position rocker
61*fbe502e9SChris Packham		 * switch. Thus the conventional KEY_POWER does not fit
62*fbe502e9SChris Packham		 */
63*fbe502e9SChris Packham		exc {
64*fbe502e9SChris Packham			label = "Back power switch (on|auto)";
65*fbe502e9SChris Packham			linux,code = <KEY_ESC>;
66*fbe502e9SChris Packham			linux,input-type = <5>;
67*fbe502e9SChris Packham			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
68*fbe502e9SChris Packham		};
69*fbe502e9SChris Packham		power {
70*fbe502e9SChris Packham			label = "Back power switch (auto|off)";
71*fbe502e9SChris Packham			linux,code = <KEY_1>;
72*fbe502e9SChris Packham			linux,input-type = <5>;
73*fbe502e9SChris Packham			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
74*fbe502e9SChris Packham		};
75*fbe502e9SChris Packham		option {
76*fbe502e9SChris Packham			label = "Function button";
77*fbe502e9SChris Packham			linux,code = <KEY_OPTION>;
78*fbe502e9SChris Packham			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
79*fbe502e9SChris Packham		};
80*fbe502e9SChris Packham
81*fbe502e9SChris Packham	};
82*fbe502e9SChris Packham
83*fbe502e9SChris Packham	gpio-poweroff {
84*fbe502e9SChris Packham		compatible = "gpio-poweroff";
85*fbe502e9SChris Packham		gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
86*fbe502e9SChris Packham	};
87*fbe502e9SChris Packham
88*fbe502e9SChris Packham	regulators: regulators {
89*fbe502e9SChris Packham		status = "okay";
90*fbe502e9SChris Packham		compatible = "simple-bus";
91*fbe502e9SChris Packham		#address-cells = <1>;
92*fbe502e9SChris Packham		#size-cells = <0>;
93*fbe502e9SChris Packham		pinctrl-names = "default";
94*fbe502e9SChris Packham
95*fbe502e9SChris Packham		regulator@1 {
96*fbe502e9SChris Packham			compatible = "regulator-fixed";
97*fbe502e9SChris Packham			reg = <1>;
98*fbe502e9SChris Packham			regulator-name = "hdd0power";
99*fbe502e9SChris Packham			regulator-min-microvolt = <5000000>;
100*fbe502e9SChris Packham			regulator-max-microvolt = <5000000>;
101*fbe502e9SChris Packham			enable-active-high;
102*fbe502e9SChris Packham			regulator-always-on;
103*fbe502e9SChris Packham			regulator-boot-on;
104*fbe502e9SChris Packham			gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
105*fbe502e9SChris Packham		};
106*fbe502e9SChris Packham	};
107*fbe502e9SChris Packham
108*fbe502e9SChris Packham	netxbig_gpio_ext: netxbig-gpio-ext {
109*fbe502e9SChris Packham		compatible = "lacie,netxbig-gpio-ext";
110*fbe502e9SChris Packham
111*fbe502e9SChris Packham		addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
112*fbe502e9SChris Packham			      &gpio1 16 GPIO_ACTIVE_HIGH
113*fbe502e9SChris Packham			      &gpio1 17 GPIO_ACTIVE_HIGH>;
114*fbe502e9SChris Packham		data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
115*fbe502e9SChris Packham			      &gpio1 13 GPIO_ACTIVE_HIGH
116*fbe502e9SChris Packham			      &gpio1 14 GPIO_ACTIVE_HIGH>;
117*fbe502e9SChris Packham		enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
118*fbe502e9SChris Packham	};
119*fbe502e9SChris Packham
120*fbe502e9SChris Packham	netxbig-leds {
121*fbe502e9SChris Packham		compatible = "lacie,netxbig-leds";
122*fbe502e9SChris Packham
123*fbe502e9SChris Packham		gpio-ext = <&netxbig_gpio_ext>;
124*fbe502e9SChris Packham
125*fbe502e9SChris Packham		timers = <NETXBIG_LED_TIMER1 500 500
126*fbe502e9SChris Packham			  NETXBIG_LED_TIMER2 500 1000>;
127*fbe502e9SChris Packham
128*fbe502e9SChris Packham		blue-power {
129*fbe502e9SChris Packham			label = "netxbig:blue:power";
130*fbe502e9SChris Packham			mode-addr = <0>;
131*fbe502e9SChris Packham			mode-val = <NETXBIG_LED_OFF 0
132*fbe502e9SChris Packham				    NETXBIG_LED_ON 1
133*fbe502e9SChris Packham				    NETXBIG_LED_TIMER1 3
134*fbe502e9SChris Packham				    NETXBIG_LED_TIMER2 7>;
135*fbe502e9SChris Packham			bright-addr = <1>;
136*fbe502e9SChris Packham			max-brightness = <7>;
137*fbe502e9SChris Packham		};
138*fbe502e9SChris Packham		red-power {
139*fbe502e9SChris Packham			label = "netxbig:red:power";
140*fbe502e9SChris Packham			mode-addr = <0>;
141*fbe502e9SChris Packham			mode-val = <NETXBIG_LED_OFF 0
142*fbe502e9SChris Packham				    NETXBIG_LED_ON 2
143*fbe502e9SChris Packham				    NETXBIG_LED_TIMER1 4>;
144*fbe502e9SChris Packham			bright-addr = <1>;
145*fbe502e9SChris Packham			max-brightness = <7>;
146*fbe502e9SChris Packham		};
147*fbe502e9SChris Packham		blue-sata0 {
148*fbe502e9SChris Packham			label = "netxbig:blue:sata0";
149*fbe502e9SChris Packham			mode-addr = <3>;
150*fbe502e9SChris Packham			mode-val = <NETXBIG_LED_OFF 0
151*fbe502e9SChris Packham				    NETXBIG_LED_ON 7
152*fbe502e9SChris Packham				    NETXBIG_LED_SATA 1
153*fbe502e9SChris Packham				    NETXBIG_LED_TIMER1 3>;
154*fbe502e9SChris Packham			bright-addr = <2>;
155*fbe502e9SChris Packham			max-brightness = <7>;
156*fbe502e9SChris Packham		};
157*fbe502e9SChris Packham		red-sata0 {
158*fbe502e9SChris Packham			label = "netxbig:red:sata0";
159*fbe502e9SChris Packham			mode-addr = <3>;
160*fbe502e9SChris Packham			mode-val = <NETXBIG_LED_OFF 0
161*fbe502e9SChris Packham				    NETXBIG_LED_ON 2
162*fbe502e9SChris Packham				    NETXBIG_LED_TIMER1 4>;
163*fbe502e9SChris Packham			bright-addr = <2>;
164*fbe502e9SChris Packham			max-brightness = <7>;
165*fbe502e9SChris Packham		};
166*fbe502e9SChris Packham		blue-sata1 {
167*fbe502e9SChris Packham			label = "netxbig:blue:sata1";
168*fbe502e9SChris Packham			mode-addr = <4>;
169*fbe502e9SChris Packham			mode-val = <NETXBIG_LED_OFF 0
170*fbe502e9SChris Packham				    NETXBIG_LED_ON 7
171*fbe502e9SChris Packham				    NETXBIG_LED_SATA 1
172*fbe502e9SChris Packham				    NETXBIG_LED_TIMER1 3>;
173*fbe502e9SChris Packham			bright-addr = <2>;
174*fbe502e9SChris Packham			max-brightness = <7>;
175*fbe502e9SChris Packham		};
176*fbe502e9SChris Packham		red-sata1 {
177*fbe502e9SChris Packham			label = "netxbig:red:sata1";
178*fbe502e9SChris Packham			mode-addr = <4>;
179*fbe502e9SChris Packham			mode-val = <NETXBIG_LED_OFF 0
180*fbe502e9SChris Packham				    NETXBIG_LED_ON 2
181*fbe502e9SChris Packham				    NETXBIG_LED_TIMER1 4>;
182*fbe502e9SChris Packham			bright-addr = <2>;
183*fbe502e9SChris Packham			max-brightness = <7>;
184*fbe502e9SChris Packham		};
185*fbe502e9SChris Packham	};
186*fbe502e9SChris Packham};
187*fbe502e9SChris Packham
188*fbe502e9SChris Packham&mdio {
189*fbe502e9SChris Packham	status = "okay";
190*fbe502e9SChris Packham
191*fbe502e9SChris Packham	ethphy0: ethernet-phy@0 {
192*fbe502e9SChris Packham		reg = <8>;
193*fbe502e9SChris Packham	};
194*fbe502e9SChris Packham
195*fbe502e9SChris Packham	ethphy1: ethernet-phy@1 {
196*fbe502e9SChris Packham		reg = <0>;
197*fbe502e9SChris Packham	};
198*fbe502e9SChris Packham};
199*fbe502e9SChris Packham
200*fbe502e9SChris Packham&eth0 {
201*fbe502e9SChris Packham	status = "okay";
202*fbe502e9SChris Packham	ethernet0-port@0 {
203*fbe502e9SChris Packham		phy-handle = <&ethphy0>;
204*fbe502e9SChris Packham	};
205*fbe502e9SChris Packham};
206*fbe502e9SChris Packham
207*fbe502e9SChris Packham&pinctrl {
208*fbe502e9SChris Packham	pinctrl-names = "default";
209*fbe502e9SChris Packham
210*fbe502e9SChris Packham	pmx_button_function: pmx-button-function {
211*fbe502e9SChris Packham		marvell,pins = "mpp34";
212*fbe502e9SChris Packham		marvell,function = "gpio";
213*fbe502e9SChris Packham	};
214*fbe502e9SChris Packham	pmx_button_power_off: pmx-button-power-off {
215*fbe502e9SChris Packham		marvell,pins = "mpp15";
216*fbe502e9SChris Packham		marvell,function = "gpio";
217*fbe502e9SChris Packham	};
218*fbe502e9SChris Packham	pmx_button_power_on: pmx-button-power-on {
219*fbe502e9SChris Packham		marvell,pins = "mpp13";
220*fbe502e9SChris Packham		marvell,function = "gpio";
221*fbe502e9SChris Packham	};
222*fbe502e9SChris Packham};
223*fbe502e9SChris Packham
224*fbe502e9SChris Packham&i2c0 {
225*fbe502e9SChris Packham	status = "okay";
226*fbe502e9SChris Packham
227*fbe502e9SChris Packham	eeprom@50 {
228*fbe502e9SChris Packham		compatible = "atmel,24c04";
229*fbe502e9SChris Packham		pagesize = <16>;
230*fbe502e9SChris Packham		reg = <0x50>;
231*fbe502e9SChris Packham	};
232*fbe502e9SChris Packham};
233