From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC2493DE44D for ; Wed, 27 May 2026 16:12:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779898376; cv=none; b=DMgdHMNnbIMhXguExMQoDL7hui7UNyJ+mL+udwTgOLj6JLn79gjEWJnI+LlovlLdW9ygVrZuDa9ahqk+TmUwfkmGakVkmVJYVU0ZWgksmnKj9jdoIJVJRKOuNw4OcwuNkVpBSYwulrRis9jmgWDPhO15jzwr159b6vchEvfsa+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779898376; c=relaxed/simple; bh=ClNdLpwYAlOi0mAXzSPeOQJ9B677z6apEQsuLegOMTw=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=mXDVgI/zK8SQ0lSebjcbTKnJgfAlZXOIcKdileak/Ys2wWKke5WPHvpA/RT1j8nMoq+GOowAO8ZjtKio0g3G/COQaBaz/XG8Pglsf6VwZ+B0SY26WRELhppOQGph3OhNuh1LbdfJLrxnc2fTidC1Xu5d77LFA4fSstc7Gkwgq3k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Y14VKAI+; arc=none smtp.client-ip=209.85.222.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y14VKAI+" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-90ca6f20872so1466621085a.0 for ; Wed, 27 May 2026 09:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779898374; x=1780503174; darn=vger.kernel.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gCF93p0pPbudh0wfYlc1I9a7H3qyspnUPz7c6ldVCIo=; b=Y14VKAI+izlZfQdu5hG374LE1Z/3yItZhME2wuGPIFpSy/vTvYC57uVJ3ilpLDHwUq qH2AP6glrnfYECeZ/Tc4mJ9XTn/6c/dxGRaN0nAoZmMoJXHl04RuOPJ9huQsJDgPJWu7 FySconMt3EXZXYPZjIpch3hwtjkqXVr+le8DLl+mdkAyQeAGJrXCh6kb+KIceSeZ0L4V clyRJdJnz+4pMB8eSFVv+OhEAWG2B8CELPdrspiKALQhDedwfiCB+JwMzdnAK6yypHAl 8foZ4qAZMhQBsl2Ipf85WMWwUC6Ke5yS85iezRGvH8iMlO2pmymDqx8wFV6m9jBS0TZp ZrNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779898374; x=1780503174; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gCF93p0pPbudh0wfYlc1I9a7H3qyspnUPz7c6ldVCIo=; b=Pz1PsTUw9/lIBK5VRW32MdtYBZY27r7mXBJZ4sm/OV2jaHxhFnrLThGZt3fWcw3Yh7 Bh21kYYmfopbtlQf/wU/irdMxaV7VPSDwXlknMUW1YAbAVdJasZ0zQGEZazq8KkMT1eG XgHnnMQCvveNSFd9HIkvUWgt3/+Qu4dC3WKB0xHbsuBeO1EQYUEru7INz1iRHvT/0wP3 EC15WtphLALmLapqewm/O+8RVqbDHXhlUexKMxgirb3rcybnKVXhaNJby891faEnStZP G2SshpI2n3dXU2IzFrHIUbFzPwodHjaYUHAWdPn7OccNWWMTKDgQevBCNyO4yrcbFaP+ wkOQ== X-Forwarded-Encrypted: i=1; AFNElJ8I3pMULIycxcbwdLROULbct3QM5Rr93T8z0/GDOXYP3AUPpLhDmfGvzmsizgAO0fTKuLI6IsTUuSlYJGE=@vger.kernel.org X-Gm-Message-State: AOJu0YxVE6Zxv9SuNXwzQNitS4Msiu66zfRHv0OlfCSG7EU/dS8Pf36z l3sBYC4E7dJgRASVACrXkK1MElLeWDvNTyRmQOudjHXwfS+12j4iFfimx9OAkvXz X-Gm-Gg: Acq92OEpqkFw2qTz4BBCG/S4xI430qO6wgiZEyf1Dm5yt+XzsjCBDUUzC4vxKctaIEB hFIT4a+EEl8YNlOX9XIaSiwRf/Lyz+HQ3QLzyItlCcx0pNs347mSZ/QLuuOcEaJdpi6ynCNklos xi9omJIlZcGK1HKt3XlQ25xBIM1ssYzeWiuEkKacPjq9mhvldBHPo+h+c+aps7/gbH8ajt5dCC2 4erlw9G7Z0wKZkjRC1wbjfEksuYSSPPwLz59Q5EnoPzQfznxIDeCOuBaLU0RZV3ld6YF3U+74/Y d+ynXd1rtsn1VMQ17GU2n75xzqYYpug0W1rN83/AlZvGF6V8alK5NOCuJZ79NUpEDAV31mkhzjd w/T6bDLfy4NOokG2Z1YX7c+LeM/myiSwTR5nNBTNxeVYxHL1bsaoyeoanXIlgiOU2Ez0s2NBfw0 aJKBZg/4yJtc6Mn1EtKKgPfBScAMPbu2QfPgoVtTbpHlNLX0eHYfWLJT2B1lpy0NiPXkGzfDHNR PI2QwXEBbeVRb6Zi2F1TwLn5nW9yrtuX5//JWblKDwIkQHfI+TE6YShzqKFbw== X-Received: by 2002:a05:620a:454b:b0:911:fba0:6d02 with SMTP id af79cd13be357-914b510b65dmr2927962085a.22.1779898373714; Wed, 27 May 2026 09:12:53 -0700 (PDT) Received: from smtpclient.apple ([2601:19b:4200:392f:e976:246b:e928:1bf7]) by smtp.gmail.com with ESMTPSA id af79cd13be357-914f87d26basm515826085a.24.2026.05.27.09.12.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 May 2026 09:12:53 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: [PATCH 1/1] wifi: ath12k: support calibration-variant from device tree From: Andrew LaMarche In-Reply-To: <20260131003222.2011259-1-andrewjlamarche@gmail.com> Date: Wed, 27 May 2026 12:12:41 -0400 Cc: linux-wireless@vger.kernel.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20260131003222.2011259-1-andrewjlamarche@gmail.com> To: Jeff Johnson X-Mailer: Apple Mail (2.3864.600.51.1.1) Hi, A kind ping here. I=E2=80=99m not sure why this functionality is missing = in the first place, but it is needed for loading caldata from the device = tree. Cheers, Andrew > On Jan 30, 2026, at 7:32=E2=80=AFPM, Andrew LaMarche = wrote: >=20 > ath10k and ath11k support reading calibration variants from the device > tree to locate the correct Board Description File (BDF). The = ath12k-wsi > binding already describes using qcom,calibration-variant and > qcom,ath12k-calibration-variant, but it is not implemented in the = code. >=20 > Many ath12k designs expose all the radios under a single phy, each of > which typically require a separate BDF. Without this, the radios may = not > come up or will not be calibrated correctly. >=20 > Fix this by parsing the device tree for the generation-agnostic > qcom,calibration-variant node or ath12k-specific > qcom,ath12k-calibration-variant node. This allows the driver to = properly > select, read and apply the correct BDF. >=20 > Signed-off-by: Andrew LaMarche > --- > drivers/net/wireless/ath/ath12k/core.c | 25 +++++++++++++++++++++++++ > drivers/net/wireless/ath/ath12k/core.h | 2 +- > drivers/net/wireless/ath/ath12k/qmi.c | 4 ++++ > 3 files changed, 30 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/wireless/ath/ath12k/core.c = b/drivers/net/wireless/ath/ath12k/core.c > index cc352eef1939..e45f76d81337 100644 > --- a/drivers/net/wireless/ath/ath12k/core.c > +++ b/drivers/net/wireless/ath/ath12k/core.c > @@ -806,6 +806,31 @@ int ath12k_core_check_smbios(struct ath12k_base = *ab) > return 0; > } >=20 > +int ath12k_core_check_dt(struct ath12k_base *ab) > +{ > + size_t max_len =3D sizeof(ab->qmi.target.bdf_ext); > + const char *variant =3D NULL; > + struct device_node *node; > + > + node =3D ab->dev->of_node; > + if (!node) > + return -ENOENT; > + > + of_property_read_string(node, "qcom,calibration-variant", > + &variant); > + if (!variant) > + of_property_read_string(node, = "qcom,ath12k-calibration-variant", > + &variant); > + if (!variant) > + return -ENODATA; > + > + if (strscpy(ab->qmi.target.bdf_ext, variant, max_len) < 0) > + ath12k_dbg(ab, ATH12K_DBG_BOOT, > + "bdf variant string is longer than the = buffer can accommodate (variant: %s)\n", variant); > + > + return 0; > +} > + > static int ath12k_core_soc_create(struct ath12k_base *ab) > { > int ret; > diff --git a/drivers/net/wireless/ath/ath12k/core.h = b/drivers/net/wireless/ath/ath12k/core.h > index 3c1e0069be1e..39700a780ee2 100644 > --- a/drivers/net/wireless/ath/ath12k/core.h > +++ b/drivers/net/wireless/ath/ath12k/core.h > @@ -1352,7 +1352,7 @@ int ath12k_core_fetch_bdf(struct ath12k_base = *ath12k, > struct ath12k_board_data *bd); > void ath12k_core_free_bdf(struct ath12k_base *ab, struct = ath12k_board_data *bd); > int ath12k_core_fetch_regdb(struct ath12k_base *ab, struct = ath12k_board_data *bd); > -int ath12k_core_check_dt(struct ath12k_base *ath12k); > +int ath12k_core_check_dt(struct ath12k_base *ab); > int ath12k_core_check_smbios(struct ath12k_base *ab); > void ath12k_core_halt(struct ath12k *ar); > int ath12k_core_resume_early(struct ath12k_base *ab); > diff --git a/drivers/net/wireless/ath/ath12k/qmi.c = b/drivers/net/wireless/ath/ath12k/qmi.c > index b7c48b6706df..22ef5aab871f 100644 > --- a/drivers/net/wireless/ath/ath12k/qmi.c > +++ b/drivers/net/wireless/ath/ath12k/qmi.c > @@ -2903,6 +2903,10 @@ int ath12k_qmi_request_target_cap(struct = ath12k_base *ab) > if (r) > ath12k_dbg(ab, ATH12K_DBG_QMI, "SMBIOS bdf variant name = not set.\n"); >=20 > + r =3D ath12k_core_check_dt(ab); > + if (r) > + ath12k_dbg(ab, ATH12K_DBG_QMI, "DT bdf variant name not = set.\n"); > + > r =3D ath12k_acpi_start(ab); > if (r) > /* ACPI is optional so continue in case of an error */ > --=20 > 2.43.0 >=20