ath79: Fix GPIO reset button on TP-Link Archer C7v5
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 4 Apr 2019 08:50:17 +0000 (10:50 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 8 Apr 2019 16:37:04 +0000 (18:37 +0200)
The GPIO for the reset button for the Archer C7v5 changed from
ar71xx to ath79. An investigation based on tests revealed
that the A7v5 responds on "11", while the C7v5 responds on
"5" as set for ar71xx.

Thus, we just define this in the DTS files instead of in the
common DTSI.

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts
target/linux/ath79/dts/qca9563_tplink_archer-c7-v5.dts
target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi

index 8cf86c0bc4a6bd8f59dfb6d86e7e2b0805a6b20c..a9174df4fad87958fe4e95c0e927cee5276ed3d0 100644 (file)
@@ -8,6 +8,15 @@
        model = "TP-Link Archer A7 v5";
 };
 
+&gpio_keys {
+       reset {
+               label = "Reset button";
+               linux,code = <KEY_RESTART>;
+               gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+               debounce-interval = <60>;
+       };
+};
+
 &mtdparts {
        factory-uboot@0 {
                label = "factory-uboot";
index 026d6c65e35d161e4b7fbcd78ca421c42bf325ff..8059b48510e22ec5ad7af7343e77641425699186 100644 (file)
@@ -8,6 +8,15 @@
        model = "TP-Link Archer C7 v5";
 };
 
+&gpio_keys {
+       reset {
+               label = "Reset button";
+               linux,code = <KEY_RESTART>;
+               gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+               debounce-interval = <60>;
+       };
+};
+
 &mtdparts {
        partition@0 {
                label = "factory-uboot";
index e019a042540ecab843020196b81555e7e1ea9d74..ba75cfc4d8864c3928060e2c0d19febb3cc00009 100644 (file)
        gpio_keys: keys {
                compatible = "gpio-keys";
 
-               reset {
-                       label = "Reset button";
-                       linux,code = <KEY_RESTART>;
-                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
-                       debounce-interval = <60>;
-               };
-
                wps {
                        label = "WPS button";
                        linux,code = <KEY_WPS_BUTTON>;