From: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Neeraj Soni <neeraj.soni@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH v3 1/3] soc: qcom: ice: Add OPP-based clock scaling support for ICE
Date: Tue, 27 Jan 2026 15:08:00 +0530 [thread overview]
Message-ID: <aXiHeMcQiF8X1ANZ@hu-arakshit-hyd.qualcomm.com> (raw)
In-Reply-To: <gfqpfzulzptkrbcrc2zcnqv6kmtdgwwxqc2rxnbq3rlh7azilj@srzlycd7wv4d>
On Fri, Jan 23, 2026 at 09:21:40PM +0200, 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@oss.qualcomm.com>
> > ---
> > drivers/soc/qcom/ice.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++
> > include/soc/qcom/ice.h | 1 +
> > 2 files changed, 64 insertions(+)
> >
> > diff --git a/drivers/soc/qcom/ice.c b/drivers/soc/qcom/ice.c
> > index b203bc685cadd21d6f96eb1799963a13db4b2b72..ca6a7df7a6827378af1f013c7e62a835d1b80cc5 100644
> > --- a/drivers/soc/qcom/ice.c
> > +++ b/drivers/soc/qcom/ice.c
> > @@ -16,6 +16,7 @@
> > #include <linux/of.h>
> > #include <linux/of_platform.h>
> > #include <linux/platform_device.h>
> > +#include <linux/pm_opp.h>
> >
> > #include <linux/firmware/qcom/qcom_scm.h>
> >
> > @@ -111,6 +112,9 @@ struct qcom_ice {
> > bool use_hwkm;
> > bool hwkm_init_complete;
> > u8 hwkm_version;
> > + unsigned long max_freq;
> > + unsigned long min_freq;
> > + bool has_opp;
> > };
> >
> > static bool qcom_ice_check_supported(struct qcom_ice *ice)
> > @@ -549,10 +553,29 @@ int qcom_ice_import_key(struct qcom_ice *ice,
> > }
> > EXPORT_SYMBOL_GPL(qcom_ice_import_key);
> >
> > +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.
No.
Thanks for pointing this out. With OPP v2 being used we can indeed,
support multiple frequencies.
Also UFS core using devfreq clock scaling can scale among
multiple-frequencies depending on the load.
Will update the patch-set, with multi-frequency scale support.
next prev parent reply other threads:[~2026-01-27 9:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 7:12 [PATCH v3 0/3] Enable ICE clock scaling Abhinaba Rakshit
2026-01-23 7:12 ` [PATCH v3 1/3] soc: qcom: ice: Add OPP-based clock scaling support for ICE Abhinaba Rakshit
2026-01-23 19:21 ` Dmitry Baryshkov
2026-01-26 10:23 ` Konrad Dybcio
2026-01-27 9:39 ` Abhinaba Rakshit
2026-01-27 9:38 ` Abhinaba Rakshit [this message]
2026-01-23 7:12 ` [PATCH v3 2/3] ufs: host: Add ICE clock scaling during UFS clock changes Abhinaba Rakshit
2026-01-23 7:12 ` [PATCH v3 3/3] soc: qcom: ice: Set ICE clk to TURBO on probe Abhinaba Rakshit
2026-01-23 19:18 ` [PATCH v3 0/3] Enable ICE clock scaling Dmitry Baryshkov
2026-01-27 9:31 ` Abhinaba Rakshit
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=aXiHeMcQiF8X1ANZ@hu-arakshit-hyd.qualcomm.com \
--to=abhinaba.rakshit@oss.qualcomm.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=neeraj.soni@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
all inboxes | Powered by JetHome®