Skip to content

Commit

Permalink
add targets 841-v10 mod 8/64 and 841-v9 mod 16/64
Browse files Browse the repository at this point in the history
  • Loading branch information
misanthropos committed Aug 22, 2024
1 parent 59c739e commit 15944b5
Show file tree
Hide file tree
Showing 5 changed files with 245 additions and 0 deletions.
147 changes: 147 additions & 0 deletions patches/openwrt/0012-add-qca9533_tplink_tl-wr841n-rom8ram64.dtsi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
From: Richard Fröhning <misanthropos@gmx.de>
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 <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ 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 = <KEY_RESTART>;
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+
+ rfkill {
+ label = "RFKILL button";
+ linux,code = <KEY_RFKILL>;
+ 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 0xfa0000>;
+ };
+
+ art: partition@fc0000 {
+ label = "art";
+ reg = <0xfc0000 0x010000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&eth0 {
+ status = "okay";
+
+ phy-handle = <&swphy4>;
+
+ nvmem-cells = <&macaddr_uboot_1fc00>;
+ nvmem-cell-names = "mac-address";
+ mac-address-increment = <1>;
+};
+
+&eth1 {
+ 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>;
+ };
+};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From: Richard Fröhning <misanthropos@gmx.de>
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From: Richard Fröhning <misanthropos@gmx.de>
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;
+ };
+};
45 changes: 45 additions & 0 deletions patches/openwrt/0015-add-wr841-v9-mod16-64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
From: Richard Fröhning <misanthropos@gmx.de>
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
4 changes: 4 additions & 0 deletions targets/ath79-generic
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down

0 comments on commit 15944b5

Please sign in to comment.