The GS110TPPv1 has a green and amber bi-color status LED per port. To reproduce the same behaviour as stock firmware, the green LEDs need to light up on gigabit link speeds, and the amber LEDs on 100M/10M link speeds. For all link speeds, the LEDs should blink on link activity.
Signed-off-by: Sander Vanheule <[email protected]> --- .../dts-5.10/rtl8380_netgear_gs110tpp-v1.dts | 192 ++++++++++++++++++ 1 file changed, 192 insertions(+) diff --git a/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts b/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts index b61af62ea536..d9ce5d317213 100644 --- a/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts +++ b/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts @@ -2,6 +2,7 @@ #include "rtl8380_netgear_gigabit_1xx.dtsi" #include <dt-bindings/leds/common.h> +#include <dt-bindings/leds/realtek-led-trigger.h> / { compatible = "netgear,gs110tpp-v1", "realtek,rtl838x-soc"; @@ -55,3 +56,194 @@ SWITCH_PORT(17, 10, qsgmii) }; }; + +&switchcore { + port-leds { + compatible = "realtek,maple-port-led"; + #address-cells = <3>; + #size-cells = <0>; + + realtek,output-mode = "serial"; + + [email protected] { + reg = <8 0 0>; + label = "green:lan-1"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <8 1 0>; + label = "amber:lan-1"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + [email protected] { + reg = <9 0 0>; + label = "green:lan-2"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <9 1 0>; + label = "amber:lan-2"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + [email protected] { + reg = <10 0 0>; + label = "green:lan-3"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <10 1 0>; + label = "amber:lan-3"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + [email protected] { + reg = <11 0 0>; + label = "green:lan-4"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <11 1 0>; + label = "amber:lan-4"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + [email protected] { + reg = <12 0 0>; + label = "green:lan-5"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <5>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <12 1 0>; + label = "amber:lan-5"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <5>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + [email protected] { + reg = <13 0 0>; + label = "green:lan-6"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <6>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <13 1 0>; + label = "amber:lan-6"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <6>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + [email protected] { + reg = <14 0 0>; + label = "green:lan-7"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <7>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <14 1 0>; + label = "amber:lan-7"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <7>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + [email protected] { + reg = <15 0 0>; + label = "green:lan-8"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <8>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <15 1 0>; + label = "amber:lan-8"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <8>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + [email protected] { + reg = <16 0 0>; + label = "green:lan-9"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <9>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <16 1 0>; + label = "amber:lan-9"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <9>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + [email protected] { + reg = <17 0 0>; + label = "green:lan-10"; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <10>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + [email protected] { + reg = <17 1 0>; + label = "amber:lan-10"; + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <10>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + }; +}; -- 2.38.1 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
