From 2f0b6ddf5eedae7d601776062fc9f4d515a0517e Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sun, 18 Jun 2017 19:41:11 +0200 Subject: [PATCH] Add support for CreatComm Technology D3321 (AR9331 based) --- Makefile | 1 + README.md | 2 ++ u-boot/Makefile | 5 +++++ u-boot/include/configs/ap121.h | 25 +++++++++++++++++++++++++ 4 files changed, 33 insertions(+) diff --git a/Makefile b/Makefile index 82def5f..2d37fde 100644 --- a/Makefile +++ b/Makefile @@ -243,6 +243,7 @@ $(COMMON_ETHS27_TARGETS): 8devices_carambola2 \ alfa-network_hornet-ub \ +creatcomm-technology_d3321 \ gl-innovations_gl-ar150: @$(call build,256,1) diff --git a/README.md b/README.md index 2b6d8fa..df0e3de 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 Hornet-UB/Hornet-UB-64 (aka Hornet-UB x2) - Black Swift + - CreatComm Technology D3321 - Dragino 2 (MS14) - GL Innovations GL-AR150 - GL Innovations GL.iNet 64xxA ([photos in my gallery](http://galeria.tech-blog.pl/GLiNet/)) @@ -124,6 +125,7 @@ More information about supported devices: | 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 | | Comfast CF-E520N/CF-E530N | QCA9531 | 8 MiB | 32 MiB DDR2 | 64 KiB, LZMA | RO | +| CreatComm Technology D3321| AR9331 | 8 MiB | 32 MiB DDR1 | 256 KiB | RW | | [D-Link DIR-505 H/W ver. A1](http://wiki.openwrt.org/toh/d-link/dir-505) | AR1311 | 8 MiB | 64 MiB DDR2 | 64 KiB, LZMA | RO | | [Dragino 2 (MS14)](http://wiki.openwrt.org/toh/dragino/ms14) | AR9331 | 16 MiB | 64 MiB DDR1 | 192 KiB | R/W | | GL Innovations GL-AR150 | AR9331 | 16 MiB | 64 MiB DDR2 | 256 KiB | 64 KiB, R/W | diff --git a/u-boot/Makefile b/u-boot/Makefile index e86725d..57ebe95 100644 --- a/u-boot/Makefile +++ b/u-boot/Makefile @@ -429,6 +429,11 @@ comfast_cf-e530n: qca953x_common @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 +creatcomm-technology_d3321: ar933x_common + @$(call config_init,CreatComm Technology D3321,d3321,8,12,1,QCA_AR933X_SOC) + @$(call define_add,CONFIG_FOR_CREATCOMM_D3321,1) + @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 + d-link_dir-505: ar933x_common @$(call config_init,D-Link DIR-505,dir-505,8,11,1,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_DLINK_DIR505_A1,1) diff --git a/u-boot/include/configs/ap121.h b/u-boot/include/configs/ap121.h index d86e261..8647550 100644 --- a/u-boot/include/configs/ap121.h +++ b/u-boot/include/configs/ap121.h @@ -50,6 +50,17 @@ #define CONFIG_QCA_GPIO_MASK_IN GPIO11 #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H CONFIG_QCA_GPIO_MASK_LED_ACT_L +#elif defined(CONFIG_FOR_CREATCOMM_D3321) + + #define CONFIG_QCA_GPIO_MASK_LED_ACT_H GPIO0 | GPIO13 | GPIO14 |\ + GPIO15 | GPIO16 + #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO17 | GPIO27 + #define CONFIG_QCA_GPIO_MASK_OUT CONFIG_QCA_GPIO_MASK_LED_ACT_L |\ + CONFIG_QCA_GPIO_MASK_LED_ACT_H + #define CONFIG_QCA_GPIO_MASK_IN GPIO12 + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H CONFIG_QCA_GPIO_MASK_LED_ACT_L + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_L CONFIG_QCA_GPIO_MASK_LED_ACT_H + #elif defined(CONFIG_FOR_DLINK_DIR505_A1) #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO26 | GPIO27 @@ -201,6 +212,12 @@ "rootfstype=squashfs init=/sbin/init "\ "mtdparts=ar7240-nor0:128k(u-boot),64k(u-boot-env),16128k(firmware),64k(art)" +#elif defined(CONFIG_FOR_CREATCOMM_D3321) + + #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:03 "\ + "rootfstype=squashfs init=/sbin/init "\ + "mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1216k(uImage),5952k(rootfs),256k(config),384k(customer),64k(ART) mem=32M" + #elif defined(CONFIG_FOR_DLINK_DIR505_A1) #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:06 "\ @@ -255,6 +272,7 @@ */ #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_CREATCOMM_D3321) ||\ defined(CONFIG_FOR_GL_AR150) #define CFG_LOAD_ADDR 0x9F050000 #elif defined(CONFIG_FOR_BLACK_SWIFT_BOARD) @@ -281,6 +299,7 @@ */ #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_CREATCOMM_D3321) ||\ defined(CONFIG_FOR_GL_AR150) #define CFG_ENV_ADDR 0x9F040000 #define CFG_ENV_SIZE 0x8000 @@ -322,6 +341,7 @@ */ #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_CREATCOMM_D3321) ||\ defined(CONFIG_FOR_DRAGINO_V2) ||\ defined(CONFIG_FOR_MESH_POTATO_V2) #define OFFSET_MAC_DATA_BLOCK 0xFF0000 @@ -356,6 +376,7 @@ #if !defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) &&\ !defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) &&\ !defined(CONFIG_FOR_BLACK_SWIFT_BOARD) &&\ + !defined(CONFIG_FOR_CREATCOMM_D3321) &&\ !defined(CONFIG_FOR_DLINK_DIR505_A1) &&\ !defined(CONFIG_FOR_DRAGINO_V2) &&\ !defined(CONFIG_FOR_GL_AR150) &&\ @@ -422,6 +443,8 @@ #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (448 * 1024) #elif defined(CONFIG_FOR_BLACK_SWIFT_BOARD) #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (256 * 1024) +#elif defined(CONFIG_FOR_CREATCOMM_D3321) + #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (1856 * 1024) #elif defined(CONFIG_FOR_DLINK_DIR505_A1) #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (512 * 1024) #elif defined(CONFIG_FOR_DRAGINO_V2) ||\ @@ -442,6 +465,7 @@ #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_CREATCOMM_D3321) ||\ defined(CONFIG_FOR_GL_AR150) #define CONFIG_QCA_PLL_IN_FLASH_BLOCK_OFFSET 0x40000 @@ -474,6 +498,7 @@ #if !defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) &&\ !defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) &&\ !defined(CONFIG_FOR_BLACK_SWIFT_BOARD) &&\ + !defined(CONFIG_FOR_CREATCOMM_D3321) &&\ !defined(CONFIG_FOR_DLINK_DIR505_A1) &&\ !defined(CONFIG_FOR_DRAGINO_V2) &&\ !defined(CONFIG_FOR_GL_AR150) &&\ -- 2.25.1