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
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
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
+ 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
--
மணிவண்ணன் சதாசிவம்
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
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
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
© 2016 - 2026 Red Hat, Inc.