ath79: add support for TP-Link TL-WPA8630P (EU) v2.1
authorJoe Mullally <jwmullally@gmail.com>
Sat, 12 Sep 2020 18:46:28 +0000 (19:46 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 4 Oct 2020 13:44:05 +0000 (15:44 +0200)
This adds support for the TP-Link TL-WPA8630P (EU) in its v2.1
version. The only unique aspect for the firmware compared to v2
layout is the partition layout.

Note that while the EU version has different partitioning for
v2.0 and v2.1, the v2.1 (AU) is supported by the v2-int image.

If you plan to use this device, make sure you have a look at
the Wiki page to check whether the device is supported and
which image needs to be taken.

Specifications
--------------

  - QCA9563 750MHz, 2.4GHz WiFi
  - QCA9888 5GHz WiFi
  - 8MiB SPI Flash
  - 128MiB RAM
  - 3 GBit Ports (QCA8337)
  - PLC (QCA7550)

Installation
------------

Installation is possible from the OEM web interface. Make sure to
install the latest OEM firmware first, so that the PLC firmware is
at the latest version. However, please also check the Wiki page
for hints according to altered partitioning between OEM firmware
revisions.

Notes
-----

The OEM firmware has 0x620000 to 0x680000 unassigned, so we leave
this empty as well. It is complicated enough already ...

Signed-off-by: Joe Mullally <jwmullally@gmail.com>
[improve partitions, use v2 DTSI, add entry in 02_network, rewrite
and extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-eu.dts
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts [new file with mode: 0644]
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ath79/image/generic-tp-link.mk
tools/firmware-utils/Makefile
tools/firmware-utils/src/tplink-safeloader.c

index 4c04d4f96eb48e17534771e397d50bfac023d962..48cc5ed32fed437a69b7ecea005c315c76c55a20 100644 (file)
@@ -8,6 +8,12 @@
 };
 
 &partitions {
+       partition@620000 {
+               label = "partition-table";
+               reg = <0x620000 0x010000>;
+               read-only;
+       };
+
        info: partition@630000 {
                label = "info";
                reg = <0x630000 0x010000>;
index 22a80820116e07660af3d3b40c187233c1613413..50a88f344a82ac27de321001131b8be01a8c39ae 100644 (file)
@@ -8,6 +8,12 @@
 };
 
 &partitions {
+       partition@620000 {
+               label = "partition-table";
+               reg = <0x620000 0x010000>;
+               read-only;
+       };
+
        partition@630000 {
                label = "tplink";
                reg = <0x630000 0x1b0000>;
diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts
new file mode 100644 (file)
index 0000000..e8d9241
--- /dev/null
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9563_tplink_tl-wpa8630p-v2.dtsi"
+
+/ {
+       compatible = "tplink,tl-wpa8630p-v2.1-eu", "qca,qca9563";
+       model = "TP-Link WPA8630P v2.1 (EU)";
+};
+
+&partitions {
+       /* 0x620000 to 0x680000 is empty in OEM partitioning */
+
+       partition@680000 {
+               label = "tplink";
+               reg = <0x680000 0x160000>;
+               read-only;
+       };
+
+       info: partition@7e0000 {
+               label = "info";
+               reg = <0x7e0000 0x010000>;
+               read-only;
+       };
+
+       art: partition@7f0000 {
+               label = "art";
+               reg = <0x7f0000 0x010000>;
+               read-only;
+       };
+};
index be691a843bc608693b5e775ed070adafa1083f48..9e6d23de4e58948eb457d67e3bb801e200cf871a 100644 (file)
                label = "firmware";
                reg = <0x040000 0x5e0000>;
        };
-
-       partition@620000 {
-               label = "partition-table";
-               reg = <0x620000 0x010000>;
-               read-only;
-       };
 };
 
 &eth0 {
index b759bfb5f66b7663c992cb6e6148f7a22e886c7d..c812f283af0d6bd058c764685edbe5aa5d2e1ed9 100755 (executable)
@@ -324,7 +324,8 @@ tplink,tl-mr6400-v1)
        ;;
 tplink,tl-wpa8630-v1|\
 tplink,tl-wpa8630p-v2-eu|\
-tplink,tl-wpa8630p-v2-int)
+tplink,tl-wpa8630p-v2-int|\
+tplink,tl-wpa8630p-v2.1-eu)
        ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
        ;;
 tplink,tl-wr842n-v2)
