aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorLech Perczak <lech.perczak@gmail.com>2020-05-29 21:56:18 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-06-01 16:58:06 +0200
commit21454a772bd8ccf13923db37a9bf02e48abeb278 (patch)
treec082bf02c19658ed8b9fe7a31afa59751d61acd2 /target/linux/ar71xx
parenta32b0ec4cf435b3c5b3998f70ebd12a72cc58df5 (diff)
downloadupstream-21454a772bd8ccf13923db37a9bf02e48abeb278.tar.gz
upstream-21454a772bd8ccf13923db37a9bf02e48abeb278.tar.bz2
upstream-21454a772bd8ccf13923db37a9bf02e48abeb278.zip
ar71xx: fix reset key for TP-Link TL-WR802N V1/V2
During porting support for this router to ath79 target it was discovered that GPIO mapping was incorrect (GPIO11 active high). Correct mapping for both V1 and V2 is GPIO12 active low. Default configuration from GPL source for V2 explicitly states this, and this was confirmed experimentally on ath79 by looking on /sys/kernel/debug/gpio. Correctness of this was also validated for V1 by cross-flashing vendor firmware for V1 on V2 hardware, in which reset button also worked. Fix it. Signed-off-by: Lech Perczak <lech.perczak@gmail.com> [slightly adjust commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit f841e706403b1a111cbb6dc5930b7886307bf633)
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c
index ece38f900f..514529ca18 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c
@@ -24,7 +24,7 @@
#include "machtypes.h"
#define TL_WR802N_GPIO_LED_SYSTEM 13
-#define TL_WR802N_GPIO_BTN_RESET 11
+#define TL_WR802N_GPIO_BTN_RESET 12
#define TL_WR802N_KEYS_POLL_INTERVAL 20 /* msecs */
#define TL_WR802N_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR802N_KEYS_POLL_INTERVAL)
@@ -61,7 +61,7 @@ static struct gpio_keys_button tl_wr802n_gpio_keys[] __initdata = {
.code = KEY_RESTART,
.debounce_interval = TL_WR802N_KEYS_DEBOUNCE_INTERVAL,
.gpio = TL_WR802N_GPIO_BTN_RESET,
- .active_low = 0,
+ .active_low = 1,
}
};