Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts b/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts
- new file mode 100644
- index 0000000000..003f29ea68
- --- /dev/null
- +++ b/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts
- @@ -0,0 +1,173 @@
- +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
- +/dts-v1/;
- +
- +#include <dt-bindings/gpio/gpio.h>
- +#include <dt-bindings/input/input.h>
- +
- +#include "qca956x.dtsi"
- +
- +/ {
- + compatible = "tplink,eap245-v3", "qca,qca9563";
- + model = "TP-Link EAP245 v3";
- +
- + chosen {
- + bootargs = "console=ttyS0,115200n8";
- + };
- +
- + aliases {
- + led-boot = &led_green;
- + led-failsafe = &led_yellow;
- + led-running = &led_green;
- + led-upgrade = &led_yellow;
- + mdio-gpio0 = &mdio2;
- + };
- +
- + leds {
- + compatible = "gpio-leds";
- +
- + led_green: led_green {
- + label = "tp-link:green:power";
- + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
- + };
- +
- + led_yellow: led_yellow {
- + label = "tp-link:yellow:failsafe";
- + gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
- + };
- +
- + };
- +
- + keys {
- + compatible = "gpio-keys";
- +
- + reset {
- + label = "Reset button";
- + linux,code = <KEY_RESTART>;
- + gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
- + debounce-interval = <60>;
- + };
- + };
- +
- + mdio2: mdio {
- + compatible = "virtual,mdio-gpio";
- +
- + gpios = <&gpio 8 GPIO_ACTIVE_HIGH>, /* MDC */
- + <&gpio 10 GPIO_ACTIVE_HIGH>; /* MDIO */
- + #address-cells = <1>;
- + #size-cells = <0>;
- +
- + phy0: ethernet-phy@0 {
- + reg = <0>;
- + device_type = "ethernet-phy";
- + reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
- + };
- + };
- +};
- +
- +&pcie {
- + status = "okay";
- +};
- +
- +&uart {
- + status = "okay";
- +};
- +
- +&gpio {
- + status = "okay";
- +};
- +
- +&spi {
- + status = "okay";
- + num-cs = <1>;
- +
- + flash@0 {
- + compatible = "jedec,spi-nor";
- + reg = <0>;
- + spi-max-frequency = <25000000>;
- +
- + partitions {
- + compatible = "fixed-partitions";
- + #address-cells = <1>;
- + #size-cells = <1>;
- +
- + partition@0 {
- + label = "factory-boot";
- + reg = <0x000000 0x040000>;
- + read-only;
- + };
- +
- + partition@40000 {
- + label = "u-boot";
- + reg = <0x040000 0x040000>;
- + read-only;
- + };
- +
- + partition@80000 {
- + label = "partition-table";
- + reg = <0x080000 0x010000>;
- + read-only;
- + };
- +
- + info: partition@90000 {
- + label = "info";
- + reg = <0x090000 0x010000>;
- + read-only;
- + };
- +
- + art: partition@a0000 {
- + label = "art";
- + reg = <0x0a0000 0x010000>;
- + read-only;
- + };
- +
- + partition@b0000 {
- + label = "extra-para";
- + reg = <0x0b0000 0x010000>;
- + read-only;
- + };
- +
- + partition@c0000 {
- + compatible = "openwrt,okli"
- + label = "firmware";
- + reg = <0x0c0000 0xe40000>;
- + read-only;
- + };
- +
- + partition@f00000 {
- + label = "config";
- + reg = <0xf00000 0x030000>;
- + read-only;
- + };
- +
- + partition@f30000 {
- + label = "mutil-log";
- + reg = <0xf30000 0x080000>;
- + read-only;
- + };
- +
- + partition@fb0000 {
- + label = "oops";
- + reg = <0xfb0000 0x040000>;
- + read-only;
- + };
- +
- + };
- + };
- +};
- +
- +ð0 {
- + status = "okay";
- +
- + phy-handle = <&phy0>;
- +
- + mtd-mac-address = <&info 0x8>;
- +};
- +
- +&wmac {
- + status = "okay";
- +
- + mtd-cal-data = <&art 0x1000>;
- + mtd-mac-address = <&info 0x8>;
- + mtd-mac-address-increment = <1>;
- +};
- +
- diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
- index 191d902dc5..9ab0bf5a69 100755
- --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
- +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
- @@ -252,6 +252,10 @@ ath79_setup_interfaces()
- ucidef_add_switch "switch0" \
- "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "1:wan"
- ;;
- + tplink,eap245-v3)
- + ucidef_add_switch "switch0" \
- + "0@eth0" "1:lan:1" "2:lan:4"
- + ;;
- tplink,tl-mr6400-v1)
- ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"
- ucidef_add_switch "switch0" \
- diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
- index b3c4d60ed8..c5460803c4 100644
- --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
- +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
- @@ -175,6 +175,12 @@ case "$FIRMWARE" in
- ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
- /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
- ;;
- + tplink,eap245-v3)
- + caldata_extract "art" 0x5000 0x2f20
- + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mac 0x8) +1)
- + ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
- + /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
- + ;;
- yuncore,a782|\
- yuncore,xd4200)
- caldata_extract "art" 0x5000 0x2f20
- diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
- index 5b8d91c3e6..a6b40745b4 100644
- --- a/target/linux/ath79/image/generic-tp-link.mk
- +++ b/target/linux/ath79/image/generic-tp-link.mk
- @@ -324,6 +324,23 @@ define Device/tplink_eap245-v1
- endef
- TARGET_DEVICES += tplink_eap245-v1
- +define Device/tplink_eap245-v3
- + ATH_SOC := qca9563
- + SOC := qca9563
- + IMAGE_SIZE := 15360k
- + DEVICE_MODEL := EAP245
- + DEVICE_VARIANT := v3
- + DEVICE_TITLE := TP-Link EAP245 v3
- + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
- + TPLINK_BOARD_ID := EAP245-V3
- + BOARDNAME := EAP245-V3
- + SUPPORTED_DEVICES += eap245-v3
- + LOADER_TYPE := elf
- + KERNEL := kernel-bin | append-dtb | lzma | loader-kernel
- + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
- +endef
- +TARGET_DEVICES += tplink_eap245-v3
- +
- define Device/tplink_re350k-v1
- $(Device/tplink-safeloader)
- SOC := qca9558
- diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
- index a46f990675..c50de863d8 100644
- --- a/tools/firmware-utils/src/tplink-safeloader.c
- +++ b/tools/firmware-utils/src/tplink-safeloader.c
- @@ -1243,6 +1243,37 @@ static struct device_info boards[] = {
- .last_sysupgrade_partition = "file-system"
- },
- + /** Firmware layout for the EAP245 v3 */
- + {
- + .id = "EAP245-V3",
- + .support_list =
- + "SupportList:\r\n"
- + "EAP245(TP-LINK|UN|AC1750-D):3.0\r\n",
- + .support_trail = '\xff',
- + .soft_ver = NULL,
- +
- + /** Merged os-image/file-system into dynamic firmware partition */
- + .partitions = {
- + {"factory-boot", 0x00000, 0x40000},
- + {"u-boot", 0x40000, 0x40000},
- + {"partition-table", 0x80000, 0x10000},
- + {"default-mac", 0x90000, 0x01000},
- + {"support-list", 0x91000, 0x00100},
- + {"product-info", 0x91100, 0x00400},
- + {"soft-version", 0x92000, 0x00100},
- + {"radio", 0xa0000, 0x10000},
- + {"extra-para", 0xb0000, 0x10000},
- + {"firmware", 0xc0000, 0xe40000},
- + {"config", 0xf00000, 0x30000},
- + {"mutil-log", 0xf30000, 0x80000},
- + {"oops", 0xfb0000, 0x40000},
- + {NULL, 0, 0}
- + },
- +
- + .first_sysupgrade_partition = "os-image",
- + .last_sysupgrade_partition = "file-system"
- + },
- +
- /** Firmware layout for the TL-WA850RE v2 */
- {
- .id = "TLWA850REV2",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement