mediatek: fix OpenWrt One MACs
authorJohn Crispin <john@phrozen.org>
Sat, 31 Aug 2024 16:56:59 +0000 (18:56 +0200)
committerJohn Crispin <john@phrozen.org>
Tue, 10 Sep 2024 15:23:04 +0000 (17:23 +0200)
* 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@phrozen.org>
target/linux/mediatek/dts/mt7981b-openwrt-one.dts

index b2223f8d765b9494a78c016fcf6a6ce16e63f2cd..2193c782b5ff7805cc69c4eea681524ba8b68d6c 100644 (file)
@@ -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;
                phy-handle = <&phy15>;
                phy-mode = "2500base-x";
                nvmem-cell-names = "mac-address";
-               nvmem-cells = <&macaddr_factory_4>;
+               nvmem-cells = <&macaddr_factory_24>;
        };
 
        gmac1: mac@1 {
                phy-mode = "gmii";
                phy-handle = <&int_gbe_phy>;
                nvmem-cell-names = "mac-address";
-               nvmem-cells = <&macaddr_factory_a>;
+               nvmem-cells = <&macaddr_factory_2a>;
        };
 };
 
                                        };
 
                                        macaddr_factory_4: macaddr@4 {
+                                               reg = <0x4 0x6>;
                                                compatible = "mac-base";
-                                               reg = <0x24 0x6>;
                                                #nvmem-cell-cells = <1>;
                                        };
 
-                                       macaddr_factory_a: macaddr@a {
+                                       macaddr_factory_24: macaddr@24 {
+                                               reg = <0x24 0x6>;
                                                compatible = "mac-base";
+                                       };
+
+                                       macaddr_factory_2a: macaddr@2a {
                                                reg = <0x2a 0x6>;
-                                               #nvmem-cell-cells = <1>;
+                                               compatible = "mac-base";
                                        };
                                };
                        };
        nvmem-cells = <&eeprom_factory_0>;
        nvmem-cell-names = "eeprom";
        status = "okay";
+
+       band@0 {
+               reg = <0>;
+               nvmem-cells = <&macaddr_factory_4 0>;
+               nvmem-cell-names = "mac-address";
+       };
+
+       band@1 {
+               reg = <1>;
+               nvmem-cells = <&macaddr_factory_4 1>;
+               nvmem-cell-names = "mac-address";
+       };
 };
 
 &pcie {