ath79: convert ath10k calibration data to NVMEM (built-in MAC)

This patch converts ath10k calibration data to NVMEM format for
wave 1 devices with built-in MAC address. The "calibration"
NVMEM cell size is 0x844.

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 7e71eef5ed
commit d07cec6b2b
22 changed files with 211 additions and 43 deletions

View File

@@ -27,6 +27,13 @@
&pcie {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
@@ -79,6 +86,10 @@
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};
};

View File

@@ -127,6 +127,10 @@
reg = <0x1002 0x6>;
#nvmem-cell-cells = <1>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};
};
@@ -161,6 +165,8 @@
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};

View File

@@ -107,6 +107,10 @@
macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};
};
@@ -129,6 +133,13 @@
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&wmac {

View File

@@ -23,6 +23,10 @@
};
};
&pcie0 {
/delete-node/ wifi@0,0;
};
&usb_phy {
status = "okay";
};

View File

@@ -23,6 +23,10 @@
};
};
&pcie0 {
/delete-node/ wifi@0,0;
};
&usb_phy {
status = "okay";
};

View File

@@ -48,6 +48,13 @@
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
@@ -90,6 +97,10 @@
reg = <0x400 0x6>;
#nvmem-cell-cells = <1>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};

View File

@@ -101,6 +101,10 @@
macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};
};
@@ -123,6 +127,13 @@
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&wmac {

View File

@@ -34,6 +34,16 @@
label = "urlader";
reg = <0x0 0x20000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_urlader_198a: calibration@198a {
reg = <0x198a 0x844>;
};
};
};
partition@20000 {

View File

@@ -89,6 +89,13 @@
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_urlader_198a>;
nvmem-cell-names = "calibration";
};
};
&phy0 {

View File

@@ -92,6 +92,13 @@
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_urlader_198a>;
nvmem-cell-names = "calibration";
};
};
&gpio {

View File

@@ -7,6 +7,15 @@
model = "Comfast CF-WR650AC v1";
};
&pcie0 {
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
status = "okay";
@@ -47,6 +56,10 @@
macaddr_art_18: macaddr@18 {
reg = <0x18 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};

View File

@@ -7,6 +7,17 @@
model = "Comfast CF-WR650AC v2";
};
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
status = "okay";
@@ -47,6 +58,10 @@
macaddr_art_18: macaddr@18 {
reg = <0x18 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};

View File

@@ -71,6 +71,13 @@
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
@@ -101,6 +108,16 @@
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>;
};
};
};
config: partition@60000 {

View File

@@ -39,6 +39,13 @@
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
@@ -69,6 +76,16 @@
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>;
};
};
};
config: partition@60000 {

View File

@@ -7,6 +7,13 @@
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
@@ -59,6 +66,10 @@
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};
};

View File

@@ -59,6 +59,13 @@
&pcie {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
@@ -99,6 +106,10 @@
macaddr_art_1002: macaddr@1002 {
reg = <0x1002 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};

View File

@@ -81,6 +81,13 @@
&pcie {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
@@ -121,6 +128,10 @@
macaddr_art_1002: macaddr@1002 {
reg = <0x1002 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};

View File

@@ -51,6 +51,13 @@
&pcie {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
@@ -98,6 +105,16 @@
label = "art";
reg = <0x060000 0x010000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};
};
};

View File

@@ -41,6 +41,13 @@
&pcie {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};
&spi {
@@ -99,6 +106,10 @@
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};
};

View File

@@ -33,7 +33,7 @@
&pcie {
wifi@0,0 {
/delete-property/ nvmem-cells;
/delete-property/ nvmem-cell-names;
nvmem-cells = <&cal_art_5000>;
nvmem-cell-names = "calibration";
};
};

View File

@@ -106,6 +106,10 @@
reg = <0x0 0x6>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};
precal_art_5000: pre-calibration@5000 {
reg = <0x5000 0x2f20>;
};