convert mtd-mac-address to nvmem implementation

Paul Blazejowski paulb at blazebox.homeip.net
Sun Jul 25 09:27:58 PDT 2021


With Ansuel's help i have successfully tested the TP-Link Archer C6v2 
(EU version) using the mtd-mac-address to nvmem changes below, since 
they are missing in: ath79/dts/qca9563_tplink_archer-x6-v2.dtsi file
(https://github.com/openwrt/openwrt/pull/4041#issuecomment-882092102)


diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts 
b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts
index 892e87ebaf..ae525ff480 100644
--- a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts
@@ -125,3 +125,13 @@
         };
     };
  };
+
+&info {
+   compatible = "nvmem-cells";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   macaddr_info_8: macaddr at 8 {
+       reg = <0x8 0x6>;
+   };
+};
diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts 
b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts
index c64402bcfe..469b437585 100644
--- a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts
@@ -119,3 +119,13 @@
         };
     };
  };
+
+&info {
+   compatible = "nvmem-cells";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   macaddr_info_8: macaddr at 8 {
+       reg = <0x8 0x6>;
+   };
+};
diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi 
b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi
index 1a074e63a6..9e00113c1d 100644
--- a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi
+++ b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi
@@ -38,12 +38,14 @@
     phy-mode = "sgmii";
     phy-handle = <&phy0>;

-   mtd-mac-address = <&info 0x8>;
+   nvmem-cells = <&macaddr_info_8>;
+   nvmem-cell-names = "mac-address";
  };

  &wmac {
     status = "okay";

     mtd-cal-data = <&art 0x1000>;
-   mtd-mac-address = <&info 0x8>;
+   nvmem-cells = <&macaddr_info_8>;
+   nvmem-cell-names = "mac-address";
  };


 > Mon Jul 19 07:41:12 PDT 2021
 > The dts has been migrated with a script and we decided to remove the
 > dtsi that caused some compilation problem.
 > We still need to take a decision for the device that have dtsi that
 > declare mtd-mac-address using partition tag declared in user dts
 > (dtsi use partition declared in the dts)



More information about the openwrt-devel mailing list