ath79: convert ath10k calibration data to NVMEM (binary MAC)
authorShiji Yang <yangshiji66@qq.com>
Thu, 1 Feb 2024 11:39:51 +0000 (19:39 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Thu, 1 Feb 2024 16:09:02 +0000 (17:09 +0100)
This patch converts ath10k calibration data to NVMEM format for
wave 1 devices with mtd binary MAC address. The "calibration"
NVMEM cell size is 0x844. The MAC addresses are assigned via dts.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
38 files changed:
target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
target/linux/ath79/dts/qca9531_glinet_gl-x750.dts
target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
target/linux/ath79/dts/qca9557_araknis_an-500-ap-i-ac.dts
target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts
target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
target/linux/ath79/dts/qca9558_araknis_an-700-ap-i-ac.dts
target/linux/ath79/dts/qca9558_comfast_cf-e380ac-v2.dts
target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi
target/linux/ath79/dts/qca9558_domywifi_dw33d.dts
target/linux/ath79/dts/qca9558_ocedo_koala.dts
target/linux/ath79/dts/qca9558_ocedo_ursus.dts
target/linux/ath79/dts/qca9558_openmesh_a60.dtsi
target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts
target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts
target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts
target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts
target/linux/ath79/dts/qca9558_tplink_archer-c5-v1.dts
target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts
target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts
target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts
target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
target/linux/ath79/dts/qca9558_tplink_tl-wdr7500-v3.dts
target/linux/ath79/dts/qca9558_watchguard_ap300.dts
target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts
target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts
target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts
target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts
target/linux/ath79/dts/qca9563_tplink_archer-c7-v5.dts
target/linux/ath79/dts/qca9563_tplink_re450-v2.dts
target/linux/ath79/dts/qca9563_tplink_re450-v3.dts
target/linux/ath79/dts/qca9563_tplink_re455-v1.dts
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata

index b81485f4653c11612b6deacc8f40b0f364d66e5f..e5d7cd04c1ace6b349526c87260ec67935c342c3 100644 (file)
@@ -72,6 +72,8 @@
        wifi@0,0 {
                compatible = "qcom,ath10k";
                reg = <0 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 1>;
+               nvmem-cell-names = "calibration", "mac-address";
        };
 };
 
                                                reg = <0x0 0x6>;
                                                #nvmem-cell-cells = <1>;
                                        };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
 
index 3f1ad22a764a4163b9234089a591c7c5e4bf6f4f..0ed3f805c7e289c376f922725aa74c8dd29697ed 100644 (file)
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 2>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &usb0 {
                                                reg = <0x0 0x6>;
                                                #nvmem-cell-cells = <1>;
                                        };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
 
index fb594f78c06d7170a02ee2a34b2fdc0b81e37985..37353ce1005d486bec9c963579f57d45880e0650 100644 (file)
                                label = "art";
                                reg = <0x7f0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "pci168c,003c";
                reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_romfile_f100 2>;
+               nvmem-cell-names = "calibration", "mac-address";
        };
 };
 
index 048099e2604d63dbae1faa61c0895e3063dbb19f..a31694effdc3129ab49bbaecc61190d56a51b409 100644 (file)
                                label = "art";
                                reg = <0x7f0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "pci168c,0050";
                reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
+               nvmem-cell-names = "calibration", "mac-address";
        };
 };
 
