123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375 |
- // SPDX-License-Identifier: (GPL-2.0 OR MIT)
- /dts-v1/;
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/leds/common.h>
- #include <dt-bindings/gpio/gpio.h>
- #include "mt7986a.dtsi"
- / {
- model = "ZyXEL EX5700 (Telenor)";
- compatible = "zyxel,ex5700-telenor", "mediatek,mt7986a";
- aliases {
- serial0 = &uart0;
- ethernet0 = &gmac0;
- led-boot = &led_status_green;
- led-failsafe = &led_status_green;
- led-running = &led_status_green;
- led-upgrade = &led_status_amber;
- };
- chosen {
- stdout-path = "serial0:115200n8";
- // Stock U-Boot crashes unless /chosen/bootargs exists
- bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8";
- };
- memory {
- reg = <0 0x40000000 0 0x40000000>;
- };
- reg_3p3v: regulator-3p3v {
- compatible = "regulator-fixed";
- regulator-name = "fixed-3.3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
- regulator-always-on;
- };
- reg_5v: regulator-5v {
- compatible = "regulator-fixed";
- regulator-name = "fixed-5V";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- regulator-boot-on;
- regulator-always-on;
- };
- keys {
- compatible = "gpio-keys";
- poll-interval = <20>;
- reset-button {
- label = "reset";
- gpios = <&pio 9 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- wps-button {
- label = "wps";
- gpios = <&pio 10 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_WPS_BUTTON>;
- };
- };
- leds {
- compatible = "gpio-leds";
- red1 {
- label = "red:net";
- gpios = <&pio 23 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- green1 {
- label = "green:net";
- gpios = <&pio 25 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- amber1 {
- label = "amber:net";
- gpios = <&pio 29 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- white2 {
- function = LED_FUNCTION_STATUS;
- color = <LED_COLOR_ID_WHITE>;
- gpios = <&pio 16 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- red2 {
- function = LED_FUNCTION_STATUS;
- color = <LED_COLOR_ID_RED>;
- gpios = <&pio 17 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- led_status_green: green2 {
- function = LED_FUNCTION_STATUS;
- color = <LED_COLOR_ID_GREEN>;
- gpios = <&pio 31 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- led_status_amber: amber2 {
- function = LED_FUNCTION_STATUS;
- color = <LED_COLOR_ID_AMBER>;
- gpios = <&pio 18 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- };
- };
- ð {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <ð_pins>;
- gmac0: mac@0 {
- compatible = "mediatek,eth-mac";
- reg = <0>;
- phy-mode = "2500base-x";
- fixed-link {
- speed = <2500>;
- full-duplex;
- pause;
- };
- };
- mac@1 {
- compatible = "mediatek,eth-mac";
- reg = <1>;
- label = "wan";
- phy-mode = "2500base-x";
- phy-handle = <&phy6>;
- };
- mdio: mdio-bus {
- #address-cells = <1>;
- #size-cells = <0>;
- };
- };
- &mdio {
- reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
- reset-delay-us = <50000>;
- reset-post-delay-us = <20000>;
- phy5: phy@5 {
- compatible = "ethernet-phy-ieee802.3-c45";
- reg = <5>;
- };
- phy6: phy@6 {
- compatible = "ethernet-phy-ieee802.3-c45";
- reg = <6>;
- };
- switch: switch@1f {
- compatible = "mediatek,mt7531";
- reg = <31>;
- reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
- interrupt-controller;
- #interrupt-cells = <1>;
- interrupt-parent = <&pio>;
- interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
- };
- };
- &switch {
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>;
- label = "lan3";
- };
- port@1 {
- reg = <1>;
- label = "lan2";
- };
- port@2 {
- reg = <2>;
- label = "lan1";
- };
- port@5 {
- reg = <5>;
- label = "lan4";
- phy-mode = "2500base-x";
- phy-handle = <&phy5>;
- };
- port@6 {
- reg = <6>;
- ethernet = <&gmac0>;
- phy-mode = "2500base-x";
- fixed-link {
- speed = <2500>;
- full-duplex;
- pause;
- };
- };
- };
- };
- &crypto {
- status = "okay";
- };
- &pcie {
- pinctrl-names = "default";
- pinctrl-0 = <&pcie_pins>;
- status = "okay";
- pcie@0,0 {
- reg = <0x0000 0 0 0 0>;
- wifi@0,0 {
- compatible = "mediatek,mt76";
- reg = <0x0000 0 0 0 0>;
- mediatek,mtd-eeprom = <&factory 0xa0000>;
- };
- };
- };
- &pcie_phy {
- status = "okay";
- };
- &watchdog {
- status = "okay";
- };
- &wifi {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&wf_5g_pins>;
- mediatek,mtd-eeprom = <&factory 0x0>;
- };
- &pio {
- eth_pins: eth-pins {
- mux {
- function = "eth";
- groups = "switch_int", "mdc_mdio";
- };
- };
- pcie_pins: pcie-pins {
- mux {
- function = "pcie";
- groups = "pcie_pereset"; // "pcie_clk" and "pcie_wake" is unused?
- };
- };
- spi_flash_pins: spi-flash-pins-33-to-38 {
- mux {
- function = "spi";
- groups = "spi0", "spi0_wp_hold";
- };
- conf-pu {
- pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
- drive-strength = <8>;
- mediatek,pull-up-adv = <0>; /* bias-disable */
- };
- conf-pd {
- pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
- drive-strength = <8>;
- mediatek,pull-down-adv = <0>; /* bias-disable */
- };
- };
- wf_5g_pins: wf_5g-pins {
- mux {
- function = "wifi";
- groups = "wf_5g";
- };
- conf {
- pins = "WF1_HB1", "WF1_HB2", "WF1_HB3", "WF1_HB4",
- "WF1_HB0", "WF1_HB5", "WF1_HB6", "WF1_HB7",
- "WF1_HB8", "WF1_TOP_CLK", "WF1_TOP_DATA";
- drive-strength = <4>;
- };
- };
- };
- &spi0 {
- pinctrl-names = "default";
- pinctrl-0 = <&spi_flash_pins>;
- cs-gpios = <0>, <0>;
- status = "okay";
- flash@0 {
- compatible = "jedec,spi-nor";
- reg = <0>;
- spi-max-frequency = <20000000>;
- };
- flash@1 {
- compatible = "spi-nand";
- reg = <1>;
- mediatek,nmbm;
- mediatek,bmt-max-ratio = <1>;
- mediatek,bmt-max-reserved-blocks = <64>;
- spi-max-frequency = <20000000>;
- spi-tx-bus-width = <4>;
- spi-rx-bus-width = <4>;
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
- partition@0 {
- label = "BL2";
- reg = <0x000000 0x100000>;
- read-only;
- };
- partition@100000 {
- label = "u-boot-env";
- reg = <0x100000 0x80000>;
- };
- factory: partition@180000 {
- label = "Factory";
- reg = <0x180000 0x200000>;
- read-only;
- };
- partition@380000 {
- label = "FIP";
- reg = <0x380000 0x200000>;
- read-only;
- };
- partition@580000 {
- label = "ubi";
- reg = <0x580000 0x1da80000>;
- };
- };
- };
- };
- &ssusb {
- vusb33-supply = <®_3p3v>;
- vbus-supply = <®_5v>;
- status = "okay";
- };
- &trng {
- status = "okay";
- };
- &uart0 {
- status = "okay";
- };
- &usb_phy {
- status = "okay";
- };
|