From: Piotr Dymacz Date: Tue, 20 Feb 2018 21:27:11 +0000 (+0100) Subject: Add support for Hak5 LAN Turtle (AR9331 based) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b3c85a13a975216e0c076d445b7d6b6a060ead16;p=oweals%2Fu-boot_mod.git Add support for Hak5 LAN Turtle (AR9331 based) Signed-off-by: Piotr Dymacz --- diff --git a/Makefile b/Makefile index 51d49c1..c984aa2 100644 --- a/Makefile +++ b/Makefile @@ -210,6 +210,7 @@ endef COMMON_AR933X_TARGETS = \ gainstrong_oolite_v1_dev \ gl-inet_6416 \ + hak5_lan-turtle \ hak5_wifi-pineapple-nano \ tp-link_tl-mr10u_v1 \ tp-link_tl-mr13u_v1 \ diff --git a/README.md b/README.md index d8044db..f4a3ad5 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ Currently supported devices: - 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/)) + - Hak5 LAN Turtle - Hak5 WiFi Pineapple NANO - TP-Link TL-MR10U v1 ([photos in my gallery](http://galeria.tech-blog.pl/TP-Link_TL-MR10U/)) - TP-Link TL-MR13U v1 @@ -159,6 +160,7 @@ More information about supported devices: | GL.iNet GL-AR750 | QCA9531 | 16 MiB | 128 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 | +| Hak5 LAN Turtle | AR9331 | 16 MiB | 64 MiB DDR2 | 128 KiB | R/W | | Hak5 WiFi Pineapple NANO | AR9331 | 16 MiB | 64 MiB DDR2 | 128 KiB | R/W | | 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 1b3cbe1..7e8eb19 100644 --- a/u-boot/Makefile +++ b/u-boot/Makefile @@ -521,6 +521,11 @@ gl-inet_gl-usb150: ar933x_common @$(call define_add,CONFIG_FOR_GLINET_GL_USB150,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 +hak5_lan-turtle: ar933x_common + @$(call config_init,Hak5 LAN Turtle,lan-turtle,16,11,1,QCA_AR9331_SOC) + @$(call define_add,CONFIG_FOR_HAK5_LAN_TURTLE,1) + @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 + hak5_wifi-pineapple-nano: ar933x_common @$(call config_init,Hak5 WiFi Pineapple NANO,wifi-pineapple-nano,16,12,1,QCA_AR9331_SOC) @$(call define_add,CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO,1) diff --git a/u-boot/cpu/mips/ar7240/qca_dram.c b/u-boot/cpu/mips/ar7240/qca_dram.c index 5e5bc71..d2d0352 100644 --- a/u-boot/cpu/mips/ar7240/qca_dram.c +++ b/u-boot/cpu/mips/ar7240/qca_dram.c @@ -91,7 +91,9 @@ u32 qca_dram_type(void) * * Therefore, use a custom DRAM type detection here (ignore LSB bit) */ -#if defined(CONFIG_FOR_DRAGINO_MS14) || defined(CONFIG_FOR_VILLAGE_TELCO_MP2) +#if defined(CONFIG_FOR_DRAGINO_MS14) ||\ + defined(CONFIG_FOR_HAK5_LAN_TURTLE) ||\ + defined(CONFIG_FOR_VILLAGE_TELCO_MP2) dram_type = dram_type >> 1; if (dram_type) diff --git a/u-boot/include/configs/ap121.h b/u-boot/include/configs/ap121.h index ae840d1..e9bfd7a 100644 --- a/u-boot/include/configs/ap121.h +++ b/u-boot/include/configs/ap121.h @@ -86,6 +86,10 @@ #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO13 | GPIO15 | GPIO17 |\ GPIO27 +#elif defined(CONFIG_FOR_HAK5_LAN_TURTLE) + + #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO13 + #elif defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO) #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO18 @@ -192,6 +196,7 @@ "mtdparts=ar7240-nor0:192k(u-boot),64k(u-boot-env),16064k(firmware),64k(art)" #elif defined(CONFIG_FOR_GLINET_6416) ||\ + defined(CONFIG_FOR_HAK5_LAN_TURTLE) ||\ defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO) ||\ defined(CONFIG_FOR_TPLINK_MR10U_V1) ||\ defined(CONFIG_FOR_TPLINK_MR13U_V1) ||\ @@ -411,6 +416,7 @@ !defined(CONFIG_FOR_GLINET_GL_AR150) &&\ !defined(CONFIG_FOR_GLINET_GL_USB150) &&\ !defined(CONFIG_FOR_GS_OOLITE_V1_DEV) &&\ + !defined(CONFIG_FOR_HAK5_LAN_TURTLE) &&\ !defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO) &&\ !defined(CONFIG_FOR_UNWIRED_DEVICES_UNWIRED_ONE) &&\ !defined(CONFIG_FOR_VILLAGE_TELCO_MP2)