From: sashiko-bot@kernel.org
To: "Yepuri Siddu" <yepuri.siddu@oss.qualcomm.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: qcom: shikra: Add WCN clock to Bluetooth node
Date: Fri, 25 Sep 2026 06:26:22 +0000 [thread overview]
Message-ID: <20260925062622.C53D31F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260925-bt-wcn-clk-enable-v1-2-30bee88c4de4@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] dt-bindings: incorrect WCN clock placement breaks WiFi power sequencing
- [High] bluetooth: hci_qca: unbalanced clock and pwrseq disable on error path
--
commit 508a8593da851a2bfa09fc351881cb48702acb33
Author: Yepuri Siddu <yepuri.siddu@oss.qualcomm.com>
arm64: dts: qcom: shikra: Add WCN clock to Bluetooth node
This commit explicitly declares the WCN clock dependency in the Bluetooth node
for the shikra CQM and IQS SOM boards. It is intended to allow the hci_qca
driver to vote for the clock during Bluetooth power sequencing.
> diff --git a/arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi b/arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi
> index 8ac42ff625a0e..4e03e459c7c16 100644
> --- a/arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi
> +++ b/arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi
> @@ -220,6 +220,8 @@ bluetooth {
> vddxo-supply = <&vreg_pmu_xo>;
> vddrf-supply = <&vreg_pmu_rf>;
> vddch0-supply = <&vreg_pmu_ch0>;
> +
> + clocks = <&rpmcc RPM_SMD_RF_CLK2>;
[Severity: High]
Does this code place the WCN clock in the correct node?
The WCN PMU driver (drivers/power/sequencing/pwrseq-qcom-wcn.c) manages the
shared WCN RF clock for both Bluetooth and WLAN. It retrieves the clock from
its own PMU device node via devm_clk_get_optional(dev, NULL).
If the main RF clock is placed inside the bluetooth node instead of the
wcn3988-pmu node, the PMU driver's ctx->clk evaluates to NULL.
If WiFi is powered on while Bluetooth is off, will the PMU driver attempt to
enable the clock but do nothing, leaving the hardware clock disabled and
causing the WiFi subsystem to silently fail or crash?
> };
> };
>
> diff --git a/arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi b/arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi
> index 4ff97945274dd..227283ab74a81 100644
> --- a/arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi
> +++ b/arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi
> @@ -242,6 +242,8 @@ bluetooth {
> vddxo-supply = <&vreg_pmu_xo>;
> vddrf-supply = <&vreg_pmu_rf>;
> vddch0-supply = <&vreg_pmu_ch0>;
> +
> + clocks = <&rpmcc RPM_SMD_RF_CLK1>;
[Severity: High]
Is the WCN clock placement correct here?
Similar to the CQM SOM, if the clock is placed in the bluetooth node instead
of the wcn3988-pmu node, will this deprive the PMU power sequencer of its
clock reference and break WiFi power sequencing?
> };
> };
I also have a question regarding the pwrseq path mentioned in the commit
message.
drivers/bluetooth/hci_qca.c:qca_regulator_enable() {
...
if (qcadev->susclk) {
ret = clk_prepare_enable(qcadev->susclk);
if (ret)
pwrseq_disable(power->pwrseq);
}
return ret;
}
[Severity: High]
If clk_prepare_enable(qcadev->susclk) fails here, pwrseq_disable() is called
and the error is returned. This error propagates up through qca_power_on() to
qca_setup(). Upon failure, qca_setup() jumps to the out label and invokes
qca_power_off():
drivers/bluetooth/hci_qca.c:qca_power_off() {
...
if (power && power->pwrseq) {
if (qcadev->susclk)
clk_disable_unprepare(qcadev->susclk);
pwrseq_disable(power->pwrseq);
set_bit(QCA_BT_OFF, &qca->flags);
return;
}
...
}
Because qca_power_off() lacks state tracking for the pwrseq path, will this
unconditionally execute clk_disable_unprepare(qcadev->susclk) and
pwrseq_disable(power->pwrseq) again?
Could this unbalanced clock unprepare trigger a kernel WARN, and could the
double pwrseq_disable() cause a reference count underflow, potentially leading
to crashes or resource corruption?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260925-bt-wcn-clk-enable-v1-0-30bee88c4de4@oss.qualcomm.com?part=2
prev parent reply other threads:[~2026-09-25 6:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 6:13 [PATCH 0/2] Bluetooth: hci_qca: Add WCN clock enable/disable support for Shikra Yepuri Siddu
2026-09-25 6:13 ` [PATCH 1/2] Bluetooth: hci_qca: Add WCN clock management for pwrseq-based power path Yepuri Siddu
2026-09-25 6:27 ` sashiko-bot
2026-09-29 10:03 ` Loic Poulain
2026-09-29 10:19 ` Yepuri Siddu
2026-09-25 6:13 ` [PATCH 2/2] arm64: dts: qcom: shikra: Add WCN clock to Bluetooth node Yepuri Siddu
2026-09-25 6:26 ` sashiko-bot [this message]
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=20260925062622.C53D31F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yepuri.siddu@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