From: Rob Herring <robh@kernel.org>
To: Viresh Kumar <viresh.kumar@linaro.org>,
Rafael Wysocki <rjw@rjwysocki.net>,
nm@ti.com, sboyd@codeaurora.org
Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
rob.herring@linaro.org, lee.jones@linaro.org,
Mark Brown <broonie@kernel.org>,
devicetree@vger.kernel.org,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
open list <linux-kernel@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Pawel Moll <pawel.moll@arm.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH 01/16] PM / OPP: Add 'supply-names' binding
Date: Mon, 14 Sep 2015 15:22:47 -0500 [thread overview]
Message-ID: <55F72C97.2030306@kernel.org> (raw)
In-Reply-To: <2b87b162eabd1570ae2311e1ef8655acda72f678.1441972771.git.viresh.kumar@linaro.org>
On 09/11/2015 07:01 AM, Viresh Kumar wrote:
> Regulators already have stable DT bindings, wherein the consumer (of
> supplies) will have following for each regulator/supply.
>
> <name>-supply: <phandle to the regulator node>;
>
> Current OPP bindings extend above, by transforming it into a list of
> phandles. But we missed the <name> string, which is used to identify the
> regulator.
>
> And looking from regulators perspective, having two different ways of
> specifying regulators doesn't seem like a step forward, it also means we
> have to update every single device binding. And things will become
> complex.
>
> Another way to support multiple regulators per device (in OPP V2
> bindings) is to leave regulator consumer bindings as is, and create a
> 'supply-names' property in the opp-table node, which will contain a list
> of strings. The names in this list shall match 'name' from the
> '<name>-supply' strings present in the device node.
>
> The strings in this list also specify the order in which values must be
> present in 'opp-microvolt' and 'opp-microamp' properties.
>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> Documentation/devicetree/bindings/opp/opp.txt | 26 +++++++++++++++++++-------
> 1 file changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
> index 0cb44dc21f97..8759bc4783ed 100644
> --- a/Documentation/devicetree/bindings/opp/opp.txt
> +++ b/Documentation/devicetree/bindings/opp/opp.txt
> @@ -69,6 +69,13 @@ This describes the OPPs belonging to a device. This node can have following
> - compatible: Allow OPPs to express their compatibility. It should be:
> "operating-points-v2".
>
> +- supply-names: This is a required property, only if multiple supplies are
> + available for the device. Otherwise it is optional.
> +
> + This list is used to pass names of all the device supplies. The order of names
> + present here is important, as that should match the order in which values are
> + present in 'opp-microvolt' and 'opp-microamp' properties.
> +
What if we have a 2nd device and supply rail? For example, what if the
L2$ has a separate rail from the cores but is linked to the OPPs.
> - OPP nodes: One or more OPP nodes describing voltage-current-frequency
> combinations. Their name isn't significant but their phandle can be used to
> reference an OPP.
> @@ -97,8 +104,8 @@ properties.
> Single entry is for target voltage and three entries are for <target min max>
> voltages.
>
> - Entries for multiple regulators must be present in the same order as
> - regulators are specified in device's DT node.
> + Entries for multiple regulators must be present in the same order as their
> + names are present in 'supply-names' property of the opp-table.
>
> - opp-microamp: The maximum current drawn by the device in microamperes
> considering system specific parameters (such as transients, process, aging,
> @@ -107,10 +114,12 @@ properties.
>
> Should only be set if opp-microvolt is set for the OPP.
>
> - Entries for multiple regulators must be present in the same order as
> - regulators are specified in device's DT node. If this property isn't required
> - for few regulators, then this should be marked as zero for them. If it isn't
> - required for any regulator, then this property need not be present.
> + Entries for multiple regulators must be present in the same order as their
> + names are present in 'supply-names' property of the opp-table.
> +
> + If this property isn't required for few regulators, then this should be marked
> + as zero for them. If it isn't required for any regulator, then this property
> + need not be present.
Remind me of when do we have multiple regulators for a cpu? The number
of supplies should be defined by the cpu binding as function of how many
supply rails a cpu has.
>
> - clock-latency-ns: Specifies the maximum possible transition latency (in
> nanoseconds) for switching to this OPP from any other OPP.
> @@ -369,13 +378,16 @@ Example 4: Handling multiple regulators
> compatible = "arm,cortex-a7";
> ...
>
> - cpu-supply = <&cpu_supply0>, <&cpu_supply1>, <&cpu_supply2>;
> + vcc0-supply = <&cpu_supply0>;
> + vcc1-supply = <&cpu_supply1>;
> + vcc2-supply = <&cpu_supply2>;
This may just be an example, but a CA7 doesn't have 3 supply rails.
Rob
next prev parent reply other threads:[~2015-09-14 20:22 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 12:01 [PATCH 00/16] PM / OPP: multiple regulators & opp-transition support Viresh Kumar
2015-09-11 12:01 ` [PATCH 01/16] PM / OPP: Add 'supply-names' binding Viresh Kumar
2015-09-11 12:01 ` Viresh Kumar
2015-09-14 20:22 ` Rob Herring [this message]
[not found] ` <55F72C97.2030306-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-09-15 2:47 ` Viresh Kumar
2015-09-15 2:47 ` Viresh Kumar
2015-10-08 9:27 ` Viresh Kumar
2015-10-16 0:22 ` Stephen Boyd
2015-10-16 6:02 ` Viresh Kumar
2015-10-16 19:16 ` Stephen Boyd
2015-10-16 19:16 ` Stephen Boyd
2015-10-17 4:10 ` Viresh Kumar
2015-10-21 13:18 ` Viresh Kumar
2015-10-22 16:39 ` Mark Brown
2015-10-27 8:19 ` Viresh Kumar
2015-10-28 8:17 ` Mark Brown
[not found] ` <20151028081742.GC28319-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-10-29 23:38 ` Stephen Boyd
2015-10-29 23:38 ` Stephen Boyd
2016-03-01 6:45 ` Viresh Kumar
2016-03-01 15:09 ` Nishanth Menon
2016-03-02 2:50 ` Mark Brown
2016-03-02 10:28 ` Viresh Kumar
2016-03-02 11:24 ` Mark Brown
2016-03-02 15:26 ` Nishanth Menon
2016-03-02 15:30 ` Mark Brown
2016-03-02 15:43 ` Nishanth Menon
2015-10-22 16:30 ` Mark Brown
2015-09-11 12:01 ` [PATCH 02/16] PM / OPP: Add 'opp-microvolt-triplets' binding Viresh Kumar
2015-09-11 12:01 ` Viresh Kumar
2015-09-14 20:30 ` Rob Herring
2015-09-15 3:30 ` Viresh Kumar
2015-09-19 15:39 ` Mark Brown
2015-09-11 12:01 ` [PATCH 03/16] PM / OPP: Improve debug print messages with pr_fmt Viresh Kumar
2015-09-11 12:01 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 04/16] PM / OPP: Rename routines specific to old bindings with _v1 Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 05/16] PM / OPP: Parse all power-supply related bindings together Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 06/16] PM / OPP: Create separate structure for regulator/supplies Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 07/16] PM / OPP: Add multiple regulators support Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 08/16] PM / OPP: get/put regulators from OPP core Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 09/16] PM / OPP: Disable OPPs that aren't supported by the regulators Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 10/16] PM / OPP: Introduce dev_pm_opp_get_max_volt_latency() Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 11/16] PM / OPP: Introduce dev_pm_opp_get_max_transition_latency() Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 12/16] PM / OPP: Parse clock and voltage tolerance for v1 bindings Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 13/16] PM / OPP: Manage device clk as well Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 14/16] PM / OPP: Add dev_pm_opp_set_regulator() to specify regulator Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 15/16] PM / OPP: Add dev_pm_opp_set_rate() Viresh Kumar
2015-09-11 12:02 ` Viresh Kumar
2015-09-11 12:02 ` [PATCH 16/16] PM / OPP: don't print error message for deferred probing Viresh Kumar
2015-09-11 12:02 ` 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=55F72C97.2030306@kernel.org \
--to=robh@kernel.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lee.jones@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=nm@ti.com \
--cc=pawel.moll@arm.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=rob.herring@linaro.org \
--cc=sboyd@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.