]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: switch to PSE driver for Plasma Cloud PSX28
authorJonas Jelonek <jelonek.jonas@gmail.com>
Sun, 31 May 2026 07:40:01 +0000 (07:40 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 17 Jul 2026 17:34:45 +0000 (19:34 +0200)
Use the kernel PSE driver for PoE functionality on this device instead
relying on userspace apps. Drop the automatic selection for poemgr in
favor of the driver module.

Link: https://github.com/openwrt/openwrt/pull/24239
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/realtek/dts/rtl9312_plasmacloud_psx28.dts
target/linux/realtek/image/rtl931x.mk

index 488fe00b11a0cb038a738b685266246891e64d98..a51a41b6589717ec4ea1d51b585142a45c846d0b 100644 (file)
                        gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
                };
        };
-
-       gpio-export {
-               compatible = "gpio-export";
-
-               poe_mcu_reset {
-                       gpio-export,name = "poe_mcu_reset";
-                       gpio-export,output = <1>;
-                       gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
-               };
-       };
 };
 
 &i2c_mst1 {
-       /* i2c for rtl8239 PoE PSE Chip */
-       i2c@5 {
+       i2c5: i2c@5 {
                reg = <5>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               pse: ethernet-pse@20 {
+                       compatible = "plasmacloud,psx28-pse", "realtek,pse-mcu-gen2-smbus";
+                       reg = <0x20>;
+
+                       enable-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+
+                       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>; };
+&phy4 { pses = <&pse_pi2>; };
+&phy5 { pses = <&pse_pi3>; };
+&phy8 { pses = <&pse_pi4>; };
+&phy9 { pses = <&pse_pi5>; };
+&phy12 { pses = <&pse_pi6>; };
+&phy13 { pses = <&pse_pi7>; };
+&phy16 { pses = <&pse_pi8>; };
+&phy17 { pses = <&pse_pi9>; };
+&phy20 { pses = <&pse_pi10>; };
+&phy21 { pses = <&pse_pi11>; };
+&phy24 { pses = <&pse_pi12>; };
+&phy25 { pses = <&pse_pi13>; };
+&phy28 { pses = <&pse_pi14>; };
+&phy29 { pses = <&pse_pi15>; };
+&phy32 { pses = <&pse_pi16>; };
+&phy33 { pses = <&pse_pi17>; };
+&phy36 { pses = <&pse_pi18>; };
+&phy37 { pses = <&pse_pi19>; };
+&phy40 { pses = <&pse_pi20>; };
+&phy41 { pses = <&pse_pi21>; };
+&phy44 { pses = <&pse_pi22>; };
+&phy45 { pses = <&pse_pi23>; };
index a0abeecff0d93130f08a222f3e0acf81a99026fc..cc4403398267f1102558629eb41df5ce2f9189f1 100644 (file)
@@ -50,7 +50,7 @@ TARGET_DEVICES += plasmacloud_esx28
 define Device/plasmacloud_psx28
   $(Device/plasmacloud-common)
   DEVICE_MODEL := PSX28
-  DEVICE_PACKAGES += poemgr
+  DEVICE_PACKAGES += kmod-pse-realtek-mcu-i2c
 endef
 TARGET_DEVICES += plasmacloud_psx28