1641 Commits

Author SHA1 Message Date
INAGAKI Hiroshi
a40a1e5d02 mediatek: add support for ELECOM WRC-X6000GSD
ELECOM WRC-X6000GSD is a 4804Mbps 4xMIMO 2.4/5 GHz 11ax (Wi-Fi 6) router
with 2.5Gbps WAN (stock: 1Gbps max.), based on MT7986B

Specification:

- SoC             : MediaTek MT7986BLA
- RAM             : DDR3 512 MiB (SoC)
- Flash           : Winbond 128MiB SPI NAND (W25N01GVZEIG)
- WLAN            : 2.4/5 GHz 4T4R (MediaTek MT7986)
- Ethernet        : 5x 10/100/1000(/2500) Mbps
  - wan           : Maxlinear Ethernet GPY211C (max. 2500M)
  - lan           : MediaTek MT7531 (max. 1000M)
- LEDs/Keys (GPIO): 11x/4x
- UART            : through-hole on PCB (J1)
  - assignment    : 3.3V, TX, RX, NC, GND from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 2 A

Flash layout:
dev:  offset     size        name
mtd0: 0x00000000 0x00100000 "BL2"
mtd1: 0x00100000 0x00080000 "Ubootenv"
mtd2: 0x00180000 0x00200000 "Factory"
mtd3: 0x00380000 0x00200000 "FIP"
mtd4: 0x00580000 0x00020000 "Fwheader"
mtd5: 0x005a0000 0x03200000 "ubi"
mtd6: 0x037a0000 0x00380000 "Config"
mtd7: 0x03b20000 0x00020000 "Fwheader_2"
mtd8: 0x03b40000 0x03200000 "ubi_2"
mtd9: 0x06d40000 0x00380000 "Config_2"
mtd10: 0x070c0000 0x00100000 "persist"
mtd11: 0x071c0000 0x00040000 "Mrd"
mtd12: 0x07200000 0x00380000 "Backup"

Flash instruction using factory.bin image:

1. Boot WRC-X6000GSD in router mode normally
2. Access to the WebUI ("http://192.168.2.1/") on the device
   -> その他設定 (Other settings)
   -> フォームウェア更新 (Update firmware)
   -> ローカルファイル指定 (Specify local file)
3. Select the OpenWrt factory.bin image and click apply ("適用") button
4. Wait ~120 seconds to complete flashing

Switching to the stock firmware:

1. Load the elecom.sh script
   . /lib/upgrade/elecom.sh

2. Check the current index of firmware partition
   mstc_rw_bootnum

3. Set the bootnum to opposite value between 1 and 2
   mstc_rw_bootnum value

   example:
   - step2 returned "1": mstc_rw_bootnum 2
   - step2 returned "2": mstc_rw_bootnum 1

4. Reboot, to stock FW

5. Flash the stock FW to fuly revert back to original.

Notes:

- With the stock firmware, it will flash to another partition and
  toggle boot to that partition when any firmware is flashed.
  For example when booting on ubi, the new firmware will be flashed
  to ubi_2 and the router will boot from ubi_2 afterwards.
  The 5th byte of the Persist partition is the boot value (0x01 or 0x02).

- bootmenu_delay=0 is set from factory so uboot menu is hidden by
  default.

- The hardware of WRC-X6000GSD is almost identical to WRC-X6000QS, but
  WAN (labeled as "INTERNET") port is limited to 1000 Mbps on stock FW.
  On OpenWrt FW, 2500 Mbps connection is available on that port.

MAC Addresses:

