Skip to content

Commit

Permalink
ath79: convert ath10k pre-calibration data to NVMEM (built-in MAC)
Browse files Browse the repository at this point in the history
This patch converts ath10k pre-calibration data to NVMEM format for
wave 2 devices with built-in MAC address. The "pre-calibration"
NVMEM cell size is 0x2f20.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
  • Loading branch information
DragonBluep authored and pull[bot] committed Feb 27, 2024
1 parent 2ae020d commit 819e482
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 12 deletions.
11 changes: 11 additions & 0 deletions target/linux/ath79/dts/qca9531_asus_rp-ac51.dts
Expand Up @@ -65,6 +65,13 @@

&pcie0 {
status = "okay";

wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&precal_art_5000>;
nvmem-cell-names = "pre-calibration";
};
};

&spi {
Expand Down Expand Up @@ -109,6 +116,10 @@
macaddr_art_1002: macaddr@1002 {
reg = <0x1002 0x6>;
};

precal_art_5000: pre-calibration@5000 {
reg = <0x5000 0x2f20>;
};
};
};

Expand Down
11 changes: 11 additions & 0 deletions target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
Expand Up @@ -118,6 +118,10 @@
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};

precal_art_5000: pre-calibration@5000 {
reg = <0x5000 0x2f20>;
};
};
};

Expand Down Expand Up @@ -183,4 +187,11 @@

&pcie {
status = "okay";

wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&precal_art_5000>;
nvmem-cell-names = "pre-calibration";
};
};
7 changes: 7 additions & 0 deletions target/linux/ath79/dts/qca9563_yuncore_xd3200.dts
Expand Up @@ -30,3 +30,10 @@
};
};
};

&pcie {
wifi@0,0 {
/delete-property/ nvmem-cells;
/delete-property/ nvmem-cell-names;
};
};
6 changes: 6 additions & 0 deletions target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi
Expand Up @@ -57,6 +57,8 @@
wifi@0,0 {
compatible = "pci168c,0056";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&precal_art_5000>;
nvmem-cell-names = "pre-calibration";
};
};

Expand Down Expand Up @@ -103,6 +105,10 @@
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};

precal_art_5000: pre-calibration@5000 {
reg = <0x5000 0x2f20>;
};
};
};
};
Expand Down
Expand Up @@ -173,13 +173,6 @@ case "$FIRMWARE" in
;;
"ath10k/pre-cal-pci-0000:00:00.0.bin")
case $board in
asus,rp-ac51|\
yuncore,a782|\
yuncore,xd4200)
caldata_extract "art" 0x5000 0x2f20
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
comfast,cf-e313ac)
caldata_extract "art" 0x5000 0x2f20
ath10k_patch_mac $(mtd_get_mac_binary art 0x6)
Expand Down Expand Up @@ -237,11 +230,6 @@ case "$FIRMWARE" in
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
xiaomi,aiot-ac2350)
caldata_extract "art" 0x5000 0x2f20
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9984/hw1.0/board.bin
;;
tplink,deco-m4r-v1)
caldata_extract "art" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary config 0x8) -1)
Expand Down

0 comments on commit 819e482

Please sign in to comment.