ImmortalWrt/target/linux
Andreas Böhler 28df7f7ff2 ramips: mt7621: add support for ZyXEL WSM20
The ZyXEL WSM20 aka Multy M1 is a cheap mesh router system by ZyXEL
based on the MT7621 CPU.

Specifications
==============

SoC: MediaTek MT7621AT (880MHz)
RAM: 256MiB
Flash: 128MiB NAND
Wireless: 802.11ax (2x2 MT7915E DBDC)
Ethernet: 4x 10/100/1000 (MT7530)
Button: 1x WPS, 1x Reset, 1x LED On/Off
LED: 7 LEDs (3x white, 2x red, 2x green)

MAC address assignment
======================

The MAC address assignment follows stock: The label MAC address is the LAN
MAC address, the WAN address is read from flash.

The WiFi MAC addresses are set in userspace to label MAC + 1 and label MAC
+ 2.

Installation (web interface)
============================

The device is cloud-managed, but there is a hidden local firmware upgrade
page in the OEM web interface. The device has to be registered in the
cloud in order to be able to access this page.

The system has a dual firmware design, there is no way to tell which
firmware is currently booted. Therefore, an -initramfs version is flashed
first.

1. Log into the OEM web GUI
2. Access the hidden upgrade page by navigating to
   https://192.168.212.1/gui/#/main/debug/firmwareupgrade
3. Upload the -initramfs-kernel.bin file and flash it
4. Wait for OpenWrt to boot and log in via SSH
5. Transfer the sysupgrade file via SCP
6. Run sysupgrade to install the image
7. Reboot and enjoy

NB: If the initramfs version was installed in RAS2, the sysupgrade script
sets the boot number to the first partition. A backup has to be performed
manually in case the OEM firwmare should be kept.

Installation (UART method)
==========================

The UART method is more difficult, as the boot loader does not have a
timeout set. A semi-working stock firmware is required to configure it:

1. Attach UART
2. Boot the stock firmware until the message about failsafe mode appears
3. Enter failsafe mode by pressing "f" and "Enter"
4. Type "mount_root"
5. Run "fw_setenv bootmenu_delay 3"
6. Reboot, U-Boot now presents a menu
7. The -initramfs-kernel.bin image can be flashed using the menu
8. Run the regular sysupgrade for a permanent installation

Changing the partition to boot is a bit cumbersome in U-Boot, as there is
no menu to select it. It can only be checked using mstc_bootnum. To change
it, issue the following commands in U-Boot:

   nand read 1800000 53c0000 800
   mw.b 1800004 1 1
   nand erase 53c0000 800
   nand write 1800000 53c0000 800

This selects FW1. Replace "mw.b 1800004 1 1" by "mw.b 1800004 2 1" to
change to the second slot.

Back to stock
=============

It is possible to flash back to stock, but a OEM firmware upgrade is
required. ZyXEL does not provide the link on its website, but the link
can be acquired from the OEM web GUI by analyzing the transferred JSON
objects.

It is then a matter of writing the firmware to Kernel2 and setting the
boot partition to FW2:

   mtd write zyxel.bin Kernel2
   echo -ne "\x02" | dd of=/dev/mtdblock7 count=1 bs=1 seek=4 conv=notrunc

