1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Device Tree file for CZ.NIC Turris Mox Board
4 * 2019 by Marek Behun <marek.behun@nic.cz>
9 #include <dt-bindings/bus/moxtet.h>
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include "armada-372x.dtsi"
15 model = "CZ.NIC Turris Mox Board";
16 compatible = "cznic,turris-mox", "marvell,armada3720",
26 stdout-path = "serial0:115200n8";
30 device_type = "memory";
31 reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
35 compatible = "gpio-leds";
37 label = "mox:red:activity";
38 gpios = <&gpiosb 21 GPIO_ACTIVE_LOW>;
39 linux,default-trigger = "default-on";
44 compatible = "gpio-keys";
48 linux,code = <KEY_RESTART>;
49 gpios = <&gpiosb 20 GPIO_ACTIVE_LOW>;
50 debounce-interval = <60>;
54 exp_usb3_vbus: usb3-vbus {
55 compatible = "regulator-fixed";
56 regulator-name = "usb3-vbus";
57 regulator-min-microvolt = <5000000>;
58 regulator-max-microvolt = <5000000>;
61 gpio = <&gpiosb 0 GPIO_ACTIVE_HIGH>;
65 compatible = "regulator-gpio";
66 regulator-name = "vsdc";
67 regulator-min-microvolt = <1800000>;
68 regulator-max-microvolt = <3300000>;
71 gpios = <&gpiosb 23 GPIO_ACTIVE_HIGH>;
78 vsdio_reg: vsdio-reg {
79 compatible = "regulator-gpio";
80 regulator-name = "vsdio";
81 regulator-min-microvolt = <1800000>;
82 regulator-max-microvolt = <3300000>;
85 gpios = <&gpiosb 22 GPIO_ACTIVE_HIGH>;
92 sdhci1_pwrseq: sdhci1-pwrseq {
93 compatible = "mmc-pwrseq-simple";
94 reset-gpios = <&gpionb 19 GPIO_ACTIVE_HIGH>;
99 compatible = "sff,sfp";
101 los-gpio = <&moxtet_sfp 0 GPIO_ACTIVE_HIGH>;
102 tx-fault-gpio = <&moxtet_sfp 1 GPIO_ACTIVE_HIGH>;
103 mod-def0-gpio = <&moxtet_sfp 2 GPIO_ACTIVE_LOW>;
104 tx-disable-gpio = <&moxtet_sfp 4 GPIO_ACTIVE_HIGH>;
105 rate-select0-gpio = <&moxtet_sfp 5 GPIO_ACTIVE_HIGH>;
107 /* enabled by U-Boot if SFP module is present */
113 compatible = "marvell,armada-3700-rwtm-firmware", "cznic,turris-mox-rwtm";
119 pinctrl-names = "default";
120 pinctrl-0 = <&i2c1_pins>;
121 clock-frequency = <100000>;
122 /delete-property/ mrvl,i2c-fast-mode;
125 /* MCP7940MT-I/MNY RTC */
127 compatible = "microchip,mcp7940x";
129 interrupt-parent = <&gpiosb>;
130 interrupts = <5 IRQ_TYPE_EDGE_FALLING>; /* GPIO2_5 */
135 pinctrl-names = "default";
136 pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>;
138 max-link-speed = <2>;
139 reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
142 * U-Boot port for Turris Mox has a bug which always expects that "ranges" DT property
143 * contains exactly 2 ranges with 3 (child) address cells, 2 (parent) address cells and
144 * 2 size cells and also expects that the second range starts at 16 MB offset. Also it
145 * expects that first range uses same address for PCI (child) and CPU (parent) cells (so
146 * no remapping) and that this address is the lowest from all specified ranges. If these
147 * conditions are not met then U-Boot crashes during loading kernel DTB file. PCIe address
148 * space is 128 MB long, so the best split between MEM and IO is to use fixed 16 MB window
149 * for IO and the rest 112 MB (64+32+16) for MEM, despite that maximal IO size is just 64 kB.
150 * This bug is not present in U-Boot ports for other Armada 3700 devices and is fixed in
151 * U-Boot version 2021.07. See relevant U-Boot commits (the last one contains fix):
152 * https://source.denx.de/u-boot/u-boot/-/commit/cb2ddb291ee6fcbddd6d8f4ff49089dfe580f5d7
153 * https://source.denx.de/u-boot/u-boot/-/commit/c64ac3b3185aeb3846297ad7391fc6df8ecd73bf
154 * https://source.denx.de/u-boot/u-boot/-/commit/4a82fca8e330157081fc132a591ebd99ba02ee33
155 * Bug related to requirement of same child and parent addresses for first range is fixed
156 * in U-Boot version 2022.04 by following commit:
157 * https://source.denx.de/u-boot/u-boot/-/commit/1fd54253bca7d43d046bba4853fe5fafd034bc17
159 #address-cells = <3>;
161 ranges = <0x81000000 0 0xe8000000 0 0xe8000000 0 0x01000000 /* Port 0 IO */
162 0x82000000 0 0xe9000000 0 0xe9000000 0 0x07000000>; /* Port 0 MEM */
164 /* enabled by U-Boot if PCIe module is present */
173 pinctrl-names = "default";
174 pinctrl-0 = <&rgmii_pins>;
175 phy-mode = "rgmii-id";
176 phy-handle = <&phy1>;
181 phy-mode = "2500base-x";
182 managed = "in-band-status";
189 cd-gpios = <&gpionb 10 GPIO_ACTIVE_HIGH>;
190 vqmmc-supply = <&vsdc_reg>;
191 marvell,pad-type = "sd";
196 pinctrl-names = "default";
197 pinctrl-0 = <&sdio_pins>;
200 marvell,pad-type = "sd";
201 vqmmc-supply = <&vsdio_reg>;
202 mmc-pwrseq = <&sdhci1_pwrseq>;
203 /* forbid SDR104 for FCC purposes */
204 sdhci-caps-mask = <0x2 0x0>;
210 pinctrl-names = "default";
211 pinctrl-0 = <&spi_quad_pins &spi_cs1_pins>;
212 assigned-clocks = <&nb_periph_clk 7>;
213 assigned-clock-parents = <&tbg 1>;
214 assigned-clock-rates = <20000000>;
217 #address-cells = <1>;
219 compatible = "jedec,spi-nor";
221 spi-max-frequency = <20000000>;
224 compatible = "fixed-partitions";
225 #address-cells = <1>;
229 label = "secure-firmware";
234 label = "a53-firmware";
235 reg = <0x20000 0x160000>;
239 label = "u-boot-env";
240 reg = <0x180000 0x10000>;
244 label = "Rescue system";
245 reg = <0x190000 0x660000>;
250 reg = <0x7f0000 0x10000>;
256 #address-cells = <1>;
258 compatible = "cznic,moxtet";
260 reset-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>;
261 spi-max-frequency = <10000000>;
264 interrupt-controller;
265 #interrupt-cells = <1>;
266 interrupt-parent = <&gpiosb>;
267 interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
271 compatible = "cznic,moxtet-gpio";
286 compatible = "usb-a-connector";
287 phy-supply = <&exp_usb3_vbus>;
297 pinctrl-names = "default";
298 pinctrl-0 = <&smi_pins>;
301 phy1: ethernet-phy@1 {
305 /* switch nodes are enabled by U-Boot if modules are present */
307 compatible = "marvell,mv88e6190";
310 interrupt-parent = <&moxtet>;
311 interrupts = <MOXTET_IRQ_PERIDOT(0)>;
315 #address-cells = <1>;
318 switch0phy1: switch0phy1@1 {
322 switch0phy2: switch0phy2@2 {
326 switch0phy3: switch0phy3@3 {
330 switch0phy4: switch0phy4@4 {
334 switch0phy5: switch0phy5@5 {
338 switch0phy6: switch0phy6@6 {
342 switch0phy7: switch0phy7@7 {
346 switch0phy8: switch0phy8@8 {
352 #address-cells = <1>;
358 phy-handle = <&switch0phy1>;
364 phy-handle = <&switch0phy2>;
370 phy-handle = <&switch0phy3>;
376 phy-handle = <&switch0phy4>;
382 phy-handle = <&switch0phy5>;
388 phy-handle = <&switch0phy6>;
394 phy-handle = <&switch0phy7>;
400 phy-handle = <&switch0phy8>;
407 phy-mode = "2500base-x";
408 managed = "in-band-status";
411 switch0port10: port@a {
414 phy-mode = "2500base-x";
415 managed = "in-band-status";
416 link = <&switch1port9 &switch2port9>;
425 managed = "in-band-status";
432 compatible = "marvell,mv88e6085";
435 interrupt-parent = <&moxtet>;
436 interrupts = <MOXTET_IRQ_TOPAZ>;
440 #address-cells = <1>;
443 switch0phy1_topaz: switch0phy1@11 {
447 switch0phy2_topaz: switch0phy2@12 {
451 switch0phy3_topaz: switch0phy3@13 {
455 switch0phy4_topaz: switch0phy4@14 {
461 #address-cells = <1>;
467 phy-handle = <&switch0phy1_topaz>;
473 phy-handle = <&switch0phy2_topaz>;
479 phy-handle = <&switch0phy3_topaz>;
485 phy-handle = <&switch0phy4_topaz>;
491 phy-mode = "2500base-x";
492 managed = "in-band-status";
499 compatible = "marvell,mv88e6190";
502 interrupt-parent = <&moxtet>;
503 interrupts = <MOXTET_IRQ_PERIDOT(1)>;
507 #address-cells = <1>;
510 switch1phy1: switch1phy1@1 {
514 switch1phy2: switch1phy2@2 {
518 switch1phy3: switch1phy3@3 {
522 switch1phy4: switch1phy4@4 {
526 switch1phy5: switch1phy5@5 {
530 switch1phy6: switch1phy6@6 {
534 switch1phy7: switch1phy7@7 {
538 switch1phy8: switch1phy8@8 {
544 #address-cells = <1>;
550 phy-handle = <&switch1phy1>;
556 phy-handle = <&switch1phy2>;
562 phy-handle = <&switch1phy3>;
568 phy-handle = <&switch1phy4>;
574 phy-handle = <&switch1phy5>;
580 phy-handle = <&switch1phy6>;
586 phy-handle = <&switch1phy7>;
592 phy-handle = <&switch1phy8>;
595 switch1port9: port@9 {
598 phy-mode = "2500base-x";
599 managed = "in-band-status";
600 link = <&switch0port10>;
603 switch1port10: port@a {
606 phy-mode = "2500base-x";
607 managed = "in-band-status";
608 link = <&switch2port9>;
617 managed = "in-band-status";
624 compatible = "marvell,mv88e6085";
627 interrupt-parent = <&moxtet>;
628 interrupts = <MOXTET_IRQ_TOPAZ>;
632 #address-cells = <1>;
635 switch1phy1_topaz: switch1phy1@11 {
639 switch1phy2_topaz: switch1phy2@12 {
643 switch1phy3_topaz: switch1phy3@13 {
647 switch1phy4_topaz: switch1phy4@14 {
653 #address-cells = <1>;
659 phy-handle = <&switch1phy1_topaz>;
665 phy-handle = <&switch1phy2_topaz>;
671 phy-handle = <&switch1phy3_topaz>;
677 phy-handle = <&switch1phy4_topaz>;
683 phy-mode = "2500base-x";
684 managed = "in-band-status";
685 link = <&switch0port10>;
691 compatible = "marvell,mv88e6190";
694 interrupt-parent = <&moxtet>;
695 interrupts = <MOXTET_IRQ_PERIDOT(2)>;
699 #address-cells = <1>;
702 switch2phy1: switch2phy1@1 {
706 switch2phy2: switch2phy2@2 {
710 switch2phy3: switch2phy3@3 {
714 switch2phy4: switch2phy4@4 {
718 switch2phy5: switch2phy5@5 {
722 switch2phy6: switch2phy6@6 {
726 switch2phy7: switch2phy7@7 {
730 switch2phy8: switch2phy8@8 {
736 #address-cells = <1>;
742 phy-handle = <&switch2phy1>;
748 phy-handle = <&switch2phy2>;
754 phy-handle = <&switch2phy3>;
760 phy-handle = <&switch2phy4>;
766 phy-handle = <&switch2phy5>;
772 phy-handle = <&switch2phy6>;
778 phy-handle = <&switch2phy7>;
784 phy-handle = <&switch2phy8>;
787 switch2port9: port@9 {
790 phy-mode = "2500base-x";
791 managed = "in-band-status";
792 link = <&switch1port10 &switch0port10>;
800 managed = "in-band-status";
807 compatible = "marvell,mv88e6085";
810 interrupt-parent = <&moxtet>;
811 interrupts = <MOXTET_IRQ_TOPAZ>;
815 #address-cells = <1>;
818 switch2phy1_topaz: switch2phy1@11 {
822 switch2phy2_topaz: switch2phy2@12 {
826 switch2phy3_topaz: switch2phy3@13 {
830 switch2phy4_topaz: switch2phy4@14 {
836 #address-cells = <1>;
842 phy-handle = <&switch2phy1_topaz>;
848 phy-handle = <&switch2phy2_topaz>;
854 phy-handle = <&switch2phy3_topaz>;
860 phy-handle = <&switch2phy4_topaz>;
866 phy-mode = "2500base-x";
867 managed = "in-band-status";
868 link = <&switch1port10 &switch0port10>;