Skip to content

Commit 8406d42

Browse files
committed
dts: bindings: zephyr,power-state: Add missing linux props
Add missing properties to match the linux idle-states binding. Add a note about how these properties may or may not be used in Zephyr (acceptable due to the fact this binding already has a `zephyr,` prefix). Expand the documentation around the min-residency to explain it better. Signed-off-by: Declan Snyder <[email protected]>
1 parent 16f4d6c commit 8406d42

File tree

1 file changed

+65
-2
lines changed

1 file changed

+65
-2
lines changed

dts/bindings/power/zephyr,power-state.yaml

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,51 @@
11
# Copyright (c) 2020, Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4-
description: Properties for power management state
4+
description: |
5+
Properties for power management idle states. Note that not all of the timing properties will
6+
be consumed by any or all of the Zephyr policy managers. See the policy manager documentation
7+
for details on how the properties affect that policy. The default policy manager, for example,
8+
does not abort entry sequences and therefore only makes use of
9+
min-residency-us and exit-latency-us.
10+
11+
The following diagram depicts the CPU execution phases and related timing
12+
properties required to enter and exit an idle state:
13+
14+
..__[EXEC]__|__[PREP]__|__[ENTRY]__|__[IDLE]__|__[EXIT]__|__[EXEC]__..
15+
| | | | |
16+
17+
|<------ entry ------->|
18+
| latency |
19+
|<- exit ->|
20+
| latency |
21+
|<-------- min-residency -------->|
22+
|<------- wakeup-latency ------->|
23+
24+
The following diagram depicts two hypothetical idle states,
25+
one with a lower power once idle but higher cost of entering,
26+
meaning that it has a higher "minimum residency" to justify it being chosen over the other:
27+
28+
|
29+
|
30+
|
31+
| /-- IDLE1
32+
e | /---
33+
n | /----
34+
e | /---
35+
r | /-----/--------- IDLE2
36+
g | /-------/---------
37+
y | ------------ /---|
38+
| / /---- |
39+
| / /--- |
40+
| / /---- |
41+
| / /--- |
42+
| --- |
43+
| / |
44+
| / |
45+
|/ | time
46+
---/----------------------------+------------------------
47+
|IDLE1-energy < IDLE2-energy | IDLE2-energy < IDLE1-energy
48+
549
650
compatible: "zephyr,power-state"
751

@@ -26,11 +70,30 @@ properties:
2670
description: |
2771
Minimum residency duration in microseconds. It is the minimum time for a
2872
given idle state to be worthwhile energywise. It includes the time to enter
29-
in this state.
73+
into this state and the time spent in the state before exiting. It represents
74+
the "break-even" time to justify the time and power spent
75+
on the work needed for entering the state based on how much actual energy is saved
76+
once in the state.
77+
entry-latency-us:
78+
type: int
79+
description: |
80+
Worst case latency in microseconds required to enter the idle state.
81+
Includes the software latency involved to prepare to enter the low power state.
3082
exit-latency-us:
3183
type: int
3284
description: |
3385
Worst case latency in microseconds required to exit the idle state.
86+
wakeup-latency-us: |
87+
type: int
88+
description: |
89+
Maximum delay between the signaling of a wake-up event and the CPU
90+
being able to execute normal code again. If unspecified, it is assumed
91+
to be entry-latency-us + exit-latency-us, which would be the worst case.
92+
But the actual wakeup latency may be lower as the intended meaning
93+
of this value is actually
94+
"exit-latency-us + entry-latency-us - 'software prep latency us'"
95+
because the software prep happening before hardware gets committed
96+
to the idle state could theoretically be aborted.
3497
zephyr,pm-device-disabled:
3598
type: boolean
3699
description: |

0 commit comments

Comments
 (0)