Revert "ar71xx: Allow to set the RXDV, RXD, TXD, TXE delays for QCA955x"
[openwrt.git] / target / linux / ar71xx / files / arch / mips / ath79 / mach-mynet-n600.c
index f87fbf8..a87413d 100644 (file)
@@ -42,6 +42,9 @@
 #define MYNET_N600_GPIO_BTN_RESET      16
 #define MYNET_N600_GPIO_BTN_WPS                17
 
+#define MYNET_N600_GPIO_EXTERNAL_LNA0  14
+#define MYNET_N600_GPIO_EXTERNAL_LNA1  15
+
 #define MYNET_N600_KEYS_POLL_INTERVAL  20      /* msecs */
 #define MYNET_N600_KEYS_DEBOUNCE_INTERVAL (3 * MYNET_N600_KEYS_POLL_INTERVAL)
 
@@ -100,7 +103,7 @@ static struct gpio_keys_button mynet_n600_gpio_keys[] __initdata = {
        {
                .desc           = "Reset button",
                .type           = EV_KEY,
-               .code           = KEY_WPS_BUTTON,
+               .code           = KEY_RESTART,
                .debounce_interval = MYNET_N600_KEYS_DEBOUNCE_INTERVAL,
                .gpio           = MYNET_N600_GPIO_BTN_RESET,
                .active_low     = 1,
@@ -152,6 +155,14 @@ static void __init mynet_n600_setup(void)
                                        ARRAY_SIZE(mynet_n600_gpio_keys),
                                        mynet_n600_gpio_keys);
 
+       /*
+        * Control signal for external LNAs 0 and 1
+        * Taken from GPL bootloader source:
+        *   board/ar7240/db12x/alpha_gpio.c
+        */
+       ath79_wmac_set_ext_lna_gpio(0, MYNET_N600_GPIO_EXTERNAL_LNA0);
+       ath79_wmac_set_ext_lna_gpio(1, MYNET_N600_GPIO_EXTERNAL_LNA1);
+
        mynet_n600_get_mac("wlan24mac=", tmpmac);
        ath79_register_wmac(art + MYNET_N600_WMAC_CALDATA_OFFSET, tmpmac);