1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Device Tree file for CZ.NIC Turris Mox Board
4 * 2019 by Marek BehĂșn <kabel@kernel.org>
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",
28 stdout-path = "serial0:115200n8";
32 device_type = "memory";
33 reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
37 compatible = "gpio-leds";
39 label = "mox:red:activity";
40 gpios = <&gpiosb 21 GPIO_ACTIVE_LOW>;
41 linux,default-trigger = "default-on";
46 compatible = "gpio-keys";
50 linux,code = <KEY_RESTART>;
51 gpios = <&gpiosb 20 GPIO_ACTIVE_LOW>;
52 debounce-interval = <60>;
56 exp_usb3_vbus: usb3-vbus {
57 compatible = "regulator-fixed";
58 regulator-name = "usb3-vbus";
59 regulator-min-microvolt = <5000000>;
60 regulator-max-microvolt = <5000000>;
63 gpio = <&gpiosb 0 GPIO_ACTIVE_HIGH>;
67 compatible = "regulator-gpio";
68 regulator-name = "vsdc";
69 regulator-min-microvolt = <1800000>;
70 regulator-max-microvolt = <3300000>;
73 gpios = <&gpiosb 23 GPIO_ACTIVE_HIGH>;
80 vsdio_reg: vsdio-reg {
81 compatible = "regulator-gpio";
82 regulator-name = "vsdio";
83 regulator-min-microvolt = <1800000>;
84 regulator-max-microvolt = <3300000>;
87 gpios = <&gpiosb 22 GPIO_ACTIVE_HIGH>;
94 sdhci1_pwrseq: sdhci1-pwrseq {
95 compatible = "mmc-pwrseq-simple";
96 reset-gpios = <&gpionb 19 GPIO_ACTIVE_HIGH>;
101 compatible = "sff,sfp";
103 los-gpios = <&moxtet_sfp 0 GPIO_ACTIVE_HIGH>;
104 tx-fault-gpios = <&moxtet_sfp 1 GPIO_ACTIVE_HIGH>;
105 mod-def0-gpios = <&moxtet_sfp 2 GPIO_ACTIVE_LOW>;
106 tx-disable-gpios = <&moxtet_sfp 4 GPIO_ACTIVE_HIGH>;
107 rate-select0-gpios = <&moxtet_sfp 5 GPIO_ACTIVE_HIGH>;
108 maximum-power-milliwatt = <3000>;
110 /* enabled by U-Boot if SFP module is present */
116 compatible = "marvell,armada-3700-rwtm-firmware", "cznic,turris-mox-rwtm";
122 pinctrl-names = "default";
123 pinctrl-0 = <&i2c1_pins>;
124 clock-frequency = <100000>;
125 /delete-property/ mrvl,i2c-fast-mode;
128 /* MCP7940MT-I/MNY RTC */
130 compatible = "microchip,mcp7940x";
132 interrupt-parent = <&gpiosb>;
133 interrupts = <5 IRQ_TYPE_EDGE_FALLING>; /* GPIO2_5 */
138 pinctrl-names = "default";
139 pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>;
141 reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
142 slot-power-limit-milliwatt = <10000>;
144 * U-Boot port for Turris Mox has a bug which always expects that "ranges" DT property
145 * contains exactly 2 ranges with 3 (child) address cells, 2 (parent) address cells and
146 * 2 size cells and also expects that the second range starts at 16 MB offset. Also it
147 * expects that first range uses same address for PCI (child) and CPU (parent) cells (so
148 * no remapping) and that this address is the lowest from all specified ranges. If these
149 * conditions are not met then U-Boot crashes during loading kernel DTB file. PCIe address
150 * space is 128 MB long, so the best split between MEM and IO is to use fixed 16 MB window
151 * for IO and the rest 112 MB (64+32+16) for MEM, despite that maximal IO size is just 64 kB.
152 * This bug is not present in U-Boot ports for other Armada 3700 devices and is fixed in
153 * U-Boot version 2021.07. See relevant U-Boot commits (the last one contains fix):
154 * https://source.denx.de/u-boot/u-boot/-/commit/cb2ddb291ee6fcbddd6d8f4ff49089dfe580f5d7
155 * https://source.denx.de/u-boot/u-boot/-/commit/c64ac3b3185aeb3846297ad7391fc6df8ecd73bf
156 * https://source.denx.de/u-boot/u-boot/-/commit/4a82fca8e330157081fc132a591ebd99ba02ee33
157 * Bug related to requirement of same child and parent addresses for first range is fixed
158 * in U-Boot version 2022.04 by following commit:
159 * https://source.denx.de/u-boot/u-boot/-/commit/1fd54253bca7d43d046bba4853fe5fafd034bc17
161 #address-cells = <3>;
163 ranges = <0x81000000 0 0xe8000000 0 0xe8000000 0 0x01000000 /* Port 0 IO */
164 0x82000000 0 0xe9000000 0 0xe9000000 0 0x07000000>; /* Port 0 MEM */
166 /* enabled by U-Boot if PCIe module is present */
175 pinctrl-names = "default";
176 pinctrl-0 = <&rgmii_pins>;
177 phy-mode = "rgmii-id";
178 phy-handle = <&phy1>;
183 phy-mode = "2500base-x";
184 managed = "in-band-status";
191 cd-gpios = <&gpionb 10 GPIO_ACTIVE_HIGH>;
192 vqmmc-supply = <&vsdc_reg>;
193 marvell,pad-type = "sd";
198 pinctrl-names = "default";
199 pinctrl-0 = <&sdio_pins>;
202 marvell,pad-type = "sd";
203 vqmmc-supply = <&vsdio_reg>;
204 mmc-pwrseq = <&sdhci1_pwrseq>;
205 /* forbid SDR104 for FCC purposes */
206 sdhci-caps-mask = <0x2 0x0>;
212 pinctrl-names = "default";
213 pinctrl-0 = <&spi_quad_pins &spi_cs1_pins>;
214 assigned-clocks = <&nb_periph_clk 7>;
215 assigned-clock-parents = <&tbg 1>;
216 assigned-clock-rates = <20000000>;
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 {
306 * NOTE: switch nodes are enabled by U-Boot if modules are present
307 * DO NOT change this node name (switch0@10) even if it is not following
308 * conventions! Deployed U-Boot binaries are explicitly looking for
309 * this node in order to augment the device tree!
310 * Also do not touch the "ports" or "port@n" nodes. These are also ABI.
313 compatible = "marvell,turris-mox-mv88e6190", "marvell,mv88e6190";
316 interrupt-parent = <&moxtet>;
317 interrupts = <MOXTET_IRQ_PERIDOT(0)>;
321 #address-cells = <1>;
324 switch0phy1: ethernet-phy@1 {
328 switch0phy2: ethernet-phy@2 {
332 switch0phy3: ethernet-phy@3 {
336 switch0phy4: ethernet-phy@4 {
340 switch0phy5: ethernet-phy@5 {
344 switch0phy6: ethernet-phy@6 {
348 switch0phy7: ethernet-phy@7 {
352 switch0phy8: ethernet-phy@8 {
358 #address-cells = <1>;
364 phy-handle = <&switch0phy1>;
370 phy-handle = <&switch0phy2>;
376 phy-handle = <&switch0phy3>;
382 phy-handle = <&switch0phy4>;
388 phy-handle = <&switch0phy5>;
394 phy-handle = <&switch0phy6>;
400 phy-handle = <&switch0phy7>;
406 phy-handle = <&switch0phy8>;
413 phy-mode = "2500base-x";
414 managed = "in-band-status";
417 switch0port10: port@a {
420 phy-mode = "2500base-x";
421 managed = "in-band-status";
422 link = <&switch1port9 &switch2port9>;
431 managed = "in-band-status";
437 /* NOTE: this node name is ABI, don't change it! */
439 compatible = "marvell,turris-mox-mv88e6085", "marvell,mv88e6085";
442 interrupt-parent = <&moxtet>;
443 interrupts = <MOXTET_IRQ_TOPAZ>;
447 #address-cells = <1>;
450 switch0phy1_topaz: ethernet-phy@11 {
454 switch0phy2_topaz: ethernet-phy@12 {
458 switch0phy3_topaz: ethernet-phy@13 {
462 switch0phy4_topaz: ethernet-phy@14 {
468 #address-cells = <1>;
474 phy-handle = <&switch0phy1_topaz>;
480 phy-handle = <&switch0phy2_topaz>;
486 phy-handle = <&switch0phy3_topaz>;
492 phy-handle = <&switch0phy4_topaz>;
498 phy-mode = "2500base-x";
499 managed = "in-band-status";
505 /* NOTE: this node name is ABI, don't change it! */
507 compatible = "marvell,turris-mox-mv88e6190", "marvell,mv88e6190";
510 interrupt-parent = <&moxtet>;
511 interrupts = <MOXTET_IRQ_PERIDOT(1)>;
515 #address-cells = <1>;
518 switch1phy1: ethernet-phy@1 {
522 switch1phy2: ethernet-phy@2 {
526 switch1phy3: ethernet-phy@3 {
530 switch1phy4: ethernet-phy@4 {
534 switch1phy5: ethernet-phy@5 {
538 switch1phy6: ethernet-phy@6 {
542 switch1phy7: ethernet-phy@7 {
546 switch1phy8: ethernet-phy@8 {
552 #address-cells = <1>;
558 phy-handle = <&switch1phy1>;
564 phy-handle = <&switch1phy2>;
570 phy-handle = <&switch1phy3>;
576 phy-handle = <&switch1phy4>;
582 phy-handle = <&switch1phy5>;
588 phy-handle = <&switch1phy6>;
594 phy-handle = <&switch1phy7>;
600 phy-handle = <&switch1phy8>;
603 switch1port9: port@9 {
606 phy-mode = "2500base-x";
607 managed = "in-band-status";
608 link = <&switch0port10>;
611 switch1port10: port@a {
614 phy-mode = "2500base-x";
615 managed = "in-band-status";
616 link = <&switch2port9>;
625 managed = "in-band-status";
631 /* NOTE: this node name is ABI, don't change it! */
633 compatible = "marvell,turris-mox-mv88e6085", "marvell,mv88e6085";
636 interrupt-parent = <&moxtet>;
637 interrupts = <MOXTET_IRQ_TOPAZ>;
641 #address-cells = <1>;
644 switch1phy1_topaz: ethernet-phy@11 {
648 switch1phy2_topaz: ethernet-phy@12 {
652 switch1phy3_topaz: ethernet-phy@13 {
656 switch1phy4_topaz: ethernet-phy@14 {
662 #address-cells = <1>;
668 phy-handle = <&switch1phy1_topaz>;
674 phy-handle = <&switch1phy2_topaz>;
680 phy-handle = <&switch1phy3_topaz>;
686 phy-handle = <&switch1phy4_topaz>;
692 phy-mode = "2500base-x";
693 managed = "in-band-status";
694 link = <&switch0port10>;
699 /* NOTE: this node name is ABI, don't change it! */
701 compatible = "marvell,turris-mox-mv88e6190", "marvell,mv88e6190";
704 interrupt-parent = <&moxtet>;
705 interrupts = <MOXTET_IRQ_PERIDOT(2)>;
709 #address-cells = <1>;
712 switch2phy1: ethernet-phy@1 {
716 switch2phy2: ethernet-phy@2 {
720 switch2phy3: ethernet-phy@3 {
724 switch2phy4: ethernet-phy@4 {
728 switch2phy5: ethernet-phy@5 {
732 switch2phy6: ethernet-phy@6 {
736 switch2phy7: ethernet-phy@7 {
740 switch2phy8: ethernet-phy@8 {
746 #address-cells = <1>;
752 phy-handle = <&switch2phy1>;
758 phy-handle = <&switch2phy2>;
764 phy-handle = <&switch2phy3>;
770 phy-handle = <&switch2phy4>;
776 phy-handle = <&switch2phy5>;
782 phy-handle = <&switch2phy6>;
788 phy-handle = <&switch2phy7>;
794 phy-handle = <&switch2phy8>;
797 switch2port9: port@9 {
800 phy-mode = "2500base-x";
801 managed = "in-band-status";
802 link = <&switch1port10 &switch0port10>;
810 managed = "in-band-status";
816 /* NOTE: this node name is ABI, don't change it! */
818 compatible = "marvell,turris-mox-mv88e6085", "marvell,mv88e6085";
821 interrupt-parent = <&moxtet>;
822 interrupts = <MOXTET_IRQ_TOPAZ>;
826 #address-cells = <1>;
829 switch2phy1_topaz: ethernet-phy@11 {
833 switch2phy2_topaz: ethernet-phy@12 {
837 switch2phy3_topaz: ethernet-phy@13 {
841 switch2phy4_topaz: ethernet-phy@14 {
847 #address-cells = <1>;
853 phy-handle = <&switch2phy1_topaz>;
859 phy-handle = <&switch2phy2_topaz>;
865 phy-handle = <&switch2phy3_topaz>;
871 phy-handle = <&switch2phy4_topaz>;
877 phy-mode = "2500base-x";
878 managed = "in-band-status";
879 link = <&switch1port10 &switch0port10>;