index 6d402df13f922b3e7fed93269ef92fb030929da6..941d87657fc854bee1ec2dc23f3a888a5f1d4d89 100644 (file)
                                reg = <0x0 0x6>;
                                #nvmem-cell-cells = <1>;
                        };
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
                };
        };
 };
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 2>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
index 154744afd51767286f6630a2b1a2690db39ff0b3..b9338f55db002da844d6e05c0dd8bf69a9e5bd18 100644 (file)
                                reg = <0x0 0x6>;
                                #nvmem-cell-cells = <1>;
                        };
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
                };
        };
 };
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 2>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
index a6197fd25ae3d4ee0a1cbc3b20b18ad013eb2a9f..9001e3fb866dbefc23cae32e81af845591b222ad 100644 (file)
                                reg = <0x0 0x6>;
                                #nvmem-cell-cells = <1>;
                        };
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
                };
        };
 };
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 2>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
index 81a9e6ca086357e7f34dfe273acc9cd42ce5996d..778710eb9192cbf61ffdf8cd2e2d519ccfc78c7a 100644 (file)
                label = "art";
                reg = <0xff0000 0x010000>;
                read-only;
+
+               nvmem-layout {
+                       compatible = "fixed-layout";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       macaddr_art_0: macaddr@0 {
+                               compatible = "mac-base";
+                               reg = <0x0 0x6>;
+                               #nvmem-cell-cells = <1>;
+                       };
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
+               };
        };
 };
 
 
 &pcie0 {
        status = "okay";
-};
-
-&art {
-       nvmem-layout {
-               compatible = "fixed-layout";
-               #address-cells = <1>;
-               #size-cells = <1>;
 
-               macaddr_art_0: macaddr@0 {
-                       compatible = "mac-base";
-                       reg = <0x0 0x6>;
-                       #nvmem-cell-cells = <1>;
-               };
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 2>;
+               nvmem-cell-names = "calibration", "mac-address";
        };
 };
index 8ce173f70dd0f40f14855cbb2c662336b2b3d65a..281559ac128dd777f93e8f50146742229c60aba7 100644 (file)
                                                reg = <0x0 0x6>;
                                                #nvmem-cell-cells = <1>;
                                        };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
 
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 2>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &wdt {
index 9a2579dd941b3a2b851ff3a8f68bf3f06732d92c..9fea2589701460079b56c49e3f1b8fb46251dfff 100644 (file)
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 (-1)>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &spi {
                                                reg = <0x0 0x6>;
                                                #nvmem-cell-cells = <1>;
                                        };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
 
index 73f4ed0d1e1dd0c36ad6822c538cebb590bc67c5..de44aec47d7b3223ddf8d2dca4c7112d5f25f109 100644 (file)
@@ -68,6 +68,8 @@
        wifi@0,0 {
                compatible = "qcom,ath10k";
                reg = <0 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_12>;
+               nvmem-cell-names = "calibration", "mac-address";
        };
 };
 
                                        macaddr_art_c: macaddr@c {
                                                reg = <0xc 0x6>;
                                        };
+
+                                       macaddr_art_12: macaddr@12 {
+                                               reg = <0x12 0x6>;
+                                       };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
                };
index 76305b2ecef2f564b585869e02ef0fe0cf760abf..ad5a378e9320890c45cd2b48bd077b9206ddee8a 100644 (file)
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_c>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &spi {
                                        macaddr_art_6: macaddr@6 {
                                                reg = <0x6 0x6>;
                                        };
+
+                                       macaddr_art_c: macaddr@c {
+                                               reg = <0xc 0x6>;
+                                       };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
                };
index d2125c38ba302e5d696e54c243034c508aef96bf..8ddeccefb73383613f078d38da500ef702ed6f9a 100644 (file)
 
 &pcie1 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_c>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &spi {
                                                reg = <0x6 0x6>;
                                        };
 
+                                       macaddr_art_c: macaddr@c {
+                                               reg = <0xc 0x6>;
+                                       };
+
                                        macaddr_art_12: macaddr@12 {
                                                reg = <0x12 0x6>;
                                        };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
                };
