Add initial support for the TPE-R1200 Mini Wireless Router
authorNYNEX <RISCi_ATOM>
Thu, 28 Mar 2019 16:52:47 +0000 (12:52 -0400)
committerNYNEX <RISCi_ATOM>
Thu, 28 Mar 2019 16:52:47 +0000 (12:52 -0400)
13 files changed:
target/linux/ar71xx/base-files/etc/board.d/01_leds
target/linux/ar71xx/base-files/etc/board.d/02_network
target/linux/ar71xx/base-files/etc/diag.sh
target/linux/ar71xx/base-files/lib/ar71xx.sh
target/linux/ar71xx/base-files/lib/upgrade/platform.sh
target/linux/ar71xx/config-4.4
target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c
target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
target/linux/ar71xx/image/generic.mk
target/linux/ar71xx/image/legacy.mk
target/linux/ar71xx/image/nand.mk
target/linux/ar71xx/image/ubinize-tpe-r1200.ini [new file with mode: 0644]

index e28fcf83dfd0b651b0d4d02fce36d7b8fc06d0c9..57c9491aee6206b18432ab837d76cce44e424ecd 100755 (executable)
@@ -286,6 +286,7 @@ gl-ar150|\
 gl-usb150|\
 gl-ar300|\
 gl-ar300m|\
+tpe-r1200|\
 gl-ar750)
        ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:white:wlan2g" "phy0tpt"
        ;;
index 36a5a33024b84f31b28c2436a59eca65b9ffafcb..d9451c82ffb568fb4dce9532289a7cdc9bcfe76d 100755 (executable)
@@ -126,6 +126,7 @@ ar71xx_setup_interfaces()
        dr344|\
        gl-ar150|\
        gl-ar300m|\
+       tpe-r1200|\
        gl-domino|\
        gl-inet|\
        gl-mifi|\
index 32a6e129f12c15e8c2d6ad90fc262e611bf3e271..87ebfd7ddc4ca3a10c023c14b639562080e6fd6b 100644 (file)
@@ -481,6 +481,7 @@ set_state() {
                status_led_on
                case $(ar71xx_board_name) in
                gl-ar300m|\
+               tpe-r1200|\
                gl-ar750)
                        fw_printenv lc >/dev/null 2>&1 && fw_setenv "bootcount" 0
                        ;;
index cd5797e5e7420c8db7302ee7cc30c68729d72425..eda918b7c0969229f3bf24dbd5f14e1ae4354592 100755 (executable)
@@ -935,6 +935,9 @@ ar71xx_board_detect() {
        *TEW-823DRU)
                name="tew-823dru"
                ;;
+       *"TPE-R1200 Think Penguin Mini Router")
+                name="tpe-r1200"
+                ;;
        *"TL-WR1041N v2")
                name="tl-wr1041n-v2"
                ;;
index 642b27ea393943ddc357c82e5370750321662f79..0d49297f6d49cdef855bf8ef60fdaea32e004ac5 100755 (executable)
@@ -274,6 +274,10 @@ platform_check_image() {
                platform_check_image_gl_ar300m "$1" "$board" "$magic" && return 0
                return 1
        ;;
+       tpe-r1200)
+               platform_check_image_gl_ar300m "$1" "$board" "$magic" && return 0
+               return 1
+       ;;
        gl-ar300|\
        gl-ar750|\
        gl-domino|\
@@ -655,6 +659,9 @@ platform_pre_upgrade() {
        gl-ar300m)
                platform_pre_upgrade_gl_ar300m "$1"
                ;;
+       tpe-r1200)
+               platform_pre_upgrade_gl_ar300m "$1"
+               ;;
        rb-941-2nd)
                ;;
        rb*|\
index 26f098676920d4ca99fa2211d41bf6c3edbab7a9..bd14388f75e0e13aae66c1d3a7b7a766ca8d30c7 100644 (file)
@@ -161,6 +161,7 @@ CONFIG_ATH79_MACH_TEW_673GRU=y
 CONFIG_ATH79_MACH_TEW_712BR=y
 CONFIG_ATH79_MACH_TEW_732BR=y
 CONFIG_ATH79_MACH_TEW_823DRU=y
+CONFIG_ATH79_MACH_TPE_R1200=y
 CONFIG_ATH79_MACH_TL_MR11U=y
 CONFIG_ATH79_MACH_TL_MR13U=y
 CONFIG_ATH79_MACH_TL_MR3020=y
index ac7d4a70fa80a5e5d8e0a0b2cfb125197c157ce2..ef23fa3ddcc9672954dd7b087155e3ac520a40cd 100644 (file)
@@ -1254,6 +1254,16 @@ config ATH79_MACH_BSB
        select ATH79_DEV_USB
        select ATH79_DEV_WMAC
 
+config ATH79_MACH_TPE_R1200
+        bool "TPE-R1200 Support"
+        select SOC_QCA953X
+        select ATH79_DEV_ETH
+        select ATH79_DEV_GPIO_BUTTONS
+        select ATH79_DEV_LEDS_GPIO
+        select ATH79_DEV_M25P80
+        select ATH79_DEV_USB
+        select ATH79_DEV_WMAC
+
 config ATH79_MACH_ARCHER_C7
        bool "TP-LINK Archer C5/C7/TL-WDR4900 v2 board support"
        select SOC_QCA955X
index 62906a1922f890eb36ad212e9542dc52dc56006c..03a370a496462576e8491e16a7ea178eab8e2177 100644 (file)
@@ -164,3 +164,6 @@ static void __init gl_ar300m_setup(void)
 
 MIPS_MACHINE(ATH79_MACH_GL_AR300M, "GL-AR300M", "GL-AR300M",
          gl_ar300m_setup);