Signed-off-by: Andreas Böhler <dev@aboehler.at>
Credits to forum users Annick and SirLouen for their initial work on this
device
2023-04-29 21:53:34 +02:00
..
airoha kernel: bump 5.15 to 5.15.100 2023-03-18 12:52:17 +01:00
apm821xx kernel: bump 5.10 to 5.10.178 2023-04-22 01:15:03 +02:00
archs38 treewide: replace wpad-basic-wolfssl default 2023-02-04 02:35:03 +01:00
armvirt kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
at91 kernel: bump 5.10 to 5.10.178 2023-04-22 01:15:03 +02:00
ath25 treewide: replace wpad-basic-wolfssl default 2023-02-04 02:35:03 +01:00
ath79 ath79: create APBoot-compatible image for Aruba AP-175 2023-04-24 10:44:49 +02:00
bcm27xx kernel: bump 5.15 to 5.15.108 2023-04-22 01:10:24 +02:00
bcm47xx kernel: add bcma/ssb fallback SPROM support 2023-04-23 12:18:35 +02:00
bcm53xx kernel: add bcma/ssb fallback SPROM support 2023-04-23 12:18:35 +02:00
bcm63xx bcm63xx: kernel: power cycle the bcm6358 USB PLL 2023-03-04 20:09:49 +01:00
bcm4908 bcm4908: switch to Kernel 5.15 by default 2023-04-10 21:21:03 +02:00
bmips bmips: fix external interrupt controller 2023-04-27 15:39:09 +02:00
gemini gemini: add generic subtarget 2022-12-23 19:44:20 +01:00
generic kernel: mtk_bmt: refactor to avoid deep recursion 2023-04-29 12:58:48 +02:00
imx cypress-nvram: consolidate NVRAM packages 2022-11-16 20:14:13 +01:00
ipq40xx ipq40xx: convert GL-AP1300 to DSA 2023-04-24 18:32:26 +02:00
ipq806x kernel: bump 5.10 to 5.10.178 2023-04-22 01:15:03 +02:00
ipq807x kernel: backport NVMEM patch for U-Boot env data "ethaddr" cell 2023-04-06 12:21:29 +02:00
kirkwood kirkwood: fix Linksys upgrade, restore config step 2023-04-11 12:21:15 +02:00
lantiq lantiq: fix lzma-loader for Netgear DGN 3500(B) 2023-04-02 22:33:55 +02:00
layerscape kernel: bump 5.15 to 5.15.108 2023-04-22 01:10:24 +02:00
malta treewide: replace wpad-basic-wolfssl default 2023-02-04 02:35:03 +01:00
mediatek mediatek: remove mt753x driver 2023-04-29 10:25:43 +02:00
mpc85xx mpc85xx: refresh patches 2023-04-08 14:41:01 +02:00
mvebu kernel: bump 5.15 to 5.15.108 2023-04-22 01:10:24 +02:00
mxs mxs: switch default kernel to 5.15 2023-01-30 11:13:14 +01:00
octeon octeon: switch to Kernel 5.15 by default 2023-04-08 00:47:12 +02:00
octeontx kernel: bump 5.15 to 5.15.100 2023-03-18 12:52:17 +01:00
omap treewide: replace wpad-basic-wolfssl default 2023-02-04 02:35:03 +01:00
oxnas treewide: replace wpad-basic-wolfssl default 2023-02-04 02:35:03 +01:00
pistachio kernel: bump 5.10 to 5.10.173 2023-03-20 22:44:28 +01:00
qoriq treewide: remove label = "cpu" from DSA dt-binding 2023-02-26 22:22:48 +01:00
ramips ramips: mt7621: add support for ZyXEL WSM20 2023-04-29 21:53:34 +02:00
realtek kernel: bump 5.10 to 5.10.178 2023-04-22 01:15:03 +02:00
rockchip treewide: update NVMEM symbols 2023-01-07 01:30:31 +01:00
sunxi sunxi: enable CONFIG_NVMEM_SYSFS 2023-02-26 22:22:48 +01:00
tegra tegra: switch to Kernel 5.15 by default 2023-04-08 00:30:22 +02:00
uml treewide: replace wpad-basic-wolfssl default 2023-02-04 02:35:03 +01:00
x86 x86: fix deprecated CONFIG_MICROCODE_OLD_INTERACE 2023-03-20 22:44:20 +01:00
zynq zynq: remove kconfig for 5.10 2023-01-30 18:01:14 +08:00
Makefile build: fix issues with targets installed via feeds 2022-09-27 13:41:12 +02:00