index 32a176b542e483a7e9ac2771f39570047c2f507f..cfceb9e6981474bd72472417b5526790b782d68f 100644 (file)
                                        macaddr_art_6: macaddr@6 {
                                                reg = <0x6 0x6>;
                                        };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
                };
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
index 218d5eb944d51b570f66b0fa4b2bf400b41c37e2..3bb793db7fd42e6aae6bed799a175cd956b8e52b 100644 (file)
                                                reg = <0x0 0x6>;
                                                #nvmem-cell-cells = <1>;
                                        };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
                };
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
index 8ef3241ee0dcc93a0c122d4171a474d15b809c25..e10e364219dcc748769f6f30e57e0cf5d36f3b7d 100644 (file)
@@ -16,6 +16,8 @@
 };
 
 &pcie0 {
+       /delete-node/ wifi@0,0;
+
        wifi@0,0 {
                compatible = "pci168c,0033";
                reg = <0x0000 0 0 0 0>;
index cd3baacd1584044ea45f8a55ff0b4c495a92d392..3198ad2aa90b93c93e3b7a23eaf0ce359adc7866 100644 (file)
@@ -16,6 +16,8 @@
 };
 
 &pcie0 {
+       /delete-node/ wifi@0,0;
+
        wifi@0,0 {
                compatible = "pci168c,0033";
                reg = <0x0000 0 0 0 0>;
index ee4b82ee8d9de4746d9bbb36c8fd4bd8ec382322..d8b6b5d98f8a54d725433bc29866017321aa5630 100644 (file)
                                        macaddr_art_6: macaddr@6 {
                                                reg = <0x6 0x6>;
                                        };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
                };
 
 &pcie1 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
index d448ca4284500b71fd5de78ed4fa216f7818e2ac..0d9053e43f2a0587a576ea81eeddb4582a94f786 100644 (file)
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &spi {
                                        macaddr_art_6: macaddr@6 {
                                                reg = <0x6 0x6>;
                                        };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
                                };
                        };
                };
index d41b065c27e049ec12e4e2f707b41c43359de7bf..584a66ba524b18027debe46c03dd74bf4fbb4132 100644 (file)
                label = "art";
                reg = <0xff0000 0x010000>;
                read-only;
+
+               nvmem-layout {
+                       compatible = "fixed-layout";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
+               };
        };
 };
 
        nvmem-cell-names = "mac-address";
 };
 
+&pcie1 {
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_uboot_1fc00 (-1)>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &wmac {
        mtd-cal-data = <&art 0x1000>;
 
index 5869ee16e39ca25365390e55848a0bf63574604c..20cefe0b793c20d7f425f19bf2bb3a493400dd08 100644 (file)
        };
 };
 
+&pcie1 {
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_romfs_f100 2>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &spi {
        status = "okay";
 
                                label = "art";
                                reg = <0xff0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
index 7094077bc6f1844a0c1a5c4dc0942bd07835c2c2..3418601c41e126c37ac1695e816c812def1f5ece 100644 (file)
        };
 };
 
+&pcie1 {
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_romfs_f100 2>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &spi {
        status = "okay";
 
                                label = "art";
                                reg = <0xff0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
index 7c48326d576fb9887db26f1378be356f368d1181..5205426f8e69c42c7d569c69fafa225b981dbe79 100644 (file)
@@ -99,7 +99,7 @@
        phy-handle = <&phy4>;
        pll-data = <0x9e000000 0x80000101 0x80001313>;
 
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 
        gmac-config {
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 2>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &spi {
                                        #size-cells = <1>;
 
                                        macaddr_info_8: macaddr@8 {
+                                               compatible = "mac-base";
                                                reg = <0x8 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
                                label = "art";
                                reg = <0xff0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
        status = "okay";
 
        mtd-cal-data = <&art 0x1000>;
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
index f90ebfea15573867128952bcc1451cf3a40ba4c0..e8ab6ff5125d51d75f392829351b32129d2e52d0 100644 (file)
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-2)>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &spi {
                                label = "art";
                                reg = <0x7f0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
index 99a4273ad0db4a526ca46026bcabab794498bad9..33697d3b836e7d596a893b6e8b3acca0d60206c9 100644 (file)
                label = "art";
                reg = <0x7f0000 0x010000>;
                read-only;
+
+               nvmem-layout {
+                       compatible = "fixed-layout";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
+               };
        };
 };
 
        nvmem-cell-names = "mac-address";
 };
 
+&pcie1 {
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_uboot_1fc00 (-1)>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &wmac {
        mtd-cal-data = <&art 0x1000>;
 
index 5f5ef0f968719e368218c2cfcbb0a67e4c15c1e7..68cd2777198591d08180247d138f63f7a0d2e5c9 100644 (file)
                                reg = <0x0 0x6>;
                                #nvmem-cell-cells = <1>;
                        };
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
                };
        };
 };
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 2>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
index 6179e621bf74f2162d7eff8be353b7388c526cbf..3e87bebd1468279a177cc322df4b3f4e9e867cf7 100644 (file)
                                label = "art";
                                reg = <0x7f0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
 
 &pcie {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &eth0 {
index 09d2f48c2aa7ed8993afc8502ff326bef3689dcf..da9e7ee867e4899eac4e8179da4a8d4263445dd4 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_art_0: macaddr@0 {
+                                               compatible = "mac-base";
                                                reg = <0x0 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
                                        };
                                };
                        };
        status = "okay";
 
        phy-handle = <&phy0>;
