[openwrt/openwrt] mediatek: fix OpenWrt One MACs

LEDE Commits lede-commits at lists.infradead.org
Tue Sep 10 08:28:16 PDT 2024


blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f5c42670d278001eaa73fbc36b5ebc1105a996a3

commit f5c42670d278001eaa73fbc36b5ebc1105a996a3
Author: John Crispin <john at phrozen.org>
AuthorDate: Sat Aug 31 18:56:59 2024 +0200

    mediatek: fix OpenWrt One MACs
    
    * Ignore the MACs passed by the bootloader.
    * fix nvmem-cell-cells warning
    * fix the node names
    * add dbdc wifi MACs
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 target/linux/mediatek/dts/mt7981b-openwrt-one.dts | 28 +++++++++++++++++------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
index b2223f8d76..2193c782b5 100644
--- a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
+++ b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
@@ -8,8 +8,6 @@
 	compatible = "openwrt,one", "mediatek,mt7981";
 
 	aliases {
-		ethernet0 = &gmac0;
-		ethernet1 = &gmac1;
 		serial0 = &uart0;
 		led-boot = &led_status_white;
 		led-failsafe = &led_status_red;
@@ -140,7 +138,7 @@
 		phy-handle = <&phy15>;
 		phy-mode = "2500base-x";
 		nvmem-cell-names = "mac-address";
-		nvmem-cells = <&macaddr_factory_4>;
+		nvmem-cells = <&macaddr_factory_24>;
 	};
 
 	gmac1: mac at 1 {
@@ -149,7 +147,7 @@
 		phy-mode = "gmii";
 		phy-handle = <&int_gbe_phy>;
 		nvmem-cell-names = "mac-address";
-		nvmem-cells = <&macaddr_factory_a>;
+		nvmem-cells = <&macaddr_factory_2a>;
 	};
 };
 
@@ -388,15 +386,19 @@
 					};
 
 					macaddr_factory_4: macaddr at 4 {
+						reg = <0x4 0x6>;
 						compatible = "mac-base";
-						reg = <0x24 0x6>;
 						#nvmem-cell-cells = <1>;
 					};
 
-					macaddr_factory_a: macaddr at a {
+					macaddr_factory_24: macaddr at 24 {
+						reg = <0x24 0x6>;
 						compatible = "mac-base";
+					};
+
+					macaddr_factory_2a: macaddr at 2a {
 						reg = <0x2a 0x6>;
-						#nvmem-cell-cells = <1>;
+						compatible = "mac-base";
 					};
 				};
 			};
@@ -444,6 +446,18 @@
 	nvmem-cells = <&eeprom_factory_0>;
 	nvmem-cell-names = "eeprom";
 	status = "okay";
+
+	band at 0 {
+		reg = <0>;
+		nvmem-cells = <&macaddr_factory_4 0>;
+		nvmem-cell-names = "mac-address";
+	};
+
+	band at 1 {
+		reg = <1>;
+		nvmem-cells = <&macaddr_factory_4 1>;
+		nvmem-cell-names = "mac-address";
+	};
 };
 
 &pcie {




More information about the lede-commits mailing list