summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Marko2024-07-11 13:02:28 +0000
committerRobert Marko2024-07-12 07:51:46 +0000
commitd44eb323173e63bef358471d32f55702c94ea123 (patch)
tree8ee4367f7f353ef38a50ddf3d0970031cccc6caa
parent88d9095ca50178f19e2cc11f12955a00c06119b5 (diff)
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: 85d9fd6f0ec7 ("mvebu: add support for RB5009UG+S+IN") Link: https://github.com/openwrt/openwrt/pull/15927 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--target/linux/mvebu/cortexa72/base-files/etc/board.d/01_leds3
-rw-r--r--target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts14
2 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/mvebu/cortexa72/base-files/etc/board.d/01_leds b/target/linux/mvebu/cortexa72/base-files/etc/board.d/01_leds
index 809a64a60e..b958c2fdab 100644
--- a/target/linux/mvebu/cortexa72/base-files/etc/board.d/01_leds
+++ b/target/linux/mvebu/cortexa72/base-files/etc/board.d/01_leds
@@ -13,6 +13,9 @@ iei,puzzle-m901)
iei,puzzle-m902)
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
board_config_flush
diff --git a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts
index 8cd744f64d..ca13e6aa89 100644
--- a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts
@@ -5,6 +5,7 @@
#include "armada-7040.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "MikroTik RB5009";
@@ -378,6 +379,19 @@
qca8081: qca8081@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;
+ };
+ };
};
};
};