index 5d23e0589ea3bd066f18fea77950880c15fe1355..58ff2aa6eb039ad0188e9f13d569bfb1ca8a39df 100755 (executable)
@@ -324,7 +324,8 @@ ath79_setup_interfaces()
                ;;
        tplink,tl-wpa8630-v1|\
        tplink,tl-wpa8630p-v2-eu|\
-       tplink,tl-wpa8630p-v2-int)
+       tplink,tl-wpa8630p-v2-int|\
+       tplink,tl-wpa8630p-v2.1-eu)
                # port 5 (internal) is the power-line port
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
index 89a64fbf35a5d5183025acb616a8f12c25fb194e..248b436c72296571d18e1f5527768f5ea8bec5b2 100644 (file)
@@ -198,7 +198,8 @@ case "$FIRMWARE" in
                ;;
        tplink,eap225-wall-v2|\
        tplink,tl-wpa8630p-v2-eu|\
-       tplink,tl-wpa8630p-v2-int)
+       tplink,tl-wpa8630p-v2-int|\
+       tplink,tl-wpa8630p-v2.1-eu)
                caldata_extract "art" 0x5000 0x2f20
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1)
                ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
index 22d1ac8a9e306759db22805d967af18dab4b75a0..a2fbf712db200c294fcad29e1fe3b896dd5a9ecc 100644 (file)
@@ -564,6 +564,13 @@ define Device/tplink_tl-wpa8630p-v2-int
 endef
 TARGET_DEVICES += tplink_tl-wpa8630p-v2-int
 
+define Device/tplink_tl-wpa8630p-v2.1-eu
+  $(Device/tplink_tl-wpa8630p-v2)
+  DEVICE_VARIANT := v2.1 (EU)
+  TPLINK_BOARD_ID := TL-WPA8630P-V2.1-EU
+endef
+TARGET_DEVICES += tplink_tl-wpa8630p-v2.1-eu
+
 define Device/tplink_tl-wr1043nd-v1
   $(Device/tplink-8m)
   SOC := ar9132
index 39c3503886bd29f2e40411792bd0e84c9b1a6037..7f1754a347dec64880574e556e72af4a6cc3a4fd 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME := firmware-utils
-PKG_RELEASE := 3
+PKG_RELEASE := 4
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/kernel.mk
index 82166a9ebb17f95283068471007118d9e94b02d9..eececeaf619991ef0939f9b075da22fe81582d1c 100644 (file)
@@ -1513,6 +1513,41 @@ static struct device_info boards[] = {
                .last_sysupgrade_partition = "file-system"
        },
 
+       /** Firmware layout for the TL-WPA8630P v2.1 (EU)*/
+       {
+               .id     = "TL-WPA8630P-V2.1-EU",
+               .vendor = "",
+               .support_list =
+                       "SupportList:\n"
+                       "{product_name:TL-WPA8630P,product_ver:2.1.0,special_id:45550000}\n",
+               .support_trail = '\x00',
+               .soft_ver = NULL,
+
+               .partitions = {
+                       {"factory-uboot", 0x00000, 0x20000},
+                       {"fs-uboot", 0x20000, 0x20000},
+                       {"firmware", 0x40000, 0x5e0000},
+                       {"extra-para", 0x680000, 0x01000},
+                       {"product-info", 0x690000, 0x01000},
+                       {"partition-table", 0x6a0000, 0x02000},
+                       {"soft-version", 0x6b0000, 0x01000},
+                       {"support-list", 0x6b1000, 0x01000},
+                       {"profile", 0x6b2000, 0x08000},
+                       {"user-config", 0x6c0000, 0x10000},
+                       {"default-config", 0x6d0000, 0x10000},
+                       {"default-nvm", 0x6e0000, 0xc0000},
+                       {"default-pib", 0x7a0000, 0x40000},
+                       {"default-mac", 0x7e0000, 0x00020},
+                       {"pin", 0x7e0100, 0x00020},
+                       {"device-id", 0x7e0200, 0x00030},
+                       {"radio", 0x7f0000, 0x10000},
+                       {NULL, 0, 0}
+               },
+
+               .first_sysupgrade_partition = "os-image",
+               .last_sysupgrade_partition = "file-system"
+       },
+
        /** Firmware layout for the TL-WR1043 v5 */
        {
                .id     = "TLWR1043NV5",