[openwrt/openwrt] ath79: change WPS to Wifi button on TL-WPA8630P v2

LEDE Commits lede-commits at lists.infradead.org
Mon Aug 17 09:26:17 EDT 2020


adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/48c3d5c884fe2b633066dd3119a4694cc5195b54

commit 48c3d5c884fe2b633066dd3119a4694cc5195b54
Author: Adrian Schmutzler <freifunk at adrianschmutzler.de>
AuthorDate: Sun Aug 16 02:07:14 2020 +0200

    ath79: change WPS to Wifi button on TL-WPA8630P v2
    
    Both TL-WPA8630(P) v1 and v2 feature a button labelled "WiFi".
    While this is implemented as KEY_RFKILL for v1 in ar71xx and ath79,
    the v2 sets it up as WPS button.
    
    According to the manual, the behavior in OEM firmware is:
    "Press and hold the button for 1 second to copy wireless settings
    from the main router to the extender. Go to Wi-Fi Clone for more
    information. Press and hold the button for at least 5 seconds to
    turn the wireless function on or off."
    
    Consequently, and since this is historic behavior on v1 in OpenWrt,
    we set this button to KEY_RFKILL on both revisions.
    
    Fixes: ab74def0db93 ("ath79: add support for TP-Link TL-WPA8630P v2")
    
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts   | 9 ---------
 target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi     | 9 ++++++++-
 target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi | 9 ---------
 3 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts
index 8912e2fc7c..0dd14896f0 100644
--- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts
@@ -12,15 +12,6 @@
 	};
 };
 
-&keys {
-	wifi {
-		label = "WiFi button";
-		linux,code = <KEY_RFKILL>;
-		gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
-		debounce-interval = <60>;
-	};
-};
-
 &partitions {
 	uboot: partition at 0 {
 		label = "u-boot";
diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi
index 68b455c66a..1f16f9a617 100644
--- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi
+++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi
@@ -13,7 +13,7 @@
 		led-upgrade = &led_power;
 	};
 
-	keys: keys {
+	keys {
 		compatible = "gpio-keys";
 
 		reset {
@@ -36,6 +36,13 @@
 			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
 			debounce-interval = <60>;
 		};
+
+		wifi {
+			label = "WiFi button";
+			linux,code = <KEY_RFKILL>;
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
 	};
 
 	leds {
diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi
index 97eeb45d65..2389fe9734 100644
--- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi
+++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi
@@ -17,15 +17,6 @@
 	};
 };
 
-&keys {
-	wps {
-		label = "WPS button";
-		linux,code = <KEY_WPS_BUTTON>;
-		gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
-		debounce-interval = <60>;
-	};
-};
-
 &partitions {
 	partition at 0 {
 		label = "factory-uboot";



More information about the lede-commits mailing list