ath79: convert ath10k calibration data to NVMEM (binary MAC)

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>
This commit is contained in:
Shiji Yang 2024-02-01 19:39:51 +08:00 committed by Christian Marangi
parent d07cec6b2b
commit 2f1c62e5af
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
38 changed files with 543 additions and 122 deletions

View File

@ -72,6 +72,8 @@
wifi@0,0 { wifi@0,0 {
compatible = "qcom,ath10k"; compatible = "qcom,ath10k";
reg = <0 0 0 0 0>; reg = <0 0 0 0 0>;
nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 1>;
nvmem-cell-names = "calibration", "mac-address";
}; };
}; };
@ -123,6 +125,10 @@
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>; #nvmem-cell-cells = <1>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };

View File

@ -57,6 +57,13 @@
&pcie0 { &pcie0 {
status = "okay"; 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 { &usb0 {
@ -106,6 +113,10 @@
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>; #nvmem-cell-cells = <1>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };

View File

@ -148,6 +148,16 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
}; };
@ -181,6 +191,8 @@
wifi@0,0 { wifi@0,0 {
compatible = "pci168c,003c"; compatible = "pci168c,003c";
reg = <0x0000 0 0 0 0>; reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>, <&macaddr_romfile_f100 2>;
nvmem-cell-names = "calibration", "mac-address";
}; };
}; };

View File

@ -149,6 +149,16 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
}; };
@ -181,6 +191,8 @@
wifi@0,0 { wifi@0,0 {
compatible = "pci168c,0050"; compatible = "pci168c,0050";
reg = <0x0000 0 0 0 0>; reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
nvmem-cell-names = "calibration", "mac-address";
}; };
}; };

View File

@ -70,6 +70,10 @@
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>; #nvmem-cell-cells = <1>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };
@ -107,4 +111,11 @@
&pcie0 { &pcie0 {
status = "okay"; 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";
};
}; };

View File

@ -76,6 +76,10 @@
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>; #nvmem-cell-cells = <1>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };
@ -124,4 +128,11 @@
&pcie0 { &pcie0 {
status = "okay"; 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";
};
}; };

View File

@ -94,6 +94,10 @@
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>; #nvmem-cell-cells = <1>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };
@ -108,4 +112,11 @@
&pcie0 { &pcie0 {
status = "okay"; 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";
};
}; };

View File

@ -59,6 +59,22 @@
label = "art"; label = "art";
reg = <0xff0000 0x010000>; reg = <0xff0000 0x010000>;
read-only; 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>;
};
};
}; };
}; };
@ -94,18 +110,11 @@
&pcie0 { &pcie0 {
status = "okay"; status = "okay";
};
&art { wifi@0,0 {
nvmem-layout { compatible = "qcom,ath10k";
compatible = "fixed-layout"; reg = <0x0000 0 0 0 0>;
#address-cells = <1>; nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 2>;
#size-cells = <1>; nvmem-cell-names = "calibration", "mac-address";
macaddr_art_0: macaddr@0 {
compatible = "mac-base";
reg = <0x0 0x6>;
#nvmem-cell-cells = <1>;
};
}; };
}; };

View File

