Skip to content

Commit

Permalink
add tp-link 841 mod16/64 target
Browse files Browse the repository at this point in the history
add re200v4
  • Loading branch information
misanthropos committed Jul 6, 2024
1 parent f0edc3e commit 0c96eb7
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 0 deletions.
147 changes: 147 additions & 0 deletions patches/openwrt/0008-add-definition-for-mod1664-wr841-devices.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
From: Richard Fröhning <misanthropos@gmx.de>
Date: Sun, 30 Jun 2024 11:38:53 +0200
Subject: -- add definition for mod1664 wr841 devices

diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-rom16ram64.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-rom16ram64.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..cefaf99bc6cc0dc79138bb0a75c395a6122a672b
--- /dev/null
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-rom16ram64.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 0xfd0000>;
+ };
+
+ art: partition@ff0000 {
+ label = "art";
+ reg = <0xff0000 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: Sun, 30 Jun 2024 11:57:24 +0200
Subject: add tplink-wr841-rom16ram64-v10 definition

diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index cfabc89b8dfe7d3b0d60e0f793e3198907b1c199..1e03235624f2272aafe876dc5a570757bfbecd22 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-wr841-rom16ram64-v10
+ $(Device/tplink-16mlzma)
+ SOC := qca9533
+ DEVICE_MODEL := TL-WR841N/ND MOD16/64
+ DEVICE_VARIANT := v10
+ TPLINK_HWID := 0x08411610
+endef
+TARGET_DEVICES += tplink_tl-wr841-rom16ram64-v10
+
define Device/tplink_tl-wr841hp-v2
$(Device/tplink-8mlzma)
SOC := ar9344
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From: Richard Fröhning <misanthropos@gmx.de>
Date: Sun, 30 Jun 2024 12:06:21 +0200
Subject: add qca9533_tplink_tl-wr841-rom16ram64-v10.dts

diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-rom16ram64-v10.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-rom16ram64-v10.dts
new file mode 100644
index 0000000000000000000000000000000000000000..c1bab7ce54af06d7ef4a8810af1f7b1154923bd1
--- /dev/null
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-rom16ram64-v10.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-wr841-rom16ram64-v10", "qca,qca9533";
+ model = "TP-Link TL-WR841N/ND MOD16/64 v10";
+
+ aliases {
+ led-boot = &led_qss;
+ led-failsafe = &led_qss;
+ led-running = &led_qss;
+ led-upgrade = &led_qss;
+ };
+};
2 changes: 2 additions & 0 deletions targets/ath79-generic
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ device('tp-link-tl-wdr4300-v1', 'tplink_tl-wdr4300-v1')

device('tp-link-tl-wr810n-v1', 'tplink_tl-wr810n-v1')

device('tp-link-tl-wr841-rom16ram64-v10', 'tplink_tl-wr841-rom16ram64-v10')

device('tp-link-tl-wr842n-v3', 'tplink_tl-wr842n-v3', {
manifest_aliases = {
'tp-link-tl-wr842n-nd-v3', -- upgrade from OpenWrt 19.07
Expand Down
2 changes: 2 additions & 0 deletions targets/ramips-mt76x8
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ device('tp-link-re200-v2', 'tplink_re200-v2')

device('tp-link-re200-v3', 'tplink_re200-v3')

device('tp-link-re200-v4', 'tplink_re200-v4')

device('tp-link-tl-mr3020-v3', 'tplink_tl-mr3020-v3', {
factory = false,
extra_images = {
Expand Down

0 comments on commit 0c96eb7

Please sign in to comment.