]> git.ipfire.org Git - people/ms/linux.git/blob - arch/arm/boot/dts/armada-385-turris-omnia.dts
Merge tag 'mvebu-dt-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement...
[people/ms/linux.git] / arch / arm / boot / dts / armada-385-turris-omnia.dts
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /*
3 * Device Tree file for the Turris Omnia
4 *
5 * Copyright (C) 2016 Uwe Kleine-König <uwe@kleine-koenig.org>
6 * Copyright (C) 2016 Tomas Hlavacek <tmshlvkc@gmail.com>
7 *
8 * Schematic available at https://www.turris.cz/doc/_media/rtrom01-schema.pdf
9 */
10
11 /dts-v1/;
12
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/input/input.h>
15 #include <dt-bindings/leds/common.h>
16 #include "armada-385.dtsi"
17
18 / {
19 model = "Turris Omnia";
20 compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
21
22 chosen {
23 stdout-path = &uart0;
24 };
25
26 memory {
27 device_type = "memory";
28 reg = <0x00000000 0x40000000>; /* 1024 MB */
29 };
30
31 soc {
32 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 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 internal-regs {
39
40 /* USB part of the PCIe2/USB 2.0 port */
41 usb@58000 {
42 status = "okay";
43 };
44
45 sata@a8000 {
46 status = "okay";
47 };
48
49 sdhci@d8000 {
50 pinctrl-names = "default";
51 pinctrl-0 = <&sdhci_pins>;
52 status = "okay";
53
54 bus-width = <8>;
55 no-1-8-v;
56 non-removable;
57 };
58
59 usb3@f0000 {
60 status = "okay";
61 };
62
63 usb3@f8000 {
64 status = "okay";
65 };
66 };
67
68 pcie {
69 status = "okay";
70
71 pcie@1,0 {
72 /* Port 0, Lane 0 */
73 status = "okay";
74 slot-power-limit-milliwatt = <10000>;
75 };
76
77 pcie@2,0 {
78 /* Port 1, Lane 0 */
79 status = "okay";
80 slot-power-limit-milliwatt = <10000>;
81 };
82
83 pcie@3,0 {
84 /* Port 2, Lane 0 */
85 status = "okay";
86 slot-power-limit-milliwatt = <10000>;
87 };
88 };
89 };
90
91 sfp: sfp {
92 compatible = "sff,sfp";
93 i2c-bus = <&sfp_i2c>;
94 tx-fault-gpios = <&pcawan 0 GPIO_ACTIVE_HIGH>;
95 tx-disable-gpios = <&pcawan 1 GPIO_ACTIVE_HIGH>;
96 rate-select0-gpios = <&pcawan 2 GPIO_ACTIVE_HIGH>;
97 los-gpios = <&pcawan 3 GPIO_ACTIVE_HIGH>;
98 mod-def0-gpios = <&pcawan 4 GPIO_ACTIVE_LOW>;
99 maximum-power-milliwatt = <3000>;
100
101 /*
102 * For now this has to be enabled at boot time by U-Boot when
103 * a SFP module is present. Read more in the comment in the
104 * eth2 node below.
105 */
106 status = "disabled";
107 };
108 };
109
110 &bm {
111 status = "okay";
112 };
113
114 &bm_bppi {
115 status = "okay";
116 };
117
118 /* Connected to 88E6176 switch, port 6 */
119 &eth0 {
120 pinctrl-names = "default";
121 pinctrl-0 = <&ge0_rgmii_pins>;
122 status = "okay";
123 phy-mode = "rgmii";
124 buffer-manager = <&bm>;
125 bm,pool-long = <0>;
126 bm,pool-short = <3>;
127
128 fixed-link {
129 speed = <1000>;
130 full-duplex;
131 };
132 };
133
134 /* Connected to 88E6176 switch, port 5 */
135 &eth1 {
136 pinctrl-names = "default";
137 pinctrl-0 = <&ge1_rgmii_pins>;
138 status = "okay";
139 phy-mode = "rgmii";
140 buffer-manager = <&bm>;
141 bm,pool-long = <1>;
142 bm,pool-short = <3>;
143
144 fixed-link {
145 speed = <1000>;
146 full-duplex;
147 };
148 };
149
150 /* WAN port */
151 &eth2 {
152 /*
153 * eth2 is connected via a multiplexor to both the SFP cage and to
154 * ethernet-phy@1. The multiplexor switches the signal to SFP cage when
155 * a SFP module is present, as determined by the mode-def0 GPIO.
156 *
157 * Until kernel supports this configuration properly, in case SFP module
158 * is present, U-Boot has to enable the sfp node above, remove phy
159 * handle and add managed = "in-band-status" property.
160 */
161 status = "okay";
162 phy-mode = "sgmii";
163 phy-handle = <&phy1>;
164 phys = <&comphy5 2>;
165 sfp = <&sfp>;
166 buffer-manager = <&bm>;
167 bm,pool-long = <2>;
168 bm,pool-short = <3>;
169 };
170
171 &i2c0 {
172 pinctrl-names = "default";
173 pinctrl-0 = <&i2c0_pins>;
174 status = "okay";
175
176 i2cmux@70 {
177 compatible = "nxp,pca9547";
178 #address-cells = <1>;
179 #size-cells = <0>;
180 reg = <0x70>;
181
182 i2c@0 {
183 #address-cells = <1>;
184 #size-cells = <0>;
185 reg = <0>;
186
187 /* STM32F0 command interface at address 0x2a */
188
189 led-controller@2b {
190 compatible = "cznic,turris-omnia-leds";
191 reg = <0x2b>;
192 #address-cells = <1>;
193 #size-cells = <0>;
194
195 /*
196 * LEDs are controlled by MCU (STM32F0) at
197 * address 0x2b.
198 *
199 * The driver does not support HW control mode
200 * for the LEDs yet. Disable the LEDs for now.
201 *
202 * Also LED functions are not stable yet:
203 * - there are 3 LEDs connected via MCU to PCIe
204 * ports. One of these ports supports mSATA.
205 * There is no mSATA nor PCIe function.
206 * For now we use LED_FUNCTION_WLAN, since
207 * in most cases users have wifi cards in
208 * these slots
209 * - there are 2 LEDs dedicated for user: A and
210 * B. Again there is no such function defined.
211 * For now we use LED_FUNCTION_INDICATOR
212 */
213 status = "disabled";
214
215 multi-led@0 {
216 reg = <0x0>;
217 color = <LED_COLOR_ID_RGB>;
218 function = LED_FUNCTION_INDICATOR;
219 function-enumerator = <2>;
220 };
221
222 multi-led@1 {
223 reg = <0x1>;
224 color = <LED_COLOR_ID_RGB>;
225 function = LED_FUNCTION_INDICATOR;
226 function-enumerator = <1>;
227 };
228
229 multi-led@2 {
230 reg = <0x2>;
231 color = <LED_COLOR_ID_RGB>;
232 function = LED_FUNCTION_WLAN;
233 function-enumerator = <3>;
234 };
235
236 multi-led@3 {
237 reg = <0x3>;
238 color = <LED_COLOR_ID_RGB>;
239 function = LED_FUNCTION_WLAN;
240 function-enumerator = <2>;
241 };
242
243 multi-led@4 {
244 reg = <0x4>;
245 color = <LED_COLOR_ID_RGB>;
246 function = LED_FUNCTION_WLAN;
247 function-enumerator = <1>;
248 };
249
250 multi-led@5 {
251 reg = <0x5>;
252 color = <LED_COLOR_ID_RGB>;
253 function = LED_FUNCTION_WAN;
254 };
255
256 multi-led@6 {
257 reg = <0x6>;
258 color = <LED_COLOR_ID_RGB>;
259 function = LED_FUNCTION_LAN;
260 function-enumerator = <4>;
261 };
262
263 multi-led@7 {
264 reg = <0x7>;
265 color = <LED_COLOR_ID_RGB>;
266 function = LED_FUNCTION_LAN;
267 function-enumerator = <3>;
268 };
269
270 multi-led@8 {
271 reg = <0x8>;
272 color = <LED_COLOR_ID_RGB>;
273 function = LED_FUNCTION_LAN;
274 function-enumerator = <2>;
275 };
276
277 multi-led@9 {
278 reg = <0x9>;
279 color = <LED_COLOR_ID_RGB>;
280 function = LED_FUNCTION_LAN;
281 function-enumerator = <1>;
282 };
283
284 multi-led@a {
285 reg = <0xa>;
286 color = <LED_COLOR_ID_RGB>;
287 function = LED_FUNCTION_LAN;
288 function-enumerator = <0>;
289 };
290
291 multi-led@b {
292 reg = <0xb>;
293 color = <LED_COLOR_ID_RGB>;
294 function = LED_FUNCTION_POWER;
295 };
296 };
297
298 eeprom@54 {
299 compatible = "atmel,24c64";
300 reg = <0x54>;
301
302 /* The EEPROM contains data for bootloader.
303 * Contents:
304 * struct omnia_eeprom {
305 * u32 magic; (=0x0341a034 in LE)
306 * u32 ramsize; (in GiB)
307 * char regdomain[4];
308 * u32 crc32;
309 * };
310 */
311 };
312 };
313
314 i2c@1 {
315 #address-cells = <1>;
316 #size-cells = <0>;
317 reg = <1>;
318
319 /* routed to PCIe0/mSATA connector (CN7A) */
320 };
321
322 i2c@2 {
323 #address-cells = <1>;
324 #size-cells = <0>;
325 reg = <2>;
326
327 /* routed to PCIe1/USB2 connector (CN61A) */
328 };
329
330 i2c@3 {
331 #address-cells = <1>;
332 #size-cells = <0>;
333 reg = <3>;
334
335 /* routed to PCIe2 connector (CN62A) */
336 };
337
338 sfp_i2c: i2c@4 {
339 #address-cells = <1>;
340 #size-cells = <0>;
341 reg = <4>;
342
343 /* routed to SFP+ */
344 };
345
346 i2c@5 {
347 #address-cells = <1>;
348 #size-cells = <0>;
349 reg = <5>;
350
351 /* ATSHA204A-MAHDA-T crypto module */
352 crypto@64 {
353 compatible = "atmel,atsha204a";
354 reg = <0x64>;
355 };
356 };
357
358 i2c@6 {
359 #address-cells = <1>;
360 #size-cells = <0>;
361 reg = <6>;
362
363 /* exposed on pin header */
364 };
365
366 i2c@7 {
367 #address-cells = <1>;
368 #size-cells = <0>;
369 reg = <7>;
370
371 pcawan: gpio@71 {
372 /*
373 * GPIO expander for SFP+ signals and
374 * and phy irq
375 */
376 compatible = "nxp,pca9538";
377 reg = <0x71>;
378
379 pinctrl-names = "default";
380 pinctrl-0 = <&pcawan_pins>;
381
382 interrupt-parent = <&gpio1>;
383 interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
384
385 gpio-controller;
386 #gpio-cells = <2>;
387 };
388 };
389 };
390 };
391
392 &mdio {
393 pinctrl-names = "default";
394 pinctrl-0 = <&mdio_pins>;
395 status = "okay";
396
397 phy1: ethernet-phy@1 {
398 compatible = "ethernet-phy-ieee802.3-c22";
399 reg = <1>;
400 marvell,reg-init = <3 18 0 0x4985>;
401
402 /* irq is connected to &pcawan pin 7 */
403 };
404
405 /* Switch MV88E6176 at address 0x10 */
406 switch@10 {
407 pinctrl-names = "default";
408 pinctrl-0 = <&swint_pins>;
409 compatible = "marvell,mv88e6085";
410 #address-cells = <1>;
411 #size-cells = <0>;
412
413 dsa,member = <0 0>;
414 reg = <0x10>;
415
416 interrupt-parent = <&gpio1>;
417 interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
418
419 ports {
420 #address-cells = <1>;
421 #size-cells = <0>;
422
423 ports@0 {
424 reg = <0>;
425 label = "lan0";
426 };
427
428 ports@1 {
429 reg = <1>;
430 label = "lan1";
431 };
432
433 ports@2 {
434 reg = <2>;
435 label = "lan2";
436 };
437
438 ports@3 {
439 reg = <3>;
440 label = "lan3";
441 };
442
443 ports@4 {
444 reg = <4>;
445 label = "lan4";
446 };
447
448 ports@5 {
449 reg = <5>;
450 label = "cpu";
451 ethernet = <&eth1>;
452 phy-mode = "rgmii-id";
453
454 fixed-link {
455 speed = <1000>;
456 full-duplex;
457 };
458 };
459
460 /* port 6 is connected to eth0 */
461 };
462 };
463 };
464
465 &pinctrl {
466 pcawan_pins: pcawan-pins {
467 marvell,pins = "mpp46";
468 marvell,function = "gpio";
469 };
470
471 swint_pins: swint-pins {
472 marvell,pins = "mpp45";
473 marvell,function = "gpio";
474 };
475
476 spi0cs0_pins: spi0cs0-pins {
477 marvell,pins = "mpp25";
478 marvell,function = "spi0";
479 };
480
481 spi0cs1_pins: spi0cs1-pins {
482 marvell,pins = "mpp26";
483 marvell,function = "spi0";
484 };
485 };
486
487 &spi0 {
488 pinctrl-names = "default";
489 pinctrl-0 = <&spi0_pins &spi0cs0_pins>;
490 status = "okay";
491
492 flash@0 {
493 compatible = "spansion,s25fl164k", "jedec,spi-nor";
494 #address-cells = <1>;
495 #size-cells = <1>;
496 reg = <0>;
497 spi-max-frequency = <40000000>;
498
499 partitions {
500 compatible = "fixed-partitions";
501 #address-cells = <1>;
502 #size-cells = <1>;
503
504 partition@0 {
505 reg = <0x0 0x00100000>;
506 label = "U-Boot";
507 };
508
509 partition@100000 {
510 reg = <0x00100000 0x00700000>;
511 label = "Rescue system";
512 };
513 };
514 };
515
516 /* MISO, MOSI, SCLK and CS1 are routed to pin header CN11 */
517 };
518
519 &uart0 {
520 /* Pin header CN10 */
521 pinctrl-names = "default";
522 pinctrl-0 = <&uart0_pins>;
523 status = "okay";
524 };
525
526 &uart1 {
527 /* Pin header CN11 */
528 pinctrl-names = "default";
529 pinctrl-0 = <&uart1_pins>;
530 status = "okay";
531 };