]> git.ipfire.org Git - thirdparty/openwrt.git/commit
mediatek: filogic: add support for AlwayLink M01K43 22818/head
authorRichard Jones <richard@netsolution.shop>
Wed, 8 Apr 2026 19:23:53 +0000 (19:23 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 25 May 2026 00:34:03 +0000 (02:34 +0200)
commitdb7d264e475293a58bb9fb3c2f59036d2edf0b24
tree2d8761d9c6d93ab40bf7f657e7791439aea905a4
parenta3105d3f9573a140a1ac70a99b77b7091878761c
mediatek: filogic: add support for AlwayLink M01K43

Add support for the AlwayLink M01K43 5G CPE router.

Hardware specifications:
- SoC:       MediaTek MT7981B (Filogic 820), dual-core Cortex-A53
- RAM:       256 MiB DDR3 (0x40000000, size 0x10000000)
- Flash:     128 MiB SPI-NAND (UBI, root) + 4 MiB SPI-NOR (bootloader)
- Ethernet:  4x 1 GbE LAN + 1x 2.5 GbE WAN
             (MT7531 DSA switch; WAN via RTL8221B 2.5GbE PHY on MAC1)
- WiFi:      MT7981 built-in 2x2 802.11ax (2.4 GHz + 5 GHz)
- USB:       1x xHCI (USB 2.0 only; USB 3.0 PHY pins not routed)
- Modem:     M.2 B-Key slot wired for USB (tested: Quectel RM551E-GL,
             Quectel RM520N-GL via QMI)
- LEDs:      10x GPIO LEDs (status, WAN, LAN, WiFi 2.4/5, signal bars)
- Buttons:   WPS, Reset, RFKill
- Power:     12 V DC barrel jack
- UART:      3.3 V TTL header on PCB, 115200 8N1, no flow control

PCB silkscreen: M01K43 v5.0
Manufacturer:   Shenzhen AlwayLink Wireless Technology Co., Ltd.

MAC addresses come from the 'ledeinfo' partition (mtd6) at offset 0x18
(label macaddr_ledeinfo_18); the stored value is the LAN MAC.

  interface            this port    vendor firmware
  -------------------  -----------  --------------------------
  eth0 / LAN bridge    base + 0     base + 0
  eth1 / WAN           base + 1     base + 1
  wifi 2.4 GHz band@0  base + 2     base (driver-derived)
  wifi 5 GHz   band@1  base + 3     base + LAA bit (driver)

The vendor's ethernet scheme (LAN = base, WAN = base + 1) is reproduced
exactly. For WiFi the vendor's proprietary mt_wifi driver ignores the
stored per-radio MAC and derives each BSSID from the base by setting the
locally-administered bit, so the radios are not given clean unicast
offsets. Under mainline mt76 + DSA, reusing the base (LAN) MAC on a radio
collides at L2 with the gmac0 conduit, so this port assigns the 2.4 GHz
and 5 GHz radios base + 2 and base + 3 — unique unicast addresses in the
same OUI block.

Installation
------------

Stock firmware defaults (verified on shipping units):
  LAN IP:   192.168.100.1
  SSH/web:  user 'root', password 'admin'
  Serial:   3.3 V TTL UART header on PCB, 115200 8N1, no flow control

Image artifacts produced by this device definition:
  openwrt-mediatek-filogic-alwaylink_m01k43-squashfs-factory.bin
  openwrt-mediatek-filogic-alwaylink_m01k43-squashfs-sysupgrade.bin

Before flashing, back up the per-unit partitions (cannot be
regenerated):

  ssh root@192.168.100.1
  dd if=/dev/mtd3 of=/tmp/factory.bin bs=1 count=655360
  dd if=/dev/mtd6 of=/tmp/ledeinfo.bin bs=1 count=65536
  exit
  scp root@192.168.100.1:/tmp/factory.bin  .
  scp root@192.168.100.1:/tmp/ledeinfo.bin .

Method 1 - From an existing OpenWrt install (sysupgrade):

  IMG=openwrt-mediatek-filogic-alwaylink_m01k43-squashfs-sysupgrade.bin
  scp "$IMG" root@192.168.1.1:/tmp/sysupgrade.bin
  ssh root@192.168.1.1 sysupgrade -n /tmp/sysupgrade.bin

Method 2 - U-Boot serial recovery via TFTP (requires 3.3 V USB-UART
adapter):

  1. Attach 3.3 V USB-UART (TX, RX, GND) to the PCB header. Open a
     terminal at 115200 8N1, no flow control.
  2. Configure a TFTP server on the host PC at IP 192.168.2.88.
     Place the factory image in the TFTP root, renamed if desired.
  3. Power on the router. The BL2/U-Boot banner prints within ~1
     second; press any key during the autoboot countdown to enter
     the U-Boot menu.
  4. From the menu, select 'Upgrade ubi'. U-Boot's default IP is
     192.168.2.1 and it expects the TFTP server at 192.168.2.88.
     Provide the factory image filename when prompted.
  5. Wait for the write to complete; U-Boot reboots into OpenWrt.

Method 3 - From a NAND programmer (brick-recovery path):

  1. Clip onto or desolder the SPI-NAND chip and dump the full
     128 MiB with a programmer (e.g. RT809H, CH341A with NAND
     adapter). Keep the dump as a recovery image.
  2. Using the same programmer, write the factory.bin image to
     the UBI region of the NAND. The SPI-NOR (BL2/u-boot-env/
     Factory/FIP/woem/ledeinfo/nvram) must NOT be erased - those
     partitions are per-unit and live on the separate 4 MiB NOR.
  3. Reseat the chip and power on. The bootloader on NOR will
     load the new kernel and rootfs from UBI.

Signed-off-by: Richard Jones <richard@netsolution.shop>
Link: https://github.com/openwrt/openwrt/pull/22818
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
target/linux/mediatek/dts/mt7981b-alwaylink-m01k43.dts [new file with mode: 0644]
target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
target/linux/mediatek/image/filogic.mk