mvebu: rb5009: fix QCA8081 LED polarity

Currently, QCA8081 LED is never configured and the default configuration
has the LED polarity inverted so it will be lit when there is nothing
connected to the PHY.

So lets define the LED as active-low and configure the trigger via 01_leds.

Fixes: 85d9fd6f0e ("mvebu: add support for RB5009UG+S+IN")
Link: https://github.com/openwrt/openwrt/pull/15927
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Robert Marko 2024-07-11 15:02:28 +02:00
parent 88d9095ca5
commit d44eb32317
2 changed files with 17 additions and 0 deletions

View File

@ -13,6 +13,9 @@ iei,puzzle-m901)
iei,puzzle-m902) iei,puzzle-m902)
ucidef_set_led_netdev "wan" "WAN" "white:network" "eth2" "link" ucidef_set_led_netdev "wan" "WAN" "white:network" "eth2" "link"
;; ;;
mikrotik,rb5009)
ucidef_set_led_netdev "wan-port-link" "WAN-PORT-LINK" "!cp0!config-space@f2000000!mdio@12a200!switch@0!mdio1:00:green:" "p1" "tx rx link_10 link_100 link_1000 link_2500"
;;
esac esac
board_config_flush board_config_flush

View File

@ -5,6 +5,7 @@
#include "armada-7040.dtsi" #include "armada-7040.dtsi"
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ { / {
model = "MikroTik RB5009"; model = "MikroTik RB5009";
@ -378,6 +379,19 @@
qca8081: qca8081@0 { qca8081: qca8081@0 {
reg = <0>; reg = <0>;
leds {
#address-cells = <1>;
#size-cells = <0>;
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WAN;
default-state = "keep";
active-low;
};
};
}; };
}; };
}; };