diff options
| author | Jonas Jelonek | 2026-05-18 21:30:31 +0000 |
|---|---|---|
| committer | Jonas Jelonek | 2026-07-14 21:45:30 +0000 |
| commit | e9aa5bea9f249eadfc5368874efee996643c0efc (patch) | |
| tree | 28cf356e00505f62e1a406cea1ded4f97ae54153 | |
| parent | f57de02350ab6b4b3eb7ca2e6cf8ca036220840e (diff) | |
| download | openwrt-main.tar.gz | |
Add support for PoE functionality using the realtek-pse-mcu driver
(kmod-pse-realtek-mcu-i2c) interfacing the on-board PoE MCU and RTL8239
PSE chips.
This doesn't include any support for PoE-related LEDs.
Link: https://github.com/openwrt/openwrt/pull/23222
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
| -rw-r--r-- | target/linux/realtek/dts/rtl9313_zyxel_xs1930-12hp.dts | 78 | ||||
| -rw-r--r-- | target/linux/realtek/image/rtl931x.mk | 1 |
2 files changed, 68 insertions, 11 deletions
diff --git a/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12hp.dts b/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12hp.dts index ec0197e1c4..972fb2d348 100644 --- a/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12hp.dts +++ b/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12hp.dts @@ -20,6 +20,13 @@ gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; }; }; + + poe_power: regulator-poe { + compatible = "regulator-fixed"; + regulator-name = "poe-power"; + gpio = <&gpio0 30 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &led_set { @@ -42,18 +49,58 @@ &led_sys_green { gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; }; &led_sys_red { gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; -&gpio0 { - poe_enable_hog { - gpio-hog; - gpios = <10 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "poe-enable"; - }; -}; - &i2c_mst1 { - /* PoE management MCU sits here */ - i2c3: i2c@3 { reg = <3>; }; + i2c3: i2c@3 { + reg = <3>; + #address-cells = <1>; + #size-cells = <0>; + + pse: ethernet-pse@20 { + compatible = "zyxel,xs1930-12hp-pse", "realtek,pse-mcu-gen2-smbus"; + reg = <0x20>; + + enable-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; + power-supply = <&poe_power>; + + pse-pis { + #address-cells = <1>; + #size-cells = <0>; + + pse_pi0: pse-pi@0 { + reg = <0>; + #pse-cells = <0>; + }; + pse_pi1: pse-pi@1 { + reg = <1>; + #pse-cells = <0>; + }; + pse_pi2: pse-pi@2 { + reg = <2>; + #pse-cells = <0>; + }; + pse_pi3: pse-pi@3 { + reg = <3>; + #pse-cells = <0>; + }; + pse_pi4: pse-pi@4 { + reg = <4>; + #pse-cells = <0>; + }; + pse_pi5: pse-pi@5 { + reg = <5>; + #pse-cells = <0>; + }; + pse_pi6: pse-pi@6 { + reg = <6>; + #pse-cells = <0>; + }; + pse_pi7: pse-pi@7 { + reg = <7>; + #pse-cells = <0>; + }; + }; + }; + }; }; &mdio_ctrl { @@ -71,6 +118,15 @@ PHY_C45(53, 8) /* AQR113C */ }; +&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>; }; + &switch0 { ethernet-ports { /* Copper ports behind AQR113C */ diff --git a/target/linux/realtek/image/rtl931x.mk b/target/linux/realtek/image/rtl931x.mk index 076d91a24a..a0abeecff0 100644 --- a/target/linux/realtek/image/rtl931x.mk +++ b/target/linux/realtek/image/rtl931x.mk @@ -102,5 +102,6 @@ TARGET_DEVICES += zyxel_xs1930-12f define Device/zyxel_xs1930-12hp DEVICE_MODEL := XS1930-12HP $(Device/zyxel_xs1930) + DEVICE_PACKAGES += kmod-pse-realtek-mcu-i2c endef TARGET_DEVICES += zyxel_xs1930-12hp |