LAN   : 38:97:A4:xx:xx:58 (Factory, 0x2A(hex)/Ubootenv, "ethaddr"(text))
WAN   : 38:97:A4:xx:xx:5B (Factory, 0x24(hex))
2.4GHz: 38:97:A4:xx:xx:59 (Factory, 0x4(hex))
5GHz  : 38:97:A4:xx:xx:5A (Factory, 0xA(hex)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-03 01:14:11 +02:00
INAGAKI Hiroshi
16d159c778 mediatek: add support for ELECOM WRC-X6000QS
ELECOM WRC-X6000QS is a 4804Mbps 4xMIMO 2.4/5 GHz 11ax (Wi-Fi 6) router
with 2.5Gbps WAN, based on MT7986b

Specification:

- SoC             : MediaTek MT7986B
- RAM             : DDR3 512 MiB
- Flash           : Winbond 128MiB SPI NAND
- WLAN            : 2.4/5 GHz 4T4R (MediaTek MT7986)
- Ethernet        : 5x 10/100/1000 Mbps
  - wan           : Maxlinear Ethernet GPY211C
  - lan           : MediaTek MT7531
- LEDs/Keys (GPIO): 11x/4x
- UART            : through-hole on PCB (J1)
  - assignment    : 3.3V, TX, RX, NC, GND from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 2 A

Flash layout:
dev:  offset     size        name
mtd0: 0x00000000 0x00100000 "BL2"
mtd1: 0x00100000 0x00080000 "Ubootenv"
mtd2: 0x00180000 0x00200000 "Factory"
mtd3: 0x00380000 0x00200000 "FIP"
mtd4: 0x00580000 0x00020000 "Fwheader"
mtd5: 0x005a0000 0x03200000 "ubi"
mtd6: 0x037a0000 0x00380000 "Config"
mtd7: 0x03b20000 0x00020000 "Fwheader_2"
mtd8: 0x03b40000 0x03200000 "ubi_2"
mtd9: 0x06d40000 0x00380000 "Config_2"
mtd10: 0x070c0000 0x00100000 "persist"
mtd11: 0x071c0000 0x00040000 "Mrd"
mtd12: 0x07200000 0x00380000 "Backup"

UBI layout:
name:       size:
kernel      0x00364000  dynamic
rootfs      0x00FFC000  dynamic
rootfs_data 0x01A47000  dynamic

Flash instruction using factory.bin image:

1. Boot WRC-X6000QS in router mode normally
2. Access to the WebUI ("http://192.168.2.1/") on the device
   -> その他設定 (Other settings)
   -> フォームウェア更新 (Update firmware)
   -> ローカルファイル指定 (Specify local file)
3. Select the OpenWrt factory.bin image and click apply ("適用") button
4. Wait ~120 seconds to complete flashing

Switching to the stock firmware:

1. Load the elecom.sh script
   . /lib/upgrade/elecom.sh

2. Check the current index of firmware partition
   mstc_rw_bootnum

3. Set the bootnum to opposite value between 1 and 2
   mstc_rw_bootnum value

   example:
   - step2 returned "1": mstc_rw_bootnum 2
   - step2 returned "2": mstc_rw_bootnum 1

4. Reboot, to stock FW

5. Flash the stock FW to fuly revert back to original.

Note 1: With the stock firmware, it will flash to another partition and
  toggle boot to that partition when any firmware is flashed.
  For example when booting on ubi, the new firmware will be flashed
  to ubi_2 and the router will boot from ubi_2 afterwards.
  The 5th byte of the Persist partition is the boot value (0x01 or 0x02).

  During my tests, it never switched to another boot partition if the
  firmware failed boot. So if openwrt doesn't boot,
  UART might be required to recover.

Note 2: bootmenu_delay=0 is set from factory so uboot menu is hidden.

[original work]
Signed-off-by: Yuhei Amemiya <minihui@me.com>
[fixes, improvements]
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-03 01:14:11 +02:00
Jörg Seitz
b84184a526 mediatek: filogic: add support for zbt-z8103ax-d
Device support for zbt-z8103ax-d

Model D DTS is identical to Model C zbt-z8103ax-c.
Both models share same motherboard.

Difference between models is

 - Model C is a cylinder shape enclosure
   containing internal antennas.
 - Model D is a sandwich shape enclosure
   with 6 external antennas.

Specifications:

SoC: MediaTek MT7981B
RAM: 256MiB
Flash: Winbond SPI-NAND 128 MiB
Switch: 1 WAN, 3 LAN (Gigabit) MediaTek MT7531
Buttons: Reset, Mesh
Power: DC 12V 1A
WiFi: MT7981B 2.4Ghz & 5.8Ghz

Led Layout from left to right:

    Power
    Mesh (RGB Led, user controllable, default set to OpenWrt Status)
    WLAN 2.4G (user controllable)
    WAN (user controllable)
    LAN3
    LAN2
    LAN1
    WLAN 5G (user controllable)

Installation:

A. Through U-Boot menu:

    - Prepare your connecting computer to use static IP
        (legacy notation) 192.168.1.10 netmask 255.255.255.0
        (CIDR notation)   192.168.1.10/24
    - Power down the router and hold in the Reset button.
    - While holding in the button power up the router again.
    - Hold the button in for 10 seconds and then release.
    - Use your browser to go to 192.168.1.1
    - If you see a GUI allowing for flashing firmware you are at the right spot.
    - Upload the **Factory** image file.

Note: U-Boot GUI it can be used to recover from an incorrect firmware flash.

B. Through OpenWrt Dashboard:

    If your router comes with OpenWrt preinstalled (modified by the seller),
    you can easily upgrade by going to the dashboard (192.168.1.1)
    and then navigate to
    System -> Backup/Flash firmware, then flash the firmware

MAC Addresses:

MAC Addresses were found in Factory partition:

offset 0x4  F8:5E:3C:xx:xx:aa --> Router Label -2
offset 0xa  F8:5E:3C:xx:xx:bb --> Router Label -1
offset 0x24 F8:5E:3C:xx:xx:cc --> Router Label +1
offset 0x2a F8:5E:3C:xx:xx:yy --> printed on Router Label

Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/21626
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-30 23:57:13 +02:00
Jörg Seitz
8dba7a692c mediatek: update device tree of zbt-z8103ax for nmbm
Nand has a valid mediatek nand badblock management (NMBM) signature.
Gets used for non-UBI partions BL2, u-boot-env, Factory and FIT.

Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/21626
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-30 23:57:13 +02:00
John Audia
ed4b6ad372 kernel: bump 6.18 to 6.18.25
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.18.25

Manually rebased:
  generic/pending-6.18/795-09-net-ethernet-mtk_ppe-offload-flows-to-MxL862xx-switc.patch

All other patches automatically rebased via update_kernel.sh

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/22890
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-30 01:15:19 +02:00
Fil Dunsky
95fb8e4353 mediatek: nmbm fix for Huasifei WH3000 Pro NAND
This commit adds missing nmbm parameters to device dts.

Before:
```
[   13.065277] ubi0 warning: ubi_eba_init: cannot reserve enough PEBs for bad PEB handling, reserved 36, need 40
[   13.184624] ubi0: attached mtd4 (name "ubi", size 226 MiB)
[   13.250170] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[   13.332343] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[   13.413459] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[   13.496659] ubi0: good PEBs: 1812, bad PEBs: 0, corrupted PEBs: 0
[   13.569460] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[   13.655780] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1717500926
[   13.764971] ubi0: available PEBs: 0, total reserved PEBs: 1812, PEBs reserved for bad PEB handling: 36
```

After:
```
[    0.939053] spi-nand spi0.0: Winbond SPI NAND was found.
[    0.944422] spi-nand spi0.0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
[    0.953256] Signature found at block 2047 [0x0ffe0000]
[    0.958389] NMBM management region starts at block 1920 [0x0f000000]
[    0.966032] First info table with writecount 0 found in block 1920
[    0.975792] Second info table with writecount 0 found in block 1923
[    0.982076] NMBM has been successfully attached
[    0.986815] 5 fixed-partitions partitions found on MTD device spi0.0
[    0.993245] Creating 5 MTD partitions on "spi0.0":
[    0.998028] 0x000000000000-0x000000100000 : "BL2"
[    1.003825] 0x000000100000-0x000000180000 : "u-boot-env"
[    1.009867] 0x000000180000-0x000000380000 : "Factory"
[    1.016776] 0x000000380000-0x000000580000 : "FIP"
[    1.023109] 0x000000580000-0x00000e780000 : "ubi"
[    1.724925] ubi0: default fastmap pool size: 90
[    1.729444] ubi0: default fastmap WL pool size: 45
[    1.734256] ubi0: attaching mtd4
[    2.441513] ubi0: scanning is finished
[    2.451382] ubi0: attached mtd4 (name "ubi", size 226 MiB)
[    2.456876] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.463753] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.470528] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.477481] ubi0: good PEBs: 1808, bad PEBs: 0, corrupted PEBs: 0
[    2.483567] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    2.490775] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[    2.499114] ubi0: available PEBs: 0, total reserved PEBs: 1808, PEBs reserved for bad PEB handling: 38
```

Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23153
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-30 00:20:39 +02:00
Daniel Golle
dbd8eab75d generic: 6.18: mtk_eth_soc: improve non-MTK tag_8021q DSA
Add patches to improve support for using 3rd-party DSA switches
like MaxLinear MxL862xx with MediaTek's mtk_eth_soc being the
conduit. This involves reorganizing hardware queues to avoid
overlap (currently dp->index is used -- if there is more than one
DSA switch this is problematic), and correctly programming flows
of the non-MTK DSA users ports in the PPE offloading engine.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-27 13:12:03 +01:00
Daniel Golle
be0a49cfe8 mediatek: filogic: arcadyan-mozart: fix polarity properties
Use the upstream properties to describe the USXGMII PCS polarity as
the downstream mediatek,pnswap{,-rx,tx} was dropped.
This board was the only user.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-27 02:56:15 +01:00
Daniel Golle
c271123724 generic: 6.18: fix MediaTek USXGMII driver
LINK_INBAND_ENABLE isn't valid for 5GBase-R/10GBase-R modes which
by definition don't support any in-band an. Correctly report
LINK_INBAND_DISABLE to fix 10G fiber SFP modules no longer working.
While at it also get rid of downstream pn-swap properties in favor
of using the upstream schema.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-27 02:56:15 +01:00
Jörg Seitz
771e06352f mediatek: filogic: Add new Router model ZBT-Z8106AX-S
Device support for zbt-z8106ax-s

Specifications:

SoC: MediaTek MT7981B
RAM: 256MiB
Flash: Winbond SPI-NAND 128 MiB
Switch: 1 WAN, 4 LAN (Gigabit) MediaTek MT7531
Buttons: Reset
Power: DC 12V 1A
WiFi: MT7981B 2.4Ghz & 5Ghz
USB 3
M2 slot to hold LTE modem
1 nano SIM slot (user controllable)
Hardware watchdog (confirmed to work)

Router comes in a plastic tower with all antennas internal.
 - 4 antennas for LTE 4G/5G communication
 - 2 antennas for Wifi 2.4 GHz
 - 2 antennas for Wifi 5 GHz

Led Layout:

Power (green, user controllable, default set to OpenWrt Status)
Mobile (green, user controllable)
WLAN 2.4G (green, user controllable)
WLAN 5G (green, user controllable)

WAN (amber, user controllable, set to show eth1)
LAN1 (amber, hardware controlled)
LAN2 (amber, hardware controlled)
LAN3 (amber, hardware controlled)
LAN4 (amber, hardware controlled)

SIM Slot:

Controlled via exported GPIO named SIM.

echo "0" > /sys/class/gpio/sim/value
 - turns off sim slot labelled SIM

echo "1" > /sys/class/gpio/sim/value
 - turns on sim slot labelled SIM

---

Installation:

A. Through U-Boot menu:

- Prepare your connecting computer to use a static IP in
  network 192.168.1.0/24 like
  a) 192.168.1.10 netmask 255.255.255.0 (legacy notation)
  b) 192.168.1.10/24 (CIDR notation)
