All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: ulf.hansson@linaro.org, Kevin Hilman <khilman@kernel.org>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	rnayak@codeaurora.org, sudeep.holla@arm.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V8 2/3] OPP: Introduce "required-opp" property
Date: Thu, 21 Dec 2017 16:26:09 -0600	[thread overview]
Message-ID: <20171221222609.zeykydxmaffqhqon@rob-hp-laptop> (raw)
In-Reply-To: <6615035f294a64a4c17e5b44ac6690d1c2ac127c.1513591822.git.viresh.kumar@linaro.org>

On Mon, Dec 18, 2017 at 03:51:29PM +0530, Viresh Kumar wrote:
> Devices have inter-dependencies some times. For example a device that
> needs to run at 800 MHz, needs another device (e.g. Its power domain) to
> be configured at a particular operating performance point.
> 
> This patch introduces a new property "required-opp" which can be present
> directly in a device's node (if it doesn't need to change its OPPs), or
> in device's OPP nodes. More details on the property can be seen in the
> binding itself.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  Documentation/devicetree/bindings/opp/opp.txt      |  8 +++
>  .../devicetree/bindings/power/power_domain.txt     | 59 ++++++++++++++++++++++
>  2 files changed, 67 insertions(+)

A couple of nits, otherwise:

Reviewed-by: Rob Herring <robh@kernel.org>

> 
> diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
> index a3953a1bb1a1..4e4f30288c8b 100644
> --- a/Documentation/devicetree/bindings/opp/opp.txt
> +++ b/Documentation/devicetree/bindings/opp/opp.txt
> @@ -159,6 +159,14 @@ properties.
>  
>  - status: Marks the node enabled/disabled.
>  
> +- required-opp: This contains phandle to an OPP node in another device's OPP
> +  table. It may contain an array of phandles, where each phandle points to an
> +  OPP of a different device. It should not contain multiple phandles to the OPP
> +  nodes in the same OPP table. This specifies the minimum required OPP of the
> +  device(s), whose OPP's phandle is present in this property, for the
> +  functioning of the current device at the current OPP (where this property is
> +  present).
> +
>  Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
>  
>  / {
> diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
> index 61549840ab3b..f824763b202e 100644
> --- a/Documentation/devicetree/bindings/power/power_domain.txt
> +++ b/Documentation/devicetree/bindings/power/power_domain.txt
> @@ -126,4 +126,63 @@ The node above defines a typical PM domain consumer device, which is located
>  inside a PM domain with index 0 of a power controller represented by a node
>  with the label "power".
>  
> +Optional properties:
> +- required-opp: This contains phandle to an OPP node in another device's OPP
> +  table. It may contain an array of phandles, where each phandle points to an
> +  OPP of a different device. It should not contain multiple phandles to the OPP
> +  nodes in the same OPP table. This specifies the minimum required OPP of the
> +  device(s), whose OPP's phandle is present in this property, for the
> +  functioning of the current device at the current OPP (where this property is
> +  present).
> +
> +Example:
> +- OPP table for domain provider that provides two domains.
> +
> +	domain0_opp_table: opp_table0 {

opp-table0

> +		compatible = "operating-points-v2";
> +
> +		domain0_opp_0: opp-1000000000 {
> +			opp-hz = /bits/ 64 <1000000000>;
> +			opp-microvolt = <975000 970000 985000>;
> +		};
> +		domain0_opp_1: opp-1100000000 {
> +			opp-hz = /bits/ 64 <1100000000>;
> +			opp-microvolt = <1000000 980000 1010000>;
> +		};
> +	};
> +
> +	domain1_opp_table: opp_table1 {

opp-table1

> +		compatible = "operating-points-v2";
> +
> +		domain1_opp_0: opp-1200000000 {
> +			opp-hz = /bits/ 64 <1200000000>;
> +			opp-microvolt = <975000 970000 985000>;
> +		};
> +		domain1_opp_1: opp-1300000000 {
> +			opp-hz = /bits/ 64 <1300000000>;
> +			opp-microvolt = <1000000 980000 1010000>;
> +		};
> +	};
> +
> +	parent: power-controller@12340000 {
> +		compatible = "foo,power-controller";
> +		reg = <0x12340000 0x1000>;
> +		#power-domain-cells = <1>;
> +		operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
> +	};
> +
> +	leaky-device0@12350000 {
> +		compatible = "foo,i-leak-current";
> +		reg = <0x12350000 0x1000>;
> +		power-domains = <&parent 0>;
> +		required-opp = <&domain0_opp_0>;
> +	};
> +
> +	leaky-device1@12350000 {
> +		compatible = "foo,i-leak-current";
> +		reg = <0x12350000 0x1000>;
> +		power-domains = <&parent 1>;
> +		required-opp = <&domain1_opp_1>;
> +	};
> +
>  [1]. Documentation/devicetree/bindings/power/domain-idle-state.txt
> -- 
> 2.15.0.194.g9af6a3dea062
> 

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Viresh Kumar <viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	Kevin Hilman <khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Viresh Kumar <vireshk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Nishanth Menon <nm-l0cyMroinI0@public.gmane.org>,
	Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Vincent Guittot
	<vincent.guittot-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	rnayak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	sudeep.holla-5wv7dgnIgG8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V8 2/3] OPP: Introduce "required-opp" property
