From: Jonas Jelonek Date: Wed, 27 May 2026 14:26:47 +0000 (+0000) Subject: realtek: add PoE support for GS1920-24HP X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F24239%2Fhead;p=thirdparty%2Fopenwrt.git realtek: add PoE support for GS1920-24HP Add PoE support for GS1920-24HP by providing the device tree definition and selecting the Realtek PSE MCU driver package for build. Support includes both versions of the device since they basically share the same PSE frontend. The common DTSI includes the shared definitions, the device DTS files then set the correct compatibles. Link: https://github.com/openwrt/openwrt/pull/24239 Signed-off-by: Jonas Jelonek --- diff --git a/target/linux/realtek/dts/rtl8391_zyxel_gs1920-24hp-v2.dts b/target/linux/realtek/dts/rtl8391_zyxel_gs1920-24hp-v2.dts index 36b05d11a8b..3aab3d8072c 100644 --- a/target/linux/realtek/dts/rtl8391_zyxel_gs1920-24hp-v2.dts +++ b/target/linux/realtek/dts/rtl8391_zyxel_gs1920-24hp-v2.dts @@ -124,6 +124,10 @@ PHY_C22_SFP(27, 27, 3) }; +&pse { + compatible = "zyxel,gs1920-24hp-v2-pse", "realtek,pse-mcu-gen1-smbus"; +}; + &switch0 { ethernet-ports { SWITCH_PORT_SDS(24, 25, 6, 0, qsgmii) diff --git a/target/linux/realtek/dts/rtl8392_zyxel_gs1920-24hp-v1.dts b/target/linux/realtek/dts/rtl8392_zyxel_gs1920-24hp-v1.dts index 47bcbe9a19c..289dc73306e 100644 --- a/target/linux/realtek/dts/rtl8392_zyxel_gs1920-24hp-v1.dts +++ b/target/linux/realtek/dts/rtl8392_zyxel_gs1920-24hp-v1.dts @@ -78,6 +78,10 @@ PHY_C22_SFP(51, 27, 3) }; +&pse { + compatible = "zyxel,gs1920-24hp-v1-pse", "realtek,pse-mcu-gen1-smbus"; +}; + &switch0 { ethernet-ports { SWITCH_PORT_SDS(48, 25, 12, 0, qsgmii) diff --git a/target/linux/realtek/dts/rtl839x_zyxel_gs1920-24hp-common.dtsi b/target/linux/realtek/dts/rtl839x_zyxel_gs1920-24hp-common.dtsi index c8bad10a469..eba9350c4d4 100644 --- a/target/linux/realtek/dts/rtl839x_zyxel_gs1920-24hp-common.dtsi +++ b/target/linux/realtek/dts/rtl839x_zyxel_gs1920-24hp-common.dtsi @@ -112,6 +112,40 @@ i2c-gpio,delay-us = <2>; #address-cells = <1>; #size-cells = <0>; + + pse: ethernet-pse@20 { + reg = <0x20>; + + 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) + PSE_PI(8) + PSE_PI(9) + PSE_PI(10) + PSE_PI(11) + PSE_PI(12) + PSE_PI(13) + PSE_PI(14) + PSE_PI(15) + PSE_PI(16) + PSE_PI(17) + PSE_PI(18) + PSE_PI(19) + PSE_PI(20) + PSE_PI(21) + PSE_PI(22) + PSE_PI(23) + }; + }; }; }; @@ -245,3 +279,28 @@ }; }; }; + +&phy0 { pses = <&pse_pi0>; }; +&phy1 { pses = <&pse_pi1>; }; +&phy2 { pses = <&pse_pi2>; }; +&phy3 { pses = <&pse_pi3>; }; +&phy4 { pses = <&pse_pi4>; }; +&phy5 { pses = <&pse_pi5>; }; +&phy6 { pses = <&pse_pi6>; }; +&phy7 { pses = <&pse_pi7>; }; +&phy8 { pses = <&pse_pi8>; }; +&phy9 { pses = <&pse_pi9>; }; +&phy10 { pses = <&pse_pi10>; }; +&phy11 { pses = <&pse_pi11>; }; +&phy12 { pses = <&pse_pi12>; }; +&phy13 { pses = <&pse_pi13>; }; +&phy14 { pses = <&pse_pi14>; }; +&phy15 { pses = <&pse_pi15>; }; +&phy16 { pses = <&pse_pi16>; }; +&phy17 { pses = <&pse_pi17>; }; +&phy18 { pses = <&pse_pi18>; }; +&phy19 { pses = <&pse_pi19>; }; +&phy20 { pses = <&pse_pi20>; }; +&phy21 { pses = <&pse_pi21>; }; +&phy22 { pses = <&pse_pi22>; }; +&phy23 { pses = <&pse_pi23>; }; diff --git a/target/linux/realtek/image/rtl839x.mk b/target/linux/realtek/image/rtl839x.mk index 13e2b6a4d7f..a8b54c9db82 100644 --- a/target/linux/realtek/image/rtl839x.mk +++ b/target/linux/realtek/image/rtl839x.mk @@ -117,8 +117,7 @@ ifeq ($(IB),) endif DEVICE_VENDOR := Zyxel DEVICE_MODEL := GS1920-24HP - DEVICE_PACKAGES := \ - kmod-hwmon-lm85 + DEVICE_PACKAGES := kmod-hwmon-lm85 kmod-pse-realtek-mcu-i2c $(Device/rt-loader-bootbase) endef