Re: [PATCH v3 1/3] soc: qcom: ice: Add OPP-based clock scaling support for ICE
From: Abhinaba Rakshit
Date: Tue Jan 27 2026 - 04:39:38 EST
On Mon, Jan 26, 2026 at 11:23:51AM +0100, Konrad Dybcio wrote:
> On 1/23/26 8:21 PM, Dmitry Baryshkov wrote:
> > On Fri, Jan 23, 2026 at 12:42:12PM +0530, 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. Disable clock scaling if OPP-table is not registered.
> >>
> >> When an ICE-device specific OPP table is available, use the PM OPP
> >> framework to manage frequency scaling and maintain proper power-domain
> >> constraints.
> >>
> >> Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@xxxxxxxxxxxxxxxx>
> >> ---
>
> [...]
>
> >> +int qcom_ice_scale_clk(struct qcom_ice *ice, bool scale_up)
> >> +{
> >> + int ret = 0;
> >> +
> >> + if (!ice->has_opp)
> >> + return ret;
> >> +
> >> + if (scale_up && ice->max_freq)
> >> + ret = dev_pm_opp_set_rate(ice->dev, ice->max_freq);
> >> + else if (!scale_up && ice->min_freq)
> >> + ret = dev_pm_opp_set_rate(ice->dev, ice->min_freq);
> >
> > Do we expect that there allways will be only two entries in the OPP?
> > If so, it should be a part of the bindings. If not, please design the
> > API with more flexibility in mind.
>
> hamoa:
>
> LOW_SVS: 100 MHz
> SVS: 201.5 MHz
> NOM: 403 MHz
>
Understood, will update the patch-series with multiple-frequency
clock scaling support.