d2483611ae61234edfe4ec4ff397b65f85aa95a0
[openwrt/staging/hauke.git] / target / linux / mvebu / files / arch / arm / boot / dts / armada-380-iij-sa-w2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include "armada-380.dtsi"
9
10 / {
11 model = "IIJ SA-W2";
12 compatible = "iij,sa-w2", "marvell,armada380";
13
14 aliases {
15 led-boot = &led_power_green;
16 led-failsafe = &led_power_red;
17 led-running = &led_power_green;
18 led-upgrade = &led_power_green;
19 label-mac-device = &ge0;
20 };
21
22 chosen {
23 stdout-path = "serial0:115200n8";
24 };
25
26 memory@0 {
27 device_type = "memory";
28 reg = <0x00000000 0x10000000>; /* 256MB */
29 };
30
31 soc {
32 ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
33 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
34 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
35 MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
36 MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
37
38 pcie {
39 status = "okay";
40
41 pcie@1,0 {
42 status = "okay";
43 };
44
45 pcie@3,0 {
46 status = "okay";
47 };
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53 pinctrl-names = "default";
54 pinctrl-0 = <&pmx_keys_pins>;
55
56 button-init {
57 label = "init";
58 linux,code = <KEY_RESTART>;
59 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
60 };
61 };
62
63 leds {
64 compatible = "gpio-leds";
65 pinctrl-names = "default";
66 pinctrl-0 = <&pmx_leds_pins>;
67
68 led-0 {
69 label = "green:wlan5g";
70 gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
71 color = <LED_COLOR_ID_GREEN>;
72 linux,default-trigger = "phy0tpt";
73 };
74
75 led-1 {
76 label = "red:wlan5g";
77 gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
78 color = <LED_COLOR_ID_RED>;
79 };
80
81 led-2 {
82 label = "green:status";
83 gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
84 color = <LED_COLOR_ID_GREEN>;
85 function = LED_FUNCTION_STATUS;
86 };
87
88 led-3 {
89 label = "red:status";
90 gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
91 color = <LED_COLOR_ID_RED>;
92 function = LED_FUNCTION_STATUS;
93 };
94
95 led-4 {
96 label = "green:mobile";
97 gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
98 color = <LED_COLOR_ID_GREEN>;
99 };
100
101 led-5 {
102 label = "red:mobile";
103 gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
104 color = <LED_COLOR_ID_RED>;
105 };
106
107 led-6 {
108 label = "green:wlan2g";
109 gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
110 color = <LED_COLOR_ID_GREEN>;
111 linux,default-trigger = "phy1tpt";
112 };
113
114 led-7 {
115 label = "red:wlan2g";
116 gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
117 color = <LED_COLOR_ID_RED>;
118 };
119
120 led_power_green: led-8 {
121 label = "green:power";
122 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
123 color = <LED_COLOR_ID_GREEN>;
124 };
125
126 led_power_red: led-9 {
127 label = "red:power";
128 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
129 color = <LED_COLOR_ID_RED>;
130 };
131
132 led-10 {
133 label = "green:usb1";
134 gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
135 color = <LED_COLOR_ID_GREEN>;
136 linux,default-trigger = "usbport";
137 trigger-sources = <&hub_port2>;
138 };
139
140 led-11 {
141 label = "green:usb0";
142 gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
143 color = <LED_COLOR_ID_GREEN>;
144 linux,default-trigger = "usbport";
145 trigger-sources = <&hub_port1>;
146 };
147 };
148
149 regulator-vbus-usb0 {
150 compatible = "regulator-fixed";
151 regulator-name = "vbus-usb0";
152 regulator-min-microvolt = <5000000>;
153 regulator-max-microvolt = <5000000>;
154 gpio = <&gpio1 20 GPIO_ACTIVE_HIGH>;
155 enable-active-high;
156 regulator-always-on;
157 };
158
159 regulator-vbus-usb1 {
160 compatible = "regulator-fixed";
161 regulator-name = "vbus-usb1";
162 regulator-min-microvolt = <5000000>;
163 regulator-max-microvolt = <5000000>;
164 gpio = <&gpio1 21 GPIO_ACTIVE_HIGH>;
165 enable-active-high;
166 regulator-always-on;
167 };
168 };
169
170 &uart0 {
171 pinctrl-names = "default";
172 pinctrl-0 = <&uart0_pins>;
173 status = "okay";
174 };
175
176 &pinctrl {
177 pmx_usb_pins: usb-pins {
178 marvell,pins = "mpp2", /* smsc usb2514b reset */
179 "mpp48", "mpp49", /* port over current */
180 "mpp52", "mpp53"; /* port vbus */
181 marvell,function = "gpio";
182 };
183
184 pmx_keys_pins: keys-pins {
185 marvell,pins = "mpp18";
186 marvell,function = "gpio";
187 };
188
189 pmx_leds_pins: leds-pins {
190 marvell,pins = "mpp19", "mpp20", "mpp33", "mpp34", "mpp35",
191 "mpp36", "mpp44", "mpp45", "mpp46", "mpp47",
192 "mpp54", "mpp55";
193 marvell,function = "gpio";
194 };
195 };
196
197 &gpio0 {
198 usb-hub-reset {
199 gpio-hog;
200 gpios = <2 GPIO_ACTIVE_HIGH>;
201 output-high;
202 };
203 };
204
205 &usb0 {
206 pinctrl-names = "default";
207 pinctrl-0 = <&pmx_usb_pins>;
208 status = "okay";
209 #address-cells = <1>;
210 #size-cells = <0>;
211
212 /* SMSC USB2514B on PCB */
213 hub@1 {
214 compatible = "usb424,2514";
215 reg = <1>;
216 #address-cells = <1>;
217 #size-cells = <0>;
218
219 hub_port1: port@1 {
220 reg = <1>;
221 #trigger-source-cells = <0>;
222 };
223
224 hub_port2: port@2 {
225 reg = <2>;
226 #trigger-source-cells = <0>;
227 };
228 };
229 };
230
231 &bm {
232 status = "okay";
233 };
234
235 &bm_bppi {
236 status = "okay";
237 };
238
239 &eth1 {
240 pinctrl-names = "default";
241 pinctrl-0 = <&ge1_rgmii_pins>;
242 status = "okay";
243
244 phy-connection-type = "rgmii-id";
245 buffer-manager = <&bm>;
246 bm,pool-long = <2>;
247 bm,pool-short = <3>;
248
249 nvmem-cells = <&macaddr_bdinfo_6 1>;
250 nvmem-cell-names = "mac-address";
251
252 fixed-link {
253 speed = <1000>;
254 full-duplex;
255 };
256 };
257
258 &mdio {
259 pinctrl-names = "default";
260 pinctrl-0 = <&mdio_pins>;
261 status = "okay";
262
263 /* Marvell 88E6172 */
264 switch@0 {
265 compatible = "marvell,mv88e6085";
266 reg = <0x0>;
267 interrupt-controller;
268 #interrupt-cells = <2>;
269 interrupt-parent = <&gpio1>;
270 interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
271
272 ports {
273 #address-cells = <1>;
274 #size-cells = <0>;
275
276 port@0 {
277 reg = <0>;
278 label = "ge1_0";
279 };
280
281 port@1 {
282 reg = <1>;
283 label = "ge1_1";
284 };
285
286 port@2 {
287 reg = <2>;
288 label = "ge1_2";
289 };
290
291 port@3 {
292 reg = <3>;
293 label = "ge1_3";
294 };
295
296 ge0: port@4 {
297 reg = <4>;
298 label = "ge0";
299 nvmem-cells = <&macaddr_bdinfo_6 0>;
300 nvmem-cell-names = "mac-address";
301 };
302
303 /*
304 * eth0 is connected to port5 for WAN connection
305 * on port4 ("GE0")
306 */
307
308 port@6 {
309 reg = <6>;
310 label = "cpu";
311 ethernet = <&eth1>;
312 phy-connection-type = "rgmii-id";
313
314 fixed-link {
315 speed = <1000>;
316 full-duplex;
317 };
318 };
319 };
320 };
321 };
322
323 &rtc {
324 status = "disabled";
325 };
326
327 &spi1 {
328 pinctrl-names = "default";
329 pinctrl-0 = <&spi1_pins>;
330 status = "okay";
331
332 flash@0 {
333 compatible = "jedec,spi-nor";
334 reg = <0>;
335 spi-max-frequency = <40000000>;
336
337 partitions {
338 compatible = "fixed-partitions";
339 #address-cells = <1>;
340 #size-cells = <1>;
341
342 partition@0 {
343 reg = <0x0 0x100000>;
344 label = "bootloader";
345 read-only;
346 };
347
348 partition@100000 {
349 reg = <0x100000 0x10000>;
350 label = "bootloader-env";
351 read-only;
352 };
353
354 partition@110000 {
355 compatible = "nvmem-cells";
356 reg = <0x110000 0xf0000>;
357 label = "board_info";
358 read-only;
359
360 nvmem-layout {
361 compatible = "fixed-layout";
362 #address-cells = <1>;
363 #size-cells = <1>;
364
365 macaddr_bdinfo_6: macaddr@6 {
366 compatible = "mac-base";
367 reg = <0x6 0x6>;
368 #nvmem-cell-cells = <1>;
369 };
370 };
371 };
372
373 partition@200000 {
374 compatible = "iij,seil-firmware";
375 reg = <0x200000 0xf00000>;
376 label = "firmware";
377 iij,bootdev-name = "flash";
378 iij,seil-id = <0x5345494c 0x32303135>;
379 };
380
381 partition@1100000 {
382 compatible = "iij,seil-firmware";
383 reg = <0x1100000 0xf00000>;
384 label = "rescue";
385 iij,bootdev-name = "rescue";
386 iij,seil-id = <0x5345494c 0x32303135>;
387 };
388 };
389 };
390 };