Skip to content

Commit

Permalink
ath79: Fix mac addresses
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Eckelmann <sven@narfation.org>
  • Loading branch information
ecsv committed Jan 6, 2024
1 parent 0c2f2c6 commit 7771b6d
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 24 deletions.
122 changes: 106 additions & 16 deletions patches/openwrt/0015-add-TL-WR841ND-N-8M-and-16M-variants-to-ath79.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Subject: add TL-WR841ND/N 8M and 16M variants to ath79

diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8-16m.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8-16m.dts
new file mode 100644
index 0000000000000000000000000000000000000000..457d55122e545857fa31f6b3ba77ca8b1009116d
index 0000000000000000000000000000000000000000..5018a727466c2c6c812d5dc1093ccd56a814f869
--- /dev/null
+++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8-16m.dts
@@ -0,0 +1,61 @@
@@ -0,0 +1,93 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9341_tplink.dtsi"
Expand All @@ -16,6 +16,10 @@ index 0000000000000000000000000000000000000000..457d55122e545857fa31f6b3ba77ca8b
+ model = "TP-Link TL-WR841N/ND Mod (ATH79 16M) v8";
+ compatible = "tplink,tl-wr841-v8-16m", "qca,ar9341";
+
+ aliases {
+ label-mac-device = &wmac;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
Expand Down Expand Up @@ -69,12 +73,40 @@ index 0000000000000000000000000000000000000000..457d55122e545857fa31f6b3ba77ca8b
+ };
+ };
+};
+
+&eth0 {
+ 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 {
+ 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/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8-8m.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8-8m.dts
new file mode 100644
index 0000000000000000000000000000000000000000..dc9f48f27b92bdb2f4d4328a14efbd1603c25e92
index 0000000000000000000000000000000000000000..8b4b13c30fce3c39735fc51b8a0b52f3cb42f9ff
--- /dev/null
+++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8-8m.dts
@@ -0,0 +1,61 @@
@@ -0,0 +1,93 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9341_tplink.dtsi"
Expand All @@ -83,6 +115,10 @@ index 0000000000000000000000000000000000000000..dc9f48f27b92bdb2f4d4328a14efbd16
+ model = "TP-Link TL-WR841N/ND Mod (ATH79 8M) v8";
+ compatible = "tplink,tl-wr841-v8-8m", "qca,ar9341";
+
+ aliases {
+ label-mac-device = &wmac;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
Expand Down Expand Up @@ -136,12 +172,40 @@ index 0000000000000000000000000000000000000000..dc9f48f27b92bdb2f4d4328a14efbd16
+ };
+ };
+};
+
+&eth0 {
+ 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 {
+ 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/target/linux/ath79/dts/qca9533_tplink_tl-wr841-16m.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-16m.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..2c6ab9d3c277e90fae4798fe9fd91e2d2accb52d
index 0000000000000000000000000000000000000000..cefaf99bc6cc0dc79138bb0a75c395a6122a672b
--- /dev/null
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-16m.dtsi
@@ -0,0 +1,124 @@
@@ -0,0 +1,137 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca953x.dtsi"
Expand Down Expand Up @@ -252,26 +316,39 @@ index 0000000000000000000000000000000000000000..2c6ab9d3c277e90fae4798fe9fd91e2d
+
+ phy-handle = <&swphy4>;
+
+ mtd-mac-address = <&uboot 0x1fc00>;
+ mtd-mac-address-increment = <1>;
+ nvmem-cells = <&macaddr_uboot_1fc00>;
+ nvmem-cell-names = "mac-address";
+ mac-address-increment = <1>;
+};
+
+&eth1 {
+ mtd-mac-address = <&uboot 0x1fc00>;
+ nvmem-cells = <&macaddr_uboot_1fc00>;
+ nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+ status = "okay";
+
+ mtd-cal-data = <&art 0x1000>;
+ mtd-mac-address = <&uboot 0x1fc00>;
+ 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/target/linux/ath79/dts/qca9533_tplink_tl-wr841-8m.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-8m.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..81317a37b8ee5251765d6eb3033749150187cc09
index 0000000000000000000000000000000000000000..040f7e558566ebf50d7aa5ebd57b79bff18fed6f
--- /dev/null
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-8m.dtsi
@@ -0,0 +1,124 @@
@@ -0,0 +1,137 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca953x.dtsi"
Expand Down Expand Up @@ -382,19 +459,32 @@ index 0000000000000000000000000000000000000000..81317a37b8ee5251765d6eb303374915
+
+ phy-handle = <&swphy4>;
+
+ mtd-mac-address = <&uboot 0x1fc00>;
+ mtd-mac-address-increment = <1>;
+ nvmem-cells = <&macaddr_uboot_1fc00>;
+ nvmem-cell-names = "mac-address";
+ mac-address-increment = <1>;
+};
+
+&eth1 {
+ mtd-mac-address = <&uboot 0x1fc00>;
+ nvmem-cells = <&macaddr_uboot_1fc00>;
+ nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+ status = "okay";
+
+ mtd-cal-data = <&art 0x1000>;
+ mtd-mac-address = <&uboot 0x1fc00>;
+ 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/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v10-16m.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v10-16m.dts
new file mode 100644
Expand Down
40 changes: 32 additions & 8 deletions targets/ath79-generic
Original file line number Diff line number Diff line change
Expand Up @@ -514,42 +514,66 @@ device('tp-link-tl-wr810n-v1', 'tplink_tl-wr810n-v1')

device('tp-link-tl-wr841n-nd-mod-ath79-8m-v8', 'tplink_tl-wr841-v8-8m', {
factory = false,
manifest_aliases = {'tp-link-tl-wr841n-nd-mod-8m-v8', 'tp-link-tl-wr841n-nd-mod-8m-ath79-v8'},
manifest_aliases = {
'tp-link-tl-wr841n-nd-mod-8m-v8',
'tp-link-tl-wr841n-nd-mod-8m-ath79-v8',
},
})

device('tp-link-tl-wr841n-nd-mod-ath79-16m-v8', 'tplink_tl-wr841-v8-16m', {
factory = false,
manifest_aliases = {'tp-link-tl-wr841n-nd-mod-8m-v8', 'tp-link-tl-wr841n-nd-mod-16m-ath79-v8'},
manifest_aliases = {
'tp-link-tl-wr841n-nd-mod-16m-v8',
'tp-link-tl-wr841n-nd-mod-16m-ath79-v8',
},
})

device('tp-link-tl-wr841n-nd-mod-ath79-8m-v9', 'tplink_tl-wr841-v9-8m', {
factory = false,
manifest_aliases = {'tp-link-tl-wr841n-nd-mod-8m-v9', 'tp-link-tl-wr841n-nd-mod-8m-ath79-v9'},
manifest_aliases = {
'tp-link-tl-wr841n-nd-mod-8m-v9',
'tp-link-tl-wr841n-nd-mod-8m-ath79-v9',
},
})

device('tp-link-tl-wr841n-nd-mod-ath79-16m-v9', 'tplink_tl-wr841-v9-16m', {
factory = false,
manifest_aliases = {'tp-link-tl-wr841n-nd-mod-8m-v9', 'tp-link-tl-wr841n-nd-mod-16m-ath79-v9'},
manifest_aliases = {
'tp-link-tl-wr841n-nd-mod-16m-v9',
'tp-link-tl-wr841n-nd-mod-16m-ath79-v9',
},
})

device('tp-link-tl-wr841n-nd-mod-ath79-8m-v10', 'tplink_tl-wr841-v10-8m', {
factory = false,
manifest_aliases = {'tp-link-tl-wr841n-nd-mod-16m-v10', 'tp-link-tl-wr841n-nd-mod-8m-ath79-v10'},
manifest_aliases = {
'tp-link-tl-wr841n-nd-mod-8m-v10',
'tp-link-tl-wr841n-nd-mod-8m-ath79-v10',
},
})

device('tp-link-tl-wr841n-nd-mod-ath79-16m-v10', 'tplink_tl-wr841-v10-16m', {
factory = false,
manifest_aliases = {'tp-link-tl-wr841n-nd-mod-16m-v10', 'tp-link-tl-wr841n-nd-mod-16m-ath79-v10'},
manifest_aliases = {
'tp-link-tl-wr841n-nd-mod-16m-v10',
'tp-link-tl-wr841n-nd-mod-16m-ath79-v10',
},
})

device('tp-link-tl-wr841n-nd-mod-ath79-8m-v11', 'tplink_tl-wr841-v11-8m', {
factory = false,
manifest_aliases = {'tp-link-tl-wr841n-nd-mod-16m-v11', 'tp-link-tl-wr841n-nd-mod-8m-ath79-v11'},
manifest_aliases = {
'tp-link-tl-wr841n-nd-mod-8m-v11',
'tp-link-tl-wr841n-nd-mod-8m-ath79-v11',
},
})

device('tp-link-tl-wr841n-nd-mod-ath79-16m-v11', 'tplink_tl-wr841-v11-16m', {
factory = false,
manifest_aliases = {'tp-link-tl-wr841n-nd-mod-16m-v11', 'tp-link-tl-wr841n-nd-mod-16m-ath79-v11'},
manifest_aliases = {
'tp-link-tl-wr841n-nd-mod-16m-v11',
'tp-link-tl-wr841n-nd-mod-16m-ath79-v11',
},
})

device('tp-link-tl-wr842n-v3', 'tplink_tl-wr842n-v3', {
Expand Down

0 comments on commit 7771b6d

Please sign in to comment.