summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValerio 'ftp21' Mancini2026-02-18 13:34:31 +0000
committerHauke Mehrtens2026-03-30 10:54:40 +0000
commit6c2304f3c6367568f19fade4b647478fb8475958 (patch)
treee48b58f5db943cf3868568d2ce2f709fc5ebe180
parent413b237d130775ed3130d7c7ef215fc52d7e0efd (diff)
downloadopenwrt-6c2304f3c6367568f19fade4b647478fb8475958.tar.gz
mediatek: add support for Zyxel WX5600-T0
This access point is a ‘friend’ of the T56 supplied by Odido but with DDR3 RAM and with two Ethernet 2.5 (GPY211) The flash procedure is similar to other Zyxel T56/EX5600/EX5601 If you need backup please use the T56 guide Please refer to https://openwrt.org/inbox/toh/zyxel/wx5600-t0 for detailed flash informations Specifications: SOC: MT7986b RAM: 512MB Flash: 512 MB SPI NAND Ports: 2 LAN 2.5Gbps (GPY211C) WIFI: MT7976GN + MT7976AN LED: 3 bicolor LED - 1 monocolor LED Buttons: Reset and WPS We can install all with U-boot and mtk_uartboot. Load Uboot: ``` ./mtk_uartboot -a -p ./mt7986-ram-ddr3-bl2.bin -s /dev/ttyUSB0 -f openwrt-mediatek-filogic-zyxel_wx5600-t0-ubootmod-bl31-uboot.fip ``` **WARNING: Please use a GBIT ethernet or force it on system** **WARNING: Please use only LAN2 port in Uboot** Press 0 on Bootmenu ``` mtd erase ubi run ubi_format bootmenu ``` Load and write BL2 and U-boot: ``` 8 7 ``` Load and write recovery and production ``` 6 5 ``` Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu> Co-authored-by: Hal Martin <halmartin@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18364 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> (cherry picked from commit 09a0462ea803deb9775ef66ef3fe5be53f12fd6b) Link: https://github.com/openwrt/openwrt/pull/22659 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic3
-rw-r--r--target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface3
-rw-r--r--target/linux/mediatek/dts/mt7986b-zyxel-wx5600-t0-ubootmod.dts378
-rw-r--r--target/linux/mediatek/filogic/base-files/etc/board.d/01_leds5
-rw-r--r--target/linux/mediatek/filogic/base-files/etc/board.d/02_network3
-rw-r--r--target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh3
-rw-r--r--target/linux/mediatek/image/filogic.mk28
7 files changed, 421 insertions, 2 deletions
diff --git a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
index 6e8c2c1a97..8c3c9ddb6b 100644
--- a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
+++ b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
@@ -52,7 +52,8 @@ tplink,tl-xtr8488|\
xiaomi,mi-router-ax3000t-ubootmod|\
xiaomi,mi-router-wr30u-ubootmod|\
xiaomi,redmi-router-ax6000-ubootmod|\
-zyxel,ex5601-t0-ubootmod)
+zyxel,ex5601-t0-ubootmod|\
+zyxel,wx5600-t0-ubootmod)
ubootenv_add_ubi_default
;;
acer,predator-w6|\
diff --git a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
index f99217621d..40b9a926c2 100644
--- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
+++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
@@ -38,6 +38,9 @@ set_preinit_iface() {
ip link set eth0 up
ifname=lan4
;;
+ zyxel,wx5600-t0-ubootmod)
+ ifname=lan1
+ ;;
*)
ip link set eth0 up
ifname=lan1
diff --git a/target/linux/mediatek/dts/mt7986b-zyxel-wx5600-t0-ubootmod.dts b/target/linux/mediatek/dts/mt7986b-zyxel-wx5600-t0-ubootmod.dts
new file mode 100644
index 0000000000..89f11d3a26
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7986b-zyxel-wx5600-t0-ubootmod.dts
@@ -0,0 +1,378 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
+
+#include "mt7986b.dtsi"
+
+/ {
+ model = "Zyxel WX5600-T0 ubootmod";
+ compatible = "zyxel,wx5600-t0-ubootmod", "mediatek,mt7986b";
+
+ aliases {
+ serial0 = &uart0;
+ label-mac-device = &gmac0;
+ led-boot = &led_green_pwr;
+ led-failsafe = &led_red_wps;
+ led-running = &led_green_pwr;
+ led-upgrade = &led_green_wps;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ bootargs-append = " root=/dev/fit0 rootwait";
+ rootdisk = <&ubi_rootdisk>;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x20000000>;
+ };
+
+ 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";
+
+ reset-button {
+ label = "reset";
+ gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps-button {
+ label = "wps";
+ gpios = <&pio 10 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_green_pwr: green_power {
+ gpios = <&pio 12 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_BOOT;
+ };
+
+ red_power {
+ gpios = <&pio 15 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_BOOT;
+ panic-indicator;
+ };
+
+ green_signal {
+ gpios = <&pio 26 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <0>;
+ };
+
+ red_signal{
+ gpios = <&pio 32 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <1>;
+ };
+
+ green_wlan {
+ gpios = <&pio 14 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN;
+ function-enumerator = <0>;
+ };
+
+ led_green_wps: green_wps {
+ gpios = <&pio 17 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WPS;
+ function-enumerator = <0>;
+ };
+
+ led_red_wps: red_wps {
+ gpios = <&pio 13 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_WPS;
+ function-enumerator = <1>;
+ };
+ };
+};
+
+&spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_flash_pins>;
+ status = "okay";
+
+ spi_nand@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <52000000>;
+ 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 = <0x0 0x100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "u-boot-env";
+ reg = <0x100000 0x80000>;
+ read-only;
+ };
+
+ partition@180000 {
+ label = "factory";
+ reg = <0x180000 0x200000>;
+ read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory: eeprom@0 {
+ #size-cells = <1>;
+ reg = <0x0 0x1000>;
+ };
+
+ macaddr_factory_4: macaddr@4 {
+ compatible = "mac-base";
+ reg = <0x4 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+
+ macaddr_factory_24: macaddr@24 {
+ compatible = "mac-base";
+ reg = <0x24 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+
+ macaddr_factory_2a: macaddr@2a {
+ compatible = "mac-base";
+ reg = <0x2a 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
+
+ partition@380000 {
+ label = "fip";
+ reg = <0x380000 0x1c0000>;
+ read-only;
+ };
+
+ partition@540000 {
+ label = "zloader";
+ reg = <0x540000 0x40000>;
+ read-only;
+ };
+
+ partition@580000 {
+ label = "ubi";
+ reg = <0x580000 0x1da80000>;
+ compatible = "linux,ubi";
+
+ volumes {
+ ubi_rootdisk: ubi-volume-fit {
+ volname = "fit";
+ };
+ };
+ };
+ };
+
+ };
+};
+
+&watchdog {
+ status = "okay";
+};
+
+&wifi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "okay";
+ pinctrl-names = "default", "dbdc";
+ pinctrl-0 = <&wf_2g_5g_pins>;
+ pinctrl-1 = <&wf_dbdc_pins>;
+ nvmem-cells = <&eeprom_factory>;
+ nvmem-cell-names = "eeprom";
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_4 1>;
+ nvmem-cell-names = "mac-address";
+ };
+};
+
+&crypto {
+ status = "okay";
+};
+
+&pio {
+ 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 = <MTK_DRIVE_8mA>;
+ mediatek,pull-up-adv = <0>; /* bias-disable */
+ };
+ conf-pd {
+ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ mediatek,pull-down-adv = <0>; /* bias-disable */
+ };
+ };
+
+ uart0_pins: uart0-pins {
+ mux {
+ function = "uart";
+ groups = "uart0";
+ };
+ };
+
+ wf_2g_5g_pins: wf_2g_5g-pins {
+ mux {
+ function = "wifi";
+ groups = "wf_2g", "wf_5g";
+ };
+ conf {
+ pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
+ "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
+ "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
+ "WF0_TOP_CLK", "WF0_TOP_DATA", "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 = <MTK_DRIVE_4mA>;
+ };
+ };
+
+ wf_dbdc_pins: wf_dbdc-pins {
+ mux {
+ function = "wifi";
+ groups = "wf_dbdc";
+ };
+ conf {
+ pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
+ "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
+ "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
+ "WF0_TOP_CLK", "WF0_TOP_DATA", "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 = <MTK_DRIVE_4mA>;
+ };
+ };
+};
+
+&ssusb {
+ vusb33-supply = <&reg_3p3v>;
+ vbus-supply = <&reg_5v>;
+ status = "okay";
+};
+
+&trng {
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins>;
+ status = "okay";
+};
+
+&eth {
+ status = "okay";
+
+ gmac0: mac@0 {
+ compatible = "mediatek,eth-mac";
+ reg = <0>;
+ nvmem-cells = <&macaddr_factory_24 0>;
+ nvmem-cell-names = "mac-address";
+ phy-mode = "2500base-x";
+ phy-handle = <&phy5>;
+ label = "lan2";
+ };
+
+ gmac1: mac@1 {
+ compatible = "mediatek,eth-mac";
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_2a 0>;
+ nvmem-cell-names = "mac-address";
+ phy-mode = "2500base-x";
+ phy-handle = <&phy6>;
+ label = "lan1";
+ };
+
+ mdio: mdio-bus{
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy5: phy@5 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <600>;
+ reset-deassert-us = <20000>;
+ reg = <5>;
+
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ };
+ };
+ };
+
+ phy6: phy@6 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <6>;
+
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ };
+ };
+ };
+ };
+}; \ No newline at end of file
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index 133db38005..af0ece7e2d 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -346,6 +346,11 @@ zyxel,ex5700-telenor)
ucidef_set_led_netdev "wan" "WAN" "mdio-bus:06:amber:wan" "eth1" "link_10 link_100 tx rx"
ucidef_set_led_netdev "wan" "WAN" "mdio-bus:06:green:wan" "eth1" "link tx rx"
;;
+zyxel,wx5600-t0-ubootmod)
+ ucidef_set_led_netdev "lan1" "LAN1" "mdio-bus:06:green:lan" "lan1" "link tx rx"
+ ucidef_set_led_netdev "lan2" "LAN2" "mdio-bus:05:green:lan" "lan2" "link tx rx"
+ ucidef_set_led_netdev "wlan5" "wlan5" "green:wlan-0" "phy1-ap0" "link tx rx"
+ ;;
esac
board_config_flush
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index d344ca8e75..61d6b701f9 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -204,6 +204,9 @@ mediatek_setup_interfaces()
xiaomi,redmi-router-ax6000-ubootmod)
ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" wan
;;
+ zyxel,wx5600-t0-ubootmod)
+ ucidef_set_interface_lan "lan1 lan2"
+ ;;
*)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
;;
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 9e29f947b2..d53babe35b 100644
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -120,7 +120,8 @@ platform_do_upgrade() {
xiaomi,mi-router-ax3000t-ubootmod|\
xiaomi,redmi-router-ax6000-ubootmod|\
xiaomi,mi-router-wr30u-ubootmod|\
- zyxel,ex5601-t0-ubootmod)
+ zyxel,ex5601-t0-ubootmod|\
+ zyxel,wx5600-t0-ubootmod)
fit_do_upgrade "$1"
;;
acer,predator-w6|\
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index a8e6869967..3b7631dcf3 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -3326,3 +3326,31 @@ define Device/zyxel_nwa50ax-pro
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += zyxel_nwa50ax-pro
+
+define Device/zyxel_wx5600-t0-ubootmod
+ DEVICE_VENDOR := Zyxel
+ DEVICE_MODEL := WX5600-T0
+ DEVICE_VARIANT := (OpenWrt U-Boot layout)
+ DEVICE_DTS := mt7986b-zyxel-wx5600-t0-ubootmod
+ DEVICE_DTS_DIR := ../dts
+ DEVICE_PACKAGES := kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware
+ KERNEL_INITRAMFS_SUFFIX := -recovery.itb
+ IMAGES := sysupgrade.itb
+ BLOCKSIZE := 256k
+ PAGESIZE := 4096
+ KERNEL_IN_UBI := 1
+ UBOOTENV_IN_UBI := 1
+ KERNEL := kernel-bin | lzma
+ KERNEL_INITRAMFS := kernel-bin | lzma | \
+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd
+ IMAGE/sysupgrade.itb := append-kernel | \
+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata
+ ARTIFACTS := preloader.bin bl31-uboot.fip
+ ARTIFACT/preloader.bin := mt7986-bl2 spim-nand-4k-ddr3
+ ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot zyxel_wx5600-t0
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ ARTIFACTS += initramfs-factory.ubi
+ ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-recovery.itb | ubinize-kernel
+endif
+endef
+TARGET_DEVICES += zyxel_wx5600-t0-ubootmod