- Power down the router and hold in the Reset button.
- While holding in the button power up the router again.
- Hold the button in for 10 seconds and then release.
- Use your browser to go to 192.168.1.1
- If you see a GUI allowing for flashing firmware then you got the right spot.
- Upload the **Factory** image file.

Note: U-Boot GUI it can be used to recover from an incorrect firmware flash.

B. Through OpenWrt Dashboard:

If your router comes with OpenWrt preinstalled (modified by vendor),
you can easily upgrade by going to the dashboard (192.168.1.1) and
then navigate to "System" -> "Backup/Flash firmware"
Flash OpenWRT firmware.
Important: Take care to deselect (untick) option
"keep settings". Settings done by vendor are incompatible with
versions 24.10 or 25.12.

MAC Addresses:

MAC Addresses were found in Factory partition:

offset 0x4 F8:5E:3C:xx:xx:aa --> Router Label -2
offset 0xa F8:5E:3C:xx:xx:bb --> Router Label -1
offset 0x24 F8:5E:3C:xx:xx:cc --> Router Label +1
offset 0x2a F8:5E:3C:xx:xx:yy --> printed on Router Label

Hardware Watchdog:

Device features a GPIO controlled hardware watchdog.
Verfied by removing procd controlled watchdog and
seeing device rebooting.

