diff options
author | John Crispin <john@openwrt.org> | 2013-07-11 21:16:53 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-07-11 21:16:53 +0000 |
commit | 39531131a9186a7810b9f67e2694ccd6b65d14bd (patch) | |
tree | 88cd47e730aed042767b6e2c0522cedb2acccee6 | |
parent | 182866ecdcd9468a04be19be9b5a10399496ba11 (diff) | |
download | upstream-39531131a9186a7810b9f67e2694ccd6b65d14bd.tar.gz upstream-39531131a9186a7810b9f67e2694ccd6b65d14bd.tar.bz2 upstream-39531131a9186a7810b9f67e2694ccd6b65d14bd.zip |
ar71xx: add carambola2 support
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37260
-rwxr-xr-x | target/linux/ar71xx/base-files/etc/uci-defaults/01_leds | 6 | ||||
-rwxr-xr-x | target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 | ||||
-rwxr-xr-x | target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 | ||||
-rw-r--r-- | target/linux/ar71xx/config-3.10 | 1 | ||||
-rw-r--r-- | target/linux/ar71xx/config-3.8 | 1 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-carambola2.c | 114 | ||||
-rw-r--r-- | target/linux/ar71xx/generic/profiles/8devices.mk | 17 | ||||
-rw-r--r-- | target/linux/ar71xx/image/Makefile | 2 | ||||
-rw-r--r-- | target/linux/ar71xx/patches-3.10/610-MIPS-ath79-openwrt-machines.patch | 225 | ||||
-rw-r--r-- | target/linux/ar71xx/patches-3.8/610-MIPS-ath79-openwrt-machines.patch | 231 |
10 files changed, 456 insertions, 147 deletions
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index c9bcedd5b9..2db8941a67 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -38,6 +38,12 @@ cap4200ag) ucidef_set_led_wlan "wlan_green" "WLAN_GREEN" "senao:green:wlan" "phy1tpt" ;; +carambola2) + ucidef_set_led_netdev "lan" "LAN" "carambola2:orange:eth0" "eth0" + ucidef_set_led_netdev "wan" "WAN" "carambola2:orange:eth1" "eth1" + ucidef_set_led_wlan "wlan" "WLAN" "carambola2:green:wlan" "phy0tpt" + ;; + db120) ucidef_set_led_usbdev "usb" "USB" "db120:green:usb" "1-1" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 05e1093737..19f19e7ae7 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -525,6 +525,9 @@ ar71xx_board_detect() { *EmbWir-Dorin-Router) name="ew-dorin-router" ;; + "8devices Carambola2"*) + name="carambola2" + ;; esac case "$machine" in diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 26b855f0a3..9542295476 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -133,7 +133,8 @@ platform_check_image() { wlae-ag300n | \ nbg460n_550n_550nh | \ unifi | \ - unifi-outdoor ) + unifi-outdoor | \ + carambola2 ) [ "$magic" != "2705" ] && { echo "Invalid image type." return 1 diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10 index 71a8a724d7..b6d065b475 100644 --- a/target/linux/ar71xx/config-3.10 +++ b/target/linux/ar71xx/config-3.10 @@ -36,6 +36,7 @@ CONFIG_ATH79_MACH_AP96=y CONFIG_ATH79_MACH_ARCHER_C7=y CONFIG_ATH79_MACH_AW_NR580=y CONFIG_ATH79_MACH_CAP4200AG=y +CONFIG_ATH79_MACH_CARAMBOLA2=y CONFIG_ATH79_MACH_DB120=y CONFIG_ATH79_MACH_DIR_600_A1=y CONFIG_ATH79_MACH_DIR_615_C1=y diff --git a/target/linux/ar71xx/config-3.8 b/target/linux/ar71xx/config-3.8 index 8a8d6a60c0..25a18034fb 100644 --- a/target/linux/ar71xx/config-3.8 +++ b/target/linux/ar71xx/config-3.8 @@ -36,6 +36,7 @@ CONFIG_ATH79_MACH_AP96=y CONFIG_ATH79_MACH_ARCHER_C7=y CONFIG_ATH79_MACH_AW_NR580=y CONFIG_ATH79_MACH_CAP4200AG=y +CONFIG_ATH79_MACH_CARAMBOLA2=y CONFIG_ATH79_MACH_DB120=y CONFIG_ATH79_MACH_DIR_600_A1=y CONFIG_ATH79_MACH_DIR_615_C1=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-carambola2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-carambola2.c new file mode 100644 index 0000000000..e7bc861e50 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-carambola2.c @@ -0,0 +1,114 @@ +/* + * 8devices Carambola2 board support + * + * Copyright (C) 2013 Darius Augulis <darius@8devices.com> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include <asm/mach-ath79/ath79.h> +#include <asm/mach-ath79/ar71xx_regs.h> +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-spi.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define CARAMBOLA2_GPIO_LED_WLAN 0 +#define CARAMBOLA2_GPIO_LED_ETH0 14 +#define CARAMBOLA2_GPIO_LED_ETH1 13 + +#define CARAMBOLA2_GPIO_BTN_JUMPSTART 11 +#define CARAMBOLA2_GPIO_BTN_RESET 12 + +#define CARAMBOLA2_KEYS_POLL_INTERVAL 20 /* msecs */ +#define CARAMBOLA2_KEYS_DEBOUNCE_INTERVAL (3 * CARAMBOLA2_KEYS_POLL_INTERVAL) + +#define CARAMBOLA2_MAC0_OFFSET 0x0000 +#define CARAMBOLA2_MAC1_OFFSET 0x0006 +#define CARAMBOLA2_CALDATA_OFFSET 0x1000 +#define CARAMBOLA2_WMAC_MAC_OFFSET 0x1002 + +static struct gpio_led carambola2_leds_gpio[] __initdata = { + { + .name = "carambola2:green:wlan", + .gpio = CARAMBOLA2_GPIO_LED_WLAN, + .active_low = 1, + }, { + .name = "carambola2:orange:eth0", + .gpio = CARAMBOLA2_GPIO_LED_ETH0, + .active_low = 0, + }, { + .name = "carambola2:orange:eth1", + .gpio = CARAMBOLA2_GPIO_LED_ETH1, + .active_low = 0, + } +}; + +static struct gpio_keys_button carambola2_gpio_keys[] __initdata = { + { + .desc = "jumpstart button", + .type = EV_KEY, + .code = KEY_WPS_BUTTON, + .debounce_interval = CARAMBOLA2_KEYS_DEBOUNCE_INTERVAL, + .gpio = CARAMBOLA2_GPIO_BTN_JUMPSTART, + .active_low = 1, + }, + { + .desc = "reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = CARAMBOLA2_KEYS_DEBOUNCE_INTERVAL, + .gpio = CARAMBOLA2_GPIO_BTN_RESET, + .active_low = 1, + } +}; + +static void __init carambola2_common_setup(void) +{ + u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); + + ath79_register_m25p80(NULL); + ath79_register_wmac(art + CARAMBOLA2_CALDATA_OFFSET, + art + CARAMBOLA2_WMAC_MAC_OFFSET); + + ath79_setup_ar933x_phy4_switch(true, true); + + ath79_init_mac(ath79_eth0_data.mac_addr, art + CARAMBOLA2_MAC0_OFFSET, 0); + ath79_init_mac(ath79_eth1_data.mac_addr, art + CARAMBOLA2_MAC1_OFFSET, 0); + + ath79_register_mdio(0, 0x0); + + /* LAN ports */ + ath79_register_eth(1); + + /* WAN port */ + ath79_register_eth(0); +} + +static void __init carambola2_setup(void) +{ + carambola2_common_setup(); + + ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(carambola2_leds_gpio), + carambola2_leds_gpio); + ath79_register_gpio_keys_polled(-1, CARAMBOLA2_KEYS_POLL_INTERVAL, + ARRAY_SIZE(carambola2_gpio_keys), + carambola2_gpio_keys); + ath79_register_usb(); +} + +MIPS_MACHINE(ATH79_MACH_CARAMBOLA2, "CARAMBOLA2", "8devices Carambola2 board", + carambola2_setup); diff --git a/target/linux/ar71xx/generic/profiles/8devices.mk b/target/linux/ar71xx/generic/profiles/8devices.mk new file mode 100644 index 0000000000..209403aeb2 --- /dev/null +++ b/target/linux/ar71xx/generic/profiles/8devices.mk @@ -0,0 +1,17 @@ +# +# Copyright (C) 2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/CARAMBOLA2 + NAME:=Carambola2 board from 8Devices + PACKAGES:=kmod-usb-core kmod-usb2 +endef + +define Profile/CARAMBOLA2/Description + Package set optimized for the 8devices Carambola2 board. +endef + +$(eval $(call Profile,CARAMBOLA2)) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 2ed63d0590..dce68dac2d 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -157,6 +157,7 @@ ap96_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),17 ap113_mtd_layout=mtdparts=spi0.0:64k(u-boot),3008k(rootfs),896k(uImage),64k(NVRAM),64k(ART),3904k@0x10000(firmware) ap121_mtdlayout_2M=mtdparts=spi0.0:64k(u-boot)ro,1216k(rootfs),704k(kernel),64k(art)ro,1920k@0x10000(firmware) ap121_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware) +carambola2_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2048k(kernel),13888k(rootfs),64k(nvram),64k(art)ro,15936k@0x50000(firmware) ap132_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),6400k(rootfs),64k(art),7808k@0x50000(firmware) ap135_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware) ap136_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(mib0),64k(art)ro,7744k@0x50000(firmware) @@ -852,6 +853,7 @@ $(eval $(call SingleProfile,AthLzma,$(fs_256k),ALL0315N,all0315n,ALL0315N,ttyS0, $(eval $(call SingleProfile,AthLzma,$(fs_64k),AP113,ap113,AP113,ttyS0,115200,$$(ap113_mtd_layout),917504,3080192,RK)) $(eval $(call SingleProfile,AthLzma,$(fs_64k),AP121_2M,ap121-2M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_2M),720896,1245184,RKuImage)) $(eval $(call SingleProfile,AthLzma,$(fs_64k),AP121_4M,ap121-4M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_4M),917504,2818048,RKuImage)) +$(eval $(call SingleProfile,AthLzma,$(fs_64k),CARAMBOLA2,carambola2,CARAMBOLA2,ttyATH0,115200,$$(carambola2_mtdlayout_16M),2097152,14221312,KRuImage)) $(eval $(call SingleProfile,AthLzma,$(fs_64k),AP121MINI,ap121-mini,AP121-MINI,ttyATH0,115200,$$(ap121_mtdlayout_4M),917504,2818048,RKuImage)) $(eval $(call SingleProfile,AthLzma,$(fs_64k),AP132,ap132,AP132,ttyS0,115200,$$(ap132_mtdlayout),1441792,6553600,KRuImage)) $(eval $(call SingleProfile,AthLzma,$(fs_64k),AP135,ap135-020,AP135-020,ttyS0,115200,$$(ap135_mtdlayout),1507328,14876672,RKuImage)) diff --git a/target/linux/ar71xx/patches-3.10/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.10/610-MIPS-ath79-openwrt-machines.patch index d2dbb597ea..12e24f0708 100644 --- a/target/linux/ar71xx/patches-3.10/610-MIPS-ath79-openwrt-machines.patch +++ b/target/linux/ar71xx/patches-3.10/610-MIPS-ath79-openwrt-machines.patch @@ -1,6 +1,8 @@ ---- a/arch/mips/ath79/machtypes.h -+++ b/arch/mips/ath79/machtypes.h -@@ -16,22 +16,124 @@ +Index: linux-3.10/arch/mips/ath79/machtypes.h +=================================================================== +--- linux-3.10.orig/arch/mips/ath79/machtypes.h 2013-07-11 22:29:04.592988418 +0200 ++++ linux-3.10/arch/mips/ath79/machtypes.h 2013-07-11 22:42:15.781006779 +0200 +@@ -16,22 +16,125 @@ enum ath79_mach_type { ATH79_MACH_GENERIC = 0, @@ -22,6 +24,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 */ @@ -125,9 +128,11 @@ }; #endif /* _ATH79_MACHTYPE_H */ ---- a/arch/mips/ath79/Kconfig -+++ b/arch/mips/ath79/Kconfig -@@ -2,6 +2,61 @@ if ATH79 +Index: linux-3.10/arch/mips/ath79/Kconfig +=================================================================== +--- linux-3.10.orig/arch/mips/ath79/Kconfig 2013-07-11 22:29:04.592988418 +0200 ++++ linux-3.10/arch/mips/ath79/Kconfig 2013-07-11 22:41:53.245006256 +0200 +@@ -2,6 +2,61 @@ menu "Atheros AR71XX/AR724X/AR913X machine selection" @@ -189,10 +194,17 @@ 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,654 @@ + 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 @@ -205,13 +217,32 @@ + 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 @@ -230,13 +261,21 @@ + 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 @@ -244,13 +283,18 @@ + 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 @@ -549,7 +593,9 @@ + 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 @@ -589,14 +635,20 @@ + +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 @@ -638,11 +690,11 @@ + +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 @@ -653,20 +705,31 @@ + 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 @@ -708,11 +771,12 @@ + +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 @@ -804,12 +868,14 @@ + 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 +730,34 @@ Say 'Y' here if you want your kernel to support the Ubiquiti Networks XM (rev 1.0) board. @@ -831,10 +897,20 @@ + 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 +807,10 @@ config ATH79_DEV_ETH def_bool n @@ -846,7 +922,7 @@ def_bool n config ATH79_DEV_GPIO_BUTTONS -@@ -164,4 +832,7 @@ config ATH79_PCI_ATH9K_FIXUP +@@ -164,4 +842,7 @@ config ATH79_ROUTERBOOT def_bool n @@ -854,9 +930,11 @@ + def_bool n + endif ---- a/arch/mips/ath79/Makefile -+++ b/arch/mips/ath79/Makefile -@@ -38,9 +38,78 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route +Index: linux-3.10/arch/mips/ath79/Makefile +=================================================================== +--- linux-3.10.orig/arch/mips/ath79/Makefile 2013-07-11 22:29:04.400988414 +0200 ++++ linux-3.10/arch/mips/ath79/Makefile 2013-07-11 22:42:39.673007333 +0200 +@@ -38,9 +38,79 @@ # # Machines # @@ -935,9 +1013,12 @@ +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 ---- a/arch/mips/ath79/prom.c -+++ b/arch/mips/ath79/prom.c -@@ -180,6 +180,11 @@ void __init prom_init(void) ++obj-$(CONFIG_ATH79_MACH_CARAMBOLA2) += mach-carambola2.o +Index: linux-3.10/arch/mips/ath79/prom.c +=================================================================== +--- linux-3.10.orig/arch/mips/ath79/prom.c 2013-07-11 22:29:04.128988408 +0200 ++++ linux-3.10/arch/mips/ath79/prom.c 2013-07-11 22:29:04.620988419 +0200 +@@ -180,6 +180,11 @@ ath79_prom_append_cmdline("board", env); } } diff --git a/target/linux/ar71xx/patches-3.8/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.8/610-MIPS-ath79-openwrt-machines.patch index d2dbb597ea..b1ffda3bc8 100644 --- a/target/linux/ar71xx/patches-3.8/610-MIPS-ath79-openwrt-machines.patch +++ b/target/linux/ar71xx/patches-3.8/610-MIPS-ath79-openwrt-machines.patch @@ -1,6 +1,8 @@ ---- a/arch/mips/ath79/machtypes.h -+++ b/arch/mips/ath79/machtypes.h -@@ -16,22 +16,124 @@ +Index: linux-3.8.13/arch/mips/ath79/machtypes.h +=================================================================== +--- linux-3.8.13.orig/arch/mips/ath79/machtypes.h 2013-07-11 21:39:45.340919744 +0200 ++++ linux-3.8.13/arch/mips/ath79/machtypes.h 2013-07-11 22:02:50.208951883 +0200 +@@ -16,22 +16,125 @@ enum ath79_mach_type { ATH79_MACH_GENERIC = 0, @@ -22,6 +24,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 */ @@ -93,14 +96,16 @@ + ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */ ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */ ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */ +- ATH79_MACH_UBNT_NANO_M, /* Ubiquiti NanoStation M */ + ATH79_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */ + ATH79_MACH_UBNT_LSX, /* Ubiquiti LSX */ - ATH79_MACH_UBNT_NANO_M, /* Ubiquiti NanoStation M */ ++ ATH79_MACH_UBNT_NANO_M, /* Ubiquiti NanoStation M */ ATH79_MACH_UBNT_ROCKET_M, /* Ubiquiti Rocket M */ + ATH79_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */ + ATH79_MACH_UBNT_RS, /* Ubiquiti RouterStation */ ATH79_MACH_UBNT_UAP_PRO, /* Ubiquiti UniFi AP Pro */ - ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */ +- ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */ ++ ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */ ATH79_MACH_UBNT_UNIFI_OUTDOOR, /* Ubiquiti UnifiAP Outdoor */ ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */ + ATH79_MACH_WHR_G301N, /* Buffalo WHR-G301N */ @@ -125,9 +130,11 @@ }; #endif /* _ATH79_MACHTYPE_H */ ---- a/arch/mips/ath79/Kconfig -+++ b/arch/mips/ath79/Kconfig -@@ -2,6 +2,61 @@ if ATH79 +Index: linux-3.8.13/arch/mips/ath79/Kconfig +=================================================================== +--- linux-3.8.13.orig/arch/mips/ath79/Kconfig 2013-07-11 21:39:45.340919744 +0200 ++++ linux-3.8.13/arch/mips/ath79/Kconfig 2013-07-11 21:57:12.076944035 +0200 +@@ -2,6 +2,61 @@ menu "Atheros AR71XX/AR724X/AR913X machine selection" @@ -189,10 +196,17 @@ 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,654 @@ + 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 @@ -205,13 +219,32 @@ + 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 @@ -230,13 +263,21 @@ + 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 @@ -244,13 +285,18 @@ + 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 @@ -549,7 +595,9 @@ + 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 @@ -589,14 +637,20 @@ + +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 @@ -638,11 +692,11 @@ + +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 @@ -653,20 +707,31 @@ + 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 @@ -708,11 +773,12 @@ + +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 @@ -804,12 +870,14 @@ + 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 +730,34 @@ Say 'Y' here if you want your kernel to support the Ubiquiti Networks XM (rev 1.0) board. @@ -831,10 +899,20 @@ + 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 +807,10 @@ config ATH79_DEV_ETH def_bool n @@ -846,7 +924,7 @@ def_bool n config ATH79_DEV_GPIO_BUTTONS -@@ -164,4 +832,7 @@ config ATH79_PCI_ATH9K_FIXUP +@@ -164,4 +842,7 @@ config ATH79_ROUTERBOOT def_bool n @@ -854,9 +932,11 @@ + def_bool n + endif ---- a/arch/mips/ath79/Makefile -+++ b/arch/mips/ath79/Makefile -@@ -38,9 +38,78 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route +Index: linux-3.8.13/arch/mips/ath79/Makefile +=================================================================== +--- linux-3.8.13.orig/arch/mips/ath79/Makefile 2013-07-11 21:39:45.288919744 +0200 ++++ linux-3.8.13/arch/mips/ath79/Makefile 2013-07-11 22:02:13.884951040 +0200 +@@ -38,9 +38,79 @@ # # Machines # @@ -935,9 +1015,12 @@ +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 ---- a/arch/mips/ath79/prom.c -+++ b/arch/mips/ath79/prom.c -@@ -180,6 +180,11 @@ void __init prom_init(void) ++obj-$(CONFIG_ATH79_MACH_CARAMBOLA2) += mach-carambola2.o +Index: linux-3.8.13/arch/mips/ath79/prom.c +=================================================================== +--- linux-3.8.13.orig/arch/mips/ath79/prom.c 2013-07-11 21:39:45.212919741 +0200 ++++ linux-3.8.13/arch/mips/ath79/prom.c 2013-07-11 21:39:45.344919744 +0200 +@@ -180,6 +180,11 @@ ath79_prom_append_cmdline("board", env); } } |