From a7c77f6e2087cc0d3042b477a73cee8ee5d28cbf Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 30 Aug 2016 12:28:06 +0200 Subject: [PATCH] ar71xx/cpe510: enable LNA for CPE210/220/510/520 --- ...10-enable-LNA-for-CPE210-220-510-520.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 patches/openwrt/0036-ar71xx-cpe510-enable-LNA-for-CPE210-220-510-520.patch diff --git a/patches/openwrt/0036-ar71xx-cpe510-enable-LNA-for-CPE210-220-510-520.patch b/patches/openwrt/0036-ar71xx-cpe510-enable-LNA-for-CPE210-220-510-520.patch new file mode 100644 index 00000000..d6ab226e --- /dev/null +++ b/patches/openwrt/0036-ar71xx-cpe510-enable-LNA-for-CPE210-220-510-520.patch @@ -0,0 +1,35 @@ +From: Matthias Schiffer +Date: Tue, 30 Aug 2016 12:27:15 +0200 +Subject: ar71xx/cpe510: enable LNA for CPE210/220/510/520 + +The LNA improves the rx path. Within a simple test setup +it improved the signal from -60dbm to -40dbm. + +Signed-off-by: Alexander Couzens + +Backport of LEDE 94e23bf7409d6cc4c9efb55ed32aba8e5a497966 + +diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c +index 8bf5c0f..5cb052a 100644 +--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c ++++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c +@@ -30,6 +30,9 @@ + #define CPE510_GPIO_LED_L3 15 + #define CPE510_GPIO_LED_L4 16 + ++#define CPE510_GPIO_EXTERNAL_LNA0 18 ++#define CPE510_GPIO_EXTERNAL_LNA1 19 ++ + #define CPE510_GPIO_BTN_RESET 4 + + #define CPE510_KEYS_POLL_INTERVAL 20 /* msecs */ +@@ -93,6 +96,9 @@ static void __init cpe510_setup(void) + ARRAY_SIZE(cpe510_gpio_keys), + cpe510_gpio_keys); + ++ ath79_wmac_set_ext_lna_gpio(0, CPE510_GPIO_EXTERNAL_LNA0); ++ ath79_wmac_set_ext_lna_gpio(1, CPE510_GPIO_EXTERNAL_LNA1); ++ + ath79_register_m25p80(NULL); + + ath79_register_mdio(1, 0);