+
+MIPS_MACHINE(ATH79_MACH_TPE_R1200, "TPE-R1200", "TPE-R1200 Think Penguin Mini Router",
+         gl_ar300m_setup);
index 93692144c75ed11a56fb529a5cf82383afdae9af..68e28535d61addb9d0187495cd87585924cef292 100644 (file)
@@ -185,6 +185,7 @@ enum ath79_mach_type {
        ATH79_MACH_TEW_712BR,                   /* TRENDnet TEW-712BR */
        ATH79_MACH_TEW_732BR,                   /* TRENDnet TEW-732BR */
        ATH79_MACH_TEW_823DRU,                  /* TRENDnet TEW-823DRU */
+       ATH79_MACH_TPE_R1200,                   /* ThinkPenguin TPE-R1200 */
        ATH79_MACH_TL_MR10U,                    /* TP-LINK TL-MR10U */
        ATH79_MACH_TL_MR11U,                    /* TP-LINK TL-MR11U */
        ATH79_MACH_TL_MR13U,                    /* TP-LINK TL-MR13U */
index ee7cf84a01133cdbdd7ec4319bfb8e034d9fcc33..8243648955dd0b97a4215e040a9851d401542fe6 100644 (file)
@@ -169,7 +169,15 @@ define Device/gl-ar300m
   CONSOLE = ttyS0,115200
   MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
 endef
-TARGET_DEVICES += gl-ar300m
+
+define Device/tpe-r1200
+  $(Device/gl-ar300m)
+  DEVICE_TITLE := TPE-R1200 Think Penguin Mini Router
+  BOARDNAME = TPE-R1200
+endef
+
+TARGET_DEVICES += gl-ar300m tpe-r1200
+
 
 define Device/gl-ar750
   DEVICE_TITLE := GL.iNet GL-AR750
index 8942b71b239996c5667ed77b48343af442fd752b..8ee0b11d1ffc0c5ffd77201f1941f3e76e28b438 100644 (file)
@@ -283,6 +283,7 @@ r6100_mtdlayout=mtdparts=ar934x-nfc:128k(u-boot)ro,256k(caldata)ro,256k(caldata-
 tew823dru_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,15296k(firmware),192k(lang)ro,512k(my-dlink)ro,64k(mac)ro,64k(art)ro
 wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata)ro,512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),23552k(ubi),25600k@0x6c0000(firmware),256k(caldata_backup),-(reserved)
 gl-ar300md_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(reserved),64k(art);spi0.1:2048k(kernel),-(ubi)
+tpe-r1200d_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(reserved),64k(art);spi0.1:2048k(kernel),-(ubi)
 
 zcn1523h_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6208k(rootfs),1472k(kernel),64k(configure)ro,64k(mfg)ro,64k(art)ro,7680k@0x50000(firmware)
 mynet_rext_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,7808k(firmware),64k(nvram)ro,64k(ART)ro
@@ -1066,6 +1067,8 @@ $(eval $(call SingleProfile,NetgearNAND,64k,R6100,r6100,R6100,ttyS0,115200,$$(r6
 $(eval $(call SingleProfile,ZyXELNAND,128k,NBG6716,nbg6716,NBG6716,ttyS0,115200,NBG6716,$$(zyx_nbg6716_mtdlayout),mem=256M))
 
 $(eval $(call SingleProfile,GLNAND,64k,GL-AR300MD,gl-ar300m,GL-AR300M,ttyS0,115200,$$(gl-ar300md_mtdlayout),gl-ar300m))
+$(eval $(call SingleProfile,GLNAND,64k,TPE-R1200D,tpe-r1200,TPE-R1200,ttyS0,115200,$$(tpe-r1200d_mtdlayout),tpe-r1200))
+
 endif # ifeq ($(SUBTARGET),nand)
 
 define Image/Build/squashfs
index 0590ad16a01b6134d9cbbf79e56704ff87e04c0f..cdccce522378b04ab7176849961d39eebb44e0d7 100644 (file)
@@ -25,7 +25,12 @@ define LegacyDevice/GL-AR300MD
        DEVICE_TITLE := GL-AR300M with nand flash
        DEVICE_PACKAGES := kmod-usb-core kmod-usb2 uboot-envtools
 endef
-LEGACY_DEVICES += GL-AR300MD
+
+define LegacyDevice/TPE-R1200D
+        DEVICE_TITLE := TPE-R1200 Think Penguin Mini Router
+        DEVICE_PACKAGES := kmod-usb-core kmod-usb2 uboot-envtools
+endef
+LEGACY_DEVICES += GL-AR300MD TPE-R1200D
 
 define Device/mr18
   DEVICE_TITLE := Meraki MR18
diff --git a/target/linux/ar71xx/image/ubinize-tpe-r1200.ini b/target/linux/ar71xx/image/ubinize-tpe-r1200.ini
new file mode 100644 (file)
index 0000000..5bff906
--- /dev/null
@@ -0,0 +1,26 @@
+[rootfs]
+# Volume mode (other option is static)
+mode=ubi
+# Source image
+image=root.squashfs
+# Volume ID in UBI image
+vol_id=0
+# Allow for dynamic resize
+vol_type=dynamic
+# Volume name
+vol_name=rootfs
+# Autoresize volume at first mount
+# vol_flags=autoresize
+
+[rootfs_data]
+# Volume mode (other option is static)
+mode=ubi
+# Volume ID in UBI image
+vol_id=1
+# Allow for dynamic resize
+vol_type=dynamic
+# Volume name
+vol_name=rootfs_data
+# Autoresize volume at first mount
+vol_flags=autoresize
+vol_size=1MiB