@ -102,6 +102,10 @@
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>; #nvmem-cell-cells = <1>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
@ -136,6 +140,13 @@
&pcie0 { &pcie0 {
status = "okay"; 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 { &wdt {

View File

@ -38,6 +38,13 @@
&pcie0 { &pcie0 {
status = "okay"; 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 { &spi {
@ -80,6 +87,10 @@
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>; #nvmem-cell-cells = <1>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };

View File

@ -68,6 +68,8 @@
wifi@0,0 { wifi@0,0 {
compatible = "qcom,ath10k"; compatible = "qcom,ath10k";
reg = <0 0 0 0 0>; reg = <0 0 0 0 0>;
nvmem-cells = <&cal_art_5000>, <&macaddr_art_12>;
nvmem-cell-names = "calibration", "mac-address";
}; };
}; };
@ -137,6 +139,14 @@
macaddr_art_c: macaddr@c { macaddr_art_c: macaddr@c {
reg = <0xc 0x6>; reg = <0xc 0x6>;
}; };
macaddr_art_12: macaddr@12 {
reg = <0x12 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };

View File

@ -57,6 +57,13 @@
&pcie0 { &pcie0 {
status = "okay"; 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 { &spi {
@ -119,6 +126,14 @@
macaddr_art_6: macaddr@6 { macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>; reg = <0x6 0x6>;
}; };
macaddr_art_c: macaddr@c {
reg = <0xc 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };

View File

@ -28,6 +28,13 @@
&pcie1 { &pcie1 {
status = "okay"; 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 { &spi {
@ -91,9 +98,17 @@
reg = <0x6 0x6>; reg = <0x6 0x6>;
}; };
macaddr_art_c: macaddr@c {
reg = <0xc 0x6>;
};
macaddr_art_12: macaddr@12 { macaddr_art_12: macaddr@12 {
reg = <0x12 0x6>; reg = <0x12 0x6>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };

View File

@ -126,6 +126,10 @@
macaddr_art_6: macaddr@6 { macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>; reg = <0x6 0x6>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };
@ -193,4 +197,11 @@
&pcie0 { &pcie0 {
status = "okay"; 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";
};
}; };

View File

@ -130,6 +130,10 @@
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>; #nvmem-cell-cells = <1>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };
@ -173,4 +177,11 @@
&pcie0 { &pcie0 {
status = "okay"; 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";
};
}; };

View File

@ -16,6 +16,8 @@
}; };
&pcie0 { &pcie0 {
/delete-node/ wifi@0,0;
wifi@0,0 { wifi@0,0 {
compatible = "pci168c,0033"; compatible = "pci168c,0033";
reg = <0x0000 0 0 0 0>; reg = <0x0000 0 0 0 0>;

View File

@ -16,6 +16,8 @@
}; };
&pcie0 { &pcie0 {
/delete-node/ wifi@0,0;
wifi@0,0 { wifi@0,0 {
compatible = "pci168c,0033"; compatible = "pci168c,0033";
reg = <0x0000 0 0 0 0>; reg = <0x0000 0 0 0 0>;

View File

@ -145,6 +145,10 @@
macaddr_art_6: macaddr@6 { macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>; reg = <0x6 0x6>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };
@ -212,4 +216,11 @@
&pcie1 { &pcie1 {
status = "okay"; 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";
};
}; };

View File

@ -113,6 +113,13 @@
&pcie0 { &pcie0 {
status = "okay"; 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 { &spi {
@ -175,6 +182,10 @@
macaddr_art_6: macaddr@6 { macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>; reg = <0x6 0x6>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };

View File

@ -57,6 +57,16 @@
label = "art"; label = "art";
reg = <0xff0000 0x010000>; reg = <0xff0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
@ -70,6 +80,15 @@
nvmem-cell-names = "mac-address"; 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 { &wmac {
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;

View File

@ -11,6 +11,15 @@
}; };
}; };
&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 { &spi {
status = "okay"; status = "okay";
@ -76,6 +85,16 @@
label = "art"; label = "art";
reg = <0xff0000 0x010000>; reg = <0xff0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
}; };

View File

@ -11,6 +11,15 @@
}; };
}; };
&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 { &spi {
status = "okay"; status = "okay";
@ -70,6 +79,16 @@
label = "art"; label = "art";
reg = <0xff0000 0x010000>; reg = <0xff0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
}; };

View File

@ -99,7 +99,7 @@
phy-handle = <&phy4>; phy-handle = <&phy4>;
pll-data = <0x9e000000 0x80000101 0x80001313>; pll-data = <0x9e000000 0x80000101 0x80001313>;
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
gmac-config { gmac-config {
@ -115,6 +115,13 @@
&pcie0 { &pcie0 {
status = "okay"; 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 { &spi {
@ -159,7 +166,9 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_info_8: macaddr@8 { macaddr_info_8: macaddr@8 {
compatible = "mac-base";
reg = <0x8 0x6>; reg = <0x8 0x6>;
#nvmem-cell-cells = <1>;
}; };
}; };
}; };
@ -174,6 +183,16 @@
label = "art"; label = "art";
reg = <0xff0000 0x010000>; reg = <0xff0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
}; };
@ -183,6 +202,6 @@
status = "okay"; status = "okay";
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };

View File

@ -98,6 +98,13 @@
&pcie0 { &pcie0 {
status = "okay"; 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 { &spi {
@ -159,6 +166,16 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
}; };

View File

@ -57,6 +57,16 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
@ -70,6 +80,15 @@
nvmem-cell-names = "mac-address"; 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 { &wmac {
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;

View File

@ -115,6 +115,10 @@
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>; #nvmem-cell-cells = <1>;
}; };
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
}; };
}; };
}; };
@ -134,4 +138,11 @@
&pcie0 { &pcie0 {
status = "okay"; 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";
};
}; };

View File

@ -170,6 +170,16 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
}; };
@ -177,6 +187,13 @@
&pcie { &pcie {
status = "okay"; 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 { &eth0 {

View File

@ -102,7 +102,13 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_art_0: macaddr@0 { macaddr_art_0: macaddr@0 {
compatible = "mac-base";
reg = <0x0 0x6>; reg = <0x0 0x6>;
#nvmem-cell-cells = <1>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
}; };
}; };
}; };
@ -133,7 +139,7 @@
status = "okay"; status = "okay";
phy-handle = <&phy0>; phy-handle = <&phy0>;
nvmem-cells = <&macaddr_art_0>; nvmem-cells = <&macaddr_art_0 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };
@ -161,6 +167,13 @@
&pcie { &pcie {
status = "okay"; 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 { &usb0 {

View File

@ -50,7 +50,9 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_info_8: macaddr@8 { macaddr_info_8: macaddr@8 {
compatible = "mac-base";
reg = <0x8 0x6>; reg = <0x8 0x6>;
#nvmem-cell-cells = <1>;
}; };
}; };
}; };
@ -71,17 +73,36 @@
label = "art"; label = "art";
reg = <0xff0000 0x010000>; reg = <0xff0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
&eth0 { &eth0 {
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; 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 { &wmac {
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };

View File

@ -134,7 +134,9 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_info_8: macaddr@8 { macaddr_info_8: macaddr@8 {
compatible = "mac-base";
reg = <0x8 0x6>; reg = <0x8 0x6>;
#nvmem-cell-cells = <1>;
}; };
}; };
}; };
@ -143,6 +145,16 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
}; };
@ -165,12 +177,19 @@
&pcie { &pcie {
status = "okay"; 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 { &eth0 {
status = "okay"; status = "okay";
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
phy-mode = "sgmii"; phy-mode = "sgmii";
phy-handle = <&phy0>; phy-handle = <&phy0>;
@ -180,6 +199,6 @@
status = "okay"; status = "okay";
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };

View File

@ -145,6 +145,13 @@
&pcie { &pcie {
status = "okay"; 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 { &usb_phy0 {
@ -205,7 +212,9 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_info_8: macaddr@8 { macaddr_info_8: macaddr@8 {
compatible = "mac-base";
reg = <0x8 0x6>; reg = <0x8 0x6>;
#nvmem-cell-cells = <1>;
}; };
}; };
}; };
@ -214,6 +223,16 @@
label = "art"; label = "art";
reg = <0xff0000 0x010000>; reg = <0xff0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
}; };
@ -241,7 +260,7 @@
pll-data = <0x03000101 0x00000101 0x00001919>; pll-data = <0x03000101 0x00000101 0x00001919>;
phy-mode = "sgmii"; phy-mode = "sgmii";
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
phy-handle = <&phy0>; phy-handle = <&phy0>;
}; };
@ -250,6 +269,6 @@
status = "okay"; status = "okay";
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };

View File

@ -43,6 +43,16 @@
label = "art"; label = "art";
reg = <0x050000 0x010000>; reg = <0x050000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
info: partition@60000 { info: partition@60000 {
@ -56,7 +66,9 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_info_8: macaddr@8 { macaddr_info_8: macaddr@8 {
compatible = "mac-base";
reg = <0x8 0x6>; reg = <0x8 0x6>;
#nvmem-cell-cells = <1>;
}; };
}; };
}; };
@ -81,13 +93,24 @@
}; };
&eth0 { &eth0 {
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; 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 { &wmac {
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };

View File

@ -41,7 +41,9 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_info_8: macaddr@8 { macaddr_info_8: macaddr@8 {
compatible = "mac-base";
reg = <0x8 0x6>; reg = <0x8 0x6>;
#nvmem-cell-cells = <1>;
}; };
}; };
}; };
@ -56,17 +58,36 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
&eth0 { &eth0 {
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; 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 { &wmac {
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };

View File

@ -29,7 +29,9 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_info_8: macaddr@8 { macaddr_info_8: macaddr@8 {
compatible = "mac-base";
reg = <0x8 0x6>; reg = <0x8 0x6>;
#nvmem-cell-cells = <1>;
}; };
}; };
}; };
@ -62,17 +64,36 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
&eth0 { &eth0 {
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; 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 { &wmac {
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };

View File

@ -29,7 +29,9 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_info_8: macaddr@8 { macaddr_info_8: macaddr@8 {
compatible = "mac-base";
reg = <0x8 0x6>; reg = <0x8 0x6>;
#nvmem-cell-cells = <1>;
}; };
}; };
}; };
@ -62,17 +64,36 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
&eth0 { &eth0 {
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; 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 { &wmac {
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_info_8>; nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };

View File

@ -23,7 +23,9 @@
#size-cells = <1>; #size-cells = <1>;
macaddr_uboot_fc00: macaddr@fc00 { macaddr_uboot_fc00: macaddr@fc00 {
compatible = "mac-base";
reg = <0xfc00 0x6>; reg = <0xfc00 0x6>;
#nvmem-cell-cells = <1>;
}; };
}; };
}; };
@ -44,17 +46,36 @@
label = "art"; label = "art";
reg = <0x7f0000 0x010000>; reg = <0x7f0000 0x010000>;
read-only; read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
}; };
}; };
&eth0 { &eth0 {
nvmem-cells = <&macaddr_uboot_fc00>; nvmem-cells = <&macaddr_uboot_fc00 0>;
nvmem-cell-names = "mac-address"; 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 { &wmac {
mtd-cal-data = <&art 0x1000>; mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_uboot_fc00>; nvmem-cells = <&macaddr_uboot_fc00 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };

View File

@ -9,25 +9,6 @@ board=$(board_name)
case "$FIRMWARE" in case "$FIRMWARE" in
"ath10k/cal-pci-0000:00:00.0.bin") "ath10k/cal-pci-0000:00:00.0.bin")
case $board in 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,ecb1200|\
engenius,ecb1750) engenius,ecb1750)
caldata_extract "art" 0x5000 0x844 caldata_extract "art" 0x5000 0x844
@ -41,10 +22,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844 caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR0) 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-ac1167dgr|\
iodata,wn-ac1600dgr2|\ iodata,wn-ac1600dgr2|\
sitecom,wlr-7100|\ sitecom,wlr-7100|\
@ -56,73 +33,14 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844 caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(mtd_get_mac_text board_data 0x880) 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) qihoo,c301)
caldata_extract "radiocfg" 0x5000 0x844 caldata_extract "radiocfg" 0x5000 0x844
ath10k_patch_mac $(mtd_get_mac_ascii devdata wlan5mac) 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 esac
;; ;;
"ath10k/cal-pci-0000:01:00.0.bin") "ath10k/cal-pci-0000:01:00.0.bin")
case $board in 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) sitecom,wlr-8100)
caldata_extract "art" 0x5000 0x844 caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1) ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)

View File

@ -9,15 +9,6 @@ board=$(board_name)
case "$FIRMWARE" in case "$FIRMWARE" in
"ath10k/cal-pci-0000:00:00.0.bin") "ath10k/cal-pci-0000:00:00.0.bin")
case $board in 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,emg2926-q10a|\
zyxel,nbg6716) zyxel,nbg6716)
caldata_extract "art" 0x5000 0x844 caldata_extract "art" 0x5000 0x844