summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-13 13:41:53 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-13 13:41:53 -0500
commit7b9dc3f75fc8be046e76387a22a21f421ce55b53 (patch)
treedd42312eebdcb5273461b304384d49a7e7e5fa73 /Documentation
parent36869cb93d36269f34800b3384ba7991060a69cf (diff)
parentbbc17bb8a89b3eb31520abf3a9b362d5ee54f908 (diff)
Merge tag 'pm-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki: "Again, cpufreq gets more changes than the other parts this time (one new driver, one old driver less, a bunch of enhancements of the existing code, new CPU IDs, fixes, cleanups) There also are some changes in cpuidle (idle injection rework, a couple of new CPU IDs, online/offline rework in intel_idle, fixes and cleanups), in the generic power domains framework (mostly related to supporting power domains containing CPUs), and in the Operating Performance Points (OPP) library (mostly related to supporting devices with multiple voltage regulators) In addition to that, the system sleep state selection interface is modified to make it easier for distributions with unchanged user space to support suspend-to-idle as the default system suspend method, some issues are fixed in the PM core, the latency tolerance PM QoS framework is improved a bit, the Intel RAPL power capping driver is cleaned up and there are some fixes and cleanups in the devfreq subsystem Specifics: - New cpufreq driver for Broadcom STB SoCs and a Device Tree binding for it (Markus Mayer) - Support for ARM Integrator/AP and Integrator/CP in the generic DT cpufreq driver and elimination of the old Integrator cpufreq driver (Linus Walleij) - Support for the zx296718, r8a7743 and r8a7745, Socionext UniPhier, and PXA SoCs in the the generic DT cpufreq driver (Baoyou Xie, Geert Uytterhoeven, Masahiro Yamada, Robert Jarzmik) - cpufreq core fix to eliminate races that may lead to using inactive policy objects and related cleanups (Rafael Wysocki) - cpufreq schedutil governor update to make it use SCHED_FIFO kernel threads (instead of regular workqueues) for doing delayed work (to reduce the response latency in some cases) and related cleanups (Viresh Kumar) - New cpufreq sysfs attribute for resetting statistics (Markus Mayer) - cpufreq governors fixes and cleanups (Chen Yu, Stratos Karafotis, Viresh Kumar) - Support for using generic cpufreq governors in the intel_pstate driver (Rafael Wysocki) - Support for per-logical-CPU P-state limits and the EPP/EPB (Energy Performance Preference/Energy Performance Bias) knobs in the intel_pstate driver (Srinivas Pandruvada) - New CPU ID for Knights Mill in intel_pstate (Piotr Luc) - intel_pstate driver modification to use the P-state selection algorithm based on CPU load on platforms with the system profile in the ACPI tables set to "mobile" (Srinivas Pandruvada) - intel_pstate driver cleanups (Arnd Bergmann, Rafael Wysocki, Srinivas Pandruvada) - cpufreq powernv driver updates including fast switching support (for the schedutil governor), fixes and cleanus (Akshay Adiga, Andrew Donnellan, Denis Kirjanov) - acpi-cpufreq driver rework to switch it over to the new CPU offline/online state machine (Sebastian Andrzej Siewior) - Assorted cleanups in cpufreq drivers (Wei Yongjun, Prashanth Prakash) - Idle injection rework (to make it use the regular idle path instead of a home-grown custom one) and related powerclamp thermal driver updates (Peter Zijlstra, Jacob Pan, Petr Mladek, Sebastian Andrzej Siewior) - New CPU IDs for Atom Z34xx and Knights Mill in intel_idle (Andy Shevchenko, Piotr Luc) - intel_idle driver cleanups and switch over to using the new CPU offline/online state machine (Anna-Maria Gleixner, Sebastian Andrzej Siewior) - cpuidle DT driver update to support suspend-to-idle properly (Sudeep Holla) - cpuidle core cleanups and misc updates (Daniel Lezcano, Pan Bian, Rafael Wysocki) - Preliminary support for power domains including CPUs in the generic power domains (genpd) framework and related DT bindings (Lina Iyer) - Assorted fixes and cleanups in the generic power domains (genpd) framework (Colin Ian King, Dan Carpenter, Geert Uytterhoeven) - Preliminary support for devices with multiple voltage regulators and related fixes and cleanups in the Operating Performance Points (OPP) library (Viresh Kumar, Masahiro Yamada, Stephen Boyd) - System sleep state selection interface rework to make it easier to support suspend-to-idle as the default system suspend method (Rafael Wysocki) - PM core fixes and cleanups, mostly related to the interactions between the system suspend and runtime PM frameworks (Ulf Hansson, Sahitya Tummala, Tony Lindgren) - Latency tolerance PM QoS framework imorovements (Andrew Lutomirski) - New Knights Mill CPU ID for the Intel RAPL power capping driver (Piotr Luc) - Intel RAPL power capping driver fixes, cleanups and switch over to using the new CPU offline/online state machine (Jacob Pan, Thomas Gleixner, Sebastian Andrzej Siewior) - Fixes and cleanups in the exynos-ppmu, exynos-nocp, rk3399_dmc, rockchip-dfi devfreq drivers and the devfreq core (Axel Lin, Chanwoo Choi, Javier Martinez Canillas, MyungJoo Ham, Viresh Kumar) - Fix for false-positive KASAN warnings during resume from ACPI S3 (suspend-to-RAM) on x86 (Josh Poimboeuf) - Memory map verification during resume from hibernation on x86 to ensure a consistent address space layout (Chen Yu) - Wakeup sources debugging enhancement (Xing Wei) - rockchip-io AVS driver cleanup (Shawn Lin)" * tag 'pm-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (127 commits) devfreq: rk3399_dmc: Don't use OPP structures outside of RCU locks devfreq: rk3399_dmc: Remove dangling rcu_read_unlock() devfreq: exynos: Don't use OPP structures outside of RCU locks Documentation: intel_pstate: Document HWP energy/performance hints cpufreq: intel_pstate: Support for energy performance hints with HWP cpufreq: intel_pstate: Add locking around HWP requests PM / sleep: Print active wakeup sources when blocking on wakeup_count reads PM / core: Fix bug in the error handling of async suspend PM / wakeirq: Fix dedicated wakeirq for drivers not using autosuspend PM / Domains: Fix compatible for domain idle state PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators() PM / OPP: Allow platform specific custom set_opp() callbacks PM / OPP: Separate out _generic_set_opp() PM / OPP: Add infrastructure to manage multiple regulators PM / OPP: Pass struct dev_pm_opp_supply to _set_opp_voltage() PM / OPP: Manage supply's voltage/current in a separate structure PM / OPP: Don't use OPP structure outside of rcu protected section PM / OPP: Reword binding supporting multiple regulators per device PM / OPP: Fix incorrect cpu-supply property in binding cpuidle: Add a kerneldoc comment to cpuidle_use_deepest_state() ..
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-power45
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt22
-rw-r--r--Documentation/cpu-freq/cpufreq-stats.txt6
-rw-r--r--Documentation/cpu-freq/intel-pstate.txt54
-rw-r--r--Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt78
-rw-r--r--Documentation/devicetree/bindings/opp/opp.txt27
-rw-r--r--Documentation/devicetree/bindings/power/domain-idle-state.txt33
-rw-r--r--Documentation/devicetree/bindings/power/power_domain.txt43
-rw-r--r--Documentation/power/devices.txt14
-rw-r--r--Documentation/power/states.txt62
10 files changed, 321 insertions, 63 deletions
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power
index 50b368d490b5..f523e5a3ac33 100644
--- a/Documentation/ABI/testing/sysfs-power
+++ b/Documentation/ABI/testing/sysfs-power
@@ -7,30 +7,35 @@ Description:
7 subsystem. 7 subsystem.
8 8
9What: /sys/power/state 9What: /sys/power/state
10Date: May 2014 10Date: November 2016
11Contact: Rafael J. Wysocki <rjw@rjwysocki.net> 11Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
12Description: 12Description:
13 The /sys/power/state file controls system sleep states. 13 The /sys/power/state file controls system sleep states.
14 Reading from this file returns the available sleep state 14 Reading from this file returns the available sleep state
15 labels, which may be "mem", "standby", "freeze" and "disk" 15 labels, which may be "mem" (suspend), "standby" (power-on
16 (hibernation). The meanings of the first three labels depend on 16 suspend), "freeze" (suspend-to-idle) and "disk" (hibernation).
17 the relative_sleep_states command line argument as follows: 17
18 1) relative_sleep_states = 1 18 Writing one of the above strings to this file causes the system
19 "mem", "standby", "freeze" represent non-hibernation sleep 19 to transition into the corresponding state, if available.
20 states from the deepest ("mem", always present) to the 20
21 shallowest ("freeze"). "standby" and "freeze" may or may 21 See Documentation/power/states.txt for more information.
22 not be present depending on the capabilities of the 22
23 platform. "freeze" can only be present if "standby" is 23What: /sys/power/mem_sleep
24 present. 24Date: November 2016
25 2) relative_sleep_states = 0 (default) 25Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
26 "mem" - "suspend-to-RAM", present if supported. 26Description:
27 "standby" - "power-on suspend", present if supported. 27 The /sys/power/mem_sleep file controls the operating mode of
28 "freeze" - "suspend-to-idle", always present. 28 system suspend. Reading from it returns the available modes
29 29 as "s2idle" (always present), "shallow" and "deep" (present if
30 Writing to this file one of these strings causes the system to 30 supported). The mode that will be used on subsequent attempts
31 transition into the corresponding state, if available. See 31 to suspend the system (by writing "mem" to the /sys/power/state
32 Documentation/power/states.txt for a description of what 32 file described above) is enclosed in square brackets.
33 "suspend-to-RAM", "power-on suspend" and "suspend-to-idle" mean. 33
34 Writing one of the above strings to this file causes the mode
35 represented by it to be used on subsequent attempts to suspend
36 the system.
37
38 See Documentation/power/states.txt for more information.
34 39
35What: /sys/power/disk 40What: /sys/power/disk
36Date: September 2006 41Date: September 2006
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 62d68b2056de..be2d6d0a03a4 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1560,6 +1560,12 @@
1560 disable 1560 disable
1561 Do not enable intel_pstate as the default 1561 Do not enable intel_pstate as the default
1562 scaling driver for the supported processors 1562 scaling driver for the supported processors
1563 passive
1564 Use intel_pstate as a scaling driver, but configure it
1565 to work with generic cpufreq governors (instead of
1566 enabling its internal governor). This mode cannot be
1567 used along with the hardware-managed P-states (HWP)
1568 feature.
1563 force 1569 force
1564 Enable intel_pstate on systems that prohibit it by default 1570 Enable intel_pstate on systems that prohibit it by default
1565 in favor of acpi-cpufreq. Forcing the intel_pstate driver 1571 in favor of acpi-cpufreq. Forcing the intel_pstate driver
@@ -1580,6 +1586,9 @@
1580 Description Table, specifies preferred power management 1586 Description Table, specifies preferred power management
1581 profile as "Enterprise Server" or "Performance Server", 1587 profile as "Enterprise Server" or "Performance Server",
1582 then this feature is turned on by default. 1588 then this feature is turned on by default.
1589 per_cpu_perf_limits
1590 Allow per-logical-CPU P-State performance control limits using
1591 cpufreq sysfs interface
1583 1592
1584 intremap= [X86-64, Intel-IOMMU] 1593 intremap= [X86-64, Intel-IOMMU]
1585 on enable Interrupt Remapping (default) 1594 on enable Interrupt Remapping (default)
@@ -2122,6 +2131,12 @@
2122 memory contents and reserves bad memory 2131 memory contents and reserves bad memory
2123 regions that are detected. 2132 regions that are detected.
2124 2133
2134 mem_sleep_default= [SUSPEND] Default system suspend mode:
2135 s2idle - Suspend-To-Idle
2136 shallow - Power-On Suspend or equivalent (if supported)
2137 deep - Suspend-To-RAM or equivalent (if supported)
2138 See Documentation/power/states.txt.
2139
2125 meye.*= [HW] Set MotionEye Camera parameters 2140 meye.*= [HW] Set MotionEye Camera parameters
2126 See Documentation/video4linux/meye.txt. 2141 See Documentation/video4linux/meye.txt.
2127 2142
@@ -3475,13 +3490,6 @@
3475 [KNL, SMP] Set scheduler's default relax_domain_level. 3490 [KNL, SMP] Set scheduler's default relax_domain_level.
3476 See Documentation/cgroup-v1/cpusets.txt. 3491 See Documentation/cgroup-v1/cpusets.txt.
3477 3492
3478 relative_sleep_states=
3479 [SUSPEND] Use sleep state labeling where the deepest
3480 state available other than hibernation is always "mem".
3481 Format: { "0" | "1" }
3482 0 -- Traditional sleep state labels.
3483 1 -- Relative sleep state labels.
3484
3485 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area 3493 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area
3486 3494
3487 reservetop= [X86-32] 3495 reservetop= [X86-32]
diff --git a/Documentation/cpu-freq/cpufreq-stats.txt b/Documentation/cpu-freq/cpufreq-stats.txt
index 8d9773f23550..3c355f6ad834 100644
--- a/Documentation/cpu-freq/cpufreq-stats.txt
+++ b/Documentation/cpu-freq/cpufreq-stats.txt
@@ -44,11 +44,17 @@ the stats driver insertion.
44total 0 44total 0
45drwxr-xr-x 2 root root 0 May 14 16:06 . 45drwxr-xr-x 2 root root 0 May 14 16:06 .
46drwxr-xr-x 3 root root 0 May 14 15:58 .. 46drwxr-xr-x 3 root root 0 May 14 15:58 ..
47--w------- 1 root root 4096 May 14 16:06 reset
47-r--r--r-- 1 root root 4096 May 14 16:06 time_in_state 48-r--r--r-- 1 root root 4096 May 14 16:06 time_in_state
48-r--r--r-- 1 root root 4096 May 14 16:06 total_trans 49-r--r--r-- 1 root root 4096 May 14 16:06 total_trans
49-r--r--r-- 1 root root 4096 May 14 16:06 trans_table 50-r--r--r-- 1 root root 4096 May 14 16:06 trans_table
50-------------------------------------------------------------------------------- 51--------------------------------------------------------------------------------
51 52
53- reset
54Write-only attribute that can be used to reset the stat counters. This can be
55useful for evaluating system behaviour under different governors without the
56need for a reboot.
57
52- time_in_state 58- time_in_state
53This gives the amount of time spent in each of the frequencies supported by 59This gives the amount of time spent in each of the frequencies supported by
54this CPU. The cat output will have "<frequency> <time>" pair in each line, which 60this CPU. The cat output will have "<frequency> <time>" pair in each line, which
diff --git a/Documentation/cpu-freq/intel-pstate.txt b/Documentation/cpu-freq/intel-pstate.txt
index e6bd1e6512a5..1953994ef5e6 100644
--- a/Documentation/cpu-freq/intel-pstate.txt
+++ b/Documentation/cpu-freq/intel-pstate.txt
@@ -48,7 +48,7 @@ In addition to the frequency-controlling interfaces provided by the cpufreq
48core, the driver provides its own sysfs files to control the P-State selection. 48core, the driver provides its own sysfs files to control the P-State selection.
49These files have been added to /sys/devices/system/cpu/intel_pstate/. 49These files have been added to /sys/devices/system/cpu/intel_pstate/.
50Any changes made to these files are applicable to all CPUs (even in a 50Any changes made to these files are applicable to all CPUs (even in a
51multi-package system). 51multi-package system, Refer to later section on placing "Per-CPU limits").
52 52
53 max_perf_pct: Limits the maximum P-State that will be requested by 53 max_perf_pct: Limits the maximum P-State that will be requested by
54 the driver. It states it as a percentage of the available performance. The 54 the driver. It states it as a percentage of the available performance. The
@@ -120,13 +120,57 @@ frequency is fictional for Intel Core processors. Even if the scaling
120driver selects a single P-State, the actual frequency the processor 120driver selects a single P-State, the actual frequency the processor
121will run at is selected by the processor itself. 121will run at is selected by the processor itself.
122 122
123Per-CPU limits
124
125The kernel command line option "intel_pstate=per_cpu_perf_limits" forces
126the intel_pstate driver to use per-CPU performance limits. When it is set,
127the sysfs control interface described above is subject to limitations.
128- The following controls are not available for both read and write
129 /sys/devices/system/cpu/intel_pstate/max_perf_pct
130 /sys/devices/system/cpu/intel_pstate/min_perf_pct
131- The following controls can be used to set performance limits, as far as the
132architecture of the processor permits:
133 /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
134 /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq
135 /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
136- User can still observe turbo percent and number of P-States from
137 /sys/devices/system/cpu/intel_pstate/turbo_pct
138 /sys/devices/system/cpu/intel_pstate/num_pstates
139- User can read write system wide turbo status
140 /sys/devices/system/cpu/no_turbo
141
142Support of energy performance hints
143It is possible to provide hints to the HWP algorithms in the processor
144to be more performance centric to more energy centric. When the driver
145is using HWP, two additional cpufreq sysfs attributes are presented for
146each logical CPU.
147These attributes are:
148 - energy_performance_available_preferences
149 - energy_performance_preference
150
151To get list of supported hints:
152$ cat energy_performance_available_preferences
153 default performance balance_performance balance_power power
154
155The current preference can be read or changed via cpufreq sysfs
156attribute "energy_performance_preference". Reading from this attribute
157will display current effective setting. User can write any of the valid
158preference string to this attribute. User can always restore to power-on
159default by writing "default".
160
161Since threads can migrate to different CPUs, this is possible that the
162new CPU may have different energy performance preference than the previous
163one. To avoid such issues, either threads can be pinned to specific CPUs
164or set the same energy performance preference value to all CPUs.
165
123Tuning Intel P-State driver 166Tuning Intel P-State driver
124 167
125When HWP mode is not used, debugfs files have also been added to allow the 168When the performance can be tuned using PID (Proportional Integral
126tuning of the internal governor algorithm. These files are located at 169Derivative) controller, debugfs files are provided for adjusting performance.
127/sys/kernel/debug/pstate_snb/. The algorithm uses a PID (Proportional 170They are presented under:
128Integral Derivative) controller. The PID tunable parameters are: 171/sys/kernel/debug/pstate_snb/
129 172
173The PID tunable parameters are:
130 deadband 174 deadband
131 d_gain_pct 175 d_gain_pct
132 i_gain_pct 176 i_gain_pct
diff --git a/Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt b/Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt
new file mode 100644
index 000000000000..af2385795d78
--- /dev/null
+++ b/Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt
@@ -0,0 +1,78 @@
1Broadcom AVS mail box and interrupt register bindings
2=====================================================
3
4A total of three DT nodes are required. One node (brcm,avs-cpu-data-mem)
5references the mailbox register used to communicate with the AVS CPU[1]. The
6second node (brcm,avs-cpu-l2-intr) is required to trigger an interrupt on
7the AVS CPU. The interrupt tells the AVS CPU that it needs to process a
8command sent to it by a driver. Interrupting the AVS CPU is mandatory for
9commands to be processed.
10
11The interface also requires a reference to the AVS host interrupt controller,
12so a driver can react to interrupts generated by the AVS CPU whenever a command
13has been processed. See [2] for more information on the brcm,l2-intc node.
14
15[1] The AVS CPU is an independent co-processor that runs proprietary
16firmware. On some SoCs, this firmware supports DFS and DVFS in addition to
17Adaptive Voltage Scaling.
18
19[2] Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt
20
21
22Node brcm,avs-cpu-data-mem
23--------------------------
24
25Required properties:
26- compatible: must include: brcm,avs-cpu-data-mem and
27 should include: one of brcm,bcm7271-avs-cpu-data-mem or
28 brcm,bcm7268-avs-cpu-data-mem
29- reg: Specifies base physical address and size of the registers.
30- interrupts: The interrupt that the AVS CPU will use to interrupt the host
31 when a command completed.
32- interrupt-parent: The interrupt controller the above interrupt is routed
33 through.
34- interrupt-names: The name of the interrupt used to interrupt the host.
35
36Optional properties:
37- None
38
39Node brcm,avs-cpu-l2-intr
40-------------------------
41
42Required properties:
43- compatible: must include: brcm,avs-cpu-l2-intr and
44 should include: one of brcm,bcm7271-avs-cpu-l2-intr or
45 brcm,bcm7268-avs-cpu-l2-intr
46- reg: Specifies base physical address and size of the registers.
47
48Optional properties:
49- None
50
51
52Example
53=======
54
55 avs_host_l2_intc: interrupt-controller@f04d1200 {
56 #interrupt-cells = <1>;
57 compatible = "brcm,l2-intc";
58 interrupt-parent = <&intc>;
59 reg = <0xf04d1200 0x48>;
60 interrupt-controller;
61 interrupts = <0x0 0x19 0x0>;
62 interrupt-names = "avs";
63 };
64
65 avs-cpu-data-mem@f04c4000 {
66 compatible = "brcm,bcm7271-avs-cpu-data-mem",
67 "brcm,avs-cpu-data-mem";
68 reg = <0xf04c4000 0x60>;
69 interrupts = <0x1a>;
70 interrupt-parent = <&avs_host_l2_intc>;
71 interrupt-names = "sw_intr";
72 };
73
74 avs-cpu-l2-intr@f04d1100 {
75 compatible = "brcm,bcm7271-avs-cpu-l2-intr",
76 "brcm,avs-cpu-l2-intr";
77 reg = <0xf04d1100 0x10>;
78 };
diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
index ee91cbdd95ee..9f5ca4457b5f 100644
--- a/Documentation/devicetree/bindings/opp/opp.txt
+++ b/Documentation/devicetree/bindings/opp/opp.txt
@@ -86,8 +86,14 @@ Optional properties:
86 Single entry is for target voltage and three entries are for <target min max> 86 Single entry is for target voltage and three entries are for <target min max>
87 voltages. 87 voltages.
88 88
89 Entries for multiple regulators must be present in the same order as 89 Entries for multiple regulators shall be provided in the same field separated
90 regulators are specified in device's DT node. 90 by angular brackets <>. The OPP binding doesn't provide any provisions to
91 relate the values to their power supplies or the order in which the supplies
92 need to be configured and that is left for the implementation specific
93 binding.
94
95 Entries for all regulators shall be of the same size, i.e. either all use a
96 single value or triplets.
91 97
92- opp-microvolt-<name>: Named opp-microvolt property. This is exactly similar to 98- opp-microvolt-<name>: Named opp-microvolt property. This is exactly similar to
93 the above opp-microvolt property, but allows multiple voltage ranges to be 99 the above opp-microvolt property, but allows multiple voltage ranges to be
@@ -104,10 +110,13 @@ Optional properties:
104 110
105 Should only be set if opp-microvolt is set for the OPP. 111 Should only be set if opp-microvolt is set for the OPP.
106 112
107 Entries for multiple regulators must be present in the same order as 113 Entries for multiple regulators shall be provided in the same field separated
108 regulators are specified in device's DT node. If this property isn't required 114 by angular brackets <>. If current values aren't required for a regulator,
109 for few regulators, then this should be marked as zero for them. If it isn't 115 then it shall be filled with 0. If current values aren't required for any of
110 required for any regulator, then this property need not be present. 116 the regulators, then this field is not required. The OPP binding doesn't
117 provide any provisions to relate the values to their power supplies or the
118 order in which the supplies need to be configured and that is left for the
119 implementation specific binding.
111 120
112- opp-microamp-<name>: Named opp-microamp property. Similar to 121- opp-microamp-<name>: Named opp-microamp property. Similar to
113 opp-microvolt-<name> property, but for microamp instead. 122 opp-microvolt-<name> property, but for microamp instead.
@@ -386,10 +395,12 @@ Example 4: Handling multiple regulators
386/ { 395/ {
387 cpus { 396 cpus {
388 cpu@0 { 397 cpu@0 {
389 compatible = "arm,cortex-a7"; 398 compatible = "vendor,cpu-type";
390 ... 399 ...
391 400
392 cpu-supply = <&cpu_supply0>, <&cpu_supply1>, <&cpu_supply2>; 401 vcc0-supply = <&cpu_supply0>;
402 vcc1-supply = <&cpu_supply1>;
403 vcc2-supply = <&cpu_supply2>;
393 operating-points-v2 = <&cpu0_opp_table>; 404 operating-points-v2 = <&cpu0_opp_table>;
394 }; 405 };
395 }; 406 };
diff --git a/Documentation/devicetree/bindings/power/domain-idle-state.txt b/Documentation/devicetree/bindings/power/domain-idle-state.txt
new file mode 100644
index 000000000000..eefc7ed22ca2
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/domain-idle-state.txt
@@ -0,0 +1,33 @@
1PM Domain Idle State Node:
2
3A domain idle state node represents the state parameters that will be used to
4select the state when there are no active components in the domain.
5
6The state node has the following parameters -
7
8- compatible:
9 Usage: Required
10 Value type: <string>
11 Definition: Must be "domain-idle-state".
12
13- entry-latency-us
14 Usage: Required
15 Value type: <prop-encoded-array>
16 Definition: u32 value representing worst case latency in
17 microseconds required to enter the idle state.
18 The exit-latency-us duration may be guaranteed
19 only after entry-latency-us has passed.
20
21- exit-latency-us
22 Usage: Required
23 Value type: <prop-encoded-array>
24 Definition: u32 value representing worst case latency
25 in microseconds required to exit the idle state.
26
27- min-residency-us
28 Usage: Required
29 Value type: <prop-encoded-array>
30 Definition: u32 value representing minimum residency duration
31 in microseconds after which the idle state will yield
32 power benefits after overcoming the overhead in entering
33i the idle state.
diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
index 025b5e7df61c..723e1ad937da 100644
--- a/Documentation/devicetree/bindings/power/power_domain.txt
+++ b/Documentation/devicetree/bindings/power/power_domain.txt
@@ -29,6 +29,15 @@ Optional properties:
29 specified by this binding. More details about power domain specifier are 29 specified by this binding. More details about power domain specifier are
30 available in the next section. 30 available in the next section.
31 31
32- domain-idle-states : A phandle of an idle-state that shall be soaked into a
33 generic domain power state. The idle state definitions are
34 compatible with domain-idle-state specified in [1].
35 The domain-idle-state property reflects the idle state of this PM domain and
36 not the idle states of the devices or sub-domains in the PM domain. Devices
37 and sub-domains have their own idle-states independent of the parent
38 domain's idle states. In the absence of this property, the domain would be
39 considered as capable of being powered-on or powered-off.
40
32Example: 41Example:
33 42
34 power: power-controller@12340000 { 43 power: power-controller@12340000 {
@@ -59,6 +68,38 @@ The nodes above define two power controllers: 'parent' and 'child'.
59Domains created by the 'child' power controller are subdomains of '0' power 68Domains created by the 'child' power controller are subdomains of '0' power
60domain provided by the 'parent' power controller. 69domain provided by the 'parent' power controller.
61 70
71Example 3:
72 parent: power-controller@12340000 {
73 compatible = "foo,power-controller";
74 reg = <0x12340000 0x1000>;
75 #power-domain-cells = <0>;
76 domain-idle-states = <&DOMAIN_RET>, <&DOMAIN_PWR_DN>;
77 };
78
79 child: power-controller@12341000 {
80 compatible = "foo,power-controller";
81 reg = <0x12341000 0x1000>;
82 power-domains = <&parent 0>;
83 #power-domain-cells = <0>;
84 domain-idle-states = <&DOMAIN_PWR_DN>;
85 };
86
87 DOMAIN_RET: state@0 {
88 compatible = "domain-idle-state";
89 reg = <0x0>;
90 entry-latency-us = <1000>;
91 exit-latency-us = <2000>;
92 min-residency-us = <10000>;
93 };
94
95 DOMAIN_PWR_DN: state@1 {
96 compatible = "domain-idle-state";
97 reg = <0x1>;
98 entry-latency-us = <5000>;
99 exit-latency-us = <8000>;
100 min-residency-us = <7000>;
101 };
102
62==PM domain consumers== 103==PM domain consumers==
63 104
64Required properties: 105Required properties:
@@ -76,3 +117,5 @@ Example:
76The node above defines a typical PM domain consumer device, which is located 117The node above defines a typical PM domain consumer device, which is located
77inside a PM domain with index 0 of a power controller represented by a node 118inside a PM domain with index 0 of a power controller represented by a node
78with the label "power". 119with the label "power".
120
121[1]. Documentation/devicetree/bindings/power/domain-idle-state.txt
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt
index 8ba6625fdd63..73ddea39a9ce 100644
--- a/Documentation/power/devices.txt
+++ b/Documentation/power/devices.txt
@@ -607,7 +607,9 @@ individually. Instead, a set of devices sharing a power resource can be put
607into a low-power state together at the same time by turning off the shared 607into a low-power state together at the same time by turning off the shared
608power resource. Of course, they also need to be put into the full-power state 608power resource. Of course, they also need to be put into the full-power state
609together, by turning the shared power resource on. A set of devices with this 609together, by turning the shared power resource on. A set of devices with this
610property is often referred to as a power domain. 610property is often referred to as a power domain. A power domain may also be
611nested inside another power domain. The nested domain is referred to as the
612sub-domain of the parent domain.
611 613
612Support for power domains is provided through the pm_domain field of struct 614Support for power domains is provided through the pm_domain field of struct
613device. This field is a pointer to an object of type struct dev_pm_domain, 615device. This field is a pointer to an object of type struct dev_pm_domain,
@@ -629,6 +631,16 @@ support for power domains into subsystem-level callbacks, for example by
629modifying the platform bus type. Other platforms need not implement it or take 631modifying the platform bus type. Other platforms need not implement it or take
630it into account in any way. 632it into account in any way.
631 633
634Devices may be defined as IRQ-safe which indicates to the PM core that their
635runtime PM callbacks may be invoked with disabled interrupts (see
636Documentation/power/runtime_pm.txt for more information). If an IRQ-safe
637device belongs to a PM domain, the runtime PM of the domain will be
638disallowed, unless the domain itself is defined as IRQ-safe. However, it
639makes sense to define a PM domain as IRQ-safe only if all the devices in it
640are IRQ-safe. Moreover, if an IRQ-safe domain has a parent domain, the runtime
641PM of the parent is only allowed if the parent itself is IRQ-safe too with the
642additional restriction that all child domains of an IRQ-safe parent must also
643be IRQ-safe.
632 644
633Device Low Power (suspend) States 645Device Low Power (suspend) States
634--------------------------------- 646---------------------------------
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt
index 50f3ef9177c1..8a39ce45d8a0 100644
--- a/Documentation/power/states.txt
+++ b/Documentation/power/states.txt
@@ -8,25 +8,43 @@ for each state.
8 8
9The states are represented by strings that can be read or written to the 9The states are represented by strings that can be read or written to the
10/sys/power/state file. Those strings may be "mem", "standby", "freeze" and 10/sys/power/state file. Those strings may be "mem", "standby", "freeze" and
11"disk", where the last one always represents hibernation (Suspend-To-Disk) and 11"disk", where the last three always represent Power-On Suspend (if supported),
12the meaning of the remaining ones depends on the relative_sleep_states command 12Suspend-To-Idle and hibernation (Suspend-To-Disk), respectively.
13line argument. 13
14 14The meaning of the "mem" string is controlled by the /sys/power/mem_sleep file.
15For relative_sleep_states=1, the strings "mem", "standby" and "freeze" label the 15It contains strings representing the available modes of system suspend that may
16available non-hibernation sleep states from the deepest to the shallowest, 16be triggered by writing "mem" to /sys/power/state. These modes are "s2idle"
17respectively. In that case, "mem" is always present in /sys/power/state, 17(Suspend-To-Idle), "shallow" (Power-On Suspend) and "deep" (Suspend-To-RAM).
18because there is at least one non-hibernation sleep state in every system. If 18The "s2idle" mode is always available, while the other ones are only available
19the given system supports two non-hibernation sleep states, "standby" is present 19if supported by the platform (if not supported, the strings representing them
20in /sys/power/state in addition to "mem". If the system supports three 20are not present in /sys/power/mem_sleep). The string representing the suspend
21non-hibernation sleep states, "freeze" will be present in /sys/power/state in 21mode to be used subsequently is enclosed in square brackets. Writing one of
22addition to "mem" and "standby". 22the other strings present in /sys/power/mem_sleep to it causes the suspend mode
23 23to be used subsequently to change to the one represented by that string.
24For relative_sleep_states=0, which is the default, the following descriptions 24
25apply. 25Consequently, there are two ways to cause the system to go into the
26 26Suspend-To-Idle sleep state. The first one is to write "freeze" directly to
27state: Suspend-To-Idle 27/sys/power/state. The second one is to write "s2idle" to /sys/power/mem_sleep
28and then to wrtie "mem" to /sys/power/state. Similarly, there are two ways
29to cause the system to go into the Power-On Suspend sleep state (the strings to
30write to the control files in that case are "standby" or "shallow" and "mem",
31respectively) if that state is supported by the platform. In turn, there is
32only one way to cause the system to go into the Suspend-To-RAM state (write
33"deep" into /sys/power/mem_sleep and "mem" into /sys/power/state).
34
35The default suspend mode (ie. the one to be used without writing anything into
36/sys/power/mem_sleep) is either "deep" (if Suspend-To-RAM is supported) or
37"s2idle", but it can be overridden by the value of the "mem_sleep_default"
38parameter in the kernel command line. On some ACPI-based systems, depending on
39the information in the FADT, the default may be "s2idle" even if Suspend-To-RAM
40is supported.
41
42The properties of all of the sleep states are described below.
43
44
45State: Suspend-To-Idle
28ACPI state: S0 46ACPI state: S0
29Label: "freeze" 47Label: "s2idle" ("freeze")
30 48
31This state is a generic, pure software, light-weight, system sleep state. 49This state is a generic, pure software, light-weight, system sleep state.
32It allows more energy to be saved relative to runtime idle by freezing user 50It allows more energy to be saved relative to runtime idle by freezing user
@@ -35,13 +53,13 @@ lower-power than available at run time), such that the processors can
35spend more time in their idle states. 53spend more time in their idle states.
36 54
37This state can be used for platforms without Power-On Suspend/Suspend-to-RAM 55This state can be used for platforms without Power-On Suspend/Suspend-to-RAM
38support, or it can be used in addition to Suspend-to-RAM (memory sleep) 56support, or it can be used in addition to Suspend-to-RAM to provide reduced
39to provide reduced resume latency. It is always supported. 57resume latency. It is always supported.
40 58
41 59
42State: Standby / Power-On Suspend 60State: Standby / Power-On Suspend
43ACPI State: S1 61ACPI State: S1
44Label: "standby" 62Label: "shallow" ("standby")
45 63
46This state, if supported, offers moderate, though real, power savings, while 64This state, if supported, offers moderate, though real, power savings, while
47providing a relatively low-latency transition back to a working system. No 65providing a relatively low-latency transition back to a working system. No
@@ -58,7 +76,7 @@ state.
58 76
59State: Suspend-to-RAM 77State: Suspend-to-RAM
60ACPI State: S3 78ACPI State: S3
61Label: "mem" 79Label: "deep"
62 80
63This state, if supported, offers significant power savings as everything in the 81This state, if supported, offers significant power savings as everything in the
64system is put into a low-power state, except for memory, which should be placed 82system is put into a low-power state, except for memory, which should be placed