Closed libinanshu closed 5 years ago
编译TP-Link Archer C7 V2或V3 当选择选择Atheros (AR7xxx/AR9xxx)架构编译时需要做以下修改才能支持reset按钮长按恢复出厂。 打开lede/target/linux/ar71xx/files/arch/mips/ath79目录下的mach-archer-c7.c文件 { .desc = "Reset button", .type = EV_KEY, .code = KEY_WPS_BUTTON, .debounce_interval = ARCHER_C7_KEYS_DEBOUNCE_INTERVAL, .gpio = ARCHER_C7_GPIO_BTN_RESET, .active_low = 1, }, 把上面的 KEY_WPS_BUTTON改为 KEY_RESTART即可。如下保存即可 { .desc = "Reset button", .type = EV_KEY, .code = KEY_RESTART, .debounce_interval = ARCHER_C7_KEYS_DEBOUNCE_INTERVAL, .gpio = ARCHER_C7_GPIO_BTN_RESET, .active_low = 1, },
TP-Link Archer C7系列,如V2 V3 DTS里面增加 reset { label = "Reset button"; linux,code =;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
kernel model----->other model选择了Button Hotplug driver、kmod-gpio-button-hotplug。
按键一点反应也没有
~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/ath79-gpio, ath79-gpio:
gpio-12 ( |tp-link:blue:wlan2g ) out lo
gpio-13 ( |RFKILL switch ) in lo
gpio-14 ( |tp-link:blue:system ) out lo
gpio-15 ( |tp-link:blue:qss ) out hi
gpio-16 ( |Reset button ) in hi
gpio-17 ( |tp-link:blue:wlan5g ) out lo
gpio-18 ( |tp-link:green:usb1 ) out hi
gpio-19 ( |tp-link:green:usb2 ) out hi
gpio-21 ( |USB2 power ) out hi
gpio-22 ( |USB1 power ) out hi
gpiochip1: GPIOs 488-511, ath9k-phy1: gpio-489 ( |ath9k-phy1 ) in lo