From: Lars Gierth Date: Sun, 9 Aug 2026 14:46:05 +0000 (+0200) Subject: realtek: rtl930x: add PoE support for Hasivo F1100WP-4SX-4XGT X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8dfd6ae9052578ae973733ba060abe42d0e1fb99;p=thirdparty%2Fopenwrt.git realtek: rtl930x: add PoE support for Hasivo F1100WP-4SX-4XGT Manage the HS104 behind the STC8 MCU, register the LEDs, attach the PSE PIs. Signed-off-by: Lars Gierth Link: https://github.com/openwrt/openwrt/pull/24643 Signed-off-by: Jonas Jelonek --- diff --git a/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt-512mb.dts b/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt-512mb.dts index 4f1d7b3037b..cf3afb2bca0 100644 --- a/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt-512mb.dts +++ b/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt-512mb.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/; -#include "rtl9303_hasivo_f1100w-4sx-4xgt-common.dtsi" +#include "rtl9303_hasivo_f1100wp-4sx-4xgt-common.dtsi" / { compatible = "hasivo,f1100wp-4sx-4xgt-512mb", "realtek,rtl9303-soc"; diff --git a/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt-common.dtsi b/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt-common.dtsi new file mode 100644 index 00000000000..0faec1cba69 --- /dev/null +++ b/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt-common.dtsi @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/dts-v1/; + +#include "rtl9303_hasivo_f1100w-4sx-4xgt-common.dtsi" + +&i2c_stc8 { + pse0: ethernet-pse@d { + compatible = "hasivo,hs104"; + reg = <0x0d>; + poll-interval-ms = <500>; + status = "okay"; + + pse-pis { + #address-cells = <1>; + #size-cells = <0>; + + pse0_pi0: pse-pi@0 { + reg = <0>; + #pse-cells = <0>; + }; + pse0_pi1: pse-pi@1 { + reg = <1>; + #pse-cells = <0>; + }; + pse0_pi2: pse-pi@2 { + reg = <2>; + #pse-cells = <0>; + }; + pse0_pi3: pse-pi@3 { + reg = <3>; + #pse-cells = <0>; + }; + }; + }; +}; + +&stc8 { + led_lan5_poe: led@1,0 { + compatible = "register-bit-led"; + reg = <0x01 0x00>; + mask = <0x08>; + color = ; + function = "poe"; + function-enumerator = <5>; + linux,default-trigger = "pse-0-000d:port0:delivering"; + default-state = "off"; + }; + + led_lan6_poe: led@1,1 { + compatible = "register-bit-led"; + reg = <0x01 0x01>; + mask = <0x04>; + color = ; + function = "poe"; + function-enumerator = <6>; + linux,default-trigger = "pse-0-000d:port1:delivering"; + default-state = "off"; + }; + + led_lan7_poe: led@1,2 { + compatible = "register-bit-led"; + reg = <0x01 0x02>; + mask = <0x02>; + color = ; + function = "poe"; + function-enumerator = <7>; + linux,default-trigger = "pse-0-000d:port2:delivering"; + default-state = "off"; + }; + + led_lan8_poe: led@1,3 { + compatible = "register-bit-led"; + reg = <0x01 0x03>; + mask = <0x01>; + color = ; + function = "poe"; + function-enumerator = <8>; + linux,default-trigger = "pse-0-000d:port3:delivering"; + default-state = "off"; + }; +}; + +&phy24 { pses = <&pse0_pi0>; }; +&phy25 { pses = <&pse0_pi1>; }; +&phy26 { pses = <&pse0_pi2>; }; +&phy27 { pses = <&pse0_pi3>; }; diff --git a/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt.dts b/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt.dts index f1c9c98cf36..31b6def1ece 100644 --- a/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt.dts +++ b/target/linux/realtek/dts/rtl9303_hasivo_f1100wp-4sx-4xgt.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/; -#include "rtl9303_hasivo_f1100w-4sx-4xgt-common.dtsi" +#include "rtl9303_hasivo_f1100wp-4sx-4xgt-common.dtsi" / { compatible = "hasivo,f1100wp-4sx-4xgt", "realtek,rtl9303-soc"; diff --git a/target/linux/realtek/image/rtl930x.mk b/target/linux/realtek/image/rtl930x.mk index 025955b27c7..b0155908ba1 100644 --- a/target/linux/realtek/image/rtl930x.mk +++ b/target/linux/realtek/image/rtl930x.mk @@ -56,7 +56,7 @@ define Device/hasivo_f1100wp-4sx-4xgt-common DEVICE_ALT0_MODEL := F1100WP-4SX-4XGT-SE DEVICE_PACKAGES := \ kmod-hasivo-mcu-sensor kmod-hasivo-mcu-wdt kmod-mfd-hasivo-stc8 \ - kmod-phy-realtek rtl826x-firmware + kmod-phy-realtek kmod-pse-hasivo-hs104 rtl826x-firmware IMAGE_SIZE := 29696k $(Device/kernel-lzma) endef