]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: add PoE support for GS1920-24HP 24239/head
authorJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 27 May 2026 14:26:47 +0000 (14:26 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 17 Jul 2026 17:34:46 +0000 (19:34 +0200)
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 <jelonek.jonas@gmail.com>
target/linux/realtek/dts/rtl8391_zyxel_gs1920-24hp-v2.dts
target/linux/realtek/dts/rtl8392_zyxel_gs1920-24hp-v1.dts
target/linux/realtek/dts/rtl839x_zyxel_gs1920-24hp-common.dtsi
target/linux/realtek/image/rtl839x.mk

index 36b05d11a8baecff7880ee1c792e3f649edbf5f7..3aab3d8072c4abc6e1125f1cc3e99207950802c5 100644 (file)
        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)
index 47bcbe9a19cce319bb4333a7fba160947a4d174c..289dc73306ef36c09f4b30d02e6664b65b7674f9 100644 (file)
        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)
index c8bad10a469610ff0cec7051f57b4b1851c80feb..eba9350c4d44c1d6fe4eab61a9ff86d0e6d841a0 100644 (file)
                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)
+                       };
+               };
        };
 };
 
                };
        };
 };
+
+&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>; };
index 13e2b6a4d7f1ad3d9d1c3656dfc92c5c65776cf5..a8b54c9db82d53617566364d3585d0286546b94f 100644 (file)
@@ -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