As reported by @ListerWRT, current main does not properly enable the PoE outputs. It was found that the GS110TPP uses gpio10 on the RTL8231 as a gpio-enable line. It would be good if somebody could test this on the GS310TP as well, to verify it is the same line there.
@RaylynnKnight, you wrote the initial support for this device, so maybe you have time to test this as well?
I also noticed there are no other GPIO definitions for the GS310TP for the front panel LEDs or the SFP cages. It would be good if these could also be determined and added to the devicetree.
As described earlier, you can just change the GPIO lines of the RTL8231 to input one-by-one. Or just test line 10 first.
Go to /sys/class/gpio and check that gpiochip536 points to the RTL8231 (ls -l should make this clear). To export for example gpio10 on the RTL8231, you can then run (536 + 10 = 546):
echo 546 > export
cat gpio546/direction # most likely "out"
echo in > gpio546/direction # change to input, the old behaviour
Wait a few seconds and your PoE device(s) should be powered again if you found the correct GPIO.
I won't have time to look at this until this coming weekend. However the reason the SFP cages were not originally implemented was that according to the output of vendor board configuration some of the GPIOs appeared to be used for multiple functions. See the output on https://svanheule.net/switches/gs310tp#vendor_board_definition where it appears the GPIO EXT_36 and EXT_28 are used for multiple functions.
I've seen that board definition too. It seems bonkers to me as well... Perhaps that's just the main configuration state, but the vendors sometimes do GPIO changes outside of the central board/GPIO config.
@svanheule confirmed, it is gpio10. PoE devices all getting power and the port LEDs turned on.
BusyBox v1.37.0 (2025-02-21 09:44:42 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r28869-6936deac67
-----------------------------------------------------
root@***:~# cd /sys/class/gpio
root@***:/sys/class/gpio# ls -l
--w------- 1 root root 4096 Jan 1 1970 export
lrwxrwxrwx 1 root root 0 Jan 1 1970 gpiochip512 -> ../../devices/platform/soc/18003500.gpio-controller/gpio/gpiochip512
lrwxrwxrwx 1 root root 0 Jan 1 1970 gpiochip536 -> ../../devices/platform/1b000000.switchcore/1b000000.switchcore:mdio-aux/mdio_bus/realtek-aux-mdio/realtek-aux-mdio:1f/gpio/gpiochip536
--w------- 1 root root 4096 Jan 1 1970 unexport
root@***:/sys/class/gpio# echo 546 > export
root@***:/sys/class/gpio# cat gpio546/direction
out
root@***:/sys/class/gpio# echo in > gpio546/direction
I could create a PR, but it won't be accepted, because I'm not going to add my real name or email address to the From: and SoB: tags. So I wonder whether it'd be of any use or it's better you commit it directly.
If color/function is defined for LEDs then label is redundant.
Please remove label = "amber:power"; and label = "green:power"; from file rtl8380_netgear_gs310tp-v1.dts.
FWIW OpenWrt still contains about 3000 of these labels. Most using functions that aren't in the LED binding, but not all were (automatically) converted. The function property is just a string though, so we're could use arbitrary functions downstream.