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
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
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>;
};

View File

@ -19,47 +19,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 2)
;;
asus,pl-ac56|\
asus,rp-ac66|\
comfast,cf-wr650ac-v1|\
comfast,cf-wr650ac-v2|\
devolo,dlan-pro-1200plus-ac|\
devolo,magic-2-wifi|\
joyit,jt-or750i|\
qxwlan,e1700ac-v2-8m|\
qxwlan,e1700ac-v2-16m|\
qxwlan,e600gac-v2-8m|\
qxwlan,e600gac-v2-16m|\
sophos,ap15|\
sophos,ap55|\
sophos,ap55c|\
sophos,ap100|\
sophos,ap100c|\
ubnt,bullet-ac|\
ubnt,uk-ultra|\
ubnt,unifiac-lite|\
ubnt,unifiac-lr|\
ubnt,unifiac-mesh|\
ubnt,unifiac-mesh-pro|\
ubnt,lap-120|\
ubnt,litebeam-ac-gen2|\
ubnt,nanobeam-ac|\
ubnt,nanobeam-ac-gen2|\
ubnt,nanobeam-ac-xc|\
ubnt,nanostation-ac|\
ubnt,nanostation-ac-loco|\
ubnt,powerbeam-5ac-500|\
ubnt,powerbeam-5ac-gen2|\
ubnt,rocket-5ac-lite|\
ubnt,unifiac-pro|\
yuncore,a770|\
yuncore,xd3200)
caldata_extract "art" 0x5000 0x844
;;
avm,fritz1750e|\
avm,fritzdvbc)
caldata_extract "urlader" 0x198a 0x844
;;
devolo,dvl1200e|\
devolo,dvl1200i|\
devolo,dvl1750c|\