From c875e202c445d7cc0190caa749bc82738eb86606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Fr=C3=B6hning?= Date: Thu, 22 Aug 2024 06:19:44 +0200 Subject: [PATCH] add targets 841-v10 mod 8/64 and 841-v9 mod 16/64 --- ...9533_tplink_tl-wr841n-rom8ram64.dtsi.patch | 147 ++++++++++++++++++ ...plink-wr841-rom16ram8-v10-definition.patch | 24 +++ ..._tplink_tl-wr841n-nd-mod8-64-v10.dts.patch | 25 +++ .../openwrt/0015-add-wr841-v9-mod16-64.patch | 45 ++++++ targets/ath79-generic | 4 + 5 files changed, 245 insertions(+) create mode 100644 patches/openwrt/0012-add-qca9533_tplink_tl-wr841n-rom8ram64.dtsi.patch create mode 100644 patches/openwrt/0013-add-tplink-wr841-rom16ram8-v10-definition.patch create mode 100644 patches/openwrt/0014-add-qca9533_tplink_tl-wr841n-nd-mod8-64-v10.dts.patch create mode 100644 patches/openwrt/0015-add-wr841-v9-mod16-64.patch diff --git a/patches/openwrt/0012-add-qca9533_tplink_tl-wr841n-rom8ram64.dtsi.patch b/patches/openwrt/0012-add-qca9533_tplink_tl-wr841n-rom8ram64.dtsi.patch new file mode 100644 index 0000000000..a9dc789c7a --- /dev/null +++ b/patches/openwrt/0012-add-qca9533_tplink_tl-wr841n-rom8ram64.dtsi.patch @@ -0,0 +1,147 @@ +From: Richard Fröhning +Date: Thu, 22 Aug 2024 05:27:35 +0200 +Subject: add qca9533_tplink_tl-wr841n-rom8ram64.dtsi + +diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-rom8ram64.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-rom8ram64.dtsi +new file mode 100644 +index 0000000000000000000000000000000000000000..1c5161d21685ebbabd052388a8ac5fdc3a4f4f4f +--- /dev/null ++++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-rom8ram64.dtsi +@@ -0,0 +1,137 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca953x.dtsi" ++ ++#include ++#include ++ ++/ { ++ aliases { ++ label-mac-device = &wmac; ++ }; ++ ++ leds: leds { ++ compatible = "gpio-leds"; ++ ++ wifi { ++ label = "green:wlan"; ++ gpios = <&gpio 13 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "phy0tpt"; ++ }; ++ ++ led_qss: qss { ++ label = "green:qss"; ++ gpios = <&gpio 3 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan { ++ label = "green:wan"; ++ gpios = <&gpio 4 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan1 { ++ label = "green:lan1"; ++ gpios = <&gpio 16 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan2 { ++ label = "green:lan2"; ++ gpios = <&gpio 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan3 { ++ label = "green:lan3"; ++ gpios = <&gpio 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan4 { ++ label = "green:lan4"; ++ gpios = <&gpio 11 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "Reset button"; ++ linux,code = ; ++ gpios = <&gpio 12 GPIO_ACTIVE_LOW>; ++ debounce-interval = <60>; ++ }; ++ ++ rfkill { ++ label = "RFKILL button"; ++ linux,code = ; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ debounce-interval = <60>; ++ }; ++ }; ++}; ++ ++&spi { ++ status = "okay"; ++ ++ flash@0 { ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <25000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ uboot: partition@0 { ++ label = "u-boot"; ++ reg = <0x000000 0x020000>; ++ read-only; ++ }; ++ ++ partition@20000 { ++ compatible = "tplink,firmware"; ++ label = "firmware"; ++ reg = <0x020000 0x7d0000>; ++ }; ++ ++ art: partition@7f0000 { ++ label = "art"; ++ reg = <0x7f0000 0x010000>; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++ð0 { ++ status = "okay"; ++ ++ phy-handle = <&swphy4>; ++ ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <1>; ++}; ++ ++ð1 { ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&wmac { ++ status = "okay"; ++ ++ mtd-cal-data = <&art 0x1000>; ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&uboot { ++ compatible = "nvmem-cells"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ macaddr_uboot_1fc00: macaddr@1fc00 { ++ reg = <0x1fc00 0x6>; ++ }; ++}; diff --git a/patches/openwrt/0013-add-tplink-wr841-rom16ram8-v10-definition.patch b/patches/openwrt/0013-add-tplink-wr841-rom16ram8-v10-definition.patch new file mode 100644 index 0000000000..ea4ecfb59a --- /dev/null +++ b/patches/openwrt/0013-add-tplink-wr841-rom16ram8-v10-definition.patch @@ -0,0 +1,24 @@ +From: Richard Fröhning +Date: Thu, 22 Aug 2024 05:31:11 +0200 +Subject: add tplink-wr841-rom16ram8-v10 definition + +diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk +index c4974b7ab25f093b62941ec5545ff0ebf0a50672..fca6397ec0523d57384ccc69c6a6e2cd0b64bb26 100644 +--- a/target/linux/ath79/image/generic-tp-link.mk ++++ b/target/linux/ath79/image/generic-tp-link.mk +@@ -829,6 +829,15 @@ define Device/tplink_tl-wr810n-v2 + endef + TARGET_DEVICES += tplink_tl-wr810n-v2 + ++define Device/tplink_tl-wr841n-nd-mod8-64-v10 ++ $(Device/tplink-8mlzma) ++ SOC := qca9533 ++ DEVICE_MODEL := TL-WR841N/ND MOD8/64 ++ DEVICE_VARIANT := v10 ++ TPLINK_HWID := 0x08410810 ++endef ++TARGET_DEVICES += tplink_tl-wr841n-nd-mod8-64-v10 ++ + define Device/tplink_tl-wr841n-nd-mod16-64-v10 + $(Device/tplink-16mlzma) + SOC := qca9533 diff --git a/patches/openwrt/0014-add-qca9533_tplink_tl-wr841n-nd-mod8-64-v10.dts.patch b/patches/openwrt/0014-add-qca9533_tplink_tl-wr841n-nd-mod8-64-v10.dts.patch new file mode 100644 index 0000000000..6fbb8028b2 --- /dev/null +++ b/patches/openwrt/0014-add-qca9533_tplink_tl-wr841n-nd-mod8-64-v10.dts.patch @@ -0,0 +1,25 @@ +From: Richard Fröhning +Date: Thu, 22 Aug 2024 05:52:33 +0200 +Subject: add qca9533_tplink_tl-wr841n-nd-mod8-64-v10.dts + +diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841n-nd-mod8-64-v10.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841n-nd-mod8-64-v10.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..edbccddd4bf5e501bd8ffc13eaea9be1da821223 +--- /dev/null ++++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841n-nd-mod8-64-v10.dts +@@ -0,0 +1,15 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca9533_tplink_tl-wr841-rom8ram64.dtsi" ++ ++/ { ++ compatible = "tplink,tl-wr841n-nd-mod8-64-v10", "qca,qca9533"; ++ model = "TP-Link TL-WR841N/ND MOD8/64 v10"; ++ ++ aliases { ++ led-boot = &led_qss; ++ led-failsafe = &led_qss; ++ led-running = &led_qss; ++ led-upgrade = &led_qss; ++ }; ++}; diff --git a/patches/openwrt/0015-add-wr841-v9-mod16-64.patch b/patches/openwrt/0015-add-wr841-v9-mod16-64.patch new file mode 100644 index 0000000000..b47d9bb02b --- /dev/null +++ b/patches/openwrt/0015-add-wr841-v9-mod16-64.patch @@ -0,0 +1,45 @@ +From: Richard Fröhning +Date: Thu, 22 Aug 2024 06:11:27 +0200 +Subject: add wr841 v9 mod16/64 + +diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841n-nd-mod16-64-v9.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841n-nd-mod16-64-v9.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..67275886e05f851d28457ed28506df77e49943cc +--- /dev/null ++++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841n-nd-mod16-64-v9.dts +@@ -0,0 +1,15 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca9533_tplink_tl-wr841-rom16ram64.dtsi" ++ ++/ { ++ compatible = "tplink,tl-wr841n-nd-mod16-64-v9", "qca,qca9533"; ++ model = "TP-Link TL-WR841N/ND MOD16/64 v9"; ++ ++ aliases { ++ led-boot = &led_qss; ++ led-failsafe = &led_qss; ++ led-running = &led_qss; ++ led-upgrade = &led_qss; ++ }; ++}; +diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk +index fca6397ec0523d57384ccc69c6a6e2cd0b64bb26..69c0bdc9a5c448ac628bf9eee38626de245ae524 100644 +--- a/target/linux/ath79/image/generic-tp-link.mk ++++ b/target/linux/ath79/image/generic-tp-link.mk +@@ -829,6 +829,15 @@ define Device/tplink_tl-wr810n-v2 + endef + TARGET_DEVICES += tplink_tl-wr810n-v2 + ++define Device/tplink_tl-wr841n-nd-mod16-64-v9 ++ $(Device/tplink-16mlzma) ++ SOC := qca9533 ++ DEVICE_MODEL := TL-WR841N/ND MOD16/64 ++ DEVICE_VARIANT := v9 ++ TPLINK_HWID := 0x08411609 ++endef ++TARGET_DEVICES += tplink_tl-wr841n-nd-mod16-64-v9 ++ + define Device/tplink_tl-wr841n-nd-mod8-64-v10 + $(Device/tplink-8mlzma) + SOC := qca9533 diff --git a/targets/ath79-generic b/targets/ath79-generic index 3566721e13..f62a3ab9e4 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -521,6 +521,10 @@ device('tp-link-tl-wdr4300-v1', 'tplink_tl-wdr4300-v1') device('tp-link-tl-wr810n-v1', 'tplink_tl-wr810n-v1') +device('tp-link-tl-wr841n-nd-mod16-64-v9', 'tplink_tl-wr841n-nd-mod16-64-v9') + +device('tp-link-tl-wr841n-nd-mod8-64-v10', 'tplink_tl-wr841n-nd-mod8-64-v10') + device('tp-link-tl-wr841n-nd-mod16-64-v10', 'tplink_tl-wr841n-nd-mod16-64-v10') device('tp-link-tl-wr842n-v3', 'tplink_tl-wr842n-v3', {