[PATCH v5 00/13] Add explicit clock vote and enable power-domain for QCOM-ICE

Harshal Dev posted 13 patches 1 month, 3 weeks ago
.../bindings/crypto/qcom,inline-crypto-engine.yaml | 35 +++++++++++++++++++++-
arch/arm64/boot/dts/qcom/eliza.dtsi                |  6 +++-
arch/arm64/boot/dts/qcom/kaanapali.dtsi            |  6 +++-
arch/arm64/boot/dts/qcom/kodiak.dtsi               |  6 +++-
arch/arm64/boot/dts/qcom/lemans.dtsi               |  6 +++-
arch/arm64/boot/dts/qcom/milos.dtsi                |  6 +++-
arch/arm64/boot/dts/qcom/monaco.dtsi               |  6 +++-
arch/arm64/boot/dts/qcom/sc7180.dtsi               |  6 +++-
arch/arm64/boot/dts/qcom/sm8450.dtsi               |  6 +++-
arch/arm64/boot/dts/qcom/sm8550.dtsi               |  6 +++-
arch/arm64/boot/dts/qcom/sm8650.dtsi               |  6 +++-
arch/arm64/boot/dts/qcom/sm8750.dtsi               |  6 +++-
drivers/soc/qcom/ice.c                             | 17 +++++++++--
13 files changed, 104 insertions(+), 14 deletions(-)
[PATCH v5 00/13] Add explicit clock vote and enable power-domain for QCOM-ICE
Posted by Harshal Dev 1 month, 3 weeks ago
When the kernel is booted without the 'clk_ignore_unused' and
'pd_ignore_unused' command‑line flags, votes for unused clocks and power
domains are dropped by the kernel post late_init and deferred probe
timeout. Depending on the relative timing between the ICE probe and the
kernel disabling the unused clocks and power domains occasional unclocked
register accesses or 'stuck' clocks are observed during QCOM‑ICE probe.
When the 'iface' clock is not voted on, unclocked register access would
be observed. On the other hand, if the associated power-domain for ICE
is not enabled, a 'stuck' clock is observed.

This patch series resolves both of these problems by adding explicit
power‑domain enablement and 'iface' clock‑vote handling to the QCOM‑ICE
driver.

The clock 'stuck' issue was first reported on Qualcomm RideSX4 (sa8775p)
platform: https://lore.kernel.org/all/ZZYTYsaNUuWQg3tR@x1/

Issue with unclocked ICE register access is easily reproducible on
on Qualcomm RB3Gen2 (kodiak) platform when 'clk_ignore_unused' is
not passed on the kernel command-line.

This patch series has been validated on: SM8650-MTP, RB3Gen2 and
Lemans-EVK.

Signed-off-by: Harshal Dev <harshal.dev@oss.qualcomm.com>
---
Changes in v5:
- Rebased onto linux-next tag next-20260415
- Added patches 12 and 13 to this series to ensure newly added eliza and milos
  DTS in v7.1 comply to the DT-binding introduced in this patch series.
- Fixed commit message of patch 1 to indicate eliza and milos DT support was
  added in kernel v7.1.
- Collected Reviewed-by and Tested-by tags from Kuldeep, Konrad, Krzysztof and
  Manivannan.  
- Link to v4: https://lore.kernel.org/r/20260323-qcom_ice_power_and_clk_vote-v4-0-e36044bbdfe9@oss.qualcomm.com

Changes in v4:
- Squashed commits 1 and 2 from v3 to form a single consolidated patch with
  an updated and more concise commit message that explains why the DT binding
  needs to be fixed and why the fix is necessary for this release cycle.
- Re-order the ICE driver source code patches to be positioned before the DTS
  patches.
- Collected Reviewed-by tags from Konrad for DTS patches which were missed in
  v3.
- Link to v3: https://lore.kernel.org/r/20260317-qcom_ice_power_and_clk_vote-v3-0-53371dbabd6a@oss.qualcomm.com

Changes in v3:
- Dropped "_clk" suffix from clock names in DT binding and sources and ensure
  ICE driver looks for these updated clock names.
- Updated commit message of DT binding change (Patch 1) to explicitly state
  that the change is preserving backward compatibility.
- Introduced new DT binding commit to ensure eliza and milos require the iface
  clock and power-domain.
- Check for IS_ERR() on devm_clk_get_optional_enabled(dev, "iface") return
  value.
- Minor beautification of dev_err() prints as suggested by Konrad.
- Rebased onto latest linux-next tag next-20260316.
- Link to v2: https://lore.kernel.org/r/20260310-qcom_ice_power_and_clk_vote-v2-0-b9c2a5471d9e@oss.qualcomm.com

Changes in v2:
- Updated the DT bindings and ICE driver source to ensure no ABI breaks are
  made in this patch series. A follow-up patch series will mark the clocks
  and power-domain as required to preserve bisectability.
- Added list of allowed clock-names to the DT-binding.
- Added Fixes tag to mark the original regressions and ensure back-porting
  for stable trees.
- Updated the commit messages to explicitly mention the problem of
  potential unclocked register access and stuck clocks during probe.
- Dropped explicit calls to pm_runtime_* APIs from ICE probe, suspend and
  resume.
- Link to v1: https://lore.kernel.org/r/20260123-qcom_ice_power_and_clk_vote-v1-0-e9059776f85c@qti.qualcomm.com

---
Harshal Dev (13):
      dt-bindings: crypto: qcom,ice: Fix missing power-domain and iface clk
      soc: qcom: ice: Allow explicit votes on 'iface' clock for ICE
      arm64: dts: qcom: kaanapali: Add power-domain and iface clk for ice node
      arm64: dts: qcom: lemans: Add power-domain and iface clk for ice node
      arm64: dts: qcom: monaco: Add power-domain and iface clk for ice node
      arm64: dts: qcom: sc7180: Add power-domain and iface clk for ice node
      arm64: dts: qcom: kodiak: Add power-domain and iface clk for ice node
      arm64: dts: qcom: sm8450: Add power-domain and iface clk for ice node
      arm64: dts: qcom: sm8550: Add power-domain and iface clk for ice node
      arm64: dts: qcom: sm8650: Add power-domain and iface clk for ice node
      arm64: dts: qcom: sm8750: Add power-domain and iface clk for ice node
      arm64: dts: qcom: milos: Add power-domain and iface clk for ice node
      arm64: dts: qcom: eliza: Add power-domain and iface clk for ice node

 .../bindings/crypto/qcom,inline-crypto-engine.yaml | 35 +++++++++++++++++++++-
 arch/arm64/boot/dts/qcom/eliza.dtsi                |  6 +++-
 arch/arm64/boot/dts/qcom/kaanapali.dtsi            |  6 +++-
 arch/arm64/boot/dts/qcom/kodiak.dtsi               |  6 +++-
 arch/arm64/boot/dts/qcom/lemans.dtsi               |  6 +++-
 arch/arm64/boot/dts/qcom/milos.dtsi                |  6 +++-
 arch/arm64/boot/dts/qcom/monaco.dtsi               |  6 +++-
 arch/arm64/boot/dts/qcom/sc7180.dtsi               |  6 +++-
 arch/arm64/boot/dts/qcom/sm8450.dtsi               |  6 +++-
 arch/arm64/boot/dts/qcom/sm8550.dtsi               |  6 +++-
 arch/arm64/boot/dts/qcom/sm8650.dtsi               |  6 +++-
 arch/arm64/boot/dts/qcom/sm8750.dtsi               |  6 +++-
 drivers/soc/qcom/ice.c                             | 17 +++++++++--
 13 files changed, 104 insertions(+), 14 deletions(-)
---
base-commit: 936c21068d7ade00325e40d82bfd2f3f29d9f659
change-id: 20260120-qcom_ice_power_and_clk_vote-769704f5036a

Best regards,
-- 
Harshal Dev <harshal.dev@oss.qualcomm.com>

Re: (subset) [PATCH v5 00/13] Add explicit clock vote and enable power-domain for QCOM-ICE
Posted by Bjorn Andersson 2 weeks, 4 days ago
On Thu, 16 Apr 2026 17:29:17 +0530, Harshal Dev wrote:
> When the kernel is booted without the 'clk_ignore_unused' and
> 'pd_ignore_unused' command‑line flags, votes for unused clocks and power
> domains are dropped by the kernel post late_init and deferred probe
> timeout. Depending on the relative timing between the ICE probe and the
> kernel disabling the unused clocks and power domains occasional unclocked
> register accesses or 'stuck' clocks are observed during QCOM‑ICE probe.
> When the 'iface' clock is not voted on, unclocked register access would
> be observed. On the other hand, if the associated power-domain for ICE
> is not enabled, a 'stuck' clock is observed.
> 
> [...]

Applied, thanks!

[03/13] arm64: dts: qcom: kaanapali: Add power-domain and iface clk for ice node
        commit: 11b48f6d5ed505ced9cd3645d6615279198a7a54
[04/13] arm64: dts: qcom: lemans: Add power-domain and iface clk for ice node
        commit: 04566e287b35fde9fd129db5fdf6a96e336af55c
[05/13] arm64: dts: qcom: monaco: Add power-domain and iface clk for ice node
        commit: 68d5d9701a7ab1b1f9c76feaa3a24ca716f03f0b
[06/13] arm64: dts: qcom: sc7180: Add power-domain and iface clk for ice node
        commit: 7cd7271ac525e4eadd22734f418219f247638f43
[07/13] arm64: dts: qcom: kodiak: Add power-domain and iface clk for ice node
        commit: cca53c338ad87edc4b46d2d82730fd8ca01a164f
[08/13] arm64: dts: qcom: sm8450: Add power-domain and iface clk for ice node
        commit: 3a5cb1ccbfb3141862b28f24cd5050083233aae7
[09/13] arm64: dts: qcom: sm8550: Add power-domain and iface clk for ice node
        commit: 52696dbbe7bbe0c8fc8c17133ffb5133b8cf37a6
[10/13] arm64: dts: qcom: sm8650: Add power-domain and iface clk for ice node
        commit: c62b084d5d1564f808408a2f7d4c514e57cd4106
[11/13] arm64: dts: qcom: sm8750: Add power-domain and iface clk for ice node
        commit: 081ac792f0ea6d27a4b130c70cfd7544efee8137

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>
Re: (subset) [PATCH v5 00/13] Add explicit clock vote and enable power-domain for QCOM-ICE
Posted by Bjorn Andersson 4 weeks ago
On Thu, 16 Apr 2026 17:29:17 +0530, Harshal Dev wrote:
> When the kernel is booted without the 'clk_ignore_unused' and
> 'pd_ignore_unused' command‑line flags, votes for unused clocks and power
> domains are dropped by the kernel post late_init and deferred probe
> timeout. Depending on the relative timing between the ICE probe and the
> kernel disabling the unused clocks and power domains occasional unclocked
> register accesses or 'stuck' clocks are observed during QCOM‑ICE probe.
> When the 'iface' clock is not voted on, unclocked register access would
> be observed. On the other hand, if the associated power-domain for ICE
> is not enabled, a 'stuck' clock is observed.
> 
> [...]

Applied, thanks!

[02/13] soc: qcom: ice: Allow explicit votes on 'iface' clock for ICE
        commit: 0d5dc5818191b55e4364d04b1b898a14a2ccac38

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>