---

Notes:
The zbt-z8106ax-s could be ordered from vendor with a variety of modems.
Mine came with a 4G LTE modem Quectel EC200A.
Quectel firmware was at EC200AEUHAR01A30M16.
Choices for ordering with 5G LTE were available.

Modem communication is set to ethernet control mode (ECM) by vendor.

Package modemmanager works fine with Quectel EC200A.
You may also decide to use FUjR/Qmodem github repository
to have it manage LTE modem.

Please take note that internal switch port named lan5 isn't
wired to LTE modem in model S as opposed to model T.
Just removing lan5 from DTS did cause unwanted reboots whenever
a cable is plugged into LAN ports 1-4. Disabling port lan5
in DTS however works fine. No unwanted reboots due to
plug/unplug cable into any lan or wan port.

Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/22912
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-27 00:31:26 +02:00
Tianling Shen
c8aa9beb43 mediatek: add GL.iNET GL-MT3600BE support
Hardware specification:
  SoC: MediaTek MT7987A 4x A53
  Flash: 512 MB SPI-NAND
  RAM: 512MB DDR4
  Ethernet: 2x 2.5GbE (built-in + RTL8221B)
  WiFi: MediaTek MT7990
  USB: 1x USB 3.0 port
  Button: Mode, Reset
  Power: Type-C PD 5/9/12V

Flash instructions:
  1. Power on the device with 'reset' key pressed for 5s
  2. Set static IP on your PC:
     IP 192.168.1.10/24, GW 192.168.1.1
  3. Visit http://192.168.1.1 and upload sysupgrade.bin

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/22476
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-27 00:27:55 +02:00
Daniel Golle
bdd216a4ec mediatek: drop v6.12 and default to v6.18
Switch to kernel v6.18 and drop v6.12.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-24 15:52:51 +01:00
Daniel Golle
18cbd83a14 generic: 6.18: import updated standalone PCS handling
Import pending series introducing support for standalone PCS drivers.

This has previously already been used by the airoha target, and is
also the base for the closer-to-upstream patches for MediaTek MT7988
10G SerDes support.

In order to not having to diverge from upstream also backport series
for standardized handling for PHY and PCS SerDes pair polarity.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-21 18:42:45 +01:00
Xiao Qian
445488e8b8 mediatek: fix MAC address assignment for ZBT Z8102AX V2
label: f8:5e:3c:99:95:c0

wifi-2.4G f8 5e 3c 99 95 be
wifi-5.8G f8 5e 3c 99 95 bf
eth0-lan  f8 5e 3c 99 95 c0
eth1-wan  f8 5e 3c 99 95 c1

:~# hexdump -C /dev/mtd2 | more
00000000  81 79 00 00 f8 5e 3c 99  95 be f8 5e 3c 99 95 bf  |.y...^<....^<...|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 f8 5e 3c 99  95 c1 f8 5e 3c 99 95 c0  |.....^<....^<...|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

Signed-off-by: Xiao Qian <qxooqx@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23016
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-04-21 10:41:06 +02:00
Daniel Pawlik
c576e95b2f generic: 6.18: drop stale hunk of Filogic SerDes patch
Daniel Pawlik figured out that a stale patch hunk breaks one of the
two 10G SerDes PCS ports of MT7988. Remove the hunk to make 10G
Ethernet work on both SerDes PCS with Linux 6.18.

Testing was done using a Aquantia AQR113C SFP+ module.

Signed-off-by: Daniel Pawlik <pawlik.dan@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-20 14:51:44 +01:00
Daniel Golle
e591ba4bad mediatek: 6.18: add missing module dependency
Add missing dependency of kmod-btmtkuart on kmod-hci-uart when building
with Linux 6.18.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-20 01:10:32 +01:00
Daniel Golle
b41ba5314c mediatek: mt7629: add missing CONFIG_LEDS_SMARTRG_LED
The config symbol has acceidentally been omitted when adding support for
Linux 6.18. Re-add it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-20 01:10:22 +01:00
Daniel Golle
de2b69c432 mediatek: enable Linux 6.18 testing kernel
Enable Linux 6.18 as testing kernel.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
Daniel Golle
7b1cbf9ea4 mediatek: filogic: adjust config for Linux 6.18
Adapt kernel configuration of the filogic subtarget for Linux 6.18.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
Daniel Golle
c0373f7af4 mediatek: mt7622: adjust config for Linux 6.18
Adapt kernel configuration of the mt7622 subtarget for Linux 6.18.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
Daniel Golle
88a4f7afbe mediatek: mt7629: adjust config for Linux 6.18
Adapt kernel configuration of the mt7629 subtarget for Linux 6.18.
This was only compile-tested as I don't have the hardward.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
Daniel Golle
a5d85f0ec2 mediatek: mt7623: adjust config for Linux 6.18
Adapt kernel configuration of the mt7623 subtarget for Linux 6.18.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
Daniel Golle
bf0825a2d0 mediatek: build driver for built-in 2.5GE PHY as module
The by-now-upstream driver for the built-in 2.5GE PHY of the MediaTek
MT7988 and MT7987 SoC loads firmware at probe time.