Date: Thu, 21 Dec 2017 16:26:09 -0600	[thread overview]
Message-ID: <20171221222609.zeykydxmaffqhqon@rob-hp-laptop> (raw)
In-Reply-To: <6615035f294a64a4c17e5b44ac6690d1c2ac127c.1513591822.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

On Mon, Dec 18, 2017 at 03:51:29PM +0530, Viresh Kumar wrote:
> Devices have inter-dependencies some times. For example a device that
> needs to run at 800 MHz, needs another device (e.g. Its power domain) to
> be configured at a particular operating performance point.
> 
> This patch introduces a new property "required-opp" which can be present
> directly in a device's node (if it doesn't need to change its OPPs), or
> in device's OPP nodes. More details on the property can be seen in the
> binding itself.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/opp/opp.txt      |  8 +++
>  .../devicetree/bindings/power/power_domain.txt     | 59 ++++++++++++++++++++++
>  2 files changed, 67 insertions(+)

A couple of nits, otherwise:

Reviewed-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

> 
> diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
> index a3953a1bb1a1..4e4f30288c8b 100644
> --- a/Documentation/devicetree/bindings/opp/opp.txt
> +++ b/Documentation/devicetree/bindings/opp/opp.txt
> @@ -159,6 +159,14 @@ properties.
>  
>  - status: Marks the node enabled/disabled.
>  
> +- required-opp: This contains phandle to an OPP node in another device's OPP
> +  table. It may contain an array of phandles, where each phandle points to an
> +  OPP of a different device. It should not contain multiple phandles to the OPP
> +  nodes in the same OPP table. This specifies the minimum required OPP of the
> +  device(s), whose OPP's phandle is present in this property, for the
> +  functioning of the current device at the current OPP (where this property is
> +  present).
> +
>  Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
>  
>  / {
> diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
> index 61549840ab3b..f824763b202e 100644
> --- a/Documentation/devicetree/bindings/power/power_domain.txt
> +++ b/Documentation/devicetree/bindings/power/power_domain.txt
> @@ -126,4 +126,63 @@ The node above defines a typical PM domain consumer device, which is located
>  inside a PM domain with index 0 of a power controller represented by a node
>  with the label "power".
>  
> +Optional properties:
> +- required-opp: This contains phandle to an OPP node in another device's OPP
> +  table. It may contain an array of phandles, where each phandle points to an
> +  OPP of a different device. It should not contain multiple phandles to the OPP
> +  nodes in the same OPP table. This specifies the minimum required OPP of the
> +  device(s), whose OPP's phandle is present in this property, for the
> +  functioning of the current device at the current OPP (where this property is
> +  present).
> +
> +Example:
> +- OPP table for domain provider that provides two domains.
> +
> +	domain0_opp_table: opp_table0 {

opp-table0

> +		compatible = "operating-points-v2";
> +
> +		domain0_opp_0: opp-1000000000 {
> +			opp-hz = /bits/ 64 <1000000000>;
> +			opp-microvolt = <975000 970000 985000>;
> +		};
> +		domain0_opp_1: opp-1100000000 {
> +			opp-hz = /bits/ 64 <1100000000>;
> +			opp-microvolt = <1000000 980000 1010000>;
> +		};
> +	};
> +
> +	domain1_opp_table: opp_table1 {

opp-table1

> +		compatible = "operating-points-v2";
> +
> +		domain1_opp_0: opp-1200000000 {
> +			opp-hz = /bits/ 64 <1200000000>;
> +			opp-microvolt = <975000 970000 985000>;
> +		};
> +		domain1_opp_1: opp-1300000000 {
> +			opp-hz = /bits/ 64 <1300000000>;
> +			opp-microvolt = <1000000 980000 1010000>;
> +		};
> +	};
> +
> +	parent: power-controller@12340000 {
> +		compatible = "foo,power-controller";
> +		reg = <0x12340000 0x1000>;
> +		#power-domain-cells = <1>;
> +		operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
> +	};
> +
> +	leaky-device0@12350000 {
> +		compatible = "foo,i-leak-current";
> +		reg = <0x12350000 0x1000>;
> +		power-domains = <&parent 0>;
> +		required-opp = <&domain0_opp_0>;
> +	};
> +
> +	leaky-device1@12350000 {
> +		compatible = "foo,i-leak-current";
> +		reg = <0x12350000 0x1000>;
> +		power-domains = <&parent 1>;
> +		required-opp = <&domain1_opp_1>;
> +	};
> +
>  [1]. Documentation/devicetree/bindings/power/domain-idle-state.txt
> -- 
> 2.15.0.194.g9af6a3dea062
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-12-21 22:26 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 10:21 [PATCH V8 0/3] OPP: Allow OPP table to be used for power-domains Viresh Kumar
2017-12-18 10:21 ` Viresh Kumar
2017-12-18 10:21 ` [PATCH V8 1/3] " Viresh Kumar
2017-12-21 22:06   ` Rob Herring
2017-12-21 22:06     ` Rob Herring
2017-12-18 10:21 ` [PATCH V8 2/3] OPP: Introduce "required-opp" property Viresh Kumar
2017-12-18 10:21   ` Viresh Kumar
2017-12-20  8:23   ` Ulf Hansson
2017-12-20  8:26     ` Viresh Kumar
2017-12-21 22:26   ` Rob Herring [this message]
2017-12-21 22:26     ` Rob Herring
2017-12-22  5:28   ` Viresh Kumar
2017-12-18 10:21 ` [PATCH V8 3/3] OPP: Allow "opp-hz" and "opp-microvolt" to contain magic values Viresh Kumar
2017-12-26 20:29   ` Rob Herring
2017-12-26 20:29     ` Rob Herring
2017-12-27  8:56     ` Viresh Kumar
2017-12-27  8:56       ` Viresh Kumar
2017-12-27 21:54       ` Rob Herring
2017-12-27 21:54         ` Rob Herring
2017-12-28  4:37         ` Viresh Kumar
2017-12-28  4:37           ` Viresh Kumar
2017-12-29  0:32           ` Stephen Boyd
2017-12-29  0:32             ` Stephen Boyd
2017-12-29  4:58             ` Viresh Kumar
2017-12-29  4:58               ` Viresh Kumar
2018-01-05 22:19               ` Stephen Boyd
2018-01-05 22:19                 ` Stephen Boyd
2018-01-08  4:16                 ` Viresh Kumar
2018-01-08  4:16                   ` Viresh Kumar
2018-01-10  2:54                   ` Stephen Boyd
2018-01-10  2:54                     ` Stephen Boyd
2018-01-10  5:37                     ` Viresh Kumar
2018-01-10  5:37                       ` Viresh Kumar
2018-01-13  0:46                       ` Stephen Boyd
2018-01-13  0:46                         ` Stephen Boyd
2018-01-02  6:05           ` Rajendra Nayak
2018-01-02  6:05             ` Rajendra Nayak
2018-01-02  6:33             ` Viresh Kumar
2018-01-02  6:33               ` Viresh Kumar
2018-01-03  7:20 ` [PATCH V8 0/3] OPP: Allow OPP table to be used for power-domains Viresh Kumar
2018-01-03  7:20   ` 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=20171221222609.zeykydxmaffqhqon@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=rnayak@codeaurora.org \
    --cc=sboyd@codeaurora.org \
    --cc=sudeep.holla@arm.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vireshk@kernel.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.