[openwrt/openwrt] realtek: add PoE enable line to Netgear GS310TP

LEDE Commits lede-commits at lists.infradead.org
Sat Feb 22 03:31:47 PST 2025


svanheule pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/890293c13cc0c7e23577cb92c36edcc9911b4400

commit 890293c13cc0c7e23577cb92c36edcc9911b4400
Author: Sander Vanheule <sander at svanheule.net>
AuthorDate: Sat Feb 22 12:06:10 2025 +0100

    realtek: add PoE enable line to Netgear GS310TP
    
    By switching to the new RTL8231 driver in commit b7af54d5c18c ("realtek:
    Simple conversions to RTL8231 MFD driver"), the bootloader state of the
    RTL8231's pins is now maintained. As the bootloader de-asserts the PoE
    enable signal, this means PoE output is no longer available.
    
    Add a gpio-hog with high output, restoring the line value from when the
    pin was configured (by default) as an input with a pull-up resistor.
    This will hard-enable the PoE output, but the individual ports can still
    be administratively disabled by realtek-poe or a similar tool.
    
    Signed-off-by: Sander Vanheule <sander at svanheule.net>
---
 target/linux/realtek/dts/rtl8380_netgear_gs310tp-v1.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/realtek/dts/rtl8380_netgear_gs310tp-v1.dts b/target/linux/realtek/dts/rtl8380_netgear_gs310tp-v1.dts
index a6f7181c11..9d58b3028a 100644
--- a/target/linux/realtek/dts/rtl8380_netgear_gs310tp-v1.dts
+++ b/target/linux/realtek/dts/rtl8380_netgear_gs310tp-v1.dts
@@ -8,6 +8,15 @@
 
 };
 
+&gpio1 {
+	poe-enable {
+		gpio-hog;
+		gpios = <10 GPIO_ACTIVE_HIGH>;
+		output-high;
+		line-name = "poe-enable";
+	};
+};
+
 &firmware {
 	openwrt,ih-magic = <0x4e474335>;
 };




More information about the lede-commits mailing list