Add support for ALFA Network Tube2H (AR9331 based)
authorPiotr Dymacz <pepe2k@gmail.com>
Tue, 28 Nov 2017 21:11:01 +0000 (22:11 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Wed, 29 Nov 2017 21:34:54 +0000 (22:34 +0100)
Makefile
README.md
u-boot/Makefile
u-boot/include/configs/ap121.h

index a8e5ecd3950185ff92439c8dad6141a29e879094..c56a17274044c1768cf8061b61e28eeab67da8bf 100644 (file)
--- 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:
index d43c8e3b89f28c27bae43717c134e327ca16cfa8..1b5e5b9304c756da5179d6867e6cba85ce2c2e79 100644 (file)
--- 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 |
index c1ff913b2956824b038025db4acfbd95d4f122de..44ac6c8e09e237e23a17b0e81961ad08d42ced3c 100644 (file)
@@ -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)
index 5e52bdbec1464548ce8239fd9784443b88eadf86..4677181f331681d7fbae04a6beea9b281c965ebe 100644 (file)
        #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 |\
                                "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 "\
 #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)
 
 #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"
 
  */
 #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)
  */
 #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)
 #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)                &&\
 
        #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)
 
 #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)
 #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)                &&\