0062-ar71xx-cpe510-enable-LNA-for-CPE210-220-510-520.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 9 Jun 2016 04:39:08 +0200
  3. Subject: ar71xx/cpe510: enable LNA for CPE210/220/510/520
  4. The LNA improves the rx path. Within a simple test setup
  5. it improved the signal from -60dbm to -40dbm.
  6. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
  7. Backport of LEDE 94e23bf7409d6cc4c9efb55ed32aba8e5a497966
  8. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
  9. index 8bf5c0f6226cbba10da10af4798b67b76db94e2b..5cb052a84aee451b9fbd449910acfde80dcf8aa7 100644
  10. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
  11. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
  12. @@ -30,6 +30,9 @@
  13. #define CPE510_GPIO_LED_L3 15
  14. #define CPE510_GPIO_LED_L4 16
  15. +#define CPE510_GPIO_EXTERNAL_LNA0 18
  16. +#define CPE510_GPIO_EXTERNAL_LNA1 19
  17. +
  18. #define CPE510_GPIO_BTN_RESET 4
  19. #define CPE510_KEYS_POLL_INTERVAL 20 /* msecs */
  20. @@ -93,6 +96,9 @@ static void __init cpe510_setup(void)
  21. ARRAY_SIZE(cpe510_gpio_keys),
  22. cpe510_gpio_keys);
  23. + ath79_wmac_set_ext_lna_gpio(0, CPE510_GPIO_EXTERNAL_LNA0);
  24. + ath79_wmac_set_ext_lna_gpio(1, CPE510_GPIO_EXTERNAL_LNA1);
  25. +
  26. ath79_register_m25p80(NULL);
  27. ath79_register_mdio(1, 0);