From 348e0ee157637a7b6da61d56638f9e843645d673 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Thu, 1 Feb 2024 19:39:51 +0800 Subject: [PATCH] ath79: convert ath10k pre-calibration data to NVMEM (binary MAC) This patch converts ath10k pre-calibration data to NVMEM format for wave 2 devices with mtd binary MAC address. The "pre-calibration" NVMEM cell size is 0x2f20. The MAC addresses are assigned via dts. Signed-off-by: Shiji Yang --- .../ath79/dts/qca9531_comfast_cf-e313ac.dts | 10 +++++ .../ath79/dts/qca9531_comfast_cf-e560ac.dts | 11 +++++ .../ath79/dts/qca9531_comfast_cf-ew72.dts | 11 +++++ .../dts/qca9531_comfast_cf-wr752ac-v1.dts | 11 +++++ .../dts/qca9561_tplink_archer-c58-v1.dts | 19 +++++++++ .../dts/qca9561_tplink_archer-c59-v1.dts | 19 +++++++++ .../dts/qca9561_tplink_archer-c59-v2.dts | 19 +++++++++ .../dts/qca9561_tplink_archer-c60-v1.dts | 19 +++++++++ .../dts/qca9561_tplink_archer-c60-v2.dts | 19 +++++++++ .../dts/qca9561_tplink_archer-c60-v3.dts | 19 +++++++++ .../ath79/dts/qca9563_comfast_cf-e375ac.dts | 11 +++++ .../dts/qca9563_tplink_archer-c6-v2-us.dts | 25 ++++++++++- .../ath79/dts/qca9563_tplink_archer-c6-v2.dts | 25 ++++++++++- .../ath79/dts/qca9563_tplink_cpe710-v1.dts | 17 ++++++++ .../ath79/dts/qca9563_tplink_deco-m4r-v1.dts | 23 ++++++++++- .../ath79/dts/qca9563_tplink_tl-wa1201-v2.dts | 23 ++++++++++- .../dts/qca9563_tplink_tl-wpa8630p-v2-int.dts | 25 ++++++++++- .../qca9563_tplink_tl-wpa8630p-v2.0-eu.dts | 25 ++++++++++- .../qca9563_tplink_tl-wpa8630p-v2.1-eu.dts | 25 ++++++++++- .../etc/hotplug.d/firmware/11-ath10k-caldata | 41 ------------------- .../etc/hotplug.d/firmware/11-ath10k-caldata | 25 ----------- 21 files changed, 342 insertions(+), 80 deletions(-) delete mode 100644 target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/11-ath10k-caldata diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts index d078a9dcce5b..40aa19a66f00 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts @@ -103,9 +103,17 @@ reg = <0x0 0x6>; }; + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; + macaddr_art_1002: macaddr@1002 { reg = <0x1002 0x6>; }; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; }; }; @@ -155,5 +163,7 @@ wifi@0,0 { compatible = "qcom,ath10k"; reg = <0 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_art_6>; + nvmem-cell-names = "pre-calibration", "mac-address"; }; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts index a316c48c5b48..b68ef442df85 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts @@ -114,6 +114,10 @@ reg = <0x0 0x6>; #nvmem-cell-cells = <1>; }; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; }; }; @@ -140,6 +144,13 @@ &pcie0 { status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_art_0 2>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; }; &usb_phy { diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts index f725ab1faa29..88a3eccb2b3c 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts @@ -62,6 +62,13 @@ &pcie0 { status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_art_0 2>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; }; &spi { @@ -98,6 +105,10 @@ reg = <0x0 0x6>; #nvmem-cell-cells = <1>; }; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; }; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts index ba33ee9a9230..6fcda9fbe357 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts @@ -62,6 +62,13 @@ &pcie0 { status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_art_0 2>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; }; &spi { @@ -98,6 +105,10 @@ reg = <0x0 0x6>; #nvmem-cell-cells = <1>; }; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts index a09e1fae6f4a..95af75178403 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts @@ -11,6 +11,15 @@ }; }; +&pcie { + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; +}; + &spi { status = "okay"; @@ -64,6 +73,16 @@ label = "art"; reg = <0x7f0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts index 720a2b01a9c8..397e81d17b39 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts @@ -28,6 +28,15 @@ status = "okay"; }; +&pcie { + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; +}; + &spi { status = "okay"; @@ -81,6 +90,16 @@ label = "art"; reg = <0xff0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts index be6e6ade1c7e..8a93d2b3b14c 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts @@ -28,6 +28,15 @@ status = "okay"; }; +&pcie { + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; +}; + &spi { status = "okay"; @@ -87,6 +96,16 @@ label = "art"; reg = <0xff0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts index eff85d6a5861..9e437b6f00f6 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts @@ -23,6 +23,15 @@ }; }; +&pcie { + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; +}; + &spi { status = "okay"; @@ -76,6 +85,16 @@ label = "art"; reg = <0x7f0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts index 18053d691c8e..e71fc9eb7abe 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts @@ -23,6 +23,15 @@ }; }; +&pcie { + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; +}; + &spi { status = "okay"; @@ -82,6 +91,16 @@ label = "art"; reg = <0x7f0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts index 068f95775918..d84ba25db4ab 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts @@ -18,6 +18,15 @@ }; }; +&pcie { + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; +}; + &spi { status = "okay"; @@ -77,6 +86,16 @@ label = "art"; reg = <0x7f0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; diff --git a/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts index 2f0a0992a9d4..15b8b819581e 100644 --- a/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts +++ b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts @@ -59,6 +59,13 @@ &pcie { status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_art_0 2>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; }; &spi { @@ -95,6 +102,10 @@ reg = <0x0 0x6>; #nvmem-cell-cells = <1>; }; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts index 6857054f1cbb..61c52943de0a 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts @@ -76,6 +76,15 @@ }; }; +&pcie { + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; +}; + &spi { status = "okay"; @@ -106,7 +115,9 @@ #size-cells = <1>; macaddr_info_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -133,19 +144,29 @@ label = "art"; reg = <0xff0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; }; ð0 { - nvmem-cells = <&macaddr_info_8>; + nvmem-cells = <&macaddr_info_8 0>; nvmem-cell-names = "mac-address"; }; &wmac { mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_info_8>; + nvmem-cells = <&macaddr_info_8 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts index e7d19c9fbd30..4a69d29b3157 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts @@ -76,6 +76,15 @@ }; }; +&pcie { + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; +}; + &spi { status = "okay"; @@ -106,7 +115,9 @@ #size-cells = <1>; macaddr_info_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -127,19 +138,29 @@ label = "art"; reg = <0x7f0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; }; ð0 { - nvmem-cells = <&macaddr_info_8>; + nvmem-cells = <&macaddr_info_8 0>; nvmem-cell-names = "mac-address"; }; &wmac { mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_info_8>; + nvmem-cells = <&macaddr_info_8 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts index 491ffac1326a..5439adaacb62 100644 --- a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts @@ -45,6 +45,13 @@ &pcie { status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; }; &spi { @@ -109,6 +116,16 @@ label = "art"; reg = <0xff0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_deco-m4r-v1.dts b/target/linux/ath79/dts/qca9563_tplink_deco-m4r-v1.dts index 63f42eba7600..989a21b1f191 100644 --- a/target/linux/ath79/dts/qca9563_tplink_deco-m4r-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_deco-m4r-v1.dts @@ -53,6 +53,13 @@ &pcie { status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_config_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; }; &mdio0 { @@ -113,7 +120,9 @@ #size-cells = <1>; macaddr_config_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -122,6 +131,16 @@ label = "art"; reg = <0xff0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; @@ -133,7 +152,7 @@ phy-mode = "sgmii"; phy-handle = <&phy0>; - nvmem-cells = <&macaddr_config_8>; + nvmem-cells = <&macaddr_config_8 0>; nvmem-cell-names = "mac-address"; }; @@ -141,6 +160,6 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_config_8>; + nvmem-cells = <&macaddr_config_8 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wa1201-v2.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wa1201-v2.dts index cf13fcd6b7ff..0629a639550c 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wa1201-v2.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wa1201-v2.dts @@ -83,6 +83,13 @@ &pcie { status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 (-1)>; + nvmem-cell-names = "pre-calibration", "mac-address"; + }; }; ð0 { @@ -91,7 +98,7 @@ phy-mode = "sgmii"; phy-handle = <&phy4>; - nvmem-cells = <&macaddr_info_8>; + nvmem-cells = <&macaddr_info_8 0>; nvmem-cell-names = "mac-address"; }; @@ -100,7 +107,7 @@ mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_info_8>; + nvmem-cells = <&macaddr_info_8 0>; nvmem-cell-names = "mac-address"; }; @@ -134,7 +141,9 @@ #size-cells = <1>; macaddr_info_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -155,6 +164,16 @@ label = "art"; reg = <0xff0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts index 8786e309659e..1e62094c12b6 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts @@ -53,7 +53,9 @@ #size-cells = <1>; macaddr_info_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -62,17 +64,36 @@ label = "art"; reg = <0x7f0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; ð0 { - 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 = <&precal_art_5000>, <&macaddr_info_8 1>; + nvmem-cell-names = "pre-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"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.0-eu.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.0-eu.dts index 3c688d67d636..5f834542f2ff 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.0-eu.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.0-eu.dts @@ -47,7 +47,9 @@ #size-cells = <1>; macaddr_info_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -62,17 +64,36 @@ label = "art"; reg = <0x7f0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; }; }; ð0 { - 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 = <&precal_art_5000>, <&macaddr_info_8 1>; + nvmem-cell-names = "pre-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"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts index 786cd3cc039e..7be23423df51 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts @@ -49,7 +49,9 @@ #size-cells = <1>; macaddr_info_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -58,17 +60,36 @@ label = "art"; reg = <0x7f0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + }; + }; +}; + +&pcie { + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&precal_art_5000>, <&macaddr_info_8 1>; + nvmem-cell-names = "pre-calibration", "mac-address"; }; }; ð0 { - nvmem-cells = <&macaddr_info_8>; + nvmem-cells = <&macaddr_info_8 0>; nvmem-cell-names = "mac-address"; }; &wmac { mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_info_8>; + nvmem-cells = <&macaddr_info_8 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 559bcd55a0e1..6145487393c6 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -173,21 +173,6 @@ case "$FIRMWARE" in ;; "ath10k/pre-cal-pci-0000:00:00.0.bin") case $board in - comfast,cf-e313ac) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_binary art 0x6) - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; - comfast,cf-e375ac|\ - comfast,cf-e560ac|\ - comfast,cf-ew72|\ - comfast,cf-wr752ac-v1) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 2) - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; dlink,dir-842-c1|\ dlink,dir-842-c2|\ dlink,dir-842-c3) @@ -210,32 +195,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 ;; - tplink,archer-c58-v1|\ - tplink,archer-c59-v1|\ - tplink,archer-c59-v2|\ - tplink,archer-c60-v1|\ - tplink,archer-c60-v2|\ - tplink,archer-c60-v3|\ - tplink,archer-c6-v2|\ - tplink,archer-c6-v2-us|\ - tplink,tl-wa1201-v2) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) -1) - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; - tplink,cpe710-v1) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_binary info 0x8) - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; - tplink,deco-m4r-v1) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary config 0x8) -1) - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; tplink,deco-s4-v2) caldata_extract "art" 0x5000 0x2f20 base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config)) diff --git a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/11-ath10k-caldata deleted file mode 100644 index 8e3e142ec972..000000000000 --- a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -[ -e /lib/firmware/$FIRMWARE ] && exit 0 - -. /lib/functions/caldata.sh - -board=$(board_name) - -case "$FIRMWARE" in -"ath10k/pre-cal-pci-0000:00:00.0.bin") - case $board in - tplink,tl-wpa8630p-v2-int|\ - tplink,tl-wpa8630p-v2.0-eu|\ - tplink,tl-wpa8630p-v2.1-eu) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1) - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; - esac - ;; -*) - exit 1 - ;; -esac -- 2.30.2