From 767cceef862d41ec07f09b461eeffe3768d65de8 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sat, 19 Aug 2017 00:07:27 +0200 Subject: [PATCH] Add support for GL.iNet GL-USB150 (AR9331 based) --- Makefile | 3 ++- README.md | 2 ++ u-boot/Makefile | 5 +++++ u-boot/include/configs/ap121.h | 30 ++++++++++++++++++++++++------ 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index bbde6c0..4ff48b7 100644 --- 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: diff --git a/README.md b/README.md index badea7d..652ea7b 100644 --- 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 | diff --git a/u-boot/Makefile b/u-boot/Makefile index 0d04c64..b899ba9 100644 --- a/u-boot/Makefile +++ b/u-boot/Makefile @@ -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) diff --git a/u-boot/include/configs/ap121.h b/u-boot/include/configs/ap121.h index 4758f87..6f4ff56 100644 --- a/u-boot/include/configs/ap121.h +++ b/u-boot/include/configs/ap121.h @@ -109,6 +109,16 @@ #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 |\ @@ -250,7 +260,8 @@ "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 "\ @@ -293,7 +304,8 @@ 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 @@ -320,7 +332,8 @@ #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 @@ -376,7 +389,8 @@ #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 @@ -409,6 +423,7 @@ !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 @@ -467,7 +482,8 @@ /* 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) ||\ @@ -498,7 +514,8 @@ 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 @@ -535,6 +552,7 @@ !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 -- 2.25.1