From: Stephen Boyd <sboyd@kernel.org>
To: Alexandre Bailon <abailon@baylibre.com>,
Jacky Bai <ping.bai@nxp.com>,
Leonard Crestez <leonard.crestez@nxp.com>,
Michael Turquette <mturquette@baylibre.com>
Cc: Aisheng Dong <aisheng.dong@nxp.com>, Peng Fan <peng.fan@nxp.com>,
Abel Vesa <abel.vesa@nxp.com>, Anson Huang <anson.huang@nxp.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Nitin Garg <nitin.garg@nxp.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Krzysztof Kozlowski <krzk@kernel.org>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
Cedric Neveux <cedric.neveux@nxp.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
Silvano Di Ninno <silvano.dininno@nxp.com>,
Shawn Guo <shawnguo@kernel.org>,
Georgi Djakov <georgi.djakov@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC] clk: imx8mm: Add dram freq switch support
Date: Thu, 27 Jun 2019 14:14:52 -0700 [thread overview]
Message-ID: <20190627211453.37FF4208CB@mail.kernel.org> (raw)
In-Reply-To: <475e0250b1e77a660c095749e78427fde318d5f6.1559200405.git.leonard.crestez@nxp.com>
Quoting Leonard Crestez (2019-05-30 00:13:51)
> Add a wrapper clock encapsulating dram frequency switch support for
> imx8m chips. This allows higher-level DVFS code to manipulate dram
> frequency using standard clock framework APIs.
>
> Linux-side implementation is similar in principle to imx_clk_cpu or a
> composite clock. Only some preparation is done inside the kernel, the
> actual freq switch is performed from TF-A code which runs from an SRAM
> area. Cores other than the one performing the switch are also made to
> spin inside TF-A by sending each an IRQ.
>
> This is an early proof-of-concept which only support low/high mode on
> imx8mm but NXP has secure-world dram freq switching implementations for
> multiple other chips and this approach can be extended.
>
> This was tested using a large pile of NXP out-of-tree patches. Code for
> the "busfreq core" from last release can be seen here:
> https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/soc/imx/busfreq-imx8mq.c?h=imx_4.14.98_2.0.0_ga
>
> It can be likely made to work with interconnect RFC:
> https://patchwork.kernel.org/cover/10851705/
>
> This RFC effectively refactors a common part between them.
>
> Among the possible cleanups:
> * Handle errors in low/high busfreq code and back off
> * Move irq to secure world
> * Try to use fewer clk parameters
> * More chips and frequencies
>
> Many platforms handle this kind of stuff externally but cpufreq is quite
> insistent that actual rates are set by clk code and that new platforms
> use cpufreq-dt.
>
> Let me know if there are objections to handling dram freq via clk.
Can it be an interconnect driver instead? I don't see how this is a clk
driver. It looks more like a driver that itself manages a collection of
clks, and you've put the coordination of those clks behind the clk_ops
interface. We don't want to have clk_ops calling clk consumer APIs in
general, so the whole approach doesn't seem correct. Hopefully this can
work out as some other sort of driver that is used directly from devfreq
or interconnect core instead and then have a different consumer driver
of devfreq or interconnect core that knows how to drive the clk tree.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-06-27 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 7:13 [RFC] clk: imx8mm: Add dram freq switch support Leonard Crestez
2019-06-27 21:14 ` Stephen Boyd [this message]
2019-06-28 8:30 ` Leonard Crestez
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=20190627211453.37FF4208CB@mail.kernel.org \
--to=sboyd@kernel.org \
--cc=abailon@baylibre.com \
--cc=abel.vesa@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=anson.huang@nxp.com \
--cc=cedric.neveux@nxp.com \
--cc=fabio.estevam@nxp.com \
--cc=georgi.djakov@linaro.org \
--cc=kernel@pengutronix.de \
--cc=krzk@kernel.org \
--cc=leonard.crestez@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-pm@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=nitin.garg@nxp.com \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=rjw@rjwysocki.net \
--cc=shawnguo@kernel.org \
--cc=silvano.dininno@nxp.com \
--cc=viresh.kumar@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).