[RFC PATCH 6/7] realtek: Zyxel GS1900-8: define port LEDs
Olliver Schinagl
oliver at schinagl.nl
Fri Jul 29 05:58:39 PDT 2022
On 16-07-2022 21:09, Sander Vanheule wrote:
> Add all port LEDs to the device tree for the GS1900-8. To reproduce the
> same behaviour as stock firmware, the LEDs need to light up on all
> link speeds, and blink on link activity:
>
> echo 1f > /sys/class/leds/lan?/rtl_hw_trigger
> echo realtek-switchport > /sys/class/leds/lan?/trigger
>
> Signed-off-by: Sander Vanheule <sander at svanheule.net>
> ---
> .../dts-5.10/rtl8380_zyxel_gs1900-8.dts | 41 +++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900-8.dts b/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900-8.dts
> index e9c5efe60392..41266b701aca 100644
> --- a/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900-8.dts
> +++ b/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900-8.dts
> @@ -10,3 +10,44 @@
> &gpio1 {
> /delete-node/ poe_enable;
> };
> +
> +&switchcore {
> + port-leds {
> + compatible = "realtek,rtl8380-port-led";
> + #address-cells = <2>;
> + #size-cells = <0>;
> +
> + led at 8.0 {
> + reg = <8 0>;
> + label = "lan1";
> + };
> + led at 9.0 {
> + reg = <9 0>;
> + label = "lan2";
> + };
> + led at 10.0 {
> + reg = <10 0>;
> + label = "lan3";
> + };
> + led at 11.0 {
> + reg = <11 0>;
> + label = "lan4";
> + };
> + led at 12.0 {
> + reg = <12 0>;
> + label = "lan5";
> + };
> + led at 13.0 {
> + reg = <13 0>;
> + label = "lan6";
> + };
> + led at 14.0 {
> + reg = <14 0>;
> + label = "lan7";
> + };
> + led at 15.0 {
> + reg = <15 0>;
> + label = "lan8";
> + };
> + };
> +};
nothing else to say then 'love it' :) I'm not familiar with the GS1900;
but it only has a single LED with one color? Can we set the trigger
already here in the dt like we do with others?
arch/arm/boot/dts/am335x-bone-common.dtsi:31: linux,default-trigger =
"heartbeat";
for example ...
>
More information about the openwrt-devel
mailing list