GNU Linux-libre 4.14.290-gnu1
[releases.git] / Documentation / devicetree / bindings / power / power_domain.txt
1 * Generic PM domains
2
3 System on chip designs are often divided into multiple PM domains that can be
4 used for power gating of selected IP blocks for power saving by reduced leakage
5 current.
6
7 This device tree binding can be used to bind PM domain consumer devices with
8 their PM domains provided by PM domain providers. A PM domain provider can be
9 represented by any node in the device tree and can provide one or more PM
10 domains. A consumer node can refer to the provider by a phandle and a set of
11 phandle arguments (so called PM domain specifiers) of length specified by the
12 #power-domain-cells property in the PM domain provider node.
13
14 ==PM domain providers==
15
16 Required properties:
17  - #power-domain-cells : Number of cells in a PM domain specifier;
18    Typically 0 for nodes representing a single PM domain and 1 for nodes
19    providing multiple PM domains (e.g. power controllers), but can be any value
20    as specified by device tree binding documentation of particular provider.
21
22 Optional properties:
23  - power-domains : A phandle and PM domain specifier as defined by bindings of
24                    the power controller specified by phandle.
25    Some power domains might be powered from another power domain (or have
26    other hardware specific dependencies). For representing such dependency
27    a standard PM domain consumer binding is used. When provided, all domains
28    created by the given provider should be subdomains of the domain
29    specified by this binding. More details about power domain specifier are
30    available in the next section.
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]. phandles
35                 that are not compatible with domain-idle-state will be
36                 ignored.
37   The domain-idle-state property reflects the idle state of this PM domain and
38   not the idle states of the devices or sub-domains in the PM domain. Devices
39   and sub-domains have their own idle-states independent of the parent
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.
42
43 Example:
44
45         power: power-controller@12340000 {
46                 compatible = "foo,power-controller";
47                 reg = <0x12340000 0x1000>;
48                 #power-domain-cells = <1>;
49         };
50
51 The node above defines a power controller that is a PM domain provider and
52 expects one cell as its phandle argument.
53
54 Example 2:
55
56         parent: power-controller@12340000 {
57                 compatible = "foo,power-controller";
58                 reg = <0x12340000 0x1000>;
59                 #power-domain-cells = <1>;
60         };
61
62         child: power-controller@12341000 {
63                 compatible = "foo,power-controller";
64                 reg = <0x12341000 0x1000>;
65                 power-domains = <&parent 0>;
66                 #power-domain-cells = <1>;
67         };
68
69 The nodes above define two power controllers: 'parent' and 'child'.
70 Domains created by the 'child' power controller are subdomains of '0' power
71 domain provided by the 'parent' power controller.
72
73 Example 3:
74         parent: power-controller@12340000 {
75                 compatible = "foo,power-controller";
76                 reg = <0x12340000 0x1000>;
77                 #power-domain-cells = <0>;
78                 domain-idle-states = <&DOMAIN_RET>, <&DOMAIN_PWR_DN>;
79         };
80
81         child: power-controller@12341000 {
82                 compatible = "foo,power-controller";
83                 reg = <0x12341000 0x1000>;
84                 power-domains = <&parent>;
85                 #power-domain-cells = <0>;
86                 domain-idle-states = <&DOMAIN_PWR_DN>;
87         };
88
89         DOMAIN_RET: state@0 {
90                 compatible = "domain-idle-state";
91                 reg = <0x0>;
92                 entry-latency-us = <1000>;
93                 exit-latency-us = <2000>;
94                 min-residency-us = <10000>;
95         };
96
97         DOMAIN_PWR_DN: state@1 {
98                 compatible = "domain-idle-state";
99                 reg = <0x1>;
100                 entry-latency-us = <5000>;
101                 exit-latency-us = <8000>;
102                 min-residency-us = <7000>;
103         };
104
105 ==PM domain consumers==
106
107 Required properties:
108  - power-domains : A phandle and PM domain specifier as defined by bindings of
109                    the power controller specified by phandle.
110
111 Example:
112
113         leaky-device@12350000 {
114                 compatible = "foo,i-leak-current";
115                 reg = <0x12350000 0x1000>;
116                 power-domains = <&power 0>;
117         };
118
119 The node above defines a typical PM domain consumer device, which is located
120 inside a PM domain with index 0 of a power controller represented by a node
121 with the label "power".
122
123 [1]. Documentation/devicetree/bindings/power/domain-idle-state.txt