From: Viresh Kumar <viresh.kumar@linaro.org>
To: Rafael Wysocki <rjw@rjwysocki.net>,
Arnd Bergmann <arnd.bergmann@linaro.org>,
Rob Herring <rob.herring@linaro.org>,
Grant Likely <grant.likely@linaro.org>
Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
Nishanth Menon <nm@ti.com>, Sudeep Holla <Sudeep.Holla@arm.com>,
Stephen Boyd <sboyd@codeaurora.org>,
devicetree@vger.kernel.org,
santosh shilimkar <santosh.shilimkar@oracle.com>,
Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
Mike Turquette <mike.turquette@linaro.org>,
kesavan.abhilash@gmail.com, catalin.marinas@arm.com,
k.chander@samsung.com, olof@lixom.net, ta.omasab@gmail.com,
linux-arm-kernel@lists.infradead.org,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: [RFC V1 1/8] cpufreq: Reuse "compatible" binding to probe cpufreq drivers
Date: Mon, 1 Dec 2014 17:11:22 +0530 [thread overview]
Message-ID: <3f559b4093fed13f96da928882839f6f1353d07f.1417433163.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1417433163.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1417433163.git.viresh.kumar@linaro.org>
DT based cpufreq drivers doesn't require much support from platform code now a
days as most of the stuff is moved behind generic APIs. Like clk APIs for
changing clock rates, regulator APIs for changing voltages, etc.
One of the bottleneck still left was how to select which cpufreq driver to probe
for a given platform as there might be multiple drivers available.
Traditionally, we used to create platform devices from machine specific code
which binds with a cpufreq driver. And while we moved towards DT based device
creation, these devices stayed as is.
The problem is getting worse now as we have architectures now with Zero platform
specific code. Forcefully these platforms have to create a new file in
drivers/cpufreq/ to just add these platform devices in order to use the generic
drivers like cpufreq-dt.c.
This has been discussed again and again, but with no solution yet. Last it was
discussed here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256154.html
This patch is an attempt towards getting the bindings.
We only need to have cpufreq drivers name string present in "compatible"
property for the root node.. If a cpufreq driver with DT support exists with
that name, then cpufreq core will create a platform device for that.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
.../devicetree/bindings/cpufreq/drivers.txt | 46 ++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 Documentation/devicetree/bindings/cpufreq/drivers.txt
diff --git a/Documentation/devicetree/bindings/cpufreq/drivers.txt b/Documentation/devicetree/bindings/cpufreq/drivers.txt
new file mode 100644
index 0000000..6a33150
--- /dev/null
+++ b/Documentation/devicetree/bindings/cpufreq/drivers.txt
@@ -0,0 +1,46 @@
+Binding to select which cpufreq driver to register
+--------------------------------------------------
+
+This presents generic DT binding for selecting which cpufreq-driver to probe for
+platforms.
+
+The property listed below must be defined in root nodes compatible list. We
+don't support multiple CPUFreq driver currently for different cluster and so
+this information isn't required to be present in cpu nodes.
+
+Required properties:
+- None
+
+Optional properties:
+- compatible: CPUFreq driver to probe. For example: "arm-bL-cpufreq-dt",
+ "cpufreq-dt", etc. A platform device will be created with this name by cpufreq
+ core.
+
+Examples:
+
+/ {
+ compatible = "samsung,exynos5250", "cpufreq-dt";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "arm,cortex-a9";
+ reg = <0>;
+ next-level-cache = <&L2>;
+ operating-points = <
+ /* kHz uV */
+ 792000 1100000
+ 396000 950000
+ 198000 850000
+ >;
+ };
+
+ ...
+
+ };
+
+ ...
+
+}
--
2.0.3.693.g996b0fd
next prev parent reply other threads:[~2014-12-01 11:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 11:41 [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar [this message]
2014-12-01 11:41 ` [RFC V1 2/8] cpufreq: Create cpufreq platform-device based on "compatible" from DT Viresh Kumar
2014-12-01 11:41 ` [RFC V1 3/8] cpufreq: imx: reuse dt_device.c to create cpufreq platform device Viresh Kumar
2014-12-01 11:41 ` [RFC V1 4/8] cpufreq: mvebu: " Viresh Kumar
2014-12-01 11:41 ` [RFC V1 5/8] cpufreq: shmobile: " Viresh Kumar
2014-12-01 11:41 ` [RFC V1 6/8] cpufreq: zynq: " Viresh Kumar
2014-12-01 11:41 ` [RFC V1 7/8] cpufreq: calxeda: " Viresh Kumar
2014-12-01 11:41 ` [RFC V1 8/8] cpufreq: exynos: " Viresh Kumar
2014-12-01 12:54 ` [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers Arnd Bergmann
2014-12-01 13:29 ` Viresh Kumar
2014-12-01 13:35 ` Sudeep Holla
2014-12-01 14:11 ` Arnd Bergmann
2014-12-01 14:48 ` Viresh Kumar
2014-12-01 15:07 ` Sudeep Holla
2014-12-01 16:03 ` Arnd Bergmann
2014-12-01 16:56 ` Sudeep Holla
2014-12-01 14:05 ` Arnd Bergmann
2014-12-01 14:48 ` Viresh Kumar
2014-12-01 14:59 ` Arnd Bergmann
2014-12-02 8:20 ` Thomas Petazzoni
2014-12-01 18:14 ` Rob Herring
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=3f559b4093fed13f96da928882839f6f1353d07f.1417433163.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=Lorenzo.Pieralisi@arm.com \
--cc=Sudeep.Holla@arm.com \
--cc=arnd.bergmann@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=k.chander@samsung.com \
--cc=kesavan.abhilash@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=mike.turquette@linaro.org \
--cc=nm@ti.com \
--cc=olof@lixom.net \
--cc=rjw@rjwysocki.net \
--cc=rob.herring@linaro.org \
--cc=santosh.shilimkar@oracle.com \
--cc=sboyd@codeaurora.org \
--cc=ta.omasab@gmail.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;
as well as URLs for NNTP newsgroup(s).