[openwrt/openwrt] mediatek: filogic: migrate SmartRG Bonanza to upstream PHY LED control
LEDE Commits
lede-commits at lists.infradead.org
Thu Mar 20 17:46:39 PDT 2025
dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fd76a38190cd01ba8b955de9fb66fa6e2fa7a81f
commit fd76a38190cd01ba8b955de9fb66fa6e2fa7a81f
Author: Aleksander Jan Bajkowski <olek2 at wp.pl>
AuthorDate: Sat Mar 1 15:57:05 2025 +0100
mediatek: filogic: migrate SmartRG Bonanza to upstream PHY LED control
This commit switches the control of the leds connected to the Maxlinear
GPY211C PHY to an upstream solution. There should be no functional changes.
Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
---
.../mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi | 58 ++++++++++++++++++++--
.../filogic/base-files/etc/board.d/01_leds | 22 ++++++++
2 files changed, 76 insertions(+), 4 deletions(-)
diff --git a/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi b/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi
index deab53dc45..8eaf5fb94e 100644
--- a/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi
@@ -220,8 +220,33 @@
compatible = "maxlinear,gpy211", "ethernet-phy-ieee802.3-c45";
reg = <5>;
- mxl,led-drive-vdd;
- mxl,led-config = <0x30 0x40 0x80 0x0>;
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-0 {
+ reg = <0>;
+ active-high;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_LAN;
+ };
+
+ led-1 {
+ reg = <1>;
+ active-high;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <0>;
+ };
+
+ led-2 {
+ reg = <2>;
+ active-high;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <1>;
+ };
+ };
};
phy6: ethernet-phy at 6 {
@@ -229,8 +254,33 @@
compatible = "maxlinear,gpy211", "ethernet-phy-ieee802.3-c45";
reg = <6>;
- mxl,led-drive-vdd;
- mxl,led-config = <0x30 0x40 0x80 0x0>;
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-0 {
+ reg = <0>;
+ active-high;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_WAN;
+ };
+
+ led-1 {
+ reg = <1>;
+ active-high;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WAN;
+ function-enumerator = <0>;
+ };
+
+ led-2 {
+ reg = <2>;
+ active-high;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WAN;
+ function-enumerator = <1>;
+ };
+ };
};
};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index 91a7892aa7..b1ab57f97b 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -109,6 +109,28 @@ routerich,ax3000-ubootmod)
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link tx rx"
ucidef_set_led_netdev "wan-off" "wan-off" "red:wan" "wan" "link"
;;
+smartrg,sdg-8612)
+ ucidef_set_led_netdev "lan4" "LAN4" "mdio-bus:05:amber:lan" "lan4" "link_10 link_100"
+ ucidef_set_led_netdev "lan4" "LAN4" "mdio-bus:05:green:lan-0" "lan4" "link_1000"
+ ucidef_set_led_netdev "lan4" "LAN4" "mdio-bus:05:green:lan-1" "lan4" "link_2500"
+ ucidef_set_led_netdev "wan" "WAN" "mdio-bus:06:amber:wan" "eth1" "link_10 link_100"
+ ucidef_set_led_netdev "wan" "WAN" "mdio-bus:06:green:wan-0" "eth1" "link_1000"
+ ucidef_set_led_netdev "wan" "WAN" "mdio-bus:06:green:wan-1" "eth1" "link_2500"
+ ;;
+smartrg,sdg-8614)
+ ucidef_set_led_netdev "lan4" "LAN4" "mdio-bus:05:amber:lan" "lan4" "link_10 link_100"
+ ucidef_set_led_netdev "lan4" "LAN4" "mdio-bus:05:green:lan-0" "lan4" "link_1000"
+ ucidef_set_led_netdev "lan4" "LAN4" "mdio-bus:05:green:lan-1" "lan4" "link_2500"
+ ;;
+smartrg,sdg-8622|\
+smartrg,sdg-8632)
+ ucidef_set_led_netdev "lan" "LAN" "mdio-bus:05:amber:lan" "lan" "link_10 link_100"
+ ucidef_set_led_netdev "lan" "LAN" "mdio-bus:05:green:lan-0" "lan" "link_1000"
+ ucidef_set_led_netdev "lan" "LAN" "mdio-bus:05:green:lan-1" "lan" "link_2500"
+ ucidef_set_led_netdev "wan" "WAN" "mdio-bus:06:amber:wan" "eth1" "link_10 link_100"
+ ucidef_set_led_netdev "wan" "WAN" "mdio-bus:06:green:wan-0" "eth1" "link_1000"
+ ucidef_set_led_netdev "wan" "WAN" "mdio-bus:06:green:wan-1" "eth1" "link_2500"
+ ;;
smartrg,sdg-8733|\
smartrg,sdg-8734)
ucidef_set_led_netdev "lan-1-green" "LAN1" "mdio-bus:08:green:lan" "lan1" "link_2500 link_5000"
More information about the lede-commits
mailing list