From: Stephen Boyd <sboyd@kernel.org>
To: Leonard Crestez <leonard.crestez@nxp.com>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: Anson Huang <anson.huang@nxp.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Michael Turquette <mturquette@baylibre.com>,
Georgi Djakov <georgi.djakov@linaro.org>,
Alexandre Bailon <abailon@baylibre.com>,
Jacky Bai <ping.bai@nxp.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Aisheng Dong <aisheng.dong@nxp.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC] devfreq: Add generic devfreq-dt driver
Date: Mon, 10 Jun 2019 16:48:44 -0700 [thread overview]
Message-ID: <20190610234844.CC289206C3@mail.kernel.org> (raw)
In-Reply-To: <VI1PR04MB50558EF0387824D6AAEEB18EEE130@VI1PR04MB5055.eurprd04.prod.outlook.com>
Quoting Leonard Crestez (2019-06-10 15:13:19)
> On 6/6/2019 6:15 AM, Viresh Kumar wrote:
> > On 05-06-19, 15:31, Leonard Crestez wrote:
> >> +static const struct of_device_id devfreq_dt_of_match[] = {
> >> + { .compatible = "generic-devfreq", },
> >> + { /* sentinel */ },
> >> +};
> >> +MODULE_DEVICE_TABLE(of, devfreq_dt_of_match);
> >
> > DT can't contain nodes for any virtual devices, this will have similar
> > problems to cpufreq-dt. How is this driver going to get probed ? Who
> > will create the device ?
>
> CPUs are special devices, I'm not sure the same issues apply here.
>
> If a SOC has multiple buses or frequency domains which can be scaled up
> and down then those can be treated as "real" devices and probing them
> from DT seems entirely reasonable. DT could look like this:
>
> + noc1 {
> + compatible = "fsl,imx8mm-noc", "generic-devfreq";
> + clocks = <&clk IMX8MM_CLK_NOC1>;
> + operating-points-v2 = <&noc1_opp_table>;
> + };
> +
> + noc1_opp_table: noc1-opp-table {
> + compatible = "operating-points-v2";
> +
> + opp-150M {
> + opp-hz = /bits/ 64 <150000000>;
> + };
> + opp-750M {
> + opp-hz = /bits/ 64 <750000000>;
> + };
> + };
>
> Instead of a "generic-devfreq" fallback the compatible list of
> devfreq-dt could contain a large number of unrelated compat strings.
> This would be vaguely similar to the white/black lists from cpufreq-dt-plat.
This still looks very much "virtual" because the NoC node doesn't have a
'reg' property. Is there anything the driver will do besides change the
frequency of the clk based on the OPP table? If not, then it still looks
like this is a node for the sake of making devfreq happy to probe via
DT.
next prev parent reply other threads:[~2019-06-10 23:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 12:31 [RFC] devfreq: Add generic devfreq-dt driver Leonard Crestez
2019-06-06 3:15 ` Viresh Kumar
2019-06-10 22:13 ` Leonard Crestez
2019-06-10 23:48 ` Stephen Boyd [this message]
2019-06-11 2:38 ` Viresh Kumar
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=20190610234844.CC289206C3@mail.kernel.org \
--to=sboyd@kernel.org \
--cc=abailon@baylibre.com \
--cc=aisheng.dong@nxp.com \
--cc=anson.huang@nxp.com \
--cc=cw00.choi@samsung.com \
--cc=fabio.estevam@nxp.com \
--cc=georgi.djakov@linaro.org \
--cc=kernel@pengutronix.de \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--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=myungjoo.ham@samsung.com \
--cc=ping.bai@nxp.com \
--cc=rjw@rjwysocki.net \
--cc=shawnguo@kernel.org \
--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).