From d44eb323173e63bef358471d32f55702c94ea123 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 11 Jul 2024 15:02:28 +0200 Subject: [PATCH] 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 --- .../mvebu/cortexa72/base-files/etc/board.d/01_leds | 3 +++ .../arm64/boot/dts/marvell/armada-7040-rb5009.dts | 14 ++++++++++++++ 2 files changed, 17 insertions(+) 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 #include +#include / { model = "MikroTik RB5009"; @@ -378,6 +379,19 @@ qca8081: qca8081@0 { reg = <0>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_WAN; + default-state = "keep"; + active-low; + }; + }; }; }; }; -- 2.30.2