Skip to content

Commit 3261227

Browse files
storulfrobherring
authored andcommitted
dt-bindings: power: Convert domain-idle-states bindings to json-schema
While converting to the json-schema, let's also take the opportunity to further specify/clarify some more details about the DT binding. For example, let's define the label where to put the states nodes, set a pattern for nodename of the state nodes and finally add an example. Fixes: a3f048b ("dt: psci: Update DT bindings to support hierarchical PSCI states") Signed-off-by: Ulf Hansson <[email protected]> [robh: drop type refs from standard unit properties] Signed-off-by: Rob Herring <[email protected]>
1 parent ac9686a commit 3261227

File tree

5 files changed

+76
-47
lines changed

5 files changed

+76
-47
lines changed

Documentation/devicetree/bindings/arm/psci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ properties:
123123
to mandate it.
124124

125125
[3] Documentation/devicetree/bindings/power/power_domain.txt
126-
[4] Documentation/devicetree/bindings/power/domain-idle-state.txt
126+
[4] Documentation/devicetree/bindings/power/domain-idle-state.yaml
127127

128128
power-domains:
129129
$ref: '/schemas/types.yaml#/definitions/phandle-array'

Documentation/devicetree/bindings/power/domain-idle-state.txt

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/power/domain-idle-state.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: PM Domain Idle States binding description
8+
9+
maintainers:
10+
- Ulf Hansson <[email protected]>
11+
12+
description:
13+
A domain idle state node represents the state parameters that will be used to
14+
select the state when there are no active components in the PM domain.
15+
16+
properties:
17+
$nodename:
18+
const: domain-idle-states
19+
20+
patternProperties:
21+
"^(cpu|cluster|domain)-":
22+
type: object
23+
description:
24+
Each state node represents a domain idle state description.
25+
26+
properties:
27+
compatible:
28+
const: domain-idle-state
29+
30+
entry-latency-us:
31+
description:
32+
The worst case latency in microseconds required to enter the idle
33+
state. Note that, the exit-latency-us duration may be guaranteed only
34+
after the entry-latency-us has passed.
35+
36+
exit-latency-us:
37+
description:
38+
The worst case latency in microseconds required to exit the idle
39+
state.
40+
41+
min-residency-us:
42+
description:
43+
The minimum residency duration in microseconds after which the idle
44+
state will yield power benefits, after overcoming the overhead while
45+
entering the idle state.
46+
47+
required:
48+
- compatible
49+
- entry-latency-us
50+
- exit-latency-us
51+
- min-residency-us
52+
53+
examples:
54+
- |
55+
56+
domain-idle-states {
57+
domain_retention: domain-retention {
58+
compatible = "domain-idle-state";
59+
entry-latency-us = <20>;
60+
exit-latency-us = <40>;
61+
min-residency-us = <80>;
62+
};
63+
};
64+
...

Documentation/devicetree/bindings/power/power-domain.yaml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,16 @@ properties:
2929

3030
domain-idle-states:
3131
$ref: /schemas/types.yaml#/definitions/phandle-array
32-
description:
33-
A phandle of an idle-state that shall be soaked into a generic domain
34-
power state. The idle state definitions are compatible with
35-
domain-idle-state specified in
36-
Documentation/devicetree/bindings/power/domain-idle-state.txt
37-
phandles that are not compatible with domain-idle-state will be ignored.
38-
The domain-idle-state property reflects the idle state of this PM domain
39-
and not the idle states of the devices or sub-domains in the PM domain.
40-
Devices and sub-domains have their own idle-states independent
41-
of the parent domain's idle states. In the absence of this property,
42-
the domain would be considered as capable of being powered-on
43-
or powered-off.
32+
description: |
33+
Phandles of idle states that defines the available states for the
34+
power-domain provider. The idle state definitions are compatible with the
35+
domain-idle-state bindings, specified in ./domain-idle-state.yaml.
36+
37+
Note that, the domain-idle-state property reflects the idle states of this
38+
PM domain and not the idle states of the devices or sub-domains in the PM
39+
domain. Devices and sub-domains have their own idle states independent of
40+
the parent domain's idle states. In the absence of this property, the
41+
domain would be considered as capable of being powered-on or powered-off.
4442
4543
operating-points-v2:
4644
$ref: /schemas/types.yaml#/definitions/phandle-array

Documentation/devicetree/bindings/power/power_domain.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ Example:
109109
required-opps = <&domain1_opp_1>;
110110
};
111111

112-
[1]. Documentation/devicetree/bindings/power/domain-idle-state.txt
112+
[1]. Documentation/devicetree/bindings/power/domain-idle-state.yaml

0 commit comments

Comments
 (0)