mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-05 01:50:36 +01:00
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>
This commit is contained in:
parent
1dbb2d55ac
commit
09a0462ea8
7 changed files with 421 additions and 2 deletions
|
|
@ -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|\
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ set_preinit_iface() {
|
|||
ip link set eth0 up
|
||||
ifname=lan4
|
||||
;;
|
||||
zyxel,wx5600-t0-ubootmod)
|
||||
ifname=lan1
|
||||
;;
|
||||
*)
|
||||
ip link set eth0 up
|
||||
ifname=lan1
|
||||
|
|
|
|||
378
target/linux/mediatek/dts/mt7986b-zyxel-wx5600-t0-ubootmod.dts
Normal file
378
target/linux/mediatek/dts/mt7986b-zyxel-wx5600-t0-ubootmod.dts
Normal file
|
|
@ -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 = <®_3p3v>;
|
||||
vbus-supply = <®_5v>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&trng {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ð {
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -206,6 +206,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
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -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|\
|
||||
|
|
|
|||
|
|
@ -3348,3 +3348,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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue