]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: add PoE support for USW XG Pro 8 PoE
authorJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 26 Jun 2026 18:10:31 +0000 (18:10 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 17 Jul 2026 17:34:46 +0000 (19:34 +0200)
Add device tree definition for PoE support using the Realtek PSE MCU
driver. Select the kernel package for the driver in DEVICE_PACKAGES
accordingly.

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

index b853ee1d172a64999a579c3fbe832190aa4f1517..5948c156df8c14905147a93922a1c6a854a0d538 100644 (file)
                };
        };
 
-       i2c6: i2c@6 { reg = <6>; }; /* PoE MCU at 0x20 */
+       i2c_poe: i2c@6 {
+               reg = <6>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               pse: ethernet-pse@20 {
+                       compatible = "ubnt,usw-pro-xg-8-poe-pse", "realtek,pse-mcu-gen2-smbus";
+                       reg = <0x20>;
+
+                       enable-gpios = <&gpio1 15 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)
+                       };
+               };
+       };
 };
 
 &mdio_ctrl {
        };
 };
 
+&phy0 { pses = <&pse_pi0>; };
+&phy8 { pses = <&pse_pi1>; };
+&phy16 { pses = <&pse_pi2>; };
+&phy24 { pses = <&pse_pi3>; };
+&phy32 { pses = <&pse_pi4>; };
+&phy40 { pses = <&pse_pi5>; };
+&phy48 { pses = <&pse_pi6>; };
+&phy50 { pses = <&pse_pi7>; };
index cc4403398267f1102558629eb41df5ce2f9189f1..c3a49385324e98661f19dfbbcb107be56e583d8f 100644 (file)
@@ -59,7 +59,7 @@ define Device/ubnt_usw-pro-xg-8-poe
   DEVICE_VENDOR := Ubiquiti
   DEVICE_MODEL := UniFi USW Pro XG 8 PoE
   IMAGE_SIZE := 30272k
-  DEVICE_PACKAGES := rtl826x-firmware kmod-hwmon-adt7475
+  DEVICE_PACKAGES := rtl826x-firmware kmod-hwmon-adt7475 kmod-pse-realtek-mcu-i2c
   $(Device/kernel-lzma)
 endef
 TARGET_DEVICES += ubnt_usw-pro-xg-8-poe