aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-05 06:57:19 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-05 06:57:19 -0500
commitb68bf11ebb536ee77c78baa56793b297212a38cd (patch)
treec2b9aa19ccf2344f56a124f6a032f4108f3436c6
parent30a7acd573899fd8b8ac39236eff6468b195ac7d (diff)
parente856f078bcf120e1627c750014d2612974ed81a2 (diff)
Merge branch 'opp/linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Pull Operating Performance Points (OPP) framework updates for v4.16 from Viresh Kumar. * 'opp/linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: OPP: Introduce "required-opp" property OPP: Allow OPP table to be used for power-domains
-rw-r--r--Documentation/devicetree/bindings/opp/opp.txt13
-rw-r--r--Documentation/devicetree/bindings/power/power_domain.txt65
2 files changed, 78 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
index 9d733af26be7..4e4f30288c8b 100644
--- a/Documentation/devicetree/bindings/opp/opp.txt
+++ b/Documentation/devicetree/bindings/opp/opp.txt
@@ -45,6 +45,11 @@ Devices supporting OPPs must set their "operating-points-v2" property with
45phandle to a OPP table in their DT node. The OPP core will use this phandle to 45phandle to a OPP table in their DT node. The OPP core will use this phandle to
46find the operating points for the device. 46find the operating points for the device.
47 47
48This can contain more than one phandle for power domain providers that provide
49multiple power domains. That is, one phandle for each power domain. If only one
50phandle is available, then the same OPP table will be used for all power domains
51provided by the power domain provider.
52
48If required, this can be extended for SoC vendor specific bindings. Such bindings 53If required, this can be extended for SoC vendor specific bindings. Such bindings
49should be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt 54should be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt
50and should have a compatible description like: "operating-points-v2-<vendor>". 55and should have a compatible description like: "operating-points-v2-<vendor>".
@@ -154,6 +159,14 @@ Optional properties:
154 159
155- status: Marks the node enabled/disabled. 160- status: Marks the node enabled/disabled.
156 161
162- required-opp: This contains phandle to an OPP node in another device's OPP
163 table. It may contain an array of phandles, where each phandle points to an
164 OPP of a different device. It should not contain multiple phandles to the OPP
165 nodes in the same OPP table. This specifies the minimum required OPP of the
166 device(s), whose OPP's phandle is present in this property, for the
167 functioning of the current device at the current OPP (where this property is
168 present).
169
157Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together. 170Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
158 171
159/ { 172/ {
diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
index 14bd9e945ff6..f3355313c020 100644
--- a/Documentation/devicetree/bindings/power/power_domain.txt
+++ b/Documentation/devicetree/bindings/power/power_domain.txt
@@ -40,6 +40,12 @@ Optional properties:
40 domain's idle states. In the absence of this property, the domain would be 40 domain's idle states. In the absence of this property, the domain would be
41 considered as capable of being powered-on or powered-off. 41 considered as capable of being powered-on or powered-off.
42 42
43- operating-points-v2 : Phandles to the OPP tables of power domains provided by
44 a power domain provider. If the provider provides a single power domain only
45 or all the power domains provided by the provider have identical OPP tables,
46 then this shall contain a single phandle. Refer to ../opp/opp.txt for more
47 information.
48
43Example: 49Example:
44 50
45 power: power-controller@12340000 { 51 power: power-controller@12340000 {
@@ -120,4 +126,63 @@ The node above defines a typical PM domain consumer device, which is located
120inside a PM domain with index 0 of a power controller represented by a node 126inside a PM domain with index 0 of a power controller represented by a node
121with the label "power". 127with the label "power".
122 128
129Optional properties:
130- required-opp: This contains phandle to an OPP node in another device's OPP
131 table. It may contain an array of phandles, where each phandle points to an
132 OPP of a different device. It should not contain multiple phandles to the OPP
133 nodes in the same OPP table. This specifies the minimum required OPP of the
134 device(s), whose OPP's phandle is present in this property, for the
135 functioning of the current device at the current OPP (where this property is
136 present).
137
138Example:
139- OPP table for domain provider that provides two domains.
140
141 domain0_opp_table: opp-table0 {
142 compatible = "operating-points-v2";
143
144 domain0_opp_0: opp-1000000000 {
145 opp-hz = /bits/ 64 <1000000000>;
146 opp-microvolt = <975000 970000 985000>;
147 };
148 domain0_opp_1: opp-1100000000 {
149 opp-hz = /bits/ 64 <1100000000>;
150 opp-microvolt = <1000000 980000 1010000>;
151 };
152 };
153
154 domain1_opp_table: opp-table1 {
155 compatible = "operating-points-v2";
156
157 domain1_opp_0: opp-1200000000 {
158 opp-hz = /bits/ 64 <1200000000>;
159 opp-microvolt = <975000 970000 985000>;
160 };
161 domain1_opp_1: opp-1300000000 {
162 opp-hz = /bits/ 64 <1300000000>;
163 opp-microvolt = <1000000 980000 1010000>;
164 };
165 };
166
167 power: power-controller@12340000 {
168 compatible = "foo,power-controller";
169 reg = <0x12340000 0x1000>;
170 #power-domain-cells = <1>;
171 operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
172 };
173
174 leaky-device0@12350000 {
175 compatible = "foo,i-leak-current";
176 reg = <0x12350000 0x1000>;
177 power-domains = <&power 0>;
178 required-opp = <&domain0_opp_0>;
179 };
180
181 leaky-device1@12350000 {
182 compatible = "foo,i-leak-current";
183 reg = <0x12350000 0x1000>;
184 power-domains = <&power 1>;
185 required-opp = <&domain1_opp_1>;
186 };
187
123[1]. Documentation/devicetree/bindings/power/domain-idle-state.txt 188[1]. Documentation/devicetree/bindings/power/domain-idle-state.txt