No description
Find a file
Semih Baskan f2699cce13 mediatek: filogic: tplink-be450: fix RTL8261N reset timing, add missing WLAN button, fix memory size
- Fix RTL8261N 10GbE PHY `reset-deassert-us` from 100ms to 221ms to meet datasheet minimum SMI-ready timing (t7 >= 150ms), fixing intermittent boot stalls caused by MDIO bus instability
- Add missing WLAN toggle button (GPIO 34) present in stock firmware but absent from OpenWrt DTS
- Fix memory size from 1 GB to the actual 512 MB

Fix 1: The RTL8261N 10GbE PHY's `reset-deassert-us` was set to 100ms (100000us), but the **RTL8261N datasheet (Table 108, parameter t7)** specifies a minimum **SMI-ready time of 150ms** after nRESET release before the MDIO (SMI) bus can be used.

With only 100ms, the kernel attempts MDIO bus access before the RTL8261N's SMI interface is stable. Since the RTL8261N (mdio-bus:00) and the internal MT7988 2.5GbE PHY (mdio-bus:0f) share the same MDIO bus, a not-yet-ready RTL8261N disrupts all MDIO traffic, causing the 2.5GbE PHY firmware loading (`mt798x_2p5ge_phy_config_init`) to stall.

Observed symptoms on warm reboot:
- Sometimes `mt798x_2p5ge_phy_config_init` hangs for 5+ minutes or indefinitely
- RCU CPU stalls (`rcu: INFO: rcu_sched detected stalls on CPUs`)
- mt7996e WiFi chip message timeouts cascading to `chip full reset failed`
- System appears hung with only power LED blinking slowly

UART serial log evidence (warm reboot with 100ms):
```
[   73.041756] rcu: INFO: rcu_sched self-detected stall on CPU
[   73.048341] rcu:  2-....: (8 ticks this GP)
[   73.061641] pc : mt798x_2p5ge_phy_config_init+0x258/0xbb0
[   73.061653] lr : mt798x_2p5ge_phy_config_init+0x238/0xbb0
...
[  334.771280] MediaTek MT7988 2.5GbE PHY mdio-bus:0f: Firmware date code: 2024/10/30
```

The 2.5GbE PHY firmware loading, which normally takes ~3 seconds, took **325 seconds** due to MDIO bus instability. In the worst case, the system never recovers.

GPL DTS uses 221ms (`reset-deassert-us = <221000>`), providing 71ms of margin above the 150ms datasheet minimum. All MediaTek MT7988 reference board DTS files in the GPL use this same 221ms value.

Fix 2: Missing WLAN button (GPIO 34)

The BE450 has a physical WLAN toggle button on GPIO 34, defined in the stock TP-Link GPL DTS but missing from the OpenWrt DTS. Without this definition, the button is non-functional under OpenWrt.

The pin name for GPIO 34 in the MT7988 pinctrl is `SPI2_MISO`, confirmed by the kernel pinctrl driver (`pinctrl-mt7988.c`: `MT7988_PIN(34, "SPI2_MISO")`) and the official devicetree binding (`mediatek,mt7988-pinctrl.yaml`).

Note: GPIO 34 is also used by the BE450's First U-Boot as a recovery button (web recovery 192.168.1.1). Registering it in the DTS ensures the kernel claims the pin.

Fix 3: Incorrect memory size in DTS

The OpenWrt DTS declares 1 GB (`0x40000000`) of RAM, but the BE450 has 512 MB (`0x20000000`).

Run tested.

Signed-off-by: Semih Baskan <strst.gs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22386
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-14 20:58:38 +01:00
.devcontainer/ci-env devcontainer: Add development environment for gihub codespace 2023-10-30 23:34:26 +01:00
.github ci: rework and move build-on-comment action 2026-01-16 18:42:20 +07:00
.vscode meta: VS Code: add "Git: Always Sign Off" setting 2024-10-03 17:18:51 +02:00
config config: add build config option to sign each .apk package 2026-03-02 11:08:10 +01:00
include config: add build config option to sign each .apk package 2026-03-02 11:08:10 +01:00
LICENSES LICENSES: include all used licenses in LICENSES directory 2021-02-14 19:21:38 +01:00
package package: update jsonfilter to latest HEAD 2026-03-12 2026-03-14 19:00:52 +01:00
scripts build: reject non-matching artifacts 2026-03-12 09:31:25 +01:00
target mediatek: filogic: tplink-be450: fix RTL8261N reset timing, add missing WLAN button, fix memory size 2026-03-14 20:58:38 +01:00
toolchain toolchain: binutils: fix update to 2.45.1 2026-03-01 02:06:00 +01:00
tools tools/expat: fix PKG_CPE_ID 2026-03-14 20:34:36 +01:00
.gitattributes gitattributes: automatically convert dts file CRLF line endings to LF 2025-11-29 17:52:35 +01:00
.gitignore gitignore: ignore local APK keys 2024-05-17 22:03:06 +03:00
BSDmakefile build: use SPDX license tags 2021-02-05 14:54:47 +01:00
Config.in build: scripts/config - update to kconfig-v5.14 2022-02-19 13:10:01 +01:00
COPYING COPYING: add COPYING file to specify project licenses 2021-02-14 19:21:38 +01:00
feeds.conf.default feeds: revert to git.openwrt.org 2026-01-09 21:55:00 +01:00
Makefile build: include tests/Makefile if available 2024-06-17 17:51:31 +02:00
README.md README: replace "MacOSX" with "macOS" 2024-04-01 18:46:30 +02:00
rules.mk rules.mk: add DEPRECATION NOTICE for AUTORELEASE 2025-10-29 21:09:57 +01:00

OpenWrt logo

OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.

Sunshine!

Download

Built firmware images are available for many architectures and come with a package selection to be used as WiFi home router. To quickly find a factory image usable to migrate from a vendor stock firmware to OpenWrt, try the Firmware Selector.

If your device is supported, please follow the Info link to see install instructions or consult the support resources listed below.

An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:

Development

To build your own firmware you need a GNU/Linux, BSD or macOS system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system.

Requirements

You need the following tools to compile OpenWrt, the package names vary between distributions. A complete list with distribution specific packages is found in the Build System Setup documentation.

binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.7+ rsync subversion unzip which

Quickstart

  1. Run ./scripts/feeds update -a to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default

  2. Run ./scripts/feeds install -a to install symlinks for all obtained packages into package/feeds/

  3. Run make menuconfig to select your preferred configuration for the toolchain, target system & firmware packages.

  4. Run make to build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.

The main repository uses multiple sub-repositories to manage packages of different categories. All packages are installed via the OpenWrt package manager called opkg. If you're looking to develop the web interface or port packages to OpenWrt, please find the fitting repository below.

  • LuCI Web Interface: Modern and modular interface to control the device via a web browser.

  • OpenWrt Packages: Community repository of ported packages.

  • OpenWrt Routing: Packages specifically focused on (mesh) routing.

  • OpenWrt Video: Packages specifically focused on display servers and clients (Xorg and Wayland).

Support Information

For a list of supported devices see the OpenWrt Hardware Database

Documentation

Support Community

  • Forum: For usage, projects, discussions and hardware advise.
  • Support Chat: Channel #openwrt on oftc.net.

Developer Community

License

OpenWrt is licensed under GPL-2.0