Add support for GL.iNet GL-USB150 (AR9331 based)
authorPiotr Dymacz <pepe2k@gmail.com>
Fri, 18 Aug 2017 22:07:27 +0000 (00:07 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Sun, 20 Aug 2017 12:52:30 +0000 (14:52 +0200)
Makefile
README.md
u-boot/Makefile
u-boot/include/configs/ap121.h

index bbde6c0090dd5467c25ac968378048a85e127657..4ff48b73821c39e183f08b6038f01f87559802cd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -247,7 +247,8 @@ $(COMMON_ETHS27_TARGETS):
 8devices_carambola2 \
 alfa-network_hornet-ub \
 creatcomm-technology_d3321 \
-gl-inet_gl-ar150:
+gl-inet_gl-ar150 \
+gl-inet_gl-usb150:
        @$(call build,256,1)
 
 alfa-network_ap121f:
index badea7d391be2220994543a53428e6a7b4171097..652ea7b91e0f784300cd3c1c29d062ac4914cdbe 100644 (file)
--- a/README.md
+++ b/README.md
@@ -70,6 +70,7 @@ Currently supported devices:
   - Dragino 2 (MS14)
   - GL.iNet 64xxA ([photos in my gallery](http://galeria.tech-blog.pl/GLiNet/))
   - GL.iNet GL-AR150
+  - GL.iNet GL-USB150
   - GS-Oolite/Elink EL-M150 module with dev board ([photos in my gallery](http://galeria.tech-blog.pl/Elink_EL-M150_Development-Board/))
   - TP-Link TL-MR10U v1 ([photos in my gallery](http://galeria.tech-blog.pl/TP-Link_TL-MR10U/))
   - TP-Link TL-MR13U v1
@@ -137,6 +138,7 @@ More information about supported devices:
 | [EnGenius ENS202EXT](https://wiki.openwrt.org/toh/engenius/engenius_ens202ext_1.0.0) | AR9341 | 16 MiB | 64 MiB DDR1 | 256 KiB | R/W |
 | [GL.iNet 64xxA](http://wiki.openwrt.org/toh/gl-inet/gl-inet) | AR9331 | 8/16 MiB | 64 MiB DDR1 | 64 KiB | RO |
 | GL.iNet GL-AR150 | AR9331 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W |
+| GL.iNet GL-USB150 | AR9331 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W |
 | GS-Oolite/Elink EL-M150 module | AR9331 | 4/8/16 MiB | 64 MiB DDR2 | 64 KiB, LZMA | RO |
 | P&W CPE505N | QCA9531 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W |
 | P&W R602N | QCA9531 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W |
index 0d04c6425a73a3defa32097f2fa27abf3560b83c..b899ba9dbbd0bf51f9b06465156cb58ba48406b9 100644 (file)
@@ -474,6 +474,11 @@ gl-inet_gl-ar150: ar933x_common
        @$(call define_add,CONFIG_FOR_GL_AR150,1)
        @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
 
+gl-inet_gl-usb150: ar933x_common
+       @$(call config_init,GL.iNet GL-USB150,gl-usb150,16,11,,QCA_AR933X_SOC)
+       @$(call define_add,CONFIG_FOR_GL_USB150,1)
+       @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
+
 p2w_cpe505n: qca953x_common
        @$(call config_init,P&W CPE505N,cpe505n,16,17,1,QCA_QCA953X_SOC)
        @$(call define_add,CONFIG_FOR_P2W_CPE505N,1)
index 4758f8751329845b267bfc1483f972439fb74700..6f4ff56d6238e5337a5e7238a1ab894437102b43 100644 (file)
        #define CONFIG_QCA_GPIO_MASK_IN         GPIO11
        #define CONFIG_QCA_GPIO_MASK_OUT_INIT_L CONFIG_QCA_GPIO_MASK_LED_ACT_H
 
+#elif defined(CONFIG_FOR_GL_USB150)
+
+       #define CONFIG_QCA_GPIO_MASK_LED_ACT_H  GPIO0
+       #define CONFIG_QCA_GPIO_MASK_OUT        GPIO7 | GPIO13 |\
+                                               CONFIG_QCA_GPIO_MASK_LED_ACT_H
+       #define CONFIG_QCA_GPIO_MASK_IN         GPIO11
+       #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H GPIO13
+       #define CONFIG_QCA_GPIO_MASK_OUT_INIT_L GPIO7 |\
+                                               CONFIG_QCA_GPIO_MASK_LED_ACT_H
+
 #elif defined(CONFIG_FOR_GS_OOLITE_V1_DEV)
 
        #define CONFIG_QCA_GPIO_MASK_LED_ACT_L  GPIO13 | GPIO15 | GPIO17 |\
                                "rootfstype=squashfs init=/sbin/init "\
                                "mtdparts=ar7240-nor0:192k(u-boot),64k(u-boot-env),16064k(firmware),64k(art)"
 
-#elif defined(CONFIG_FOR_GL_AR150)
+#elif defined(CONFIG_FOR_GL_AR150) ||\
+      defined(CONFIG_FOR_GL_USB150)
 
        #define CONFIG_BOOTARGS "console=ttyATH0,115200 board=domino root=31:03 "\
                                "rootfstype=squashfs,jffs2 noinitrd "\
     defined(CONFIG_FOR_ALFA_NETWORK_AP121F)    ||\
     defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\
     defined(CONFIG_FOR_CREATCOMM_D3321)        ||\
-    defined(CONFIG_FOR_GL_AR150)
+    defined(CONFIG_FOR_GL_AR150)               ||\
+    defined(CONFIG_FOR_GL_USB150)
        #define CFG_LOAD_ADDR   0x9F050000
 #elif defined(CONFIG_FOR_BLACK_SWIFT_BOARD)
        #define CFG_LOAD_ADDR   0x9F030000
 #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2)    ||\
     defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\
     defined(CONFIG_FOR_CREATCOMM_D3321)        ||\
-    defined(CONFIG_FOR_GL_AR150)
+    defined(CONFIG_FOR_GL_AR150)               ||\
+    defined(CONFIG_FOR_GL_USB150)
        #define CFG_ENV_ADDR            0x9F040000
        #define CFG_ENV_SIZE            0x8000
        #define CFG_ENV_SECT_SIZE       0x10000
        #define OFFSET_MAC_DATA_BLOCK_LENGTH    0x10000
        #define OFFSET_MAC_ADDRESS              0x00000
 #elif defined(CONFIG_FOR_BLACK_SWIFT_BOARD) ||\
-      defined(CONFIG_FOR_GL_AR150)
+      defined(CONFIG_FOR_GL_AR150)          ||\
+      defined(CONFIG_FOR_GL_USB150)
        #define OFFSET_MAC_DATA_BLOCK           0xFF0000
        #define OFFSET_MAC_DATA_BLOCK_LENGTH    0x010000
        #define OFFSET_MAC_ADDRESS              0x000000
     !defined(CONFIG_FOR_DRAGINO_V2)             &&\
     !defined(CONFIG_FOR_GL_AR150)               &&\
     !defined(CONFIG_FOR_GL_INET)                &&\
+    !defined(CONFIG_FOR_GL_USB150)              &&\
     !defined(CONFIG_FOR_GS_OOLITE_V1_DEV)       &&\
     !defined(CONFIG_FOR_MESH_POTATO_V2)
        #define OFFSET_ROUTER_MODEL     0xFD00
 
 /* Firmware size limit */
 #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\
-    defined(CONFIG_FOR_GL_AR150)
+    defined(CONFIG_FOR_GL_AR150)            ||\
+    defined(CONFIG_FOR_GL_USB150)
        #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES        (384 * 1024)
 #elif defined(CONFIG_FOR_ALFA_NETWORK_AP121F) ||\
       defined(CONFIG_FOR_DRAGINO_V2)          ||\
     defined(CONFIG_FOR_ALFA_NETWORK_AP121F)    ||\
     defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\
     defined(CONFIG_FOR_CREATCOMM_D3321)        ||\
-    defined(CONFIG_FOR_GL_AR150)
+    defined(CONFIG_FOR_GL_AR150)               ||\
+    defined(CONFIG_FOR_GL_USB150)
 
        #define CONFIG_QCA_PLL_IN_FLASH_BLOCK_OFFSET    0x40000
        #define CONFIG_QCA_PLL_IN_FLASH_BLOCK_SIZE      0x10000
     !defined(CONFIG_FOR_DLINK_DIR505_A1)        &&\
     !defined(CONFIG_FOR_DRAGINO_V2)             &&\
     !defined(CONFIG_FOR_GL_AR150)               &&\
+    !defined(CONFIG_FOR_GL_USB150)              &&\
     !defined(CONFIG_FOR_MESH_POTATO_V2)
        #define CONFIG_UPG_SCRIPTS_UBOOT_SIZE_BCKP_HEX  0x20000
 #endif