* [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms
@ 2025-11-14 10:22 Manivannan Sadhasivam
2025-11-14 10:22 ` [PATCH 1/2] " Manivannan Sadhasivam
` (2 more replies)
0 siblings, 3 replies; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-14 10:22 UTC (permalink / raw)
To: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-wireless, linux-kernel, ath10k, ath11k, devicetree, ath12k,
Miaoqing Pan, Manivannan Sadhasivam
Hi,
This series aims to deprecate the usage of "qcom,*calibration-variant"
devicetree property to select the calibration variant for the WLAN devices. This
is necessary for WLAN devices connected using PCI bus, as hardcoding the device
specific information in PCI devicetree node causes the node to be updated every
time when a new device variant is attached to the PCI slot. This approach is not
scalable and causes bad user experience.
So to avoid relying on the "qcom,*calibration-variant" property, this series
introduces a new static calibration variant table based lookup. The newly
introduced helper, ath_get_calib_variant() will parse the model name from
devicetree and use it to do the variant lookup during runtime. The
ath_calib_variant_table[] will hold all the model and calibration variant
entries for the supported devices.
Going forward, new entries will be added to this table to support calibration
variants.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
Manivannan Sadhasivam (2):
wifi: ath: Use static calibration variant table for devicetree platforms
dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
.../bindings/net/wireless/qcom,ath10k.yaml | 1 +
.../bindings/net/wireless/qcom,ath11k-pci.yaml | 3 +-
.../bindings/net/wireless/qcom,ath11k.yaml | 1 +
.../bindings/net/wireless/qcom,ath12k-wsi.yaml | 6 +-
.../bindings/net/wireless/qcom,ipq5332-wifi.yaml | 2 +-
drivers/net/wireless/ath/ath.h | 98 ++++++++++++++++++++++
drivers/net/wireless/ath/ath10k/core.c | 5 ++
drivers/net/wireless/ath/ath11k/core.c | 7 ++
8 files changed, 115 insertions(+), 8 deletions(-)
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251114-ath-variant-tbl-22865456a527
Best regards,
--
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 1/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-14 10:22 [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms Manivannan Sadhasivam
@ 2025-11-14 10:22 ` Manivannan Sadhasivam
2025-11-14 10:45 ` Krzysztof Kozlowski
2025-11-15 9:51 ` kernel test robot
2025-11-14 10:22 ` [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property Manivannan Sadhasivam
2025-11-17 2:36 ` [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms Baochen Qiang
2 siblings, 2 replies; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-14 10:22 UTC (permalink / raw)
To: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-wireless, linux-kernel, ath10k, ath11k, devicetree, ath12k,
Miaoqing Pan, Manivannan Sadhasivam
On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
'qcom,*calibration-variant' property to select the correct calibration data
for device variants with colliding IDs.
But this property based selection has its own downside that it needs to be
added to the devicetree node of the WLAN device, especially for PCI based
devices. Currently, the users/vendors are forced to hardcode this property
in the PCI device node. If a different device need to be attached to the
slot, then the devicetree node also has to be changed. This approach is not
scalable and creates a bad user experience.
To get rid of this requirement, this commit introduces a static calibration
variant table ath_calib_variant_table[], consisting of the platform model
and the calibration variant for all upstream supported devices. The entries
of this table are derived from the upstream DTS files.
The newly introduced helper, ath_get_calib_variant() will parse the model
name from devicetree and use it to do the variant lookup during runtime. If
the platform model name doesn't match, it will fallback to the devicetree
property based lookup.
Going forward, the devicetree based lookup will be deprecated and this
table will be used exclusively for devices connected to the devicetree
based host platforms.
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
drivers/net/wireless/ath/ath.h | 98 ++++++++++++++++++++++++++++++++++
drivers/net/wireless/ath/ath10k/core.c | 5 ++
drivers/net/wireless/ath/ath11k/core.c | 7 +++
3 files changed, 110 insertions(+)
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index 34654f710d8a1e63f65a47d4602e2035262a4d9e..d0a12151b7fc13355161c48ba1fb200e4617ed11 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -21,6 +21,7 @@
#include <linux/skbuff.h>
#include <linux/if_ether.h>
#include <linux/spinlock.h>
+#include <linux/of.h>
#include <net/mac80211.h>
/*
@@ -336,4 +337,101 @@ static inline const char *ath_bus_type_to_string(enum ath_bus_type bustype)
return ath_bus_type_strings[bustype];
}
+static const struct __ath_calib_variant_table {
+ const char *machine;
+ const char *variant;
+} ath_calib_variant_table[] = {
+ { "ALFA Network AP120C-AC", "ALFA-Network-AP120C-AC" },
+ { "8devices Jalapeno", "8devices-Jalapeno" },
+ { "Google cozmo board", "GO_COZMO" },
+ { "Google damu board", "GO_DAMU" },
+ { "Google fennel sku1 board", "GO_FENNEL" },
+ { "Google fennel sku6 board", "GO_FENNEL" },
+ { "Google fennel sku7 board", "GO_FENNEL" },
+ { "Google fennel14 sku2 board", "GO_FENNEL14" },
+ { "Google fennel14 sku0 board", "GO_FENNEL14" },
+ { "Google juniper sku16 board", "GO_JUNIPER" },
+ { "Google makomo sku0 board", "GO_FENNEL14" },
+ { "Google makomo sku1 board", "GO_FENNEL14" },
+ { "MediaTek kakadu board sku22", "GO_KAKADU" },
+ { "MediaTek kakadu board", "GO_KAKADU" },
+ { "Google katsu board", "GO_KATSU" },
+ { "Google katsu sku38 board", "GO_KATSU" },
+ { "MediaTek kodama sku16 board", "GO_KODAMA" },
+ { "MediaTek kodama sku272 board", "GO_KODAMA" },
+ { "MediaTek kodama sku288 board", "GO_KODAMA" },
+ { "MediaTek kodama sku32 board", "GO_KODAMA" },
+ { "MediaTek krane sku0 board", "LE_Krane" },
+ { "MediaTek krane sku176 board", "LE_Krane" },
+ { "Qualcomm Technologies, Inc. Lemans Ride Rev3", "QC_SA8775P_Ride" },
+ { "Qualcomm Technologies, Inc. Lemans Ride", "QC_SA8775P_Ride" },
+ { "Qualcomm SA8775P Ride Rev3", "QC_SA8775P_Ride" },
+ { "Qualcomm SA8775P Ride", "QC_SA8775P_Ride" },
+ { "Lenovo Miix 630", "Lenovo_Miix630" },
+ { "Fairphone 5", "Fairphone_5" },
+ { "Qualcomm Technologies, Inc. QCM6490 IDP", "Qualcomm_qcm6490idp" },
+ { "SHIFT SHIFTphone 8", "SHIFTphone_8" },
+ { "Qualcomm Technologies, Inc. QCS615 Ride", "QC_QCS615_Ride" },
+ { "Qualcomm Technologies, Inc. Robotics RB3gen2", "Qualcomm_rb3gen2" },
+ { "Qualcomm Technologies, Inc. Robotics RB1", "Thundercomm_RB1" },
+ { "Qualcomm Technologies, Inc. QRB4210 RB2", "Thundercomm_RB2" },
+ { "Google Homestar (rev2)", "GO_HOMESTAR" },
+ { "Google Homestar (rev3)", "GO_HOMESTAR" },
+ { "Google Homestar (rev4+)", "GO_HOMESTAR" },
+ { "Google Kingoftown", "GO_KINGOFTOWN" },
+ { "Google Lazor Limozeen without Touchscreen (rev10+)", "GO_LAZOR" },
+ { "Google Lazor Limozeen without Touchscreen (rev5 - rev8)", "GO_LAZOR" },
+ { "Google Lazor Limozeen without Touchscreen (rev9)", "GO_LAZOR" },
+ { "Google Lazor Limozeen (rev10+)", "GO_LAZOR" },
+ { "Google Lazor Limozeen (rev4 - rev8)", "GO_LAZOR" },
+ { "Google Lazor Limozeen (rev9)", "GO_LAZOR" },
+ { "Google Lazor (rev1 - 2)", "GO_LAZOR" },
+ { "Google Lazor (rev10+) with KB Backlight", "GO_LAZOR" },
+ { "Google Lazor (rev10+) with LTE", "GO_LAZOR" },
+ { "Google Lazor (rev10+)", "GO_LAZOR" },
+ { "Google Lazor (rev3 - 8) with KB Backlight", "GO_LAZOR" },
+ { "Google Lazor (rev3 - 8) with LTE", "GO_LAZOR" },
+ { "Google Lazor (rev3 - 8)", "GO_LAZOR" },
+ { "Google Lazor (rev9) with KB Backlight", "GO_LAZOR" },
+ { "Google Lazor (rev9) with LTE", "GO_LAZOR" },
+ { "Google Lazor (rev9)", "GO_LAZOR" },
+ { "Google Pazquel (Parade,LTE)", "GO_PAZQUEL360" },
+ { "Google Pazquel (Parade,WIFI-only)", "GO_PAZQUEL360" },
+ { "Google Pompom (rev1)", "GO_POMPOM" },
+ { "Google Pompom (rev2)", "GO_POMPOM" },
+ { "Google Pompom (rev3+)", "GO_POMPOM" },
+ { "Google Wormdingler rev1+ (BOE, rt5682s)", "GO_WORMDINGLER" },
+ { "Google Wormdingler rev1+ BOE panel board", "GO_WORMDINGLER" },
+ { "Google Wormdingler rev1+ (INX, rt5682s)", "GO_WORMDINGLER" },
+ { "Google Wormdingler rev1+ INX panel board", "GO_WORMDINGLER" },
+ { "Qualcomm SC8280XP CRD", "QC_8280XP_CRD" },
+ { "Lenovo ThinkPad X13s", "LE_X13S" },
+ { "Microsoft Surface Pro 9 5G", "MS_SP9_5G" },
+ { "Windows Dev Kit 2023", "MS_Volterra" },
+ { "Inforce 6560 Single Board Computer", "Inforce_IFC6560" },
+ { "Thundercomm Dragonboard 845c", "Thundercomm_DB845C" },
+ { "Qualcomm Technologies, Inc. SDM845 MTP", "Qualcomm_sdm845mtp" },
+ { "Lenovo Yoga C630", "Lenovo_C630" },
+ { "F(x)tec Pro1X (QX1050)", "Fxtec_QX1050" },
+ { "Lenovo Tab P11", "Lenovo_P11" },
+ { "Qualcomm Technologies, Inc. SM8150 HDK", "Qualcomm_sm8150hdk" },
+ { "Xiaomi Mi Pad 5 Pro (BOE)", "Xiaomi_Pad_5Pro" },
+ { "Xiaomi Mi Pad 5 Pro (CSOT)", "Xiaomi_Pad_5Pro" },
+ { "ASUS Zenbook A14 (UX3407QA)", "UX3407Q" },
+ { "Google Scarlet", "GO_DUMO" },
+ { /* Sentinel */ }
+};
+
+static inline const char *ath_get_calib_variant(void)
+{
+ const struct __ath_calib_variant_table *entry = ath_calib_variant_table;
+ struct device_node *root __free(device_node) = of_find_node_by_path("/");
+ const char *model = of_get_property(root, "model", NULL);
+
+ while ((entry->machine) && strcmp(entry->machine, model))
+ entry++;
+
+ return entry->machine ? entry->variant : NULL;
+}
+
#endif /* ATH_H */
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 6f78f1752cd6ffcf8eb56621ba0e4978ac23e696..099b8592d50bfac37c54dee7b0aa660ac126a410 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1161,6 +1161,10 @@ int ath10k_core_check_dt(struct ath10k *ar)
struct device_node *node;
const char *variant = NULL;
+ variant = ath_get_calib_variant();
+ if (variant)
+ goto copy_variant;
+
node = ar->dev->of_node;
if (!node)
return -ENOENT;
@@ -1173,6 +1177,7 @@ int ath10k_core_check_dt(struct ath10k *ar)
if (!variant)
return -ENODATA;
+copy_variant:
if (strscpy(ar->id.bdf_ext, variant, sizeof(ar->id.bdf_ext)) < 0)
ath10k_dbg(ar, ATH10K_DBG_BOOT,
"bdf variant string is longer than the buffer can accommodate (variant: %s)\n",
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 2810752260f2f7eee226f88d5aea7cdabe7e9ed4..2db067d6357c8848ede7384ec4a615ca22282650 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -20,6 +20,8 @@
#include "wow.h"
#include "fw.h"
+#include "../ath.h"
+
unsigned int ath11k_debug_mask;
EXPORT_SYMBOL(ath11k_debug_mask);
module_param_named(debug_mask, ath11k_debug_mask, uint, 0644);
@@ -1362,6 +1364,10 @@ int ath11k_core_check_dt(struct ath11k_base *ab)
const char *variant = NULL;
struct device_node *node;
+ variant = ath_get_calib_variant();
+ if (variant)
+ goto copy_variant;
+
node = ab->dev->of_node;
if (!node)
return -ENOENT;
@@ -1374,6 +1380,7 @@ int ath11k_core_check_dt(struct ath11k_base *ab)
if (!variant)
return -ENODATA;
+copy_variant:
if (strscpy(ab->qmi.target.bdf_ext, variant, max_len) < 0)
ath11k_dbg(ab, ATH11K_DBG_BOOT,
"bdf variant string is longer than the buffer can accommodate (variant: %s)\n",
--
2.48.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
2025-11-14 10:22 [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms Manivannan Sadhasivam
2025-11-14 10:22 ` [PATCH 1/2] " Manivannan Sadhasivam
@ 2025-11-14 10:22 ` Manivannan Sadhasivam
2025-11-14 10:47 ` Krzysztof Kozlowski
2025-11-17 2:36 ` [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms Baochen Qiang
2 siblings, 1 reply; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-14 10:22 UTC (permalink / raw)
To: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-wireless, linux-kernel, ath10k, ath11k, devicetree, ath12k,
Miaoqing Pan, Manivannan Sadhasivam
On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
'qcom,calibration-variant' property to select the correct calibration data
for device variants with colliding IDs.
But this property based selection has its own downside that it needs to be
added to the devicetree node of the WLAN device, especially for PCI based
devices. Currently, the users/vendors are forced to hardcode this property
in the PCI device node. If a different device need to be attached to the
slot, then the devicetree node also has to be changed. This approach is not
scalable and creates a bad user experience.
So deprecate this property from WLAN devicetree nodes and let the drivers
do the devicetree model based calibration variant lookup using a static
table.
This also warrants removing the property from examples in the binding.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml | 1 +
Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml | 3 +--
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml | 1 +
Documentation/devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml | 6 +-----
.../devicetree/bindings/net/wireless/qcom,ipq5332-wifi.yaml | 2 +-
5 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
index f2440d39b7ebcda77db592de85573bec902fb334..efe11bdec30dcdb6d48185b68093ea8c247b8c3d 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
@@ -107,6 +107,7 @@ properties:
qcom,calibration-variant:
$ref: /schemas/types.yaml#/definitions/string
+ deprecated: true
description:
Unique variant identifier of the calibration data in board-2.bin
for designs with colliding bus and device specific ids
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml
index e34d42a30192b80311a4c6bb41bd3c8ffc66375f..df7d7aae3343168ffa92bcce16a0b429a6d7bfef 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml
@@ -24,6 +24,7 @@ properties:
qcom,calibration-variant:
$ref: /schemas/types.yaml#/definitions/string
+ deprecated: true
description: |
string to uniquely identify variant of the calibration data for designs
with colliding bus and device ids
@@ -139,8 +140,6 @@ examples:
vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
vddrfa1p8-supply = <&vreg_pmu_rfa_1p7>;
-
- qcom,calibration-variant = "LE_X13S";
};
};
};
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
index c089677702cf17f3016b054d21494d2a7706ce5d..45ae5d3ca73b75b0755466f4dd92df1625dcb4c1 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
@@ -43,6 +43,7 @@ properties:
qcom,calibration-variant:
$ref: /schemas/types.yaml#/definitions/string
+ deprecated: true
description:
string to uniquely identify variant of the calibration data in the
board-2.bin for designs with colliding bus and device specific ids
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml
index 589960144fe1d56eb6f15f63a2d594210e045d27..cd6604eab5f3608811805d204a4c59ce1dcc060a 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml
@@ -54,6 +54,7 @@ properties:
qcom,calibration-variant:
$ref: /schemas/types.yaml#/definitions/string
+ deprecated: true
description:
String to uniquely identify variant of the calibration data for designs
with colliding bus and device ids
@@ -110,8 +111,6 @@ examples:
compatible = "pci17cb,1109";
reg = <0x0 0x0 0x0 0x0 0x0>;
- qcom,calibration-variant = "RDP433_1";
-
ports {
#address-cells = <1>;
#size-cells = <0>;
@@ -146,7 +145,6 @@ examples:
compatible = "pci17cb,1109";
reg = <0x0 0x0 0x0 0x0 0x0>;
- qcom,calibration-variant = "RDP433_2";
qcom,wsi-controller;
ports {
@@ -183,8 +181,6 @@ examples:
compatible = "pci17cb,1109";
reg = <0x0 0x0 0x0 0x0 0x0>;
- qcom,calibration-variant = "RDP433_3";
-
ports {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ipq5332-wifi.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ipq5332-wifi.yaml
index 363a0ecb6ad97c3dce72881ff552d238d08a2c12..1e6ff8e7a6c20cbe4abe31cacd8b25a78af05f4c 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ipq5332-wifi.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ipq5332-wifi.yaml
@@ -151,6 +151,7 @@ properties:
qcom,calibration-variant:
$ref: /schemas/types.yaml#/definitions/string
+ deprecated: true
description:
String to uniquely identify variant of the calibration data for designs
with colliding bus and device ids
@@ -304,7 +305,6 @@ examples:
memory-region = <&q6_region>, <&m3_dump>, <&q6_caldb>, <&mlo_mem>;
memory-region-names = "q6-region", "m3-dump", "q6-caldb", "mlo-global-mem";
- qcom,calibration-variant = "RDP441_1";
qcom,rproc = <&q6v5_wcss>;
qcom,smem-states = <&wcss_smp2p_out 8>,
<&wcss_smp2p_out 9>,
--
2.48.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 1/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-14 10:22 ` [PATCH 1/2] " Manivannan Sadhasivam
@ 2025-11-14 10:45 ` Krzysztof Kozlowski
2025-11-14 11:16 ` Manivannan Sadhasivam
2025-11-15 9:51 ` kernel test robot
1 sibling, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-14 10:45 UTC (permalink / raw)
To: Manivannan Sadhasivam, Jeff Johnson, Johannes Berg, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-wireless, linux-kernel, ath10k, ath11k, devicetree, ath12k,
Miaoqing Pan
On 14/11/2025 11:22, Manivannan Sadhasivam wrote:
> On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
> 'qcom,*calibration-variant' property to select the correct calibration data
> for device variants with colliding IDs.
>
> But this property based selection has its own downside that it needs to be
> added to the devicetree node of the WLAN device, especially for PCI based
> devices. Currently, the users/vendors are forced to hardcode this property
> in the PCI device node. If a different device need to be attached to the
> slot, then the devicetree node also has to be changed. This approach is not
> scalable and creates a bad user experience.
>
> To get rid of this requirement, this commit introduces a static calibration
> variant table ath_calib_variant_table[], consisting of the platform model
> and the calibration variant for all upstream supported devices. The entries
> of this table are derived from the upstream DTS files.
>
> The newly introduced helper, ath_get_calib_variant() will parse the model
> name from devicetree and use it to do the variant lookup during runtime. If
> the platform model name doesn't match, it will fallback to the devicetree
> property based lookup.
>
> Going forward, the devicetree based lookup will be deprecated and this
> table will be used exclusively for devices connected to the devicetree
> based host platforms.
>
> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath.h | 98 ++++++++++++++++++++++++++++++++++
> drivers/net/wireless/ath/ath10k/core.c | 5 ++
> drivers/net/wireless/ath/ath11k/core.c | 7 +++
> 3 files changed, 110 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
> index 34654f710d8a1e63f65a47d4602e2035262a4d9e..d0a12151b7fc13355161c48ba1fb200e4617ed11 100644
> --- a/drivers/net/wireless/ath/ath.h
> +++ b/drivers/net/wireless/ath/ath.h
> @@ -21,6 +21,7 @@
> #include <linux/skbuff.h>
> #include <linux/if_ether.h>
> #include <linux/spinlock.h>
> +#include <linux/of.h>
> #include <net/mac80211.h>
>
> /*
> @@ -336,4 +337,101 @@ static inline const char *ath_bus_type_to_string(enum ath_bus_type bustype)
> return ath_bus_type_strings[bustype];
> }
>
> +static const struct __ath_calib_variant_table {
> + const char *machine;
> + const char *variant;
> +} ath_calib_variant_table[] = {
> + { "ALFA Network AP120C-AC", "ALFA-Network-AP120C-AC" },
> + { "8devices Jalapeno", "8devices-Jalapeno" },
> + { "Google cozmo board", "GO_COZMO" },
> + { "Google damu board", "GO_DAMU" },
> + { "Google fennel sku1 board", "GO_FENNEL" },
> + { "Google fennel sku6 board", "GO_FENNEL" },
> + { "Google fennel sku7 board", "GO_FENNEL" },
Are these top-machine models? If so, you cannot use them. The value is
user-informative, not ABI. If you wanted to use them, you would need to
document the ABI.
Just use compatible, that's the entire point of compatible.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
2025-11-14 10:22 ` [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property Manivannan Sadhasivam
@ 2025-11-14 10:47 ` Krzysztof Kozlowski
2025-11-14 11:02 ` Manivannan Sadhasivam
0 siblings, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-14 10:47 UTC (permalink / raw)
To: Manivannan Sadhasivam, Jeff Johnson, Johannes Berg, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-wireless, linux-kernel, ath10k, ath11k, devicetree, ath12k,
Miaoqing Pan
On 14/11/2025 11:22, Manivannan Sadhasivam wrote:
> On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
> 'qcom,calibration-variant' property to select the correct calibration data
> for device variants with colliding IDs.
>
> But this property based selection has its own downside that it needs to be
> added to the devicetree node of the WLAN device, especially for PCI based
> devices. Currently, the users/vendors are forced to hardcode this property
> in the PCI device node. If a different device need to be attached to the
> slot, then the devicetree node also has to be changed. This approach is not
> scalable and creates a bad user experience.
>
> So deprecate this property from WLAN devicetree nodes and let the drivers
> do the devicetree model based calibration variant lookup using a static
> table.
>
> This also warrants removing the property from examples in the binding.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
The problem - visible in one of the examples here - is that one board
has multiple WiFi chips and they use different calibration-variant
properties. How do you find the right calibration variant for such case
based on board machine match?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
2025-11-14 10:47 ` Krzysztof Kozlowski
@ 2025-11-14 11:02 ` Manivannan Sadhasivam
2025-11-14 11:04 ` Krzysztof Kozlowski
0 siblings, 1 reply; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-14 11:02 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On Fri, Nov 14, 2025 at 11:47:25AM +0100, Krzysztof Kozlowski wrote:
> On 14/11/2025 11:22, Manivannan Sadhasivam wrote:
> > On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
> > 'qcom,calibration-variant' property to select the correct calibration data
> > for device variants with colliding IDs.
> >
> > But this property based selection has its own downside that it needs to be
> > added to the devicetree node of the WLAN device, especially for PCI based
> > devices. Currently, the users/vendors are forced to hardcode this property
> > in the PCI device node. If a different device need to be attached to the
> > slot, then the devicetree node also has to be changed. This approach is not
> > scalable and creates a bad user experience.
> >
> > So deprecate this property from WLAN devicetree nodes and let the drivers
> > do the devicetree model based calibration variant lookup using a static
> > table.
> >
> > This also warrants removing the property from examples in the binding.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> > ---
>
> The problem - visible in one of the examples here - is that one board
> has multiple WiFi chips and they use different calibration-variant
> properties. How do you find the right calibration variant for such case
> based on board machine match?
>
I suspect the legitimacy of the example here. I don't understand how a single
machine can have same devices with 3 different calibration data.
AFAIU, calibration data is specific to the platform design. And I don't see any
upstream supported devicetree having similar properties.
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
2025-11-14 11:02 ` Manivannan Sadhasivam
@ 2025-11-14 11:04 ` Krzysztof Kozlowski
2025-11-14 11:18 ` Manivannan Sadhasivam
0 siblings, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-14 11:04 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On 14/11/2025 12:02, Manivannan Sadhasivam wrote:
> On Fri, Nov 14, 2025 at 11:47:25AM +0100, Krzysztof Kozlowski wrote:
>> On 14/11/2025 11:22, Manivannan Sadhasivam wrote:
>>> On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
>>> 'qcom,calibration-variant' property to select the correct calibration data
>>> for device variants with colliding IDs.
>>>
>>> But this property based selection has its own downside that it needs to be
>>> added to the devicetree node of the WLAN device, especially for PCI based
>>> devices. Currently, the users/vendors are forced to hardcode this property
>>> in the PCI device node. If a different device need to be attached to the
>>> slot, then the devicetree node also has to be changed. This approach is not
>>> scalable and creates a bad user experience.
>>>
>>> So deprecate this property from WLAN devicetree nodes and let the drivers
>>> do the devicetree model based calibration variant lookup using a static
>>> table.
>>>
>>> This also warrants removing the property from examples in the binding.
>>>
>>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
>>> ---
>>
>> The problem - visible in one of the examples here - is that one board
>> has multiple WiFi chips and they use different calibration-variant
>> properties. How do you find the right calibration variant for such case
>> based on board machine match?
>>
>
> I suspect the legitimacy of the example here. I don't understand how a single
> machine can have same devices with 3 different calibration data.
Me neither but I am not the domain expert here.
>
> AFAIU, calibration data is specific to the platform design. And I don't see any
> upstream supported devicetree having similar properties.
Deprecating these is fine with me, but I would prefer if we get here
some clear answers that mentioned case cannot happen. If you are sure of
that, please mention it in commit msg.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-14 10:45 ` Krzysztof Kozlowski
@ 2025-11-14 11:16 ` Manivannan Sadhasivam
2025-11-14 11:24 ` Krzysztof Kozlowski
0 siblings, 1 reply; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-14 11:16 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: srinivas.kandagatla, Jeff Johnson, Johannes Berg, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-wireless, linux-kernel,
ath10k, ath11k, devicetree, ath12k, Miaoqing Pan
+ Srini
On Fri, Nov 14, 2025 at 11:45:30AM +0100, Krzysztof Kozlowski wrote:
> On 14/11/2025 11:22, Manivannan Sadhasivam wrote:
> > On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
> > 'qcom,*calibration-variant' property to select the correct calibration data
> > for device variants with colliding IDs.
> >
> > But this property based selection has its own downside that it needs to be
> > added to the devicetree node of the WLAN device, especially for PCI based
> > devices. Currently, the users/vendors are forced to hardcode this property
> > in the PCI device node. If a different device need to be attached to the
> > slot, then the devicetree node also has to be changed. This approach is not
> > scalable and creates a bad user experience.
> >
> > To get rid of this requirement, this commit introduces a static calibration
> > variant table ath_calib_variant_table[], consisting of the platform model
> > and the calibration variant for all upstream supported devices. The entries
> > of this table are derived from the upstream DTS files.
> >
> > The newly introduced helper, ath_get_calib_variant() will parse the model
> > name from devicetree and use it to do the variant lookup during runtime. If
> > the platform model name doesn't match, it will fallback to the devicetree
> > property based lookup.
> >
> > Going forward, the devicetree based lookup will be deprecated and this
> > table will be used exclusively for devices connected to the devicetree
> > based host platforms.
> >
> > Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> > ---
> > drivers/net/wireless/ath/ath.h | 98 ++++++++++++++++++++++++++++++++++
> > drivers/net/wireless/ath/ath10k/core.c | 5 ++
> > drivers/net/wireless/ath/ath11k/core.c | 7 +++
> > 3 files changed, 110 insertions(+)
> >
> > diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
> > index 34654f710d8a1e63f65a47d4602e2035262a4d9e..d0a12151b7fc13355161c48ba1fb200e4617ed11 100644
> > --- a/drivers/net/wireless/ath/ath.h
> > +++ b/drivers/net/wireless/ath/ath.h
> > @@ -21,6 +21,7 @@
> > #include <linux/skbuff.h>
> > #include <linux/if_ether.h>
> > #include <linux/spinlock.h>
> > +#include <linux/of.h>
> > #include <net/mac80211.h>
> >
> > /*
> > @@ -336,4 +337,101 @@ static inline const char *ath_bus_type_to_string(enum ath_bus_type bustype)
> > return ath_bus_type_strings[bustype];
> > }
> >
> > +static const struct __ath_calib_variant_table {
> > + const char *machine;
> > + const char *variant;
> > +} ath_calib_variant_table[] = {
> > + { "ALFA Network AP120C-AC", "ALFA-Network-AP120C-AC" },
> > + { "8devices Jalapeno", "8devices-Jalapeno" },
> > + { "Google cozmo board", "GO_COZMO" },
> > + { "Google damu board", "GO_DAMU" },
> > + { "Google fennel sku1 board", "GO_FENNEL" },
> > + { "Google fennel sku6 board", "GO_FENNEL" },
> > + { "Google fennel sku7 board", "GO_FENNEL" },
>
> Are these top-machine models? If so, you cannot use them. The value is
> user-informative, not ABI. If you wanted to use them, you would need to
> document the ABI.
>
I had this question initially, but Srini convinced me it is OK to use it in the
driver as they do it in audio :)
> Just use compatible, that's the entire point of compatible.
>
Ok!
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
2025-11-14 11:04 ` Krzysztof Kozlowski
@ 2025-11-14 11:18 ` Manivannan Sadhasivam
2025-11-14 17:29 ` Jeff Johnson
0 siblings, 1 reply; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-14 11:18 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On Fri, Nov 14, 2025 at 12:04:55PM +0100, Krzysztof Kozlowski wrote:
> On 14/11/2025 12:02, Manivannan Sadhasivam wrote:
> > On Fri, Nov 14, 2025 at 11:47:25AM +0100, Krzysztof Kozlowski wrote:
> >> On 14/11/2025 11:22, Manivannan Sadhasivam wrote:
> >>> On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
> >>> 'qcom,calibration-variant' property to select the correct calibration data
> >>> for device variants with colliding IDs.
> >>>
> >>> But this property based selection has its own downside that it needs to be
> >>> added to the devicetree node of the WLAN device, especially for PCI based
> >>> devices. Currently, the users/vendors are forced to hardcode this property
> >>> in the PCI device node. If a different device need to be attached to the
> >>> slot, then the devicetree node also has to be changed. This approach is not
> >>> scalable and creates a bad user experience.
> >>>
> >>> So deprecate this property from WLAN devicetree nodes and let the drivers
> >>> do the devicetree model based calibration variant lookup using a static
> >>> table.
> >>>
> >>> This also warrants removing the property from examples in the binding.
> >>>
> >>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> >>> ---
> >>
> >> The problem - visible in one of the examples here - is that one board
> >> has multiple WiFi chips and they use different calibration-variant
> >> properties. How do you find the right calibration variant for such case
> >> based on board machine match?
> >>
> >
> > I suspect the legitimacy of the example here. I don't understand how a single
> > machine can have same devices with 3 different calibration data.
>
> Me neither but I am not the domain expert here.
>
> >
> > AFAIU, calibration data is specific to the platform design. And I don't see any
> > upstream supported devicetree having similar properties.
> Deprecating these is fine with me, but I would prefer if we get here
> some clear answers that mentioned case cannot happen. If you are sure of
> that, please mention it in commit msg.
>
I'm pretty sure that this example is wrong. But I will wait for Jeff or other
ath developers to confirm.
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-14 11:16 ` Manivannan Sadhasivam
@ 2025-11-14 11:24 ` Krzysztof Kozlowski
2025-11-14 11:44 ` Srinivas Kandagatla
0 siblings, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-14 11:24 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: srinivas.kandagatla, Jeff Johnson, Johannes Berg, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-wireless, linux-kernel,
ath10k, ath11k, devicetree, ath12k, Miaoqing Pan
On 14/11/2025 12:16, Manivannan Sadhasivam wrote:
>>>
>>> +static const struct __ath_calib_variant_table {
>>> + const char *machine;
>>> + const char *variant;
>>> +} ath_calib_variant_table[] = {
>>> + { "ALFA Network AP120C-AC", "ALFA-Network-AP120C-AC" },
>>> + { "8devices Jalapeno", "8devices-Jalapeno" },
>>> + { "Google cozmo board", "GO_COZMO" },
>>> + { "Google damu board", "GO_DAMU" },
>>> + { "Google fennel sku1 board", "GO_FENNEL" },
>>> + { "Google fennel sku6 board", "GO_FENNEL" },
>>> + { "Google fennel sku7 board", "GO_FENNEL" },
>>
>> Are these top-machine models? If so, you cannot use them. The value is
>> user-informative, not ABI. If you wanted to use them, you would need to
>> document the ABI.
>>
>
> I had this question initially, but Srini convinced me it is OK to use it in the
> driver as they do it in audio :)
That's sounds like an issue which could be fixed or at least discussed.
There is no in-kernel usage of ASoC's 'model' property, thus we probably
never noticed that it is an ABI.
OTOH, everyone apparently knows that audio's 'model' is an ABI because
no one changes it, unlike top-level machine 'model' which is being
changed from time to time.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-14 11:24 ` Krzysztof Kozlowski
@ 2025-11-14 11:44 ` Srinivas Kandagatla
2025-11-14 11:48 ` Krzysztof Kozlowski
0 siblings, 1 reply; 21+ messages in thread
From: Srinivas Kandagatla @ 2025-11-14 11:44 UTC (permalink / raw)
To: Krzysztof Kozlowski, Manivannan Sadhasivam
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On 11/14/25 11:24 AM, Krzysztof Kozlowski wrote:
> On 14/11/2025 12:16, Manivannan Sadhasivam wrote:
>>>>
>>>> +static const struct __ath_calib_variant_table {
>>>> + const char *machine;
>>>> + const char *variant;
>>>> +} ath_calib_variant_table[] = {
>>>> + { "ALFA Network AP120C-AC", "ALFA-Network-AP120C-AC" },
>>>> + { "8devices Jalapeno", "8devices-Jalapeno" },
>>>> + { "Google cozmo board", "GO_COZMO" },
>>>> + { "Google damu board", "GO_DAMU" },
>>>> + { "Google fennel sku1 board", "GO_FENNEL" },
>>>> + { "Google fennel sku6 board", "GO_FENNEL" },
>>>> + { "Google fennel sku7 board", "GO_FENNEL" },
>>>
>>> Are these top-machine models? If so, you cannot use them. The value is
>>> user-informative, not ABI. If you wanted to use them, you would need to
>>> document the ABI.
the value has expected format, can it not be an ABI?, from DT Specs:
"Specifies a string that uniquely identifies the model of the system
board" We can argue that its not part of
Documentation/devicetree/bindings/arm/qcom.yaml
@Mani, can you not use the top level machine compatibles instead,
something like: "google,fennel-sku7" instead of "Google fennel sku7
board" which is an ABI.
>>>
>>
>> I had this question initially, but Srini convinced me it is OK to use it in the
>> driver as they do it in audio :)
>
> That's sounds like an issue which could be fixed or at least discussed.
> There is no in-kernel usage of ASoC's 'model' property, thus we probably
> never noticed that it is an ABI.
>
model is actually used as soundcard name and long name if there is no
DMI info for the platform, This string is also used at the UCM level to
identify the correct UCM configuration.
However the model that we are referring for sound is part of the
dt-bindings for the sound card, not the top-level model, so this is an
ABI for soundcard itself.
--srini
> OTOH, everyone apparently knows that audio's 'model' is an ABI because
> no one changes it, unlike top-level machine 'model' which is being
> changed from time to time.
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-14 11:44 ` Srinivas Kandagatla
@ 2025-11-14 11:48 ` Krzysztof Kozlowski
0 siblings, 0 replies; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-14 11:48 UTC (permalink / raw)
To: Srinivas Kandagatla, Manivannan Sadhasivam
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On 14/11/2025 12:44, Srinivas Kandagatla wrote:
> On 11/14/25 11:24 AM, Krzysztof Kozlowski wrote:
>> On 14/11/2025 12:16, Manivannan Sadhasivam wrote:
>>>>>
>>>>> +static const struct __ath_calib_variant_table {
>>>>> + const char *machine;
>>>>> + const char *variant;
>>>>> +} ath_calib_variant_table[] = {
>>>>> + { "ALFA Network AP120C-AC", "ALFA-Network-AP120C-AC" },
>>>>> + { "8devices Jalapeno", "8devices-Jalapeno" },
>>>>> + { "Google cozmo board", "GO_COZMO" },
>>>>> + { "Google damu board", "GO_DAMU" },
>>>>> + { "Google fennel sku1 board", "GO_FENNEL" },
>>>>> + { "Google fennel sku6 board", "GO_FENNEL" },
>>>>> + { "Google fennel sku7 board", "GO_FENNEL" },
>>>>
>>>> Are these top-machine models? If so, you cannot use them. The value is
>>>> user-informative, not ABI. If you wanted to use them, you would need to
>>>> document the ABI.
>
> the value has expected format, can it not be an ABI?, from DT Specs:
Where is the ABI documented? You should not have ABI which is completely
undocumented.
> "Specifies a string that uniquely identifies the model of the system
> board" We can argue that its not part of
> Documentation/devicetree/bindings/arm/qcom.yaml
>
> @Mani, can you not use the top level machine compatibles instead,
> something like: "google,fennel-sku7" instead of "Google fennel sku7
> board" which is an ABI.
>
>>>>
>>>
>>> I had this question initially, but Srini convinced me it is OK to use it in the
>>> driver as they do it in audio :)
>>
>> That's sounds like an issue which could be fixed or at least discussed.
>> There is no in-kernel usage of ASoC's 'model' property, thus we probably
>> never noticed that it is an ABI.
>>
> model is actually used as soundcard name and long name if there is no
> DMI info for the platform, This string is also used at the UCM level to
> identify the correct UCM configuration.
You speak about user-space... I did not dispute that. I said - it is not
used in the kernel.
> >
> However the model that we are referring for sound is part of the
> dt-bindings for the sound card, not the top-level model, so this is an
> ABI for soundcard itself.
We speak about the values. They are not defined as ABI and not used in
the kernel.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
2025-11-14 11:18 ` Manivannan Sadhasivam
@ 2025-11-14 17:29 ` Jeff Johnson
2025-11-17 9:03 ` Manivannan Sadhasivam
0 siblings, 1 reply; 21+ messages in thread
From: Jeff Johnson @ 2025-11-14 17:29 UTC (permalink / raw)
To: Manivannan Sadhasivam, Krzysztof Kozlowski
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On 11/14/2025 3:18 AM, Manivannan Sadhasivam wrote:
> On Fri, Nov 14, 2025 at 12:04:55PM +0100, Krzysztof Kozlowski wrote:
>> On 14/11/2025 12:02, Manivannan Sadhasivam wrote:
>>> On Fri, Nov 14, 2025 at 11:47:25AM +0100, Krzysztof Kozlowski wrote:
>>>> On 14/11/2025 11:22, Manivannan Sadhasivam wrote:
>>>>> On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
>>>>> 'qcom,calibration-variant' property to select the correct calibration data
>>>>> for device variants with colliding IDs.
>>>>>
>>>>> But this property based selection has its own downside that it needs to be
>>>>> added to the devicetree node of the WLAN device, especially for PCI based
>>>>> devices. Currently, the users/vendors are forced to hardcode this property
>>>>> in the PCI device node. If a different device need to be attached to the
>>>>> slot, then the devicetree node also has to be changed. This approach is not
>>>>> scalable and creates a bad user experience.
>>>>>
>>>>> So deprecate this property from WLAN devicetree nodes and let the drivers
>>>>> do the devicetree model based calibration variant lookup using a static
>>>>> table.
>>>>>
>>>>> This also warrants removing the property from examples in the binding.
>>>>>
>>>>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
>>>>> ---
>>>>
>>>> The problem - visible in one of the examples here - is that one board
>>>> has multiple WiFi chips and they use different calibration-variant
>>>> properties. How do you find the right calibration variant for such case
>>>> based on board machine match?
>>>>
>>>
>>> I suspect the legitimacy of the example here. I don't understand how a single
>>> machine can have same devices with 3 different calibration data.
>>
>> Me neither but I am not the domain expert here.
>>
>>>
>>> AFAIU, calibration data is specific to the platform design. And I don't see any
>>> upstream supported devicetree having similar properties.
>> Deprecating these is fine with me, but I would prefer if we get here
>> some clear answers that mentioned case cannot happen. If you are sure of
>> that, please mention it in commit msg.
>>
>
> I'm pretty sure that this example is wrong. But I will wait for Jeff or other
> ath developers to confirm.
As discussed privately this is a valid example. This is a single-band chip. So
a tri-band router platform will have 3 boards, one that is supporting 2 GHz,
one supporting 5 GHz, and one supporting 6 GHz, and each frequency range will
have different calibration data.
So we still need to support slot-specific configuration in cases where the
slot to board mapping really is fixed in the platform.
/jeff
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-14 10:22 ` [PATCH 1/2] " Manivannan Sadhasivam
2025-11-14 10:45 ` Krzysztof Kozlowski
@ 2025-11-15 9:51 ` kernel test robot
1 sibling, 0 replies; 21+ messages in thread
From: kernel test robot @ 2025-11-15 9:51 UTC (permalink / raw)
To: Manivannan Sadhasivam, Jeff Johnson, Johannes Berg, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: oe-kbuild-all, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan, Manivannan Sadhasivam
Hi Manivannan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 3a8660878839faadb4f1a6dd72c3179c1df56787]
url: https://github.com/intel-lab-lkp/linux/commits/Manivannan-Sadhasivam/wifi-ath-Use-static-calibration-variant-table-for-devicetree-platforms/20251114-183506
base: 3a8660878839faadb4f1a6dd72c3179c1df56787
patch link: https://lore.kernel.org/r/20251114-ath-variant-tbl-v1-1-a9adfc49e3f3%40oss.qualcomm.com
patch subject: [PATCH 1/2] wifi: ath: Use static calibration variant table for devicetree platforms
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20251115/202511151754.ggEBSIV4-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251115/202511151754.ggEBSIV4-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511151754.ggEBSIV4-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/wireless/ath/ath10k/core.h:26,
from drivers/net/wireless/ath/ath10k/core.c:21:
In function 'ath_get_calib_variant',
inlined from 'ath10k_core_check_dt' at drivers/net/wireless/ath/ath10k/core.c:1164:12:
>> drivers/net/wireless/ath/ath10k/../ath.h:431:36: warning: argument 2 null where non-null expected [-Wnonnull]
431 | while ((entry->machine) && strcmp(entry->machine, model))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bitmap.h:13,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/tsc.h:11,
from arch/x86/include/asm/timex.h:6,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/net/wireless/ath/ath10k/core.c:11:
include/linux/string.h: In function 'ath10k_core_check_dt':
include/linux/string.h:161:12: note: in a call to function 'strcmp' declared 'nonnull'
161 | extern int strcmp(const char *,const char *);
| ^~~~~~
--
In file included from drivers/net/wireless/ath/ath11k/core.c:23:
In function 'ath_get_calib_variant',
inlined from 'ath11k_core_check_dt' at drivers/net/wireless/ath/ath11k/core.c:1367:12:
>> drivers/net/wireless/ath/ath11k/../ath.h:431:36: warning: argument 2 null where non-null expected [-Wnonnull]
431 | while ((entry->machine) && strcmp(entry->machine, model))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bitmap.h:13,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/tsc.h:11,
from arch/x86/include/asm/timex.h:6,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/net/wireless/ath/ath11k/core.c:9:
include/linux/string.h: In function 'ath11k_core_check_dt':
include/linux/string.h:161:12: note: in a call to function 'strcmp' declared 'nonnull'
161 | extern int strcmp(const char *,const char *);
| ^~~~~~
vim +431 drivers/net/wireless/ath/ath10k/../ath.h
424
425 static inline const char *ath_get_calib_variant(void)
426 {
427 const struct __ath_calib_variant_table *entry = ath_calib_variant_table;
428 struct device_node *root __free(device_node) = of_find_node_by_path("/");
429 const char *model = of_get_property(root, "model", NULL);
430
> 431 while ((entry->machine) && strcmp(entry->machine, model))
432 entry++;
433
434 return entry->machine ? entry->variant : NULL;
435 }
436
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-14 10:22 [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms Manivannan Sadhasivam
2025-11-14 10:22 ` [PATCH 1/2] " Manivannan Sadhasivam
2025-11-14 10:22 ` [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property Manivannan Sadhasivam
@ 2025-11-17 2:36 ` Baochen Qiang
2025-11-17 9:00 ` Manivannan Sadhasivam
2 siblings, 1 reply; 21+ messages in thread
From: Baochen Qiang @ 2025-11-17 2:36 UTC (permalink / raw)
To: Manivannan Sadhasivam, Jeff Johnson, Johannes Berg, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-wireless, linux-kernel, ath10k, ath11k, devicetree, ath12k,
Miaoqing Pan
On 11/14/2025 6:22 PM, Manivannan Sadhasivam wrote:
> Hi,
>
> This series aims to deprecate the usage of "qcom,*calibration-variant"
> devicetree property to select the calibration variant for the WLAN devices. This
> is necessary for WLAN devices connected using PCI bus, as hardcoding the device
> specific information in PCI devicetree node causes the node to be updated every
> time when a new device variant is attached to the PCI slot. This approach is not
> scalable and causes bad user experience.
I am not very clear about the problem here: is calibration variant device/module specific,
or platform specific? If it is module specific, why the lookup is based on the machine
'model' property? While if it is platform specific, why do we need to update devicetree
node whenever a new device is attached?
>
> So to avoid relying on the "qcom,*calibration-variant" property, this series
> introduces a new static calibration variant table based lookup. The newly
> introduced helper, ath_get_calib_variant() will parse the model name from
> devicetree and use it to do the variant lookup during runtime. The
> ath_calib_variant_table[] will hold all the model and calibration variant
> entries for the supported devices.
>
> Going forward, new entries will be added to this table to support calibration
> variants.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
> Manivannan Sadhasivam (2):
> wifi: ath: Use static calibration variant table for devicetree platforms
> dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
>
> .../bindings/net/wireless/qcom,ath10k.yaml | 1 +
> .../bindings/net/wireless/qcom,ath11k-pci.yaml | 3 +-
> .../bindings/net/wireless/qcom,ath11k.yaml | 1 +
> .../bindings/net/wireless/qcom,ath12k-wsi.yaml | 6 +-
> .../bindings/net/wireless/qcom,ipq5332-wifi.yaml | 2 +-
> drivers/net/wireless/ath/ath.h | 98 ++++++++++++++++++++++
> drivers/net/wireless/ath/ath10k/core.c | 5 ++
> drivers/net/wireless/ath/ath11k/core.c | 7 ++
> 8 files changed, 115 insertions(+), 8 deletions(-)
> ---
> base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
> change-id: 20251114-ath-variant-tbl-22865456a527
>
> Best regards,
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-17 2:36 ` [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms Baochen Qiang
@ 2025-11-17 9:00 ` Manivannan Sadhasivam
2025-11-17 9:40 ` Baochen Qiang
0 siblings, 1 reply; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-17 9:00 UTC (permalink / raw)
To: Baochen Qiang
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On Mon, Nov 17, 2025 at 10:36:39AM +0800, Baochen Qiang wrote:
>
>
> On 11/14/2025 6:22 PM, Manivannan Sadhasivam wrote:
> > Hi,
> >
> > This series aims to deprecate the usage of "qcom,*calibration-variant"
> > devicetree property to select the calibration variant for the WLAN devices. This
> > is necessary for WLAN devices connected using PCI bus, as hardcoding the device
> > specific information in PCI devicetree node causes the node to be updated every
> > time when a new device variant is attached to the PCI slot. This approach is not
> > scalable and causes bad user experience.
>
> I am not very clear about the problem here: is calibration variant device/module specific,
> or platform specific? If it is module specific, why the lookup is based on the machine
> 'model' property? While if it is platform specific, why do we need to update devicetree
> node whenever a new device is attached?
>
I think I mixed the usecase of the 'firmware-name' property in the above
description.
But nevertheless, the calibration info platform specific, and hardcoding the DT
property fixes the location of the WLAN card with a specific slot. For instance,
if the board has a couple of M.2 slots, users should be free to plug the WLAN in
any slot, not just a single slot where the property was defined in DT.
Also, if the users plug-in the WLAN card of another vendor, not Qcom, this
property is irrelevant/wrong.
PCIe slots should be plug and play i.e., users should plug-in any M.2 card and
expect it to work.
However, as I learned from Jeff, calibration variant property is also going to
be required in cases like router boards where each slot is dedicated to a fixed
band and the calibration variant is going to be different for each band for the
platform. So unlike I thought, this DT property cannot be deprecated. But going
forward, I'd like it to be used only in these special usecases. Most of the
upstream DTS have a single calibration variant for the platform and for those
generic usecases, this static table should be used.
- Mani
> >
> > So to avoid relying on the "qcom,*calibration-variant" property, this series
> > introduces a new static calibration variant table based lookup. The newly
> > introduced helper, ath_get_calib_variant() will parse the model name from
> > devicetree and use it to do the variant lookup during runtime. The
> > ath_calib_variant_table[] will hold all the model and calibration variant
> > entries for the supported devices.
> >
> > Going forward, new entries will be added to this table to support calibration
> > variants.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> > ---
> > Manivannan Sadhasivam (2):
> > wifi: ath: Use static calibration variant table for devicetree platforms
> > dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
> >
> > .../bindings/net/wireless/qcom,ath10k.yaml | 1 +
> > .../bindings/net/wireless/qcom,ath11k-pci.yaml | 3 +-
> > .../bindings/net/wireless/qcom,ath11k.yaml | 1 +
> > .../bindings/net/wireless/qcom,ath12k-wsi.yaml | 6 +-
> > .../bindings/net/wireless/qcom,ipq5332-wifi.yaml | 2 +-
> > drivers/net/wireless/ath/ath.h | 98 ++++++++++++++++++++++
> > drivers/net/wireless/ath/ath10k/core.c | 5 ++
> > drivers/net/wireless/ath/ath11k/core.c | 7 ++
> > 8 files changed, 115 insertions(+), 8 deletions(-)
> > ---
> > base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
> > change-id: 20251114-ath-variant-tbl-22865456a527
> >
> > Best regards,
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
2025-11-14 17:29 ` Jeff Johnson
@ 2025-11-17 9:03 ` Manivannan Sadhasivam
0 siblings, 0 replies; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-17 9:03 UTC (permalink / raw)
To: Jeff Johnson
Cc: Krzysztof Kozlowski, Jeff Johnson, Johannes Berg, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-wireless, linux-kernel,
ath10k, ath11k, devicetree, ath12k, Miaoqing Pan
On Fri, Nov 14, 2025 at 09:29:46AM -0800, Jeff Johnson wrote:
> On 11/14/2025 3:18 AM, Manivannan Sadhasivam wrote:
> > On Fri, Nov 14, 2025 at 12:04:55PM +0100, Krzysztof Kozlowski wrote:
> >> On 14/11/2025 12:02, Manivannan Sadhasivam wrote:
> >>> On Fri, Nov 14, 2025 at 11:47:25AM +0100, Krzysztof Kozlowski wrote:
> >>>> On 14/11/2025 11:22, Manivannan Sadhasivam wrote:
> >>>>> On devicetree platforms, ath{10k/11k} drivers rely on the presence of the
> >>>>> 'qcom,calibration-variant' property to select the correct calibration data
> >>>>> for device variants with colliding IDs.
> >>>>>
> >>>>> But this property based selection has its own downside that it needs to be
> >>>>> added to the devicetree node of the WLAN device, especially for PCI based
> >>>>> devices. Currently, the users/vendors are forced to hardcode this property
> >>>>> in the PCI device node. If a different device need to be attached to the
> >>>>> slot, then the devicetree node also has to be changed. This approach is not
> >>>>> scalable and creates a bad user experience.
> >>>>>
> >>>>> So deprecate this property from WLAN devicetree nodes and let the drivers
> >>>>> do the devicetree model based calibration variant lookup using a static
> >>>>> table.
> >>>>>
> >>>>> This also warrants removing the property from examples in the binding.
> >>>>>
> >>>>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> >>>>> ---
> >>>>
> >>>> The problem - visible in one of the examples here - is that one board
> >>>> has multiple WiFi chips and they use different calibration-variant
> >>>> properties. How do you find the right calibration variant for such case
> >>>> based on board machine match?
> >>>>
> >>>
> >>> I suspect the legitimacy of the example here. I don't understand how a single
> >>> machine can have same devices with 3 different calibration data.
> >>
> >> Me neither but I am not the domain expert here.
> >>
> >>>
> >>> AFAIU, calibration data is specific to the platform design. And I don't see any
> >>> upstream supported devicetree having similar properties.
> >> Deprecating these is fine with me, but I would prefer if we get here
> >> some clear answers that mentioned case cannot happen. If you are sure of
> >> that, please mention it in commit msg.
> >>
> >
> > I'm pretty sure that this example is wrong. But I will wait for Jeff or other
> > ath developers to confirm.
>
> As discussed privately this is a valid example. This is a single-band chip. So
> a tri-band router platform will have 3 boards, one that is supporting 2 GHz,
> one supporting 5 GHz, and one supporting 6 GHz, and each frequency range will
> have different calibration data.
>
> So we still need to support slot-specific configuration in cases where the
> slot to board mapping really is fixed in the platform.
>
Thanks for letting me know of the multi-band usecase, which I was not aware of.
Yes, this property has to be used for those special usecases, so we cannot
deprecate it. But going forward, for the single calibration data usecase (like
almost all upstream DTS), this static table should be used.
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-17 9:00 ` Manivannan Sadhasivam
@ 2025-11-17 9:40 ` Baochen Qiang
2025-11-17 12:45 ` Manivannan Sadhasivam
0 siblings, 1 reply; 21+ messages in thread
From: Baochen Qiang @ 2025-11-17 9:40 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On 11/17/2025 5:00 PM, Manivannan Sadhasivam wrote:
> On Mon, Nov 17, 2025 at 10:36:39AM +0800, Baochen Qiang wrote:
>>
>>
>> On 11/14/2025 6:22 PM, Manivannan Sadhasivam wrote:
>>> Hi,
>>>
>>> This series aims to deprecate the usage of "qcom,*calibration-variant"
>>> devicetree property to select the calibration variant for the WLAN devices. This
>>> is necessary for WLAN devices connected using PCI bus, as hardcoding the device
>>> specific information in PCI devicetree node causes the node to be updated every
>>> time when a new device variant is attached to the PCI slot. This approach is not
>>> scalable and causes bad user experience.
>>
>> I am not very clear about the problem here: is calibration variant device/module specific,
>> or platform specific? If it is module specific, why the lookup is based on the machine
>> 'model' property? While if it is platform specific, why do we need to update devicetree
>> node whenever a new device is attached?
>>
>
> I think I mixed the usecase of the 'firmware-name' property in the above
> description.
>
> But nevertheless, the calibration info platform specific, and hardcoding the DT
> property fixes the location of the WLAN card with a specific slot. For instance,
> if the board has a couple of M.2 slots, users should be free to plug the WLAN in
> any slot, not just a single slot where the property was defined in DT.
>
> Also, if the users plug-in the WLAN card of another vendor, not Qcom, this
> property is irrelevant/wrong.
>
> PCIe slots should be plug and play i.e., users should plug-in any M.2 card and
> expect it to work.
>
correct
> However, as I learned from Jeff, calibration variant property is also going to
> be required in cases like router boards where each slot is dedicated to a fixed
> band and the calibration variant is going to be different for each band for the
> platform. So unlike I thought, this DT property cannot be deprecated. But going
> forward, I'd like it to be used only in these special usecases. Most of the
> upstream DTS have a single calibration variant for the platform and for those
> generic usecases, this static table should be used.
If that property is not going to be deprecated, should it take precedence?
>
> - Mani
>
>>>
>>> So to avoid relying on the "qcom,*calibration-variant" property, this series
>>> introduces a new static calibration variant table based lookup. The newly
>>> introduced helper, ath_get_calib_variant() will parse the model name from
>>> devicetree and use it to do the variant lookup during runtime. The
>>> ath_calib_variant_table[] will hold all the model and calibration variant
>>> entries for the supported devices.
>>>
>>> Going forward, new entries will be added to this table to support calibration
>>> variants.
>>>
>>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
>>> ---
>>> Manivannan Sadhasivam (2):
>>> wifi: ath: Use static calibration variant table for devicetree platforms
>>> dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
>>>
>>> .../bindings/net/wireless/qcom,ath10k.yaml | 1 +
>>> .../bindings/net/wireless/qcom,ath11k-pci.yaml | 3 +-
>>> .../bindings/net/wireless/qcom,ath11k.yaml | 1 +
>>> .../bindings/net/wireless/qcom,ath12k-wsi.yaml | 6 +-
>>> .../bindings/net/wireless/qcom,ipq5332-wifi.yaml | 2 +-
>>> drivers/net/wireless/ath/ath.h | 98 ++++++++++++++++++++++
>>> drivers/net/wireless/ath/ath10k/core.c | 5 ++
>>> drivers/net/wireless/ath/ath11k/core.c | 7 ++
>>> 8 files changed, 115 insertions(+), 8 deletions(-)
>>> ---
>>> base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
>>> change-id: 20251114-ath-variant-tbl-22865456a527
>>>
>>> Best regards,
>>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-17 9:40 ` Baochen Qiang
@ 2025-11-17 12:45 ` Manivannan Sadhasivam
2025-11-17 17:13 ` Jeff Johnson
0 siblings, 1 reply; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-17 12:45 UTC (permalink / raw)
To: Baochen Qiang
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On Mon, Nov 17, 2025 at 05:40:06PM +0800, Baochen Qiang wrote:
>
>
> On 11/17/2025 5:00 PM, Manivannan Sadhasivam wrote:
> > On Mon, Nov 17, 2025 at 10:36:39AM +0800, Baochen Qiang wrote:
> >>
> >>
> >> On 11/14/2025 6:22 PM, Manivannan Sadhasivam wrote:
> >>> Hi,
> >>>
> >>> This series aims to deprecate the usage of "qcom,*calibration-variant"
> >>> devicetree property to select the calibration variant for the WLAN devices. This
> >>> is necessary for WLAN devices connected using PCI bus, as hardcoding the device
> >>> specific information in PCI devicetree node causes the node to be updated every
> >>> time when a new device variant is attached to the PCI slot. This approach is not
> >>> scalable and causes bad user experience.
> >>
> >> I am not very clear about the problem here: is calibration variant device/module specific,
> >> or platform specific? If it is module specific, why the lookup is based on the machine
> >> 'model' property? While if it is platform specific, why do we need to update devicetree
> >> node whenever a new device is attached?
> >>
> >
> > I think I mixed the usecase of the 'firmware-name' property in the above
> > description.
> >
> > But nevertheless, the calibration info platform specific, and hardcoding the DT
> > property fixes the location of the WLAN card with a specific slot. For instance,
> > if the board has a couple of M.2 slots, users should be free to plug the WLAN in
> > any slot, not just a single slot where the property was defined in DT.
> >
> > Also, if the users plug-in the WLAN card of another vendor, not Qcom, this
> > property is irrelevant/wrong.
> >
> > PCIe slots should be plug and play i.e., users should plug-in any M.2 card and
> > expect it to work.
> >
>
> correct
>
> > However, as I learned from Jeff, calibration variant property is also going to
> > be required in cases like router boards where each slot is dedicated to a fixed
> > band and the calibration variant is going to be different for each band for the
> > platform. So unlike I thought, this DT property cannot be deprecated. But going
> > forward, I'd like it to be used only in these special usecases. Most of the
> > upstream DTS have a single calibration variant for the platform and for those
> > generic usecases, this static table should be used.
>
> If that property is not going to be deprecated, should it take precedence?
>
If you mean 'it' by this static table, yes, it is going to take precedence as it
should cover the generic usecases. For special cases like the multi-band
routers, existing DT node fallback will cover.
- Mani
> >
> > - Mani
> >
> >>>
> >>> So to avoid relying on the "qcom,*calibration-variant" property, this series
> >>> introduces a new static calibration variant table based lookup. The newly
> >>> introduced helper, ath_get_calib_variant() will parse the model name from
> >>> devicetree and use it to do the variant lookup during runtime. The
> >>> ath_calib_variant_table[] will hold all the model and calibration variant
> >>> entries for the supported devices.
> >>>
> >>> Going forward, new entries will be added to this table to support calibration
> >>> variants.
> >>>
> >>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> >>> ---
> >>> Manivannan Sadhasivam (2):
> >>> wifi: ath: Use static calibration variant table for devicetree platforms
> >>> dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property
> >>>
> >>> .../bindings/net/wireless/qcom,ath10k.yaml | 1 +
> >>> .../bindings/net/wireless/qcom,ath11k-pci.yaml | 3 +-
> >>> .../bindings/net/wireless/qcom,ath11k.yaml | 1 +
> >>> .../bindings/net/wireless/qcom,ath12k-wsi.yaml | 6 +-
> >>> .../bindings/net/wireless/qcom,ipq5332-wifi.yaml | 2 +-
> >>> drivers/net/wireless/ath/ath.h | 98 ++++++++++++++++++++++
> >>> drivers/net/wireless/ath/ath10k/core.c | 5 ++
> >>> drivers/net/wireless/ath/ath11k/core.c | 7 ++
> >>> 8 files changed, 115 insertions(+), 8 deletions(-)
> >>> ---
> >>> base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
> >>> change-id: 20251114-ath-variant-tbl-22865456a527
> >>>
> >>> Best regards,
> >>
> >
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-17 12:45 ` Manivannan Sadhasivam
@ 2025-11-17 17:13 ` Jeff Johnson
2025-11-18 6:53 ` Manivannan Sadhasivam
0 siblings, 1 reply; 21+ messages in thread
From: Jeff Johnson @ 2025-11-17 17:13 UTC (permalink / raw)
To: Manivannan Sadhasivam, Baochen Qiang
Cc: Jeff Johnson, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-wireless, linux-kernel, ath10k, ath11k,
devicetree, ath12k, Miaoqing Pan
On 11/17/2025 4:45 AM, Manivannan Sadhasivam wrote:
> On Mon, Nov 17, 2025 at 05:40:06PM +0800, Baochen Qiang wrote:
>> On 11/17/2025 5:00 PM, Manivannan Sadhasivam wrote:
>>> On Mon, Nov 17, 2025 at 10:36:39AM +0800, Baochen Qiang wrote:
>>>> On 11/14/2025 6:22 PM, Manivannan Sadhasivam wrote:
>>>>> Hi,
>>>>>
>>>>> This series aims to deprecate the usage of "qcom,*calibration-variant"
>>>>> devicetree property to select the calibration variant for the WLAN devices. This
>>>>> is necessary for WLAN devices connected using PCI bus, as hardcoding the device
>>>>> specific information in PCI devicetree node causes the node to be updated every
>>>>> time when a new device variant is attached to the PCI slot. This approach is not
>>>>> scalable and causes bad user experience.
>>>>
>>>> I am not very clear about the problem here: is calibration variant device/module specific,
>>>> or platform specific? If it is module specific, why the lookup is based on the machine
>>>> 'model' property? While if it is platform specific, why do we need to update devicetree
>>>> node whenever a new device is attached?
>>>>
>>>
>>> I think I mixed the usecase of the 'firmware-name' property in the above
>>> description.
>>>
>>> But nevertheless, the calibration info platform specific, and hardcoding the DT
>>> property fixes the location of the WLAN card with a specific slot. For instance,
>>> if the board has a couple of M.2 slots, users should be free to plug the WLAN in
>>> any slot, not just a single slot where the property was defined in DT.
>>>
>>> Also, if the users plug-in the WLAN card of another vendor, not Qcom, this
>>> property is irrelevant/wrong.
>>>
>>> PCIe slots should be plug and play i.e., users should plug-in any M.2 card and
>>> expect it to work.
>>>
>>
>> correct
>>
>>> However, as I learned from Jeff, calibration variant property is also going to
>>> be required in cases like router boards where each slot is dedicated to a fixed
>>> band and the calibration variant is going to be different for each band for the
>>> platform. So unlike I thought, this DT property cannot be deprecated. But going
>>> forward, I'd like it to be used only in these special usecases. Most of the
>>> upstream DTS have a single calibration variant for the platform and for those
>>> generic usecases, this static table should be used.
>>
>> If that property is not going to be deprecated, should it take precedence?
>>
>
> If you mean 'it' by this static table, yes, it is going to take precedence as it
> should cover the generic usecases. For special cases like the multi-band
> routers, existing DT node fallback will cover.
Does there need to be a PCI Vendor ID & Device ID as part of this lookup?
For example, start with a device that has an ath11k chipset with calibration
data for that chipset. If the end user replaces that chipset with an ath12k
chipset then with the current proposal the same calibration variant will
attempt to be used. But there will not be any calibration data with that
variant for that chipset.
/jeff
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms
2025-11-17 17:13 ` Jeff Johnson
@ 2025-11-18 6:53 ` Manivannan Sadhasivam
0 siblings, 0 replies; 21+ messages in thread
From: Manivannan Sadhasivam @ 2025-11-18 6:53 UTC (permalink / raw)
To: Jeff Johnson
Cc: Baochen Qiang, Jeff Johnson, Johannes Berg, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-wireless, linux-kernel,
ath10k, ath11k, devicetree, ath12k, Miaoqing Pan
On Mon, Nov 17, 2025 at 09:13:04AM -0800, Jeff Johnson wrote:
> On 11/17/2025 4:45 AM, Manivannan Sadhasivam wrote:
> > On Mon, Nov 17, 2025 at 05:40:06PM +0800, Baochen Qiang wrote:
> >> On 11/17/2025 5:00 PM, Manivannan Sadhasivam wrote:
> >>> On Mon, Nov 17, 2025 at 10:36:39AM +0800, Baochen Qiang wrote:
> >>>> On 11/14/2025 6:22 PM, Manivannan Sadhasivam wrote:
> >>>>> Hi,
> >>>>>
> >>>>> This series aims to deprecate the usage of "qcom,*calibration-variant"
> >>>>> devicetree property to select the calibration variant for the WLAN devices. This
> >>>>> is necessary for WLAN devices connected using PCI bus, as hardcoding the device
> >>>>> specific information in PCI devicetree node causes the node to be updated every
> >>>>> time when a new device variant is attached to the PCI slot. This approach is not
> >>>>> scalable and causes bad user experience.
> >>>>
> >>>> I am not very clear about the problem here: is calibration variant device/module specific,
> >>>> or platform specific? If it is module specific, why the lookup is based on the machine
> >>>> 'model' property? While if it is platform specific, why do we need to update devicetree
> >>>> node whenever a new device is attached?
> >>>>
> >>>
> >>> I think I mixed the usecase of the 'firmware-name' property in the above
> >>> description.
> >>>
> >>> But nevertheless, the calibration info platform specific, and hardcoding the DT
> >>> property fixes the location of the WLAN card with a specific slot. For instance,
> >>> if the board has a couple of M.2 slots, users should be free to plug the WLAN in
> >>> any slot, not just a single slot where the property was defined in DT.
> >>>
> >>> Also, if the users plug-in the WLAN card of another vendor, not Qcom, this
> >>> property is irrelevant/wrong.
> >>>
> >>> PCIe slots should be plug and play i.e., users should plug-in any M.2 card and
> >>> expect it to work.
> >>>
> >>
> >> correct
> >>
> >>> However, as I learned from Jeff, calibration variant property is also going to
> >>> be required in cases like router boards where each slot is dedicated to a fixed
> >>> band and the calibration variant is going to be different for each band for the
> >>> platform. So unlike I thought, this DT property cannot be deprecated. But going
> >>> forward, I'd like it to be used only in these special usecases. Most of the
> >>> upstream DTS have a single calibration variant for the platform and for those
> >>> generic usecases, this static table should be used.
> >>
> >> If that property is not going to be deprecated, should it take precedence?
> >>
> >
> > If you mean 'it' by this static table, yes, it is going to take precedence as it
> > should cover the generic usecases. For special cases like the multi-band
> > routers, existing DT node fallback will cover.
> Does there need to be a PCI Vendor ID & Device ID as part of this lookup?
>
I don't think so.
> For example, start with a device that has an ath11k chipset with calibration
> data for that chipset. If the end user replaces that chipset with an ath12k
> chipset then with the current proposal the same calibration variant will
> attempt to be used. But there will not be any calibration data with that
> variant for that chipset.
>
ath12k doesn't seem to require a calibration variant. But even if the user
replaces ath11k chipset with ath10k one, the calibration variant should be the
same as it is platform specific except for WSI.
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2025-11-18 6:53 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14 10:22 [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms Manivannan Sadhasivam
2025-11-14 10:22 ` [PATCH 1/2] " Manivannan Sadhasivam
2025-11-14 10:45 ` Krzysztof Kozlowski
2025-11-14 11:16 ` Manivannan Sadhasivam
2025-11-14 11:24 ` Krzysztof Kozlowski
2025-11-14 11:44 ` Srinivas Kandagatla
2025-11-14 11:48 ` Krzysztof Kozlowski
2025-11-15 9:51 ` kernel test robot
2025-11-14 10:22 ` [PATCH 2/2] dt-bindings: wireless: ath: Deprecate 'qcom,calibration-variant' property Manivannan Sadhasivam
2025-11-14 10:47 ` Krzysztof Kozlowski
2025-11-14 11:02 ` Manivannan Sadhasivam
2025-11-14 11:04 ` Krzysztof Kozlowski
2025-11-14 11:18 ` Manivannan Sadhasivam
2025-11-14 17:29 ` Jeff Johnson
2025-11-17 9:03 ` Manivannan Sadhasivam
2025-11-17 2:36 ` [PATCH 0/2] wifi: ath: Use static calibration variant table for devicetree platforms Baochen Qiang
2025-11-17 9:00 ` Manivannan Sadhasivam
2025-11-17 9:40 ` Baochen Qiang
2025-11-17 12:45 ` Manivannan Sadhasivam
2025-11-17 17:13 ` Jeff Johnson
2025-11-18 6:53 ` Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).