INAGAKI Hiroshi 986ca4c887 mediatek: add support for BUFFALO WSR-3000AX4P
BUFFALO WSR-3000AX4P is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
MT7981B.

Specification:

- SoC             : MediaTek MT7981B
- RAM             : DDR4 512 MiB (ESMT M16U4G16256A-KJBG)
- Flash           : SPI-NAND 128 MiB (Winbond W25N01GVZEIG)
- WLAN            : 2.4/5 GHz 2T2R (MediaTek MT7981B (SoC))
- Ethernet        : 4x 10/100/1000 Mbps
  - switch        : MediaTek MT7531A
- LEDs/Keys (GPIO): 6x/4x
- UART            : through-hole on PCB (J1)
  - assignment    : 3.3V, GND, TX, RX from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 1.5 A (Max. 14.4 W)

Flash instruction using initramfs image:

1. Prepare a TFTP server with 192.168.11.2
2. Rename initramfs image to "linux.ubi-recovery" and put it to the TFTP
   directory
3. Hold the "AOSS" button and power on WSR-3000AX4P, release after 7~
   seconds
4. The bootloader automatically downloads the initramfs image and boots
   with it
5. After booting, upload a sysupgrade image to the device and perform
   sysupgrade with it
6. Wait ~100 seconds to complete flashing

Reverting to stock image:

1. Download a official firmware and decrypt it by buffalo-enc

   example:

     buffalo-enc -i <official .bin> -o fw.dec -d -O 0xC8 -l

2. Upload the decrypted image to the device
3. Flash the image to the UBI in "ubi_kernel" partition on the device

   example:

     . /lib/upgrade/common.sh
     . /lib/upgrade/nand.sh
     CI_UBIPART="ubi_kernel" nand_do_flash_file fw.dec

4. Reboot the device

   reboot

Notes:

- WSR-3000AX4P has 2x OS images ("ubi"/"Kernel2"), but the second one
  is only for backup and not used for booting.

  image handling on the bootloader:

  - "ubi" is broken     : "Kernel2" --(copy)--> "ubi"
  - "Kernel2" is broken : "ubi" --(copy)--> "Kernel2"
  - "ubi" != "Kernel2"  :
    - boot_select=0: "ubi" --(copy)--> "Kernel2"
    - boot_select=1: "Kernel2" --(copy)--> "ubi", set boot_select to '0'

MAC Addresses:

LAN   : EC:5A:31:xx:xx:50 (board_data, "mac" (text))
WAN   : EC:5A:31:xx:xx:50
2.4GHz: EC:5A:31:xx:xx:52
5GHz  : EC:5A:31:xx:xx:59

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22587
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-16 22:48:57 +02:00
..
2025-11-18 12:18:02 +01:00