summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/kirkwood-netxbig.dtsi
blob: 52b58fe0c4feeff2486d7d463ade23b5526b3e64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
/*
 * Device Tree common file for LaCie 2Big and 5Big Network v2
 *
 * Copyright (C) 2014
 *
 * Andrew Lunn <andrew@lunn.ch>
 *
 * Based on netxbig_v2-setup.c,
 * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
*/

#include <dt-bindings/leds/leds-netxbig.h>
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	chosen {
		bootargs = "console=ttyS0,115200n8";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		serial@12000 {
			status = "okay";
		};

		spi@10600 {
			status = "okay";

			flash@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "mxicy,mx25l4005a", "jedec,spi-nor";
				reg = <0>;
				spi-max-frequency = <20000000>;
				mode = <0>;

				partition@0 {
					reg = <0x0 0x80000>;
					label = "u-boot";
				};
			};
		};

		sata@80000 {
			status = "okay";
			nr-ports = <2>;
		};

	};

	gpio-keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		/*
		 * esc and power represent a three position rocker
		 * switch. Thus the conventional KEY_POWER does not fit
		 */
		exc {
			label = "Back power switch (on|auto)";
			linux,code = <KEY_ESC>;
			linux,input-type = <5>;
			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
		};
		power {
			label = "Back power switch (auto|off)";
			linux,code = <KEY_1>;
			linux,input-type = <5>;
			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
		};
		option {
			label = "Function button";
			linux,code = <KEY_OPTION>;
			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
		};

	};

	gpio-poweroff {
		compatible = "gpio-poweroff";
		gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
	};

	regulators: regulators {
		status = "okay";
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-names = "default";

		regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "hdd0power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
		};
	};

	netxbig_gpio_ext: netxbig-gpio-ext {
		compatible = "lacie,netxbig-gpio-ext";

		addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
			      &gpio1 16 GPIO_ACTIVE_HIGH
			      &gpio1 17 GPIO_ACTIVE_HIGH>;
		data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
			      &gpio1 13 GPIO_ACTIVE_HIGH
			      &gpio1 14 GPIO_ACTIVE_HIGH>;
		enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
	};

	netxbig-leds {
		compatible = "lacie,netxbig-leds";

		gpio-ext = <&netxbig_gpio_ext>;

		timers = <NETXBIG_LED_TIMER1 500 500
			  NETXBIG_LED_TIMER2 500 1000>;

		blue-power {
			label = "netxbig:blue:power";
			mode-addr = <0>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 1
				    NETXBIG_LED_TIMER1 3
				    NETXBIG_LED_TIMER2 7>;
			bright-addr = <1>;
			max-brightness = <7>;
		};
		red-power {
			label = "netxbig:red:power";
			mode-addr = <0>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <1>;
			max-brightness = <7>;
		};
		blue-sata0 {
			label = "netxbig:blue:sata0";
			mode-addr = <3>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata0 {
			label = "netxbig:red:sata0";
			mode-addr = <3>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		blue-sata1 {
			label = "netxbig:blue:sata1";
			mode-addr = <4>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata1 {
			label = "netxbig:red:sata1";
			mode-addr = <4>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 {
		reg = <8>;
	};

	ethphy1: ethernet-phy@1 {
		reg = <0>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&pinctrl {
	pinctrl-names = "default";

	pmx_button_function: pmx-button-function {
		marvell,pins = "mpp34";
		marvell,function = "gpio";
	};
	pmx_button_power_off: pmx-button-power-off {
		marvell,pins = "mpp15";
		marvell,function = "gpio";
	};
	pmx_button_power_on: pmx-button-power-on {
		marvell,pins = "mpp13";
		marvell,function = "gpio";
	};
};

&i2c0 {
	status = "okay";

	eeprom@50 {
		compatible = "atmel,24c04";
		pagesize = <16>;
		reg = <0x50>;
	};
};