From ded52f63db1bcf72880159d20d511f4b1a6629cb Mon Sep 17 00:00:00 2001 From: Kel Modderman Date: Thu, 24 Sep 2026 11:23:17 +1000 Subject: [PATCH] realtek: gs110tpp: switch to PSE driver Use the realtek-pse-mcu kernel driver instead of realtek-poe. The MCU is a Nuvoton M05xx using the gen1 protocol over UART at 19200 baud. realtek-poe turns off the MCU's port mapping at startup, which reversed the PoE port numbering and the front-panel PoE LEDs. The kernel driver leaves the mapping alone, so both now match the front panel. The MCU keeps this state across a warm reboot, so a unit sysupgraded from a realtek-poe image stays reversed until its first power cycle. Tested on a GS110TPP v1: the driver probes the MCU and its BCM59121, and a PoE device on lan1 is powered. Signed-off-by: Kel Modderman Co-Authored-By: Claude Opus 5.5 (1M context) Link: https://github.com/openwrt/openwrt/pull/25298 Signed-off-by: Jonas Jelonek --- .../realtek/base-files/etc/board.d/02_network | 3 +- .../dts/rtl8380_netgear_gs110tpp-v1.dts | 29 +++++++++++++++++++ target/linux/realtek/image/rtl838x.mk | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 2301d5af293..bc332c76f74 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -210,8 +210,7 @@ realtek_setup_poe() ucidef_set_poe 193 "lan8 lan7 lan6 lan5 lan4 lan3 lan2 lan1 lan16 lan15 lan14 lan13 lan12 lan11 lan10 lan9 lan24 lan23 lan22 lan21 lan20 lan19 lan18 lan17" ;; - edgecore,ecs4100-12ph|\ - netgear,gs110tpp-v1) + edgecore,ecs4100-12ph) ucidef_set_poe 130 "$(filter_port_list "$lan_list" "lan9 lan10")" ;; datto,l8) diff --git a/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts b/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts index 61d203b294d..c7ac01d7831 100644 --- a/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts +++ b/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts @@ -52,8 +52,37 @@ &uart1 { status = "okay"; + + pse: ethernet-pse { + compatible = "netgear,gs110tpp-v1-pse", "realtek,pse-mcu-gen1"; + current-speed = <19200>; + + pse-pis { + #address-cells = <1>; + #size-cells = <0>; + + PSE_PI(0) + PSE_PI(1) + PSE_PI(2) + PSE_PI(3) + PSE_PI(4) + PSE_PI(5) + PSE_PI(6) + PSE_PI(7) + }; + }; }; +/* Copper ports lan1..lan8 (phy8..phy15) -> MCU PoE ports 0..7 */ +&phy8 { pses = <&pse_pi0>; }; +&phy9 { pses = <&pse_pi1>; }; +&phy10 { pses = <&pse_pi2>; }; +&phy11 { pses = <&pse_pi3>; }; +&phy12 { pses = <&pse_pi4>; }; +&phy13 { pses = <&pse_pi5>; }; +&phy14 { pses = <&pse_pi6>; }; +&phy15 { pses = <&pse_pi7>; }; + &mdio_bus0 { PHY_C22(16, 16) PHY_C22(17, 17) diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk index 884cb04a5bb..bea7ffa63c8 100644 --- a/target/linux/realtek/image/rtl838x.mk +++ b/target/linux/realtek/image/rtl838x.mk @@ -268,7 +268,7 @@ define Device/netgear_gs110tpp-v1 $(Device/netgear_nge) DEVICE_MODEL := GS110TPP DEVICE_VARIANT := v1 - DEVICE_PACKAGES += realtek-poe + DEVICE_PACKAGES += kmod-pse-realtek-mcu-uart endef TARGET_DEVICES += netgear_gs110tpp-v1