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>;
143 * U-Boot port for Turris Mox has a bug which always expects that "ranges" DT property
144 * contains exactly 2 ranges with 3 (child) address cells, 2 (parent) address cells and
145 * 2 size cells and also expects that the second range starts at 16 MB offset. Also it
146 * expects that first range uses same address for PCI (child) and CPU (parent) cells (so
147 * no remapping) and that this address is the lowest from all specified ranges. If these
148 * conditions are not met then U-Boot crashes during loading kernel DTB file. PCIe address
149 * space is 128 MB long, so the best split between MEM and IO is to use fixed 16 MB window
150 * for IO and the rest 112 MB (64+32+16) for MEM, despite that maximal IO size is just 64 kB.
151 * This bug is not present in U-Boot ports for other Armada 3700 devices and is fixed in
152 * U-Boot version 2021.07. See relevant U-Boot commits (the last one contains fix):
153 * https://source.denx.de/u-boot/u-boot/-/commit/cb2ddb291ee6fcbddd6d8f4ff49089dfe580f5d7
154 * https://source.denx.de/u-boot/u-boot/-/commit/c64ac3b3185aeb3846297ad7391fc6df8ecd73bf
155 * https://source.denx.de/u-boot/u-boot/-/commit/4a82fca8e330157081fc132a591ebd99ba02ee33
156 * Bug related to requirement of same child and parent addresses for first range is fixed
157 * in U-Boot version 2022.04 by following commit:
158 * https://source.denx.de/u-boot/u-boot/-/commit/1fd54253bca7d43d046bba4853fe5fafd034bc17
160 #address-cells = <3>;
162 ranges = <0x81000000 0 0xe8000000 0 0xe8000000 0 0x01000000 /* Port 0 IO */
163 0x82000000 0 0xe9000000 0 0xe9000000 0 0x07000000>; /* Port 0 MEM */
165 /* enabled by U-Boot if PCIe module is present */
174 pinctrl-names = "default";
175 pinctrl-0 = <&rgmii_pins>;
176 phy-mode = "rgmii-id";
177 phy-handle = <&phy1>;
182 phy-mode = "2500base-x";
183 managed = "in-band-status";
190 cd-gpios = <&gpionb 10 GPIO_ACTIVE_HIGH>;
191 vqmmc-supply = <&vsdc_reg>;
192 marvell,pad-type = "sd";
197 pinctrl-names = "default";
198 pinctrl-0 = <&sdio_pins>;
201 marvell,pad-type = "sd";
202 vqmmc-supply = <&vsdio_reg>;
203 mmc-pwrseq = <&sdhci1_pwrseq>;
204 /* forbid SDR104 for FCC purposes */
205 sdhci-caps-mask = <0x2 0x0>;
211 pinctrl-names = "default";
212 pinctrl-0 = <&spi_quad_pins &spi_cs1_pins>;
213 assigned-clocks = <&nb_periph_clk 7>;
214 assigned-clock-parents = <&tbg 1>;
215 assigned-clock-rates = <20000000>;
218 #address-cells = <1>;
220 compatible = "jedec,spi-nor";
222 spi-max-frequency = <20000000>;
225 compatible = "fixed-partitions";
226 #address-cells = <1>;
230 label = "secure-firmware";
235 label = "a53-firmware";
236 reg = <0x20000 0x160000>;
240 label = "u-boot-env";
241 reg = <0x180000 0x10000>;
245 label = "Rescue system";
246 reg = <0x190000 0x660000>;
251 reg = <0x7f0000 0x10000>;
257 #address-cells = <1>;
259 compatible = "cznic,moxtet";
261 reset-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>;
262 spi-max-frequency = <10000000>;
265 interrupt-controller;
266 #interrupt-cells = <1>;
267 interrupt-parent = <&gpiosb>;
268 interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
272 compatible = "cznic,moxtet-gpio";
287 compatible = "usb-a-connector";
288 phy-supply = <&exp_usb3_vbus>;
298 pinctrl-names = "default";
299 pinctrl-0 = <&smi_pins>;
302 phy1: ethernet-phy@1 {
306 /* switch nodes are enabled by U-Boot if modules are present */
308 compatible = "marvell,mv88e6190";
311 interrupt-parent = <&moxtet>;
312 interrupts = <MOXTET_IRQ_PERIDOT(0)>;
316 #address-cells = <1>;
319 switch0phy1: switch0phy1@1 {
323 switch0phy2: switch0phy2@2 {
327 switch0phy3: switch0phy3@3 {
331 switch0phy4: switch0phy4@4 {
335 switch0phy5: switch0phy5@5 {
339 switch0phy6: switch0phy6@6 {
343 switch0phy7: switch0phy7@7 {
347 switch0phy8: switch0phy8@8 {
353 #address-cells = <1>;
359 phy-handle = <&switch0phy1>;
365 phy-handle = <&switch0phy2>;
371 phy-handle = <&switch0phy3>;
377 phy-handle = <&switch0phy4>;
383 phy-handle = <&switch0phy5>;
389 phy-handle = <&switch0phy6>;
395 phy-handle = <&switch0phy7>;
401 phy-handle = <&switch0phy8>;
408 phy-mode = "2500base-x";
409 managed = "in-band-status";
412 switch0port10: port@a {
415 phy-mode = "2500base-x";
416 managed = "in-band-status";
417 link = <&switch1port9 &switch2port9>;
426 managed = "in-band-status";
433 compatible = "marvell,mv88e6085";
436 interrupt-parent = <&moxtet>;
437 interrupts = <MOXTET_IRQ_TOPAZ>;
441 #address-cells = <1>;
444 switch0phy1_topaz: switch0phy1@11 {
448 switch0phy2_topaz: switch0phy2@12 {
452 switch0phy3_topaz: switch0phy3@13 {
456 switch0phy4_topaz: switch0phy4@14 {
462 #address-cells = <1>;
468 phy-handle = <&switch0phy1_topaz>;
474 phy-handle = <&switch0phy2_topaz>;
480 phy-handle = <&switch0phy3_topaz>;
486 phy-handle = <&switch0phy4_topaz>;
492 phy-mode = "2500base-x";
493 managed = "in-band-status";
500 compatible = "marvell,mv88e6190";
503 interrupt-parent = <&moxtet>;
504 interrupts = <MOXTET_IRQ_PERIDOT(1)>;
508 #address-cells = <1>;
511 switch1phy1: switch1phy1@1 {
515 switch1phy2: switch1phy2@2 {
519 switch1phy3: switch1phy3@3 {
523 switch1phy4: switch1phy4@4 {
527 switch1phy5: switch1phy5@5 {
531 switch1phy6: switch1phy6@6 {
535 switch1phy7: switch1phy7@7 {
539 switch1phy8: switch1phy8@8 {
545 #address-cells = <1>;
551 phy-handle = <&switch1phy1>;
557 phy-handle = <&switch1phy2>;
563 phy-handle = <&switch1phy3>;
569 phy-handle = <&switch1phy4>;
575 phy-handle = <&switch1phy5>;
581 phy-handle = <&switch1phy6>;
587 phy-handle = <&switch1phy7>;
593 phy-handle = <&switch1phy8>;
596 switch1port9: port@9 {
599 phy-mode = "2500base-x";
600 managed = "in-band-status";
601 link = <&switch0port10>;
604 switch1port10: port@a {
607 phy-mode = "2500base-x";
608 managed = "in-band-status";
609 link = <&switch2port9>;
618 managed = "in-band-status";
625 compatible = "marvell,mv88e6085";
628 interrupt-parent = <&moxtet>;
629 interrupts = <MOXTET_IRQ_TOPAZ>;
633 #address-cells = <1>;
636 switch1phy1_topaz: switch1phy1@11 {
640 switch1phy2_topaz: switch1phy2@12 {
644 switch1phy3_topaz: switch1phy3@13 {
648 switch1phy4_topaz: switch1phy4@14 {
654 #address-cells = <1>;
660 phy-handle = <&switch1phy1_topaz>;
666 phy-handle = <&switch1phy2_topaz>;
672 phy-handle = <&switch1phy3_topaz>;
678 phy-handle = <&switch1phy4_topaz>;
684 phy-mode = "2500base-x";
685 managed = "in-band-status";
686 link = <&switch0port10>;
692 compatible = "marvell,mv88e6190";
695 interrupt-parent = <&moxtet>;
696 interrupts = <MOXTET_IRQ_PERIDOT(2)>;
700 #address-cells = <1>;
703 switch2phy1: switch2phy1@1 {
707 switch2phy2: switch2phy2@2 {
711 switch2phy3: switch2phy3@3 {
715 switch2phy4: switch2phy4@4 {
719 switch2phy5: switch2phy5@5 {
723 switch2phy6: switch2phy6@6 {
727 switch2phy7: switch2phy7@7 {
731 switch2phy8: switch2phy8@8 {
737 #address-cells = <1>;
743 phy-handle = <&switch2phy1>;
749 phy-handle = <&switch2phy2>;
755 phy-handle = <&switch2phy3>;
761 phy-handle = <&switch2phy4>;
767 phy-handle = <&switch2phy5>;
773 phy-handle = <&switch2phy6>;
779 phy-handle = <&switch2phy7>;
785 phy-handle = <&switch2phy8>;
788 switch2port9: port@9 {
791 phy-mode = "2500base-x";
792 managed = "in-band-status";
793 link = <&switch1port10 &switch0port10>;
801 managed = "in-band-status";
808 compatible = "marvell,mv88e6085";
811 interrupt-parent = <&moxtet>;
812 interrupts = <MOXTET_IRQ_TOPAZ>;
816 #address-cells = <1>;
819 switch2phy1_topaz: switch2phy1@11 {
823 switch2phy2_topaz: switch2phy2@12 {
827 switch2phy3_topaz: switch2phy3@13 {
831 switch2phy4_topaz: switch2phy4@14 {
837 #address-cells = <1>;
843 phy-handle = <&switch2phy1_topaz>;
849 phy-handle = <&switch2phy2_topaz>;
855 phy-handle = <&switch2phy3_topaz>;
861 phy-handle = <&switch2phy4_topaz>;
867 phy-mode = "2500base-x";
868 managed = "in-band-status";
869 link = <&switch1port10 &switch0port10>;