ar71xx: add kernel support for the TEW-732BR board
[openwrt.git] / target / linux / ar71xx / patches-3.10 / 610-MIPS-ath79-openwrt-machines.patch
index d2dbb59..f68630e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/machtypes.h
 +++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,124 @@
+@@ -16,22 +16,125 @@
  
  enum ath79_mach_type {
        ATH79_MACH_GENERIC = 0,
@@ -22,6 +22,7 @@
 +      ATH79_MACH_ARCHER_C7,           /* TP-LINK Archer C7 board */
 +      ATH79_MACH_AW_NR580,            /* AzureWave AW-NR580 */
 +      ATH79_MACH_CAP4200AG,           /* Senao CAP4200AG */
++      ATH79_MACH_CARAMBOLA2,          /* 8devices Carambola2 */
        ATH79_MACH_DB120,               /* Atheros DB120 reference board */
        ATH79_MACH_PB44,                /* Atheros PB44 reference board */
 +      ATH79_MACH_DIR_600_A1,          /* D-Link DIR-600 rev. A1 */
  config ATH79_MACH_AP121
        bool "Atheros AP121 reference board"
        select SOC_AR933X
-@@ -15,6 +70,18 @@ config ATH79_MACH_AP121
-         Say 'Y' here if you want your kernel to support the
-         Atheros AP121 reference board.
+@@ -11,62 +66,653 @@ config ATH79_MACH_AP121
+       select ATH79_DEV_M25P80
+       select ATH79_DEV_USB
+       select ATH79_DEV_WMAC
+-      help
+-        Say 'Y' here if you want your kernel to support the
+-        Atheros AP121 reference board.
++      help
++        Say 'Y' here if you want your kernel to support the
++        Atheros AP121 reference board.
++
 +config ATH79_MACH_AP132
 +      bool "Atheros AP132 reference board"
 +      select SOC_QCA955X
 +        Say 'Y' here if you want your kernel to support the
 +        Atheros AP132 reference boards.
 +
- config ATH79_MACH_AP136
-       bool "Atheros AP136/AP135 reference board"
-       select SOC_QCA955X
-@@ -41,6 +108,24 @@ config ATH79_MACH_AP81
-         Say 'Y' here if you want your kernel to support the
-         Atheros AP81 reference board.
++config ATH79_MACH_AP136
++      bool "Atheros AP136/AP135 reference board"
++      select SOC_QCA955X
++      select ATH79_DEV_GPIO_BUTTONS
++      select ATH79_DEV_LEDS_GPIO
++      select ATH79_DEV_NFC
++      select ATH79_DEV_SPI
++      select ATH79_DEV_USB
++      select ATH79_DEV_WMAC
++      help
++        Say 'Y' here if you want your kernel to support the
++        Atheros AP136 or AP135 reference boards.
++
++config ATH79_MACH_AP81
++      bool "Atheros AP81 reference board"
++      select SOC_AR913X
++      select ATH79_DEV_ETH
++      select ATH79_DEV_GPIO_BUTTONS
++      select ATH79_DEV_LEDS_GPIO
++      select ATH79_DEV_M25P80
++      select ATH79_DEV_USB
++      select ATH79_DEV_WMAC
++      help
++        Say 'Y' here if you want your kernel to support the
++        Atheros AP81 reference board.
++
 +config ATH79_MACH_AP83
 +      bool "Atheros AP83 board support"
 +      select SOC_AR913X
 +      select ATH79_DEV_M25P80
 +      select ATH79_DEV_USB
 +
- config ATH79_MACH_DB120
-       bool "Atheros DB120 reference board"
-       select SOC_AR934X
-@@ -56,6 +141,13 @@ config ATH79_MACH_DB120
-         Say 'Y' here if you want your kernel to support the
-         Atheros DB120 reference board.
++config ATH79_MACH_DB120
++      bool "Atheros DB120 reference board"
++      select SOC_AR934X
++      select ATH79_DEV_AP9X_PCI if PCI
++      select ATH79_DEV_ETH
++      select ATH79_DEV_GPIO_BUTTONS
++      select ATH79_DEV_LEDS_GPIO
++      select ATH79_DEV_M25P80
++      select ATH79_DEV_NFC
++      select ATH79_DEV_USB
++      select ATH79_DEV_WMAC
++      help
++        Say 'Y' here if you want your kernel to support the
++        Atheros DB120 reference board.
++
 +config ATH79_MACH_PB42
 +      bool "Atheros PB42 board support"
 +      select SOC_AR71XX
 +      select ATH79_DEV_GPIO_BUTTONS
 +      select ATH79_DEV_M25P80
 +
- config ATH79_MACH_PB44
-       bool "Atheros PB44 reference board"
-       select SOC_AR71XX
-@@ -68,6 +160,561 @@ config ATH79_MACH_PB44
-         Say 'Y' here if you want your kernel to support the
-         Atheros PB44 reference board.
++config ATH79_MACH_PB44
++      bool "Atheros PB44 reference board"
++      select SOC_AR71XX
++      select ATH79_DEV_ETH
++      select ATH79_DEV_GPIO_BUTTONS
++      select ATH79_DEV_LEDS_GPIO
++      select ATH79_DEV_SPI
++      select ATH79_DEV_USB
++      help
++        Say 'Y' here if you want your kernel to support the
++        Atheros PB44 reference board.
++
 +config ATH79_MACH_PB92
 +      bool "Atheros PB92 board support"
 +      select SOC_AR724X
 +      select ATH79_DEV_GPIO_BUTTONS
 +      select ATH79_DEV_LEDS_GPIO
 +      select ATH79_DEV_M25P80
-+      select ATH79_DEV_USB
 +
 +config ATH79_MACH_WNDR3700
 +      bool "NETGEAR WNDR3700 board support"
 +      select ATH79_DEV_M25P80
 +      select ATH79_DEV_USB
 +      select ATH79_DEV_WMAC
-+
+-config ATH79_MACH_AP136
+-      bool "Atheros AP136/AP135 reference board"
 +config ATH79_MACH_MZK_W300NH
 +      bool "Planex MZK-W300NH board support"
 +      select SOC_AR913X
 +
 +config ATH79_MACH_ARCHER_C7
 +      bool "TP-LINK Archer C7 board support"
-+      select SOC_QCA955X
+       select SOC_QCA955X
 +      select ATH79_DEV_ETH
-+      select ATH79_DEV_GPIO_BUTTONS
-+      select ATH79_DEV_LEDS_GPIO
-+      select ATH79_DEV_SPI
-+      select ATH79_DEV_USB
-+      select ATH79_DEV_WMAC
-+
+       select ATH79_DEV_GPIO_BUTTONS
+       select ATH79_DEV_LEDS_GPIO
+-      select ATH79_DEV_NFC
+       select ATH79_DEV_SPI
+       select ATH79_DEV_USB
+       select ATH79_DEV_WMAC
+-      help
+-        Say 'Y' here if you want your kernel to support the
+-        Atheros AP136 or AP135 reference boards.
+-config ATH79_MACH_AP81
+-      bool "Atheros AP81 reference board"
 +config ATH79_MACH_TL_MR11U
 +      bool "TP-LINK TL-MR11U/TL-MR3040 support"
 +      select SOC_AR933X
 +
 +config ATH79_MACH_TL_WA901ND_V2
 +      bool "TP-LINK TL-WA901ND v2 support"
-+      select SOC_AR913X
-+      select ATH79_DEV_ETH
-+      select ATH79_DEV_GPIO_BUTTONS
-+      select ATH79_DEV_LEDS_GPIO
-+      select ATH79_DEV_M25P80
+       select SOC_AR913X
+       select ATH79_DEV_ETH
+       select ATH79_DEV_GPIO_BUTTONS
+       select ATH79_DEV_LEDS_GPIO
+       select ATH79_DEV_M25P80
 +      select ATH79_DEV_WMAC
 +
 +config ATH79_MACH_TL_WDR3500
 +      select ATH79_DEV_GPIO_BUTTONS
 +      select ATH79_DEV_LEDS_GPIO
 +      select ATH79_DEV_M25P80
-+      select ATH79_DEV_USB
-+      select ATH79_DEV_WMAC
-+
+       select ATH79_DEV_USB
+       select ATH79_DEV_WMAC
+-      help
+-        Say 'Y' here if you want your kernel to support the
+-        Atheros AP81 reference board.
+-config ATH79_MACH_DB120
+-      bool "Atheros DB120 reference board"
 +config ATH79_MACH_TL_WDR4300
 +      bool "TP-LINK TL-WDR3600/4300/4310 board support"
-+      select SOC_AR934X
-+      select ATH79_DEV_AP9X_PCI if PCI
-+      select ATH79_DEV_ETH
-+      select ATH79_DEV_GPIO_BUTTONS
-+      select ATH79_DEV_LEDS_GPIO
-+      select ATH79_DEV_M25P80
-+      select ATH79_DEV_USB
-+      select ATH79_DEV_WMAC
-+
+       select SOC_AR934X
+       select ATH79_DEV_AP9X_PCI if PCI
+       select ATH79_DEV_ETH
+       select ATH79_DEV_GPIO_BUTTONS
+       select ATH79_DEV_LEDS_GPIO
+       select ATH79_DEV_M25P80
+-      select ATH79_DEV_NFC
+       select ATH79_DEV_USB
+       select ATH79_DEV_WMAC
+-      help
+-        Say 'Y' here if you want your kernel to support the
+-        Atheros DB120 reference board.
+-config ATH79_MACH_PB44
+-      bool "Atheros PB44 reference board"
 +config ATH79_MACH_TL_WR703N
 +      bool "TP-LINK TL-WR703N support"
 +      select SOC_AR933X
 +
 +config ATH79_MACH_TL_WR841N_V1
 +      bool "TP-LINK TL-WR841N v1 support"
-+      select SOC_AR71XX
+       select SOC_AR71XX
 +      select ATH79_DEV_DSA
-+      select ATH79_DEV_ETH
-+      select ATH79_DEV_GPIO_BUTTONS
-+      select ATH79_DEV_LEDS_GPIO
+       select ATH79_DEV_ETH
+       select ATH79_DEV_GPIO_BUTTONS
+       select ATH79_DEV_LEDS_GPIO
+-      select ATH79_DEV_SPI
 +      select ATH79_DEV_M25P80
 +
 +config ATH79_MACH_TL_WR841N_V8
 +      select ATH79_DEV_GPIO_BUTTONS
 +      select ATH79_DEV_LEDS_GPIO
 +      select ATH79_DEV_M25P80
-+      select ATH79_DEV_USB
-+
+       select ATH79_DEV_USB
+-      help
+-        Say 'Y' here if you want your kernel to support the
+-        Atheros PB44 reference board.
  config ATH79_MACH_UBNT_XM
        bool "Ubiquiti Networks XM/UniFi boards"
-       select SOC_AR724X
-@@ -83,6 +730,24 @@ config ATH79_MACH_UBNT_XM
+@@ -83,6 +729,34 @@ config ATH79_MACH_UBNT_XM
          Say 'Y' here if you want your kernel to support the
          Ubiquiti Networks XM (rev 1.0) board.
  
 +      select ATH79_DEV_M25P80
 +      select ATH79_DEV_WMAC
 +
++config ATH79_MACH_CARAMBOLA2
++      bool "8devices Carambola2 board"
++      select SOC_AR933X
++      select ATH79_DEV_ETH
++      select ATH79_DEV_GPIO_BUTTONS
++      select ATH79_DEV_LEDS_GPIO
++      select ATH79_DEV_M25P80
++      select ATH79_DEV_USB
++      select ATH79_DEV_WMAC
++
  endmenu
  
  config SOC_AR71XX
-@@ -132,7 +797,10 @@ config ATH79_DEV_DSA
+@@ -132,7 +806,10 @@ config ATH79_DEV_DSA
  config ATH79_DEV_ETH
        def_bool n
  
        def_bool n
  
  config ATH79_DEV_GPIO_BUTTONS
-@@ -164,4 +832,7 @@ config ATH79_PCI_ATH9K_FIXUP
+@@ -164,4 +841,7 @@ config ATH79_PCI_ATH9K_FIXUP
  config ATH79_ROUTERBOOT
        def_bool n
  
  endif
 --- a/arch/mips/ath79/Makefile
 +++ b/arch/mips/ath79/Makefile
-@@ -38,9 +38,78 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)              += route
+@@ -38,9 +38,79 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)              += route
  #
  # Machines
  #
 +obj-$(CONFIG_ATH79_MACH_WZR_HP_AG300H)        += mach-wzr-hp-ag300h.o
 +obj-$(CONFIG_ATH79_MACH_WZR_HP_G450H) += mach-wzr-hp-g450h.o
 +obj-$(CONFIG_ATH79_MACH_ZCN_1523H)    += mach-zcn-1523h.o
++obj-$(CONFIG_ATH79_MACH_CARAMBOLA2)   += mach-carambola2.o
 --- a/arch/mips/ath79/prom.c
 +++ b/arch/mips/ath79/prom.c
 @@ -180,6 +180,11 @@ void __init prom_init(void)