Build the driver as a module in order to make sure the driver only
attempts to load the firmware by the time the rootfs with the firmware
file has become available.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
Daniel Golle
7de575b809 mediatek: fix Arioha AN8855 DSA driver for Linux 6.18
Upstream changes to phylink require to make some small changes to our
downstream Airoha AN8855 DSA driver, so it build with Linux 6.18.
The efuse driver is upstream by now and can be dropped.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
Daniel Golle
2129465f98 mediatek: fix patches for Linux 6.18
Delete patches merged upstream and refresh the remaining patches.
Import pending patchset to fix read-out-of-bounds bug in clk driver
while at it, as it makes maintaining the downstream clk driver for
MT7987 easier.
Replace downstream patch for Fidelix FM35X1GA SPI-NAND chip with
upstream commit replacing it (Dosilicon DS35Q1GA is indentical).
Several additional fixes were needed for MT7623N, especially to get
HDMI and the Mali-450 GPU working again...

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
Daniel Golle
ddfe78ea75 kernel/mediatek: restore files for v6.12
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
Daniel Golle
505c187497 kernel/mediatek: create files for v6.18 (from v6.12)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-17 14:37:52 +01:00
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
INAGAKI Hiroshi
2cef2148c4 mediatek: filogic: enable ascii-env NVMEM driver
Enable ascii-env NVMEM driver (CONFIG_NVMEM_LAYOUT_ASCII_ENV) on
mediatek/filogic subtarget, to handle ascii-based MAC addresses
in key-value format stored to the mtd partition.

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
Jörg Seitz
a2dcbd79a4 mediatek: filogic: Add new Router model ZBT-Z8106AX-T
Device support for zbt-z8106ax-t

Vendor Zbtlink advertizes this device as model Z8106AX-M2-T
on their website www.zbtlink.com. Device label sticked on
enclosure however states this is model Z8106AX version -T.
I made firmware selector to show this device as
- ZBT-Z8106AX-T to match information printed on the label and
- ZBT-Z8106AX-M2-T to match information found on vendors web pages.

Specifications:

SoC: MediaTek MT7981B
RAM: 256MiB
Flash: Winbond SPI-NAND 128 MiB
Switch: 1 WAN, 4 LAN (Gigabit) MediaTek MT7531
Buttons: Reset
Power: DC 12V-32V 1A
WiFi: MT7981B 2.4Ghz & 5Ghz
USB 3
M2 slot to hold LTE modem
2x nano SIM slots (user controllable)

Router comes in a flat metal box with all antennas detachable.
 - 4 antennas for LTE 4G/5G communication
 - 2 antennas for Wifi 2.4 GHz
 - 2 antennas for Wifi 5 GHz

Power supply could be between 12V and 32V.
This serves both cars equipped with 12V batteries
and trucks equipped with 24V batteries.

Led Layout:

Power (green, user controllable, default set to OpenWrt Status)
Mobile (green, user controllable)
WLAN 2.4G (green, user controllable)
WLAN 5G (green, user controllable)

WAN (amber, user controllable, set to show eth1)
LAN1 (amber, hardware controlled)
LAN2 (amber, hardware controlled)
LAN3 (amber, hardware controlled)
LAN4 (amber, hardware controlled)

SIM Slots:

Controlled via exported GPIO named SIM.

echo "0" > /sys/class/gpio/sim/value
 - selects upper sim slot labelled SIM1

echo "1" > /sys/class/gpio/sim/value
 - selects lower sim slot labelled SIM2

Slot SIM2 is set as default and matches label on Router enclosure

---

Installation:

A. Through U-Boot menu:

- Prepare your connecting computer to use a static IP in
  network 192.168.1.0/24 like
  a) 192.168.1.10 netmask 255.255.255.0 (legacy notation)
  b) 192.168.1.10/24 (CIDR notation)
- Power down the router and hold in the Reset button.
- While holding in the button power up the router again.
- Hold the button in for 10 seconds and then release.
- Use your browser to go to 192.168.1.1
- If you see a GUI allowing for flashing firmware then you got the right spot.
- Upload the **Factory** image file.

Note: U-Boot GUI it can be used to recover from an incorrect firmware flash.

B. Through OpenWrt Dashboard:

If your router comes with OpenWrt preinstalled (modified by vendor),
you can easily upgrade by going to the dashboard (192.168.1.1) and
then navigate to "System" -> "Backup/Flash firmware"
Flash OpenWRT firmware and take care to deselect (untick) option
"keep settings". Settings done by vendor are incompatible with
versions 24.10 or 25.12.

MAC Addresses:

MAC Addresses were found in Factory partition:

offset 0x4 F8:5E:3C:xx:xx:aa --> Router Label -2
offset 0xa F8:5E:3C:xx:xx:bb --> Router Label -1
offset 0x24 F8:5E:3C:xx:xx:cc --> Router Label +1
offset 0x2a F8:5E:3C:xx:xx:yy --> printed on Router Label

Hardware Watchdog:

Device features a GPIO controlled hardware watchdog.
Verfied by removing procd controlled watchdog and
seeing device rebooting.

---

Notes:
The zbt-z8106ax-t could be ordered from vendor with a variety of modems.
Mine came with a Quectel RM520N-GL. Quectel firmware was at RM520NGLAAR01A07M4G.
This level of firmware made some trouble connecting with some of my
SIM cardproviders.
Newer firmware level RM520NGLAAR01A08M4G_01.205.01.205 was available searching
github repositories. Upgrading my RM520-GL allowed to get successful connects
that did fail with older Quectel firmware.

Modem communication is set to ethernet control mode (ECM) by vendor.
Vendor takes advantage of ECM by wiring modem to internal switch port WWAN.
OpenWRT network configuration wants to define two network interfaces
 - Network interface covering USB0 set with high metric
 - Network interface covering WWAN set with low metric
Network interface covering WWAN would be preferred default route.

Please take note that internal switch port wired to LTE modem is named LAN5
in vendor provided firmwares. OpenWRT however names port as WWAN to better
describe purpose of port. WWAN is suggested to be assigned to firewall zone WAN.

Did use package qmodem from github repository FUjR/QModem to manage RM520N-GL LTE modem.

Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/21834
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-16 21:52:51 +02:00
Rosen Penev
669a7375a6 treewide: use _scoped for loop
Avoids refcount problems and slightly simplifies code.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21176
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-16 21:17:43 +02:00
Daniel Golle
79c0127417 mediatek: add missing patch description
Add missing patch description, so all patches of the mediatek target can
be applied to a kernel tree using 'git am'.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-16 15:15:34 +01:00
Daniel Golle
a45ce4c788 mediatek: don't let devfreq power-off the CPU
Fix a long standing bug in the mediatek-cci-devfreq driver which leads
to the driver switching off the CPU power regulator in case of another
resource not being ready in time -- a classic probe-order race condition.

As a work-around it would of course just as well be possible to set the
CPU regulator as 'regulator-always-on' (and not just 'regulator-boot-on'),
but practically all MT7988 devices have copy&pasted the PMIC device tree
hunk which sets only 'regulator-boot-on').

Hence, in order not having to fix all device trees, a proper fix in the
driver is preferred.

Fixes: #683
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-14 00:54:37 +01:00
Roland Reinl
145bc7e52f filogic: add support for D-Link AQUILA PRO AI E30
Specification:
The device is similar to the M30 but has only one LAN port and no WAN port.

- MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
- 512MB RAM
- 128MB NAND flash with two UBI partitions with identical size
- 1 multi color LED (red, green, blue, white) connected via GCA230718
- 2 buttons (WPS, reset, LED)
- 1 1Gbit LAN port

Disassembly:
- There are two screws at the power connector which must be removed. Afterwards the top case can be removed (it is clipped on, so some tools are required).

Serial Interface:
- The serial interface can be connected to the 4 pin holes on the board. Do NOT connect VCC.
- The pins are labelled on the PCB (RX, TX, GND)
- Settings: 115200, 8N1

MAC addresses:
- LAN MAC is stored in partition "Odm" at offset 0x8f
- WLAN MAC (2.4 GHz and 5GHz) is LAN MAC + 1

Reverting back to OEM firmware:
- There is currently no easy way to revert back to the OEM image
- The methods from M30 and M60 doesn't seem to work anymore
- If you plan to revert back to OEM firmware later, do the following steps before flashing OpenWrt:
  - Boot from initramfs as described in "Flashing via U-Boot" but don't flash anything
  - Instead, make a backup of UBI and UBI1 partition
  - The created dumps must be written to the initial partitions to revert back to OEM

Flashing via Recovery Web Interface:
- Set your IP address to 192.168.200.10, subnetmask 255.255.255.0
- Press the reset button while powering on the device
- Keep the reset button pressed until the LED blinks red
- Open a Chromium based and goto http://192.168.200.50/ (recovery web interface)
- Download openwrt-mediatek-filogic-dlink_aquila-pro-ai-e30-a1-squashfs-recovery.bin
- Note: The recovery web interface always reports successful flashing, even if it fails
- After flashing, the recovery web interface will try to forward the browser to 192.168.0.1 (can be ignored)
- If flashing was successful, OpenWrt is accessible via 192.168.1.1
- The recovery image boots an initramfs image, flash the sys upgrade image to get to „normal“ OpenWrt mode

Flashing via U-Boot:
- Open the case, connect to the UART console
- Set your IP address to 192.168.200.2, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
- Run a tftp server which provides openwrt-mediatek-filogic-dlink_aquila-pro-ai-e30-a1-initramfs-kernel.bin
- Supply the board with 12V
- Select "7. Load image" in the U-Boot menu
- Enter image file, tftp server IP and device IP (if they differ from the default).
- TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
- The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
- Perform a sysupgrade using openwrt-mediatek-filogic-dlink_aquila-pro-ai-e30-a1-squashfs-sysupgrade.bin
- Reboot the device. OpenWrt should start from flash now

Flashing via OEM web interface is not possible, as it will change the active partition and OpenWrt is only running on the first UBI partition.

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22776
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-13 01:52:29 +02:00
Daniel Golle
8101611355 mediatek: fix patch filename
A previous commit wrongly renamed a patch file omitting the final 'h'
character. Rename it to again have the correct '.patch' suffix.

Fixes: c23b9256f0 ("mediatek: replace patches with upstream version")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-04-10 00:10:09 +01:00
Mieczyslaw Nalewaj
3e42e349d4
treewide: strip trailing whitespace
Strip trailing whitespace in all code:
find . -type f | grep "\.c$" | xargs sed -i 's/[ \t]\+$//'
find . -type f | grep "\.h$" | xargs sed -i 's/[ \t]\+$//'
find . -type f | grep "\.dts$" | xargs sed -i 's/[ \t]\+$//'
find . -type f | grep "\.dtsi$" | xargs sed -i 's/[ \t]\+$//'

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22840
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-04-08 10:05:53 +02:00
Jascha Sundaresan
bc0a2c933e
mediatek: filogic: fix EAX17 rootfs hash in FIT node for per-device rootfs builds
When CONFIG_TARGET_PER_DEVICE_ROOTFS is enabled (as in buildbot builds),
the final per-device rootfs is assembled at root.squashfs+pkg=<hash> rather
than root.squashfs. The gen_netgear_rootfs_node.sh script was always hashing
root.squashfs (the base rootfs without device-specific packages), causing the
size and hash in the FIT node to not match the actual rootfs written to the
UBI volume, resulting in boot failure on buildbot-produced images.

Fix by using the per-device rootfs path when TARGET_PER_DEVICE_ROOTFS is set,
consistent with how include/image.mk handles the same distinction elsewhere.

Fixes: 46ab9f3f1c ("filogic: add support for Netgear EAX17")
Signed-off-by: Jascha Sundaresan <flizarthanon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22839
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-04-08 10:02:58 +02:00
Daniel Pawlik
561e3cf678 mediatek: device tree overlay for BPI-R4 with BE14 module
Some Banana Pi BPI-R4 BE14 WiFi modules are shipped with zeroed
tx_power fields in EEPROM (2G/5G/6G). This leads to low transmit power
on affected bands.
This overlay provides known-good EEPROM data (including correct tx_power
values for 2G/5G/6G bands) dumped from a working BE14 module.

To enable BE14 overlay, add into u-boot bootconf_extra
parameter: 'mt7988a-bananapi-bpi-r4-wifi-be14'.
You can use example script:

    overlay="mt7988a-bananapi-bpi-r4-wifi-be14"
    current="$(fw_printenv -n bootconf_extra 2>/dev/null)"
    if [ -n "${current}" ]; then
        fw_setenv bootconf_extra "${current}#${overlay}"
    else
        fw_setenv bootconf_extra "${overlay}"
    fi

Earlier proposal proposed in [1] was fallback to default values if
invalid EEPROM content is detected.

[1] https://github.com/openwrt/openwrt/pull/19503/

Fixes: https://github.com/openwrt/openwrt/issues/17489
Signed-off-by: Daniel Pawlik <pawlik.dan@gmail.com>
2026-04-07 19:38:07 +01:00
Fil Dunsky
f4c211f635 mediatek: add Huasifei WH3000 Pro NAND support
This commit adds support for Huasifei WH3000 Pro NAND version.
There is an eMMC already supported in OpenWrt. The only difference is NAND chip.
This commit adds common .dtsi and separate .dts
for eMMC and nand versions.

**Huasifei WH3000 Pro NAND**
Portable Wi-Fi 6 travel router based on MediaTek MT7981A SoC. MT7981B+MT7976CN+RTL8221B Dual Core 1.3GHZ with 5G modems module and PWM Fan.

**Specifications**
SoC: Filogic 820 MT7981A (1.3GHz)
RAM: DDR4 1GB
Flash: 256mb Winbond SPI NAND
WiFi: 2.4GHz and 5GHz with 3 antennas
Ethernet:
1x WAN (10/100/1000M)
1x LAN (10/100/1000/2500M)
USB: 1x USB 3.0 port
Two buttons: reset and mode (BTN_0)
LEDS: blue, red, blue+red=pink
UART: 3.3V, TX, RX, GND / 115200 8N1
M.2 (WWAN) slot

**Installation via U-Boot rescue**
1. Set static IP 192.168.1.2 on your computer and default route as 192.168.1.1
2. Connect to the WAN port and hold the reset button while booting the device.
3. Wait for the LED to blink 5 times, and release the reset button.
4. Open U-boot web page on your browser at http://192.168.1.1
5. Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
6. Wait for the router to flash the new firmware.
7. Wait for the router to reboot itself.

**Installation via sysupgrade**
Just flash sysupgrade file via [LuCI upgrade page](http://192.168.1.1/cgi-bin/luci/admin/system/flash) without saving the settings.

**Installation via SSH**
Upload the file to the router `/tmp` directory, `ssh root@192.168.1.1` and issue a command:
```
sysupgrade -n /tmp/openwrt-mediatek-filogic-huasifei_wh3000-pro-nand-squashfs-sysupgrade.bin
```

Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22694
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-06 22:39:41 +02:00
Shiji Yang
c3109a565c kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic
This symbol is selected by CONFIG_BPF, which was already enabled
on generic config-6.12.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22730
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-06 01:38:41 +02:00
Shiji Yang
499886de05 kernel: enable CRYPTO_RNG2 and CRYPTO_SIG2 by default
These two symbols are selected by CONFIG_CRYPTO_MANAGER2[1-2], which
was already enabled on generic config-{6.12,6.18}.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=fb28fabfad332a731423ffdd2be122b73ea90f1e
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=6cb8815f41a966b217c0d9826c592254d72dcc31
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22730
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-06 01:38:41 +02:00
Shiji Yang
14e082f16a kernel: reorganize config files
Automatically refreshed by `./scripts/kconfig-reorder.sh`.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22730
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-06 01:38:41 +02:00
air jinkela
14d09b78b5 mediatek: rax3000m: add Airoha AN8855 switch support
This commit adds support for Airoha AN8855 switch to RAX000Me

Fixes: https://github.com/openwrt/openwrt/issues/21230
Signed-off-by: air jinkela <air_jinkela@163.com>
Link: https://github.com/openwrt/openwrt/pull/21171
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-05 19:53:46 +02:00
John Audia
2fab6c937a kernel: bump 6.12 to 6.12.80
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.80

Manually rebased:
  generic-hack/902-debloat_proc.patch

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/22742
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-03 19:08:27 +02:00
Aleksander Jan Bajkowski
21704379e0 mediatek: backport upstream thermal patch for mt7981
Backport upstream patch that adds node for thermal driver.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/22646
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-04-01 14:10:26 +02:00
Emre Yavuzalp
776a926c25 mediatek: filogic: ASUS RT-AX52 PRO support
The board is exactly identical to the ASUS RT-AX52, I've literally not changed a single thing.
Only AX52 is AX1800, PRO is AX3000.

SOC: MediaTek MT7981b
RAM: 256MB DDR3
FLASH: 128MB SPI-NAND (Winbond W25N01GV)
WIFI: Mediatek MT7981b DBDC 802.11ax 2.4/5 GHz
ETH: MediaTek MT7531 Switch
UART: 3V3 115200 8N1 (Pinout silkscreened / Do not ocnnect VCC)

Use the compiled asus_rt-ax52-pro-initramfs.trx file from the this repo.

Connect the PC via LAN to one of the yellow router ports and wait until your PC to get a DHCP lease.

Browse to http://192.168.50.1 or http://www.asusrouter.com/

If your router is brand new, finish the setup process and log into the Web-UI.

Navigate to Administration → Firmware Upgrade or use this link http://www.asusrouter.com/Advanced_FirmwareUpgrade_Content.asp.

Upload the .trx file to router

Wait for it to reboot

trx image is initramfs version. You must upgrade to squashfs version.

Browse to http://192.168.1.1/cgi-bin/luci/admin/system/flash

Upload asus_rt-ax52-pro-squashfs-sysupgrade.bin and use sysupgrade -n

Wait for it to reboot

SSH to 192.168.1.1 and set a root password, or browse to http://192.168.1.1

-------Revert to stock asus firmware ---------:
1: Download the rt-ax52 firmware from ASUS official website. Save the firmware to tftp server directory and rename to RT-AX52.trx

2: Connect the PC with TFTP server to the RT-AX52. Set a static ip on the ethernet interface of your PC. (ip address: 192.168.1.70, subnet mask:255.255.255.0)

3: Conect to the serial console, power on again, interrupt the autoboot process by pressing '4' when prompted. $ ubi remove linux
$ ubi remove jffs2
$ ubi remove rootfs
$ ubi remove rootfs_data
$ ubi create linux 0x45fe000
$ reset
then the dut will reboot,interrupt the autoboot process by pressing '2' when prompted. 2: Load System code then write to Flash via TFTP.
Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) $: enter y
you will see the follow, type enter directly:
Input device IP (192.168.1.1) ==:
Input server IP (192.168.1.70) ==:
Input Linux Kernel filename (RT-AX52.trx) ==:

4: wait for the device run up

Signed-off-by: Emre Yavuzalp <emreyavuzalp2@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21905
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-31 16:56:03 +02:00
Paweł Owoc
598b90107e treewide: linksys: remove unnecessary properties
Remove unnecessary properties as there is no
reg property in child node.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22592
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-30 19:35:41 +02:00
John Audia
bb3da35c90 kernel: bump 6.12 to 6.12.78
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.78

Removed upstreamed:
  generic/pending-6.12/620-net-sfp-improve-Huawei-MA5671a-fixup.patch[1]
  generic/pending-6.12/704-net-phy-register-phy-led_triggers-during-probe-to-av.patch[2]
  airoha/patches-6.12/014-01-v6.13-net-airoha-fix-PSE-memory-configuration-in-airoha_fe.patch[3]
  airoha/patches-6.12/014-02-v6.13-net-airoha-read-default-PSE-reserved-pages-value-bef.patch[4]
  airoha/patches-6.12/031-01-v6.13-net-airoha-Read-completion-queue-data-in-airoha_qdma.patch[5]
  airoha/patches-6.12/128-v7.1-net-airoha-Remove-airoha_dev_stop-in-airoha_remove.patch[6]

Manually rebased:
  airoha/patches-6.12/048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol.patch

All patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=bbdf6d378e1ddbeadc04c57b182aadefcc3aa917
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=241cd64cf2e32b28ead151b1795cd8fef2b6e482
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=a04ac7bc97afe313e10ae4c73797c668dee47c5c
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=a9ed47c3663219e20406d566f02809de05373a42
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=4cba4373abac7ba27fdb33057a29b92efa8fd15d
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=652ec118d8dc1b088e685d5562995b6665463771

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/22607
[Fix 048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-30 13:42:44 +02:00
Dmitry Mostovoy
eb6dd61a8d mediatek: add cudy wr3000h-v1 ubootmod
This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdata" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1

3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
  ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
  ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
  ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21943
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-27 11:27:39 +01:00
Dmitry Mostovoy
cfc17e81e1 mediatek: add cudy wr3000e-v1 ubootmod
This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdata" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1

3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
  ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
  ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
  ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21943
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-27 11:27:39 +01:00