openwrt/target/linux
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
..
airoha airoha: an7581: remove source-only 2026-03-11 00:42:36 +01:00
apm821xx Revert "apm821xx: rename pciex to pcie" 2026-02-10 14:54:23 +01:00
armsr kernel: lift CONFIG_REGULATOR_VEXPRESS 'not set' to generic 2026-02-28 10:12:15 +01:00
at91 kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
ath79 ath79: tiny: increment compat version for RE355/RE450 2026-03-06 12:04:23 +01:00
bcm27xx kernel: refresh patches 2026-03-06 11:33:05 +01:00
bcm47xx kernel: bump 6.12 to 6.12.64 2026-01-15 01:22:47 +01:00
bcm53xx bcm53xx: mr26: fix nvmem MAC override 2026-03-11 12:13:14 +01:00
bcm4908 kernel: disable non layout u-boot,env 2025-11-28 01:20:33 +01:00
bmips Revert "bmips: huawei-hg556a-c: use nvmem for wifi eeprom" 2026-02-20 23:01:29 +01:00
d1 d1: Enable LED driver for D1 builds 2026-01-23 10:35:36 +01:00
econet econet: en7528: add missing flash partition for DASAN H660GM-A Generic 2026-03-01 17:36:01 +01:00
gemini gemini: add support for Teltonika RUT104 2026-02-17 11:27:22 +01:00
generic kernel: add patch for YT8821 address collision 2026-03-14 01:40:32 +01:00
imx imx: cortexa53: remove KSZ9477 static driver 2026-03-13 19:59:59 +01:00
ipq40xx ipq40xx: wrtq-329acn: remove ethernet alias 2026-03-13 11:54:50 +01:00
ipq806x ipq806x: ap3935: fix uboot nvmem 2026-03-10 13:38:33 +01:00
ixp4xx ixp4xx: select the GPIO keys input package 2026-01-28 18:59:47 +01:00
kirkwood kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
lantiq lantiq: dm200: Fix loading PHY firmware 2026-02-28 14:36:16 +01:00
layerscape kernel: bump 6.12 to 6.12.71 2026-02-14 18:30:02 +01:00
loongarch64 loongarch64: set PREEMPT_NONE as default preemption model 2026-01-24 22:54:29 +01:00
malta malta: convert to Device macro image building 2026-02-11 00:08:34 +01:00
mediatek mediatek: filogic: tplink-be450: fix RTL8261N reset timing, add missing WLAN button, fix memory size 2026-03-14 20:58:38 +01:00
microchipsw microchipsw: lan969x: tactical-1000: fix SFP I2C buses 2026-03-12 11:05:40 +01:00
mpc85xx mpc85xx: fix dtc warnings 2026-03-06 12:06:49 +01:00
mvebu kernel: refresh patches 2026-03-06 11:33:05 +01:00
mxs kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
octeon kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
omap kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
pistachio kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
qoriq package: uboot-qoriq: fix T4240RDB u-boot selection 2026-01-12 13:59:30 +01:00
qualcommax generic: add CONFIG_REGULATOR_QCOM_LABIBB 2026-02-27 11:16:55 +01:00
qualcommbe generic: add CONFIG_REGULATOR_QCOM_LABIBB 2026-02-27 11:16:55 +01:00
ramips ramips: modules: build I2C driver package for MT7621 2026-03-03 13:07:58 +01:00
realtek realtek: pcs: rtl931x: use generic CMU configuration 2026-03-14 20:24:32 +01:00
rockchip kernel: bump 6.12 to 6.12.69 2026-02-07 17:20:33 +01:00
sifiveu kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
siflower treewide: constify mdio_bus 2026-03-13 19:56:20 +01:00
starfive kernel: refresh patches 2026-03-06 11:33:05 +01:00
stm32 kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
sunxi kernel: reorder configuration options 2026-01-26 23:57:25 +01:00
tegra kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
uml kernel: cleanup CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU 2026-01-11 12:52:54 +01:00
x86 x86: base-files add support for Sophos 210r3 and 230r2 2026-02-12 23:55:29 +01:00
zynq kernel: lift CONFIG_REGULATOR_VEXPRESS 'not set' to generic 2026-02-28 10:12:15 +01:00
Makefile linux: fix missing default packages in profiles.json 2024-11-17 19:29:06 +01:00