Re: [PATCH v2 1/3] soc: qcom: ice: Add OPP-based clock scaling support for ICE

From: Konrad Dybcio

Date: Fri Nov 21 2025 - 08:46:56 EST


On 11/21/25 11:36 AM, Abhinaba Rakshit wrote:
> Register optional operation-points-v2 table for ICE device
> and aquire its minimum and maximum frequency during ICE
> device probe.
>
> Introduce clock scaling API qcom_ice_scale_clk which scale ICE
> core clock if valid (non-zero) frequencies are obtained from
> OPP-table. Zero min and max (default values) frequencies depicts
> clock scaling is disabled.
>
> When an ICE-device specific OPP table is available, use the PM OPP
> framework to manage frequency scaling and maintain proper power-domain
> constraints. For legacy targets without an ICE-device specific OPP table,
> fall back to the standard clock framework APIs to set the frequency.

You can still set a frequency through OPP APIs if the table is empty
(and one is always created even if devm_pm_opp_of_add_table() fails)

[...]

> /*
> * Legacy DT binding uses different clk names for each consumer,
> - * so lets try those first. If none of those are a match, it means
> - * the we only have one clock and it is part of the dedicated DT node.
> - * Also, enable the clock before we check what HW version the driver
> - * supports.
> + * so lets try those first. Also get its corresponding clock index.
> + */

I would argue *not* setting the rate on targets utilizing a binding without
an OPP table for the ICE is probably a smart thing to do, because we may
brownout the SoC this way

Konrad