mvebu: move files to files-6.1
[openwrt/openwrt.git] / target / linux / mvebu / files-6.1 / 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 gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
70 color = <LED_COLOR_ID_GREEN>;
71 linux,default-trigger = "phy0tpt";
72 };
73
74 led-1 {
75 gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
76 color = <LED_COLOR_ID_RED>;
77 };
78
79 led-2 {
80 gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
81 color = <LED_COLOR_ID_GREEN>;
82 function = LED_FUNCTION_STATUS;
83 };
84
85 led-3 {
86 gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
87 color = <LED_COLOR_ID_RED>;
88 function = LED_FUNCTION_STATUS;
89 };
90
91 led-4 {
92 gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
93 color = <LED_COLOR_ID_GREEN>;
94 };
95
96 led-5 {
97 gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
98 color = <LED_COLOR_ID_RED>;
99 };
100
101 led-6 {
102 gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
103 color = <LED_COLOR_ID_GREEN>;
104 linux,default-trigger = "phy1tpt";
105 };
106
107 led-7 {
108 gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
109 color = <LED_COLOR_ID_RED>;
110 };
111
112 led_power_green: led-8 {
113 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
114 color = <LED_COLOR_ID_GREEN>;
115 };
116
117 led_power_red: led-9 {
118 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
119 color = <LED_COLOR_ID_RED>;
120 };
121
122 led-10 {
123 gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
124 color = <LED_COLOR_ID_GREEN>;
125 linux,default-trigger = "usbport";
126 trigger-sources = <&hub_port2>;
127 };
128
129 led-11 {
130 gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
131 color = <LED_COLOR_ID_GREEN>;
132 linux,default-trigger = "usbport";
133 trigger-sources = <&hub_port1>;
134 };
135 };
136
137 regulator-vbus-usb0 {
138 compatible = "regulator-fixed";
139 regulator-name = "vbus-usb0";
140 regulator-min-microvolt = <5000000>;
141 regulator-max-microvolt = <5000000>;
142 gpio = <&gpio1 20 GPIO_ACTIVE_HIGH>;
143 enable-active-high;
144 regulator-always-on;
145 };
146
147 regulator-vbus-usb1 {
148 compatible = "regulator-fixed";
149 regulator-name = "vbus-usb1";
150 regulator-min-microvolt = <5000000>;
151 regulator-max-microvolt = <5000000>;
152 gpio = <&gpio1 21 GPIO_ACTIVE_HIGH>;
153 enable-active-high;
154 regulator-always-on;
155 };
156 };
157
158 &uart0 {
159 pinctrl-names = "default";
160 pinctrl-0 = <&uart0_pins>;
161 status = "okay";
162 };
163
164 &pinctrl {
165 pmx_usb_pins: usb-pins {
166 marvell,pins = "mpp2", /* smsc usb2514b reset */
167 "mpp48", "mpp49", /* port over current */
168 "mpp52", "mpp53"; /* port vbus */
169 marvell,function = "gpio";
170 };
171
172 pmx_keys_pins: keys-pins {
173 marvell,pins = "mpp18";
174 marvell,function = "gpio";
175 };
176
177 pmx_leds_pins: leds-pins {
178 marvell,pins = "mpp19", "mpp20", "mpp33", "mpp34", "mpp35",
179 "mpp36", "mpp44", "mpp45", "mpp46", "mpp47",
180 "mpp54", "mpp55";
181 marvell,function = "gpio";
182 };
183 };
184
185 &gpio0 {
186 usb-hub-reset {
187 gpio-hog;
188 gpios = <2 GPIO_ACTIVE_HIGH>;
189 output-high;
190 };
191 };
192
193 &usb0 {
194 pinctrl-names = "default";
195 pinctrl-0 = <&pmx_usb_pins>;
196 status = "okay";
197 #address-cells = <1>;
198 #size-cells = <0>;
199
200 /* SMSC USB2514B on PCB */
201 hub@1 {
202 compatible = "usb424,2514";
203 reg = <1>;
204 #address-cells = <1>;
205 #size-cells = <0>;
206
207 hub_port1: port@1 {
208 reg = <1>;
209 #trigger-source-cells = <0>;
210 };
211
212 hub_port2: port@2 {
213 reg = <2>;
214 #trigger-source-cells = <0>;
215 };
216 };
217 };
218
219 &bm {
220 status = "okay";
221 };
222
223 &bm_bppi {
224 status = "okay";
225 };
226
227 &eth1 {
228 pinctrl-names = "default";
229 pinctrl-0 = <&ge1_rgmii_pins>;
230 status = "okay";
231
232 phy-connection-type = "rgmii-id";
233 buffer-manager = <&bm>;
234 bm,pool-long = <2>;
235 bm,pool-short = <3>;
236
237 nvmem-cells = <&macaddr_bdinfo_6 1>;
238 nvmem-cell-names = "mac-address";
239
240 fixed-link {
241 speed = <1000>;
242 full-duplex;
243 };
244 };
245
246 &mdio {
247 pinctrl-names = "default";
248 pinctrl-0 = <&mdio_pins>;
249 status = "okay";
250
251 /* Marvell 88E6172 */
252 switch@0 {
253 compatible = "marvell,mv88e6085";
254 reg = <0x0>;
255 interrupt-controller;
256 #interrupt-cells = <2>;
257 interrupt-parent = <&gpio1>;
258 interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
259
260 ports {
261 #address-cells = <1>;
262 #size-cells = <0>;
263
264 port@0 {
265 reg = <0>;
266 label = "ge1_0";
267 };
268
269 port@1 {
270 reg = <1>;
271 label = "ge1_1";
272 };
273
274 port@2 {
275 reg = <2>;
276 label = "ge1_2";
277 };
278
279 port@3 {
280 reg = <3>;
281 label = "ge1_3";
282 };
283
284 ge0: port@4 {
285 reg = <4>;
286 label = "ge0";
287 nvmem-cells = <&macaddr_bdinfo_6 0>;
288 nvmem-cell-names = "mac-address";
289 };
290
291 /*
292 * eth0 is connected to port5 for WAN connection
293 * on port4 ("GE0")
294 */
295
296 port@6 {
297 reg = <6>;
298 label = "cpu";
299 ethernet = <&eth1>;
300 phy-connection-type = "rgmii-id";
301
302 fixed-link {
303 speed = <1000>;
304 full-duplex;
305 };
306 };
307 };
308 };
309 };
310
311 &rtc {
312 status = "disabled";
313 };
314
315 &spi1 {
316 pinctrl-names = "default";
317 pinctrl-0 = <&spi1_pins>;
318 status = "okay";
319
320 flash@0 {
321 compatible = "jedec,spi-nor";
322 reg = <0>;
323 spi-max-frequency = <40000000>;
324
325 partitions {
326 compatible = "fixed-partitions";
327 #address-cells = <1>;
328 #size-cells = <1>;
329
330 partition@0 {
331 reg = <0x0 0x100000>;
332 label = "bootloader";
333 read-only;
334 };
335
336 partition@100000 {
337 reg = <0x100000 0x10000>;
338 label = "bootloader-env";
339 read-only;
340 };
341
342 partition@110000 {
343 reg = <0x110000 0xf0000>;
344 label = "board_info";
345 read-only;
346
347 nvmem-layout {
348 compatible = "fixed-layout";
349 #address-cells = <1>;
350 #size-cells = <1>;
351
352 macaddr_bdinfo_6: macaddr@6 {
353 compatible = "mac-base";
354 reg = <0x6 0x6>;
355 #nvmem-cell-cells = <1>;
356 };
357 };
358 };
359
360 partition@200000 {
361 compatible = "iij,seil-firmware";
362 reg = <0x200000 0xf00000>;
363 label = "firmware";
364 iij,bootdev-name = "flash";
365 iij,seil-id = <0x5345494c 0x32303135>;
366 };
367
368 partition@1100000 {
369 compatible = "iij,seil-firmware";
370 reg = <0x1100000 0xf00000>;
371 label = "rescue";
372 iij,bootdev-name = "rescue";
373 iij,seil-id = <0x5345494c 0x32303135>;
374 };
375 };
376 };
377 };