-       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cells = <&macaddr_art_0 0>;
        nvmem-cell-names = "mac-address";
 };
 
 
 &pcie {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 1>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &usb0 {
index 339891f6da07eab6cb59015b870b3d9d9dcc00be..50996e06c7c31099bd81c45567fb3b57cbc7cc32 100644 (file)
@@ -50,7 +50,9 @@
                        #size-cells = <1>;
 
                        macaddr_info_8: macaddr@8 {
+                               compatible = "mac-base";
                                reg = <0x8 0x6>;
+                               #nvmem-cell-cells = <1>;
                        };
                };
        };
                label = "art";
                reg = <0xff0000 0x010000>;
                read-only;
+
+               nvmem-layout {
+                       compatible = "fixed-layout";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
+               };
        };
 };
 
 &eth0 {
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
+&pcie {
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &wmac {
        mtd-cal-data = <&art 0x1000>;
 
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
index 9925666f826911d3224448af8a621473eedd75ab..57db3cfa9aca3436b9cb9e5af6c4988a235db817 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_info_8: macaddr@8 {
+                                               compatible = "mac-base";
                                                reg = <0x8 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
                                label = "art";
                                reg = <0x7f0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
 
 &pcie {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &eth0 {
        status = "okay";
 
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
        phy-mode = "sgmii";
        phy-handle = <&phy0>;
        status = "okay";
 
        mtd-cal-data = <&art 0x1000>;
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
index ae6061c4cef4f7e3dc7fd95b9f9860217ba69589..929e8dc1bbcfbd0b2c041b963d68dfd332aea1e3 100644 (file)
 
 &pcie {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
 };
 
 &usb_phy0 {
                                        #size-cells = <1>;
 
                                        macaddr_info_8: macaddr@8 {
+                                               compatible = "mac-base";
                                                reg = <0x8 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
                                label = "art";
                                reg = <0xff0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x844>;
+                                       };
+                               };
                        };
                };
        };
        pll-data = <0x03000101 0x00000101 0x00001919>;
 
        phy-mode = "sgmii";
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
        phy-handle = <&phy0>;
 };
        status = "okay";
 
        mtd-cal-data = <&art 0x1000>;
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
index 32b75cad7b4a97de2946a1c0d5e10d6b45af642c..d37fc14b11332ceb1ee4cbf1cc175452050aee61 100644 (file)
                label = "art";
                reg = <0x050000 0x010000>;
                read-only;
+
+               nvmem-layout {
+                       compatible = "fixed-layout";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
+               };
        };
 
        info: partition@60000 {
@@ -56,7 +66,9 @@
                        #size-cells = <1>;
 
                        macaddr_info_8: macaddr@8 {
+                               compatible = "mac-base";
                                reg = <0x8 0x6>;
+                               #nvmem-cell-cells = <1>;
                        };
                };
        };
 };
 
 &eth0 {
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
+&pcie {
+       status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &wmac {
        mtd-cal-data = <&art 0x1000>;
 
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
index 5eb1eafaf41c4a22352b1a92e300cda8a1360227..25a7b8229b56cfaba1e7b2abba6fb9066e61000d 100644 (file)
@@ -41,7 +41,9 @@
                        #size-cells = <1>;
 
                        macaddr_info_8: macaddr@8 {
+                               compatible = "mac-base";
                                reg = <0x8 0x6>;
+                               #nvmem-cell-cells = <1>;
                        };
                };
        };
                label = "art";
                reg = <0x7f0000 0x010000>;
                read-only;
+
+               nvmem-layout {
+                       compatible = "fixed-layout";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
+               };
        };
 };
 
 &eth0 {
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
+&pcie {
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 1>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &wmac {
        mtd-cal-data = <&art 0x1000>;
 
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
index fdd982ae2e2447263a0958e6b732412fc29a626a..2572901def8bcb7293e8b7498cd9b8d4fb07abdf 100644 (file)
@@ -29,7 +29,9 @@
                        #size-cells = <1>;
 
                        macaddr_info_8: macaddr@8 {
+                               compatible = "mac-base";
                                reg = <0x8 0x6>;
+                               #nvmem-cell-cells = <1>;
                        };
                };
        };
                label = "art";
                reg = <0x7f0000 0x010000>;
                read-only;
+
+               nvmem-layout {
+                       compatible = "fixed-layout";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
+               };
        };
 };
 
 &eth0 {
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
+&pcie {
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 1>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &wmac {
        mtd-cal-data = <&art 0x1000>;
 
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
index a976f4fa5a2bf643c253a8d5db8916131c5fc6cf..7caa356861008dfee407213fd99694e03acba81e 100644 (file)
@@ -29,7 +29,9 @@
                        #size-cells = <1>;
 
                        macaddr_info_8: macaddr@8 {
+                               compatible = "mac-base";
                                reg = <0x8 0x6>;
+                               #nvmem-cell-cells = <1>;
                        };
                };
        };
                label = "art";
                reg = <0x7f0000 0x010000>;
                read-only;
+
+               nvmem-layout {
+                       compatible = "fixed-layout";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
+               };
        };
 };
 
 &eth0 {
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
+&pcie {
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 1>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &wmac {
        mtd-cal-data = <&art 0x1000>;
 
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
index 8c6c91f10702287c441b017586d9bbadfd515305..a44caa0b6b0189432b792498eeedabce70eb83c3 100644 (file)
@@ -23,7 +23,9 @@
                        #size-cells = <1>;
 
                        macaddr_uboot_fc00: macaddr@fc00 {
+                               compatible = "mac-base";
                                reg = <0xfc00 0x6>;
+                               #nvmem-cell-cells = <1>;
                        };
                };
        };
                label = "art";
                reg = <0x7f0000 0x010000>;
                read-only;
+
+               nvmem-layout {
+                       compatible = "fixed-layout";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       cal_art_5000: calibration@5000 {
+                               reg = <0x5000 0x844>;
+                       };
+               };
        };
 };
 
 &eth0 {
-       nvmem-cells = <&macaddr_uboot_fc00>;
+       nvmem-cells = <&macaddr_uboot_fc00 0>;
        nvmem-cell-names = "mac-address";
 };
 
+&pcie {
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&cal_art_5000>, <&macaddr_uboot_fc00 1>;
+               nvmem-cell-names = "calibration", "mac-address";
+       };
+};
+
 &wmac {
        mtd-cal-data = <&art 0x1000>;
 
-       nvmem-cells = <&macaddr_uboot_fc00>;
+       nvmem-cells = <&macaddr_uboot_fc00 0>;
        nvmem-cell-names = "mac-address";
 };
index cc7458ae598f9d2030ad8492f1f6d47c73c8e91b..02cc293a6e831e7dc3452f651ffd7cbf3017f2e7 100644 (file)
@@ -9,25 +9,6 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath10k/cal-pci-0000:00:00.0.bin")
        case $board in
-       allnet,all-wap02860ac|\
-       araknis,an-500-ap-i-ac|\
-       araknis,an-700-ap-i-ac|\
-       comfast,cf-e380ac-v2|\
-       engenius,enstationac-v1|\
-       glinet,gl-x750|\
-       watchguard,ap300)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 2)
-               ;;
-       devolo,dvl1200e|\
-       devolo,dvl1200i|\
-       devolo,dvl1750c|\
-       devolo,dvl1750e|\
-       devolo,dvl1750i|\
-       devolo,dvl1750x)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) -1)
-               ;;
        engenius,ecb1200|\
        engenius,ecb1750)
                caldata_extract "art" 0x5000 0x844
@@ -41,10 +22,6 @@ case "$FIRMWARE" in
                caldata_extract "art" 0x5000 0x844
                ath10k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR0)
                ;;
-       glinet,gl-ar750)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 1)
-               ;;
        iodata,wn-ac1167dgr|\
        iodata,wn-ac1600dgr2|\
        sitecom,wlr-7100|\
@@ -56,73 +33,14 @@ case "$FIRMWARE" in
                caldata_extract "art" 0x5000 0x844
                ath10k_patch_mac $(mtd_get_mac_text board_data 0x880)
                ;;
-       ocedo,koala|\
-       ocedo,ursus)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(mtd_get_mac_binary art 0xc)
-               ;;
-       openmesh,a40|\
-       openmesh,a60|\
-       openmesh,mr1750-v1|\
-       openmesh,mr1750-v2|\
-       openmesh,om5p-ac-v2)
-               caldata_extract "ART" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) 16)
-               ;;
        qihoo,c301)
                caldata_extract "radiocfg" 0x5000 0x844
                ath10k_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
                ;;
-       tplink,archer-a7-v5|\
-       tplink,archer-c2-v3|\
-       tplink,archer-c7-v4|\
-       tplink,archer-c7-v5|\
-       tplink,archer-c25-v1|\
-       tplink,tl-wr902ac-v1)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) -1)
-               ;;
-       tplink,archer-c5-v1|\
-       tplink,tl-wdr7500-v3)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x1fc00) -1)
-               ;;
-       tplink,archer-d50-v1)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary romfile 0xf100) 2)
-               ;;
-       tplink,archer-d7-v1|\
-       tplink,archer-d7b-v1)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary romfs 0xf100) 2)
-               ;;
-       tplink,re350k-v1)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 2)
-               ;;
-       tplink,re355-v1|\
-       tplink,re450-v1)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2)
-               ;;
-       tplink,re450-v2|\
-       tplink,re450-v3|\
-       tplink,re455-v1)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1)
-               ;;
-       tplink,tl-wpa8630-v1)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x0fc00) 1)
-               ;;
        esac
        ;;
 "ath10k/cal-pci-0000:01:00.0.bin")
        case $board in
-       openmesh,om5p-ac-v1)
-               caldata_extract "ART" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
-               ;;
        sitecom,wlr-8100)
                caldata_extract "art" 0x5000 0x844
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
index d26625981ee3a823f524a8316eda9e783197ad0e..c85a134b58b3001be9b9b42b9455959715f076cb 100644 (file)
@@ -9,15 +9,6 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath10k/cal-pci-0000:00:00.0.bin")
        case $board in
-       domywifi,dw33d)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(mtd_get_mac_binary art 0x12)
-               ;;
-       glinet,gl-ar750s-nor|\
-       glinet,gl-ar750s-nor-nand)
-               caldata_extract "art" 0x5000 0x844
-               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 1)
-               ;;
        zyxel,emg2926-q10a|\
        zyxel,nbg6716)
                caldata_extract "art" 0x5000 0x844