From: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
To: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>,
Johannes Berg <johannes@sipsolutions.net>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jeff Johnson <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, ath12k@lists.infradead.org,
Sowmiya Sree Elavalagan <sowmiya.elavalagan@oss.qualcomm.com>,
Saravanakumar Duraisamy <quic_saradura@quicinc.com>,
Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Subject: Re: [PATCH ath-next v5 6/6] wifi: ath12k: Enable IPQ5424 WiFi device support
Date: Tue, 7 Apr 2026 21:54:53 +0530 [thread overview]
Message-ID: <53817665-ef49-445f-b549-41bdc7a847cc@oss.qualcomm.com> (raw)
In-Reply-To: <20260407-ath12k-ipq5424-v5-6-8e96aa660ec4@oss.qualcomm.com>
On 4/7/2026 10:56 AM, Raj Kumar Bhagat wrote:
> From: Sowmiya Sree Elavalagan <sowmiya.elavalagan@oss.qualcomm.com>
>
> Currently, ath12k AHB (in IPQ5332) uses SCM calls to authenticate the
> firmware image to bring up userpd. From IPQ5424 onwards, Q6 firmware can
> directly communicate with the Trusted Management Engine - Lite (TME-L),
> eliminating the need for SCM calls for userpd bring-up.
>
> Hence, to enable IPQ5424 device support, use qcom_mdt_load_no_init() and
> skip the SCM call as Q6 will directly authenticate the userpd firmware.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
> Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
> Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Sowmiya Sree Elavalagan <sowmiya.elavalagan@oss.qualcomm.com>
> Co-developed-by: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
> Signed-off-by: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
> Co-developed-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
> Signed-off-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath12k/ahb.c | 36 ++++++++++++++++++-----------
> drivers/net/wireless/ath/ath12k/ahb.h | 1 +
> drivers/net/wireless/ath/ath12k/wifi7/ahb.c | 8 +++++++
> 3 files changed, 31 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/ahb.c b/drivers/net/wireless/ath/ath12k/ahb.c
> index 9a4d34e49104..2dcf0a52e4c1 100644
> --- a/drivers/net/wireless/ath/ath12k/ahb.c
> +++ b/drivers/net/wireless/ath/ath12k/ahb.c
> @@ -382,8 +382,12 @@ static int ath12k_ahb_power_up(struct ath12k_base *ab)
> ATH12K_AHB_UPD_SWID;
>
> /* Load FW image to a reserved memory location */
> - ret = qcom_mdt_load(dev, fw, fw_name, pasid, mem_region, mem_phys, mem_size,
> - &mem_phys);
> + if (ab_ahb->scm_auth_enabled)
> + ret = qcom_mdt_load(dev, fw, fw_name, pasid, mem_region,
> + mem_phys, mem_size, &mem_phys);
> + else
> + ret = qcom_mdt_load_no_init(dev, fw, fw_name, mem_region,
> + mem_phys, mem_size, &mem_phys);
> if (ret) {
> ath12k_err(ab, "Failed to load MDT segments: %d\n", ret);
> goto err_fw;
> @@ -414,11 +418,13 @@ static int ath12k_ahb_power_up(struct ath12k_base *ab)
> goto err_fw2;
> }
>
> - /* Authenticate FW image using peripheral ID */
> - ret = qcom_scm_pas_auth_and_reset(pasid);
> - if (ret) {
> - ath12k_err(ab, "failed to boot the remote processor %d\n", ret);
> - goto err_fw2;
> + if (ab_ahb->scm_auth_enabled) {
> + /* Authenticate FW image using peripheral ID */
> + ret = qcom_scm_pas_auth_and_reset(pasid);
> + if (ret) {
> + ath12k_err(ab, "failed to boot the remote processor %d\n", ret);
> + goto err_fw2;
> + }
> }
>
> /* Instruct Q6 to spawn userPD thread */
> @@ -475,13 +481,15 @@ static void ath12k_ahb_power_down(struct ath12k_base *ab, bool is_suspend)
>
> qcom_smem_state_update_bits(ab_ahb->stop_state, BIT(ab_ahb->stop_bit), 0);
>
> - pasid = (u32_encode_bits(ab_ahb->userpd_id, ATH12K_USERPD_ID_MASK)) |
> - ATH12K_AHB_UPD_SWID;
> - /* Release the firmware */
> - ret = qcom_scm_pas_shutdown(pasid);
> - if (ret)
> - ath12k_err(ab, "scm pas shutdown failed for userPD%d: %d\n",
> - ab_ahb->userpd_id, ret);
> + if (ab_ahb->scm_auth_enabled) {
> + pasid = (u32_encode_bits(ab_ahb->userpd_id, ATH12K_USERPD_ID_MASK)) |
> + ATH12K_AHB_UPD_SWID;
> + /* Release the firmware */
> + ret = qcom_scm_pas_shutdown(pasid);
> + if (ret)
> + ath12k_err(ab, "scm pas shutdown failed for userPD%d\n",
> + ab_ahb->userpd_id);
> + }
> }
>
> static void ath12k_ahb_init_qmi_ce_config(struct ath12k_base *ab)
> diff --git a/drivers/net/wireless/ath/ath12k/ahb.h b/drivers/net/wireless/ath/ath12k/ahb.h
> index be9e31b3682d..0fa15daaa3e6 100644
> --- a/drivers/net/wireless/ath/ath12k/ahb.h
> +++ b/drivers/net/wireless/ath/ath12k/ahb.h
> @@ -68,6 +68,7 @@ struct ath12k_ahb {
> int userpd_irq_num[ATH12K_USERPD_MAX_IRQ];
> const struct ath12k_ahb_ops *ahb_ops;
> const struct ath12k_ahb_device_family_ops *device_family_ops;
> + bool scm_auth_enabled;
> };
>
> struct ath12k_ahb_driver {
> diff --git a/drivers/net/wireless/ath/ath12k/wifi7/ahb.c b/drivers/net/wireless/ath/ath12k/wifi7/ahb.c
> index a6c5f7689edd..6a8b8b2a56f9 100644
> --- a/drivers/net/wireless/ath/ath12k/wifi7/ahb.c
> +++ b/drivers/net/wireless/ath/ath12k/wifi7/ahb.c
> @@ -19,6 +19,9 @@ static const struct of_device_id ath12k_wifi7_ahb_of_match[] = {
> { .compatible = "qcom,ipq5332-wifi",
> .data = (void *)ATH12K_HW_IPQ5332_HW10,
> },
> + { .compatible = "qcom,ipq5424-wifi",
> + .data = (void *)ATH12K_HW_IPQ5424_HW10,
> + },
> { }
> };
>
> @@ -38,6 +41,11 @@ static int ath12k_wifi7_ahb_probe(struct platform_device *pdev)
> switch (hw_rev) {
> case ATH12K_HW_IPQ5332_HW10:
> ab_ahb->userpd_id = ATH12K_IPQ5332_USERPD_ID;
> + ab_ahb->scm_auth_enabled = true;
> + break;
> + case ATH12K_HW_IPQ5424_HW10:
> + ab_ahb->userpd_id = ATH12K_IPQ5332_USERPD_ID;
> + ab_ahb->scm_auth_enabled = false;
> break;
> default:
> return -EOPNOTSUPP;
>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
next prev parent reply other threads:[~2026-04-07 16:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 5:26 [PATCH ath-next v5 0/6] wifi: ath12k: Enable IPQ5424 AHB WiFi device Raj Kumar Bhagat
2026-04-07 5:26 ` [PATCH ath-next v5 1/6] dt-bindings: net: wireless: add ath12k wifi device IPQ5424 Raj Kumar Bhagat
2026-04-07 5:26 ` [PATCH ath-next v5 2/6] wifi: ath12k: Add ath12k_hw_params for IPQ5424 Raj Kumar Bhagat
2026-04-07 16:20 ` Rameshkumar Sundaram
2026-04-07 5:26 ` [PATCH ath-next v5 3/6] wifi: ath12k: add ath12k_hw_version_map entry " Raj Kumar Bhagat
2026-04-07 16:21 ` Rameshkumar Sundaram
2026-04-07 5:26 ` [PATCH ath-next v5 4/6] wifi: ath12k: add ath12k_hw_regs " Raj Kumar Bhagat
2026-04-07 16:22 ` Rameshkumar Sundaram
2026-04-07 5:26 ` [PATCH ath-next v5 5/6] wifi: ath12k: Add CE remap hardware parameters " Raj Kumar Bhagat
2026-04-07 16:23 ` Rameshkumar Sundaram
2026-04-07 5:26 ` [PATCH ath-next v5 6/6] wifi: ath12k: Enable IPQ5424 WiFi device support Raj Kumar Bhagat
2026-04-07 16:24 ` Rameshkumar Sundaram [this message]
2026-04-08 0:50 ` [PATCH ath-next v5 0/6] wifi: ath12k: Enable IPQ5424 AHB WiFi device Jeff Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53817665-ef49-445f-b549-41bdc7a847cc@oss.qualcomm.com \
--to=rameshkumar.sundaram@oss.qualcomm.com \
--cc=ath12k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jjohnson@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_saradura@quicinc.com \
--cc=raj.bhagat@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sowmiya.elavalagan@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox