aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Bentham <db260179@gmail.com>2022-10-17 15:43:29 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2022-10-23 01:45:52 +0200
commit67660d36674c8c1504cbf3cd199409d0b209f802 (patch)
tree104a51d23fd85be992438b7bed02b7aef487c675
parentac296f621058119501ccd54e7cb2a243af5dc5a0 (diff)
downloadupstream-67660d36674c8c1504cbf3cd199409d0b209f802.tar.gz
upstream-67660d36674c8c1504cbf3cd199409d0b209f802.tar.bz2
upstream-67660d36674c8c1504cbf3cd199409d0b209f802.zip
ramips: fix WAN mac address allocation for Unielec 01 and 06 models
Manufacturer has predetermined mac address values for lan and wan ports. This change keeps inline with other mt7621 devices mac address allocation from factory mtd partition. Example from hexdump output: 0xe000 0x6 (lan) - 0xe006 0x6 (wan) 0000e000 70 b3 d5 10 02 96 70 b3 d5 10 02 95 ff ff ff ff Previous change had created an overlapping mac address situation as it would increment by one based on the lan mac address location found in the factory partition, which would sometimes increment to the same as the mt7603 wifi chip. Tested on Unielec u7621-01 model Signed-off-by: David Bentham <db260179@gmail.com>
-rw-r--r--target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts7
-rw-r--r--target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts7
-rw-r--r--target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts7
3 files changed, 15 insertions, 6 deletions
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts
index 6e75d1b930..8780b17b80 100644
--- a/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts
@@ -53,9 +53,8 @@
};
&gmac1 {
- nvmem-cells = <&macaddr_factory_e000>;
+ nvmem-cells = <&macaddr_factory_e006>;
nvmem-cell-names = "mac-address";
- mac-address-increment = <1>;
};
&factory {
@@ -66,4 +65,8 @@
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
+
+ macaddr_factory_e006: macaddr@e006 {
+ reg = <0xe006 0x6>;
+ };
};
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts
index d7dd4ccd46..212c000942 100644
--- a/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts
@@ -58,9 +58,8 @@
};
&gmac1 {
- nvmem-cells = <&macaddr_factory_e000>;
+ nvmem-cells = <&macaddr_factory_e006>;
nvmem-cell-names = "mac-address";
- mac-address-increment = <1>;
};
&factory {
@@ -71,4 +70,8 @@
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
+
+ macaddr_factory_e006: macaddr@e006 {
+ reg = <0xe006 0x6>;
+ };
};
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts
index 669340f194..f196432111 100644
--- a/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts
@@ -59,9 +59,8 @@
};
&gmac1 {
- nvmem-cells = <&macaddr_factory_e000>;
+ nvmem-cells = <&macaddr_factory_e006>;
nvmem-cell-names = "mac-address";
- mac-address-increment = <1>;
};
&factory {
@@ -72,4 +71,8 @@
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
+
+ macaddr_factory_e006: macaddr@e006 {
+ reg = <0xe006 0x6>;
+ };
};