From 1dd1a7f99fe5c969fd627701266360f9bb6d432a Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Tue, 28 Nov 2017 22:11:01 +0100 Subject: [PATCH] Add support for ALFA Network Tube2H (AR9331 based) --- Makefile | 1 + README.md | 2 ++ u-boot/Makefile | 5 +++++ u-boot/include/configs/ap121.h | 22 +++++++++++++++++++--- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a8e5ecd..c56a172 100644 --- a/Makefile +++ b/Makefile @@ -248,6 +248,7 @@ $(COMMON_ETHS27_TARGETS): 8devices_carambola2 \ alfa-network_hornet-ub \ +alfa-network_tube2h \ creatcomm-technology_d3321 \ gl-inet_gl-ar150 \ gl-inet_gl-usb150: diff --git a/README.md b/README.md index d43c8e3..1b5e5b9 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Currently supported devices: - 8devices Carambola 2 (for version with development board, [photos in my gallery](http://galeria.tech-blog.pl/8devices_Carambola_2/)) - ALFA Network AP121F - ALFA Network Hornet-UB/Hornet-UB-64 (aka Hornet-UB x2) + - ALFA Network Tube2H - Black Swift - CreatComm Technology D3321 - Dragino MS14/N @@ -133,6 +134,7 @@ More information about supported devices: | [8devices Carambola 2](http://8devices.com/carambola-2) | AR9331 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W | | ALFA Network AP121F | AR9331 | 16 MiB | 64 MiB DDR1 | 192 KiB, LZMA | R/W | | [ALFA Network Hornet-UB](https://wiki.openwrt.org/toh/alfa.network/hornet-ub) | AR9331 | 8/16 MiB | 32/64 MiB DDR1 | 256 KiB | R/W | +| ALFA Network Tube2H | AR9331 | 8/16 MiB | 32/64 MiB DDR1 | 256 KiB | R/W | | [Black Swift](http://www.black-swift.com) | AR9331 | 16 MiB | 64 MiB DDR2 | 128 KiB, LZMA | R/W | | Comfast CF-E314N | QCA9531 | 16 MiB | 64 MiB DDR2 | 64 KiB, LZMA | RO | | Comfast CF-E320N v2 | QCA9531 | 16 MiB | 64 MiB DDR2 | 64 KiB, LZMA | RO | diff --git a/u-boot/Makefile b/u-boot/Makefile index c1ff913..44ac6c8 100644 --- a/u-boot/Makefile +++ b/u-boot/Makefile @@ -406,6 +406,11 @@ alfa-network_hornet-ub: ar933x_common @$(call define_add,CONFIG_FOR_ALFA_NETWORK_HORNET_UB,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 +alfa-network_tube2h: ar933x_common + @$(call config_init,ALFA Network Tube2H,tube2h,8,12,1,QCA_AR9331_SOC) + @$(call define_add,CONFIG_FOR_ALFA_NETWORK_TUBE2H,1) + @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 + comfast_cf-e314n: qca953x_common @$(call config_init,Comfast CF-E314N,cf-e314n,16,17,1,QCA_QCA9531_SOC) @$(call define_add,CONFIG_FOR_COMFAST_CF_E314N,1) diff --git a/u-boot/include/configs/ap121.h b/u-boot/include/configs/ap121.h index 5e52bdb..4677181 100644 --- a/u-boot/include/configs/ap121.h +++ b/u-boot/include/configs/ap121.h @@ -41,6 +41,13 @@ #define CONFIG_QCA_GPIO_MASK_IN GPIO11 #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H GPIO26 | GPIO28 +#elif defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) + + #define CONFIG_QCA_GPIO_MASK_LED_ACT_H GPIO0 | GPIO1 | GPIO13 + #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO17 | GPIO27 + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H GPIO28 + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_L GPIO18 | GPIO22 + #elif defined(CONFIG_FOR_CREATCOMM_D3321) #define CONFIG_QCA_GPIO_MASK_LED_ACT_H GPIO0 | GPIO13 | GPIO14 |\ @@ -152,7 +159,8 @@ "rootfstype=squashfs,jffs2 noinitrd "\ "mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)" -#elif defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) +#elif defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 "\ "rootfstype=squashfs init=/sbin/init "\ @@ -226,6 +234,7 @@ #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ defined(CONFIG_FOR_ALFA_NETWORK_AP121F) ||\ defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) ||\ defined(CONFIG_FOR_CREATCOMM_D3321) ||\ defined(CONFIG_FOR_GLINET_GL_AR150) ||\ defined(CONFIG_FOR_GLINET_GL_USB150) @@ -251,7 +260,8 @@ #endif -#if defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) +#if defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) #define CONFIG_BOOTCOMMAND "bootm 0x9F050000 || bootm 0x9F650000 || bootm 0x9FE50000" @@ -268,6 +278,7 @@ */ #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) ||\ defined(CONFIG_FOR_CREATCOMM_D3321) ||\ defined(CONFIG_FOR_GLINET_GL_AR150) ||\ defined(CONFIG_FOR_GLINET_GL_USB150) @@ -326,6 +337,7 @@ */ #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) ||\ defined(CONFIG_FOR_CREATCOMM_D3321) ||\ defined(CONFIG_FOR_DRAGINO_MS14) ||\ defined(CONFIG_FOR_VILLAGE_TELCO_MP2) @@ -378,6 +390,7 @@ #if !defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) &&\ !defined(CONFIG_FOR_ALFA_NETWORK_AP121F) &&\ !defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) &&\ + !defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) &&\ !defined(CONFIG_FOR_CREATCOMM_D3321) &&\ !defined(CONFIG_FOR_DLINK_DIR505_A1) &&\ !defined(CONFIG_FOR_DRAGINO_MS14) &&\ @@ -470,7 +483,8 @@ #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (320 * 1024) -#elif defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) +#elif defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (448 * 1024) @@ -502,6 +516,7 @@ #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ defined(CONFIG_FOR_ALFA_NETWORK_AP121F) ||\ defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) ||\ defined(CONFIG_FOR_CREATCOMM_D3321) ||\ defined(CONFIG_FOR_GLINET_GL_AR150) ||\ defined(CONFIG_FOR_GLINET_GL_USB150) @@ -536,6 +551,7 @@ #if !defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) &&\ !defined(CONFIG_FOR_ALFA_NETWORK_AP121F) &&\ !defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) &&\ + !defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) &&\ !defined(CONFIG_FOR_CREATCOMM_D3321) &&\ !defined(CONFIG_FOR_DLINK_DIR505_A1) &&\ !defined(CONFIG_FOR_DRAGINO_MS14) &&\ -- 2.25.1