ramips: fix WAN mac address allocation for Unielec 01 and 06 models
authorDavid Bentham <db260179@gmail.com>
Mon, 17 Oct 2022 14:43:29 +0000 (15:43 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 22 Oct 2022 23:45:52 +0000 (01:45 +0200)
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>
target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts
target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts
target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts

index 6e75d1b9309f9f189e7df32d3cea5f1b363cf35b..8780b17b80b8f0ad7399bebd1e965347f95c59f5 100644 (file)
@@ -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>;
+       };
 };
index d7dd4ccd46169b2056eda48c4b08fdac2e3321da..212c0009425f044f82268f1d7d5398b14cb461f8 100644 (file)
@@ -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>;
+       };
 };
index 669340f194c3288ca8be49025f14a68a6337dd6f..f196432111b6886a18efe95094e52986243f41d8 100644 (file)
@@ -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>;
+       };
 };