mediatek: convert mtd-mac-address to nvmem for MT7629 RFB
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 20 Aug 2021 12:42:56 +0000 (14:42 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 20 Aug 2021 16:13:55 +0000 (18:13 +0200)
This conversion appears to have been overlooked since it's in a
kernel patch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/mediatek/patches-5.10/101-dts-update-mt7629-rfb.patch
target/linux/mediatek/patches-5.10/130-dts-mt7629-add-snand-support.patch
target/linux/mediatek/patches-5.10/603-ARM-dts-mediatek-Update-mt7629-PCIe-node.patch
target/linux/mediatek/patches-5.4/0005-dts-mt7629-add-gsw.patch
target/linux/mediatek/patches-5.4/0010-dts-mt7629-rfb-fix-firmware-partition.patch
target/linux/mediatek/patches-5.4/0307-dts-mt7629-add-snand-support.patch
target/linux/mediatek/patches-5.4/0994-ARM-dts-mediatek-Update-mt7629-PCIe-node.patch

index 8d3e2833158c8fd8ca2d3aacbaf3621656353506..254b5f9eb72f003dabb447c928a6e7c33bae4608 100644 (file)
@@ -8,23 +8,28 @@
        };
  
        gpio-keys {
-@@ -69,6 +70,7 @@
-       gmac0: mac@0 {
+@@ -70,6 +71,10 @@
                compatible = "mediatek,eth-mac";
                reg = <0>;
-+              mtd-mac-address = <&factory 0x2a>;
                phy-mode = "2500base-x";
++
++              nvmem-cells = <&macaddr_factory_2a>;
++              nvmem-cell-names = "mac-address";
++
                fixed-link {
                        speed = <2500>;
-@@ -80,6 +82,7 @@
-       gmac1: mac@1 {
-               compatible = "mediatek,eth-mac";
+                       full-duplex;
+@@ -82,6 +87,9 @@
                reg = <1>;
-+              mtd-mac-address = <&factory 0x24>;
                phy-mode = "gmii";
                phy-handle = <&phy0>;
++
++              nvmem-cells = <&macaddr_factory_24>;
++              nvmem-cell-names = "mac-address";
        };
-@@ -133,8 +136,9 @@
+       mdio: mdio-bus {
+@@ -133,8 +141,9 @@
                        };
  
                        partition@b0000 {
                        };
                };
        };
+@@ -272,3 +281,17 @@
+       pinctrl-0 = <&watchdog_pins>;
+       status = "okay";
+ };
++
++&factory {
++      compatible = "nvmem-cells";
++      #address-cells = <1>;
++      #size-cells = <1>;
++
++      macaddr_factory_24: macaddr@24 {
++              reg = <0x24 0x6>;
++      };
++
++      macaddr_factory_2a: macaddr@2a {
++              reg = <0x2a 0x6>;
++      };
++};
index 479694b4002579a9959b76c93da6a909c3a2be6b..8febc65d1b0ba68f565ab386f046e61db920d149 100644 (file)
@@ -42,7 +42,7 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
                                     "mediatek,mt7622-spi";
 --- a/arch/arm/boot/dts/mt7629-rfb.dts
 +++ b/arch/arm/boot/dts/mt7629-rfb.dts
-@@ -249,6 +249,52 @@
+@@ -254,6 +254,52 @@
        };
  };
  
index 799cc31ab78930c31e9c2de2a841704323639ab4..252ef080f59fc05386db4f148b09b5ff65c5dc19 100644 (file)
@@ -135,7 +135,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
 
 --- a/arch/arm/boot/dts/mt7629-rfb.dts
 +++ b/arch/arm/boot/dts/mt7629-rfb.dts
-@@ -144,9 +144,10 @@
+@@ -149,9 +149,10 @@
        };
  };
  
index 773a69f0522b3aa2064d964ebf6d25fdbf6ff9cf..4028bad4dfa08db861296b020e1ea78bd171dccb 100644 (file)
        memory@40000000 {
                device_type = "memory";
                reg = <0x40000000 0x10000000>;
-@@ -69,6 +77,7 @@
-       gmac0: mac@0 {
+@@ -70,6 +78,10 @@
                compatible = "mediatek,eth-mac";
                reg = <0>;
-+              mtd-mac-address = <&factory 0x2a>;
                phy-mode = "2500base-x";
++
++              nvmem-cells = <&macaddr_factory_2a>;
++              nvmem-cell-names = "mac-address";
++
                fixed-link {
                        speed = <2500>;
-@@ -80,6 +89,7 @@
-       gmac1: mac@1 {
-               compatible = "mediatek,eth-mac";
+                       full-duplex;
+@@ -82,6 +94,9 @@
                reg = <1>;
-+              mtd-mac-address = <&factory 0x24>;
                phy-mode = "gmii";
                phy-handle = <&phy0>;
++
++              nvmem-cells = <&macaddr_factory_24>;
++              nvmem-cell-names = "mac-address";
        };
-@@ -93,6 +103,26 @@
-               };
+       mdio: mdio-bus {
+@@ -94,6 +109,26 @@
        };
  };
-+
 +&gsw {
 +      mediatek,mdio = <&mdio>;
 +      mediatek,portmap = "llllw";
 +              };
 +      };
 +};
++
  &i2c {
        pinctrl-names = "default";
+       pinctrl-0 = <&i2c_pins>;
+@@ -272,3 +307,17 @@
+       pinctrl-0 = <&watchdog_pins>;
+       status = "okay";
+ };
++
++&factory {
++      compatible = "nvmem-cells";
++      #address-cells = <1>;
++      #size-cells = <1>;
++
++      macaddr_factory_24: macaddr@24 {
++              reg = <0x24 0x6>;
++      };
++
++      macaddr_factory_2a: macaddr@2a {
++              reg = <0x2a 0x6>;
++      };
++};
index 5d0a19ed4cbf1f12a515fe416d1a14c09b4fa065..2c48e5706fc41a4d659a25e44c00f0ada80d6fc0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/arm/boot/dts/mt7629-rfb.dts
 +++ b/arch/arm/boot/dts/mt7629-rfb.dts
-@@ -163,8 +163,9 @@
+@@ -168,8 +168,9 @@
                        };
  
                        partition@b0000 {
index 753c1117b90b398dbba331c53da7955c28faae1b..233face4c5f8d84077eee6d2090e648d62d2a42c 100644 (file)
@@ -42,7 +42,7 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
                                     "mediatek,mt7622-spi";
 --- a/arch/arm/boot/dts/mt7629-rfb.dts
 +++ b/arch/arm/boot/dts/mt7629-rfb.dts
-@@ -276,6 +276,52 @@
+@@ -281,6 +281,52 @@
        };
  };
  
index b20e1fce6cf6324a571bd2a84e04a2a53053d9d2..f166aa75de2179201ebc252f16df08ddccabd143 100644 (file)
@@ -135,7 +135,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
 
 --- a/arch/arm/boot/dts/mt7629-rfb.dts
 +++ b/arch/arm/boot/dts/mt7629-rfb.dts
-@@ -171,9 +171,10 @@
+@@ -176,9 +176,10 @@
        };
  };