[OpenWrt-Devel] [PATCH] ramips: convert TP-Link MT7620 boards to tpt trigger
David Bauer
mail at david-bauer.net
Wed Jan 1 21:54:52 EST 2020
This converts all MediaTek MT7620 boards from TP-Link to use the now
supported WiFi throughput LED trigger. This way, the LED state now
covers all VAPs regardless of their name.
Signed-off-by: David Bauer <mail at david-bauer.net>
---
target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts | 1 +
target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts | 2 ++
target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts | 1 +
target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts | 2 ++
target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts | 1 +
target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts | 2 +-
target/linux/ramips/mt7620/base-files/etc/board.d/01_leds | 6 ------
7 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
index 45752c095d..58e4b39b55 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
@@ -48,6 +48,7 @@
wlan {
label = "archer-c2-v1:green:wlan";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
};
};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
index 59e109c8a2..b1d3e23450 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
@@ -47,11 +47,13 @@
wlan5g {
label = "archer-c20-v1:blue:wlan5g";
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
};
wlan2g {
label = "archer-c20-v1:blue:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
};
wps {
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
index 707453d2b5..694528d749 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
@@ -38,6 +38,7 @@
wlan {
label = "archer-c20i:blue:wlan";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
};
};
};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
index ed2b00836e..ca03d2ed78 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
@@ -47,11 +47,13 @@
wlan5g {
label = "archer-c50-v1:green:wlan5g";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
};
wlan2g {
label = "archer-c50-v1:green:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
};
wps {
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
index bc7825df00..dccced0f18 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
@@ -71,6 +71,7 @@
wlan {
label = "archer-mr200:white:wlan";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
};
};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts
index 39fdc0af53..afc94c538c 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts
@@ -53,7 +53,7 @@
wlan2g_green {
label = "re200-v1:green:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "phy1radio";
+ linux,default-trigger = "phy1tpt";
};
};
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
index 02899d646d..fe6dfac50e 100755
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
@@ -168,28 +168,22 @@ zbtlink,zbt-we826-e)
tplink,archer-c2-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch1" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch1" "0x01"
- set_wifi_led "$boardname:green:wlan"
;;
tplink,archer-c20-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:blue:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x01"
- ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:blue:wlan2g" "wlan0"
;;
tplink,archer-c20i)
ucidef_set_led_switch "lan" "lan" "$boardname:blue:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x01"
- ucidef_set_led_wlan "wlan" "wlan" "$boardname:blue:wlan" "phy0radio"
;;
tplink,archer-c50-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
- ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" wlan1
- set_wifi_led "$boardname:green:wlan5g"
;;
tplink,archer-mr200)
ucidef_set_led_netdev "lan" "lan" "$boardname:white:lan" "eth0.1"
ucidef_set_led_netdev "wan" "wan" "$boardname:white:wan" "usb0"
- set_wifi_led "$boardname:white:wlan"
;;
tplink,re200-v1)
ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" "eth0"
--
2.24.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list