lkml.org 
[lkml]   [2019]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 3/3] cpufreq: imx-sc: add i.mx system controller cpufreq support
Date


Best Regards!
Anson Huang

> -----Original Message-----
> From: Anson Huang
> Sent: 2019年2月13日 16:47
> To: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: robh+dt@kernel.org; mark.rutland@arm.com; shawnguo@kernel.org;
> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> catalin.marinas@arm.com; will.deacon@arm.com; rjw@rjwysocki.net;
> Aisheng Dong <aisheng.dong@nxp.com>; Daniel Baluta
> <daniel.baluta@nxp.com>; Andy Gross <andy.gross@linaro.org>;
> horms+renesas@verge.net.au; heiko@sntech.de; arnd@arndb.de;
> bjorn.andersson@linaro.org; jagan@amarulasolutions.com;
> enric.balletbo@collabora.com; marc.w.gonzalez@free.fr; olof@lixom.net;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; linux-pm@vger.kernel.org; dl-linux-imx <linux-
> imx@nxp.com>
> Subject: RE: [PATCH 3/3] cpufreq: imx-sc: add i.mx system controller cpufreq
> support
>
> Hi, Viresh
>
> Best Regards!
> Anson Huang
>
> > -----Original Message-----
> > From: Viresh Kumar [mailto:viresh.kumar@linaro.org]
> > Sent: 2019年2月13日 15:09
> > To: Anson Huang <anson.huang@nxp.com>
> > Cc: robh+dt@kernel.org; mark.rutland@arm.com; shawnguo@kernel.org;
> > s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> > catalin.marinas@arm.com; will.deacon@arm.com; rjw@rjwysocki.net;
> > Aisheng Dong <aisheng.dong@nxp.com>; Daniel Baluta
> > <daniel.baluta@nxp.com>; Andy Gross <andy.gross@linaro.org>;
> > horms+renesas@verge.net.au; heiko@sntech.de; arnd@arndb.de;
> > bjorn.andersson@linaro.org; jagan@amarulasolutions.com;
> > enric.balletbo@collabora.com; marc.w.gonzalez@free.fr; olof@lixom.net;
> > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > linux- kernel@vger.kernel.org; linux-pm@vger.kernel.org; dl-linux-imx
> > <linux- imx@nxp.com>
> > Subject: Re: [PATCH 3/3] cpufreq: imx-sc: add i.mx system controller
> > cpufreq support
> >
> > On 13-02-19, 03:09, Anson Huang wrote:
> > > On NXP's i.MX SoCs with system controller inside, CPU frequency
> > > scaling can ONLY be done by system controller firmware, and it can
> > > ONLY be requested from secure mode, so Linux cpufreq driver has to
> > > call ARM SMC to trap to ARM-Trusted-Firmware to request system
> > > controller firmware to do CPU frequency scaling.
> > >
> > > This patch adds i.MX system controller cpufreq driver support, when
> > > doing CPU frequency scaling, cpufreq driver will do ARM SMC call and
> > > trap to ARM-Trusted-Firmware, then SIP(silicon provider) service
> > > will communicate with system controller for CPU frequenct scaling.
> > >
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > ---
> > > drivers/cpufreq/Kconfig.arm | 9 ++
> > > drivers/cpufreq/Makefile | 1 +
> > > drivers/cpufreq/imx-sc-cpufreq.c | 183
> > > +++++++++++++++++++++++++++++++++++++++
> > > 3 files changed, 193 insertions(+)
> > > create mode 100644 drivers/cpufreq/imx-sc-cpufreq.c
> >
> > Why can't you use cpufreq-dt driver like everyone else ?
>
> Just notice that we can overwrite the set_target if using cpufreq-dt, then we
> still need a platform cpufreq file to implement arch_set_freq_scale(), I can
> use it to save the code of imx system controller cpufreq driver, and BTW, can
> cpufreq-dt support multi clusters cpufreq? As i.MX8QM has 2 clusters
> running with different OPPs.
>
> Thanks,
> Anson.

Forgot to mention, i.MX system controller cpufreq actually can NOT do any CPU
clock/voltage scaling from Linux kernel, they are controlled by system controller
firmware and ONLY can be requested via RPC with secure mode, so Linux kernel
has to call SMC and trap to ARM-Trusted-Firmware to do it, in this case, is cpufreq-dt
still suitable to support it? I saw cpufreq-dt driver will do CPU clock/voltage scaling
directly.

Anson.

>
> >
> > --
> > viresh
\
 
 \ /
  Last update: 2019-02-13 09:54    [W:0.087 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site