]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: add PoE support for Linksys LGS328MPCv2
authorJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 14 Jul 2026 22:08:27 +0000 (22:08 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 17 Jul 2026 17:34:45 +0000 (19:34 +0200)
Add PoE support to Linksys LGS328MPCv2 by adding the required device
tree definition and select the needed kernel module package, making use
of the Realtek PSE MCU driver.

Co-authored-by: Jan-Henrik Bruhn <git@jhbruhn.de>
Link: https://github.com/openwrt/openwrt/pull/24239
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/realtek/dts/rtl9301_linksys_lgs328mpc-v2.dts
target/linux/realtek/image/rtl930x_nand.mk

index 7c66067814aa45b7cd3cc6279788a384423e7a0d..175c82d3405f1627dfdb27a6634cd6d4076db782 100644 (file)
                        debounce-interval = <60>;
                };
        };
+
+       i2c_poe: i2c-poe {
+               compatible = "i2c-gpio";
+               sda-gpios = <&gpio0  9 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+               scl-gpios = <&gpio0 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+               i2c-gpio,delay-us = <5>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               pse: ethernet-pse@2a {
+                       compatible = "linksys,lgs328mpc-v2-pse", "realtek,pse-mcu-gen2-i2c";
+                       reg = <0x2a>;
+
+                       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)
+                       };
+               };
+       };
 };
 
 &i2c_mst1 {
                };
        };
 };
+
+&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 7c068c2600b45f6e5f24ca5983d4007e2049b521..f01d98aa947e6fb159916bb4aaa8089e7485279a 100644 (file)
@@ -33,7 +33,7 @@ define Device/linksys_lgs328mpc-v2
   $(Device/linksys_lgs328)
   DEVICE_MODEL := LGS328MPC
   DEVICE_VARIANT := v2
-  DEVICE_PACKAGES += kmod-hwmon-lm63
+  DEVICE_PACKAGES += kmod-hwmon-lm63 kmod-pse-realtek-mcu-i2c
   LINKSYS_MODEL := 60412060
 endef
 TARGET_DEVICES += linksys_lgs328mpc-v2