xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/power/power-domain.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/power/power-domain.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: Generic PM domains
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - Rafael J. Wysocki <rjw@rjwysocki.net>
11*4882a593Smuzhiyun  - Kevin Hilman <khilman@kernel.org>
12*4882a593Smuzhiyun  - Ulf Hansson <ulf.hansson@linaro.org>
13*4882a593Smuzhiyun
14*4882a593Smuzhiyundescription: |+
15*4882a593Smuzhiyun  System on chip designs are often divided into multiple PM domains that can be
16*4882a593Smuzhiyun  used for power gating of selected IP blocks for power saving by reduced leakage
17*4882a593Smuzhiyun  current.
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun  This device tree binding can be used to bind PM domain consumer devices with
20*4882a593Smuzhiyun  their PM domains provided by PM domain providers. A PM domain provider can be
21*4882a593Smuzhiyun  represented by any node in the device tree and can provide one or more PM
22*4882a593Smuzhiyun  domains. A consumer node can refer to the provider by a phandle and a set of
23*4882a593Smuzhiyun  phandle arguments (so called PM domain specifiers) of length specified by the
24*4882a593Smuzhiyun  \#power-domain-cells property in the PM domain provider node.
25*4882a593Smuzhiyun
26*4882a593Smuzhiyunproperties:
27*4882a593Smuzhiyun  $nodename:
28*4882a593Smuzhiyun    pattern: "^(power-controller|power-domain)([@-].*)?$"
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun  domain-idle-states:
31*4882a593Smuzhiyun    $ref: /schemas/types.yaml#/definitions/phandle-array
32*4882a593Smuzhiyun    description: |
33*4882a593Smuzhiyun      Phandles of idle states that defines the available states for the
34*4882a593Smuzhiyun      power-domain provider. The idle state definitions are compatible with the
35*4882a593Smuzhiyun      domain-idle-state bindings, specified in ./domain-idle-state.yaml.
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun      Note that, the domain-idle-state property reflects the idle states of this
38*4882a593Smuzhiyun      PM domain and not the idle states of the devices or sub-domains in the PM
39*4882a593Smuzhiyun      domain. Devices and sub-domains have their own idle states independent of
40*4882a593Smuzhiyun      the parent domain's idle states. In the absence of this property, the
41*4882a593Smuzhiyun      domain would be considered as capable of being powered-on or powered-off.
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun  operating-points-v2:
44*4882a593Smuzhiyun    $ref: /schemas/types.yaml#/definitions/phandle-array
45*4882a593Smuzhiyun    description:
46*4882a593Smuzhiyun      Phandles to the OPP tables of power domains provided by a power domain
47*4882a593Smuzhiyun      provider. If the provider provides a single power domain only or all
48*4882a593Smuzhiyun      the power domains provided by the provider have identical OPP tables,
49*4882a593Smuzhiyun      then this shall contain a single phandle. Refer to ../opp/opp.txt
50*4882a593Smuzhiyun      for more information.
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun  "#power-domain-cells":
53*4882a593Smuzhiyun    description:
54*4882a593Smuzhiyun      Number of cells in a PM domain specifier. Typically 0 for nodes
55*4882a593Smuzhiyun      representing a single PM domain and 1 for nodes providing multiple PM
56*4882a593Smuzhiyun      domains (e.g. power controllers), but can be any value as specified
57*4882a593Smuzhiyun      by device tree binding documentation of particular provider.
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun  power-domains:
60*4882a593Smuzhiyun    description:
61*4882a593Smuzhiyun      A phandle and PM domain specifier as defined by bindings of the power
62*4882a593Smuzhiyun      controller specified by phandle. Some power domains might be powered
63*4882a593Smuzhiyun      from another power domain (or have other hardware specific
64*4882a593Smuzhiyun      dependencies). For representing such dependency a standard PM domain
65*4882a593Smuzhiyun      consumer binding is used. When provided, all domains created
66*4882a593Smuzhiyun      by the given provider should be subdomains of the domain specified
67*4882a593Smuzhiyun      by this binding.
68*4882a593Smuzhiyun
69*4882a593Smuzhiyunrequired:
70*4882a593Smuzhiyun  - "#power-domain-cells"
71*4882a593Smuzhiyun
72*4882a593SmuzhiyunadditionalProperties: true
73*4882a593Smuzhiyun
74*4882a593Smuzhiyunexamples:
75*4882a593Smuzhiyun  - |
76*4882a593Smuzhiyun    power: power-controller@12340000 {
77*4882a593Smuzhiyun        compatible = "foo,power-controller";
78*4882a593Smuzhiyun        reg = <0x12340000 0x1000>;
79*4882a593Smuzhiyun        #power-domain-cells = <1>;
80*4882a593Smuzhiyun    };
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun    // The node above defines a power controller that is a PM domain provider and
83*4882a593Smuzhiyun    // expects one cell as its phandle argument.
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun  - |
86*4882a593Smuzhiyun    parent2: power-controller@12340000 {
87*4882a593Smuzhiyun        compatible = "foo,power-controller";
88*4882a593Smuzhiyun        reg = <0x12340000 0x1000>;
89*4882a593Smuzhiyun        #power-domain-cells = <1>;
90*4882a593Smuzhiyun    };
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun    child2: power-controller@12341000 {
93*4882a593Smuzhiyun        compatible = "foo,power-controller";
94*4882a593Smuzhiyun        reg = <0x12341000 0x1000>;
95*4882a593Smuzhiyun        power-domains = <&parent2 0>;
96*4882a593Smuzhiyun        #power-domain-cells = <1>;
97*4882a593Smuzhiyun    };
98*4882a593Smuzhiyun
99*4882a593Smuzhiyun    // The nodes above define two power controllers: 'parent' and 'child'.
100*4882a593Smuzhiyun    // Domains created by the 'child' power controller are subdomains of '0' power
101*4882a593Smuzhiyun    // domain provided by the 'parent' power controller.
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun  - |
104*4882a593Smuzhiyun    parent3: power-controller@12340000 {
105*4882a593Smuzhiyun        compatible = "foo,power-controller";
106*4882a593Smuzhiyun        reg = <0x12340000 0x1000>;
107*4882a593Smuzhiyun        #power-domain-cells = <0>;
108*4882a593Smuzhiyun        domain-idle-states = <&DOMAIN_RET>, <&DOMAIN_PWR_DN>;
109*4882a593Smuzhiyun    };
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun    child3: power-controller@12341000 {
112*4882a593Smuzhiyun        compatible = "foo,power-controller";
113*4882a593Smuzhiyun        reg = <0x12341000 0x1000>;
114*4882a593Smuzhiyun        power-domains = <&parent3>;
115*4882a593Smuzhiyun        #power-domain-cells = <0>;
116*4882a593Smuzhiyun        domain-idle-states = <&DOMAIN_PWR_DN>;
117*4882a593Smuzhiyun    };
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun    domain-idle-states {
120*4882a593Smuzhiyun        DOMAIN_RET: domain-retention {
121*4882a593Smuzhiyun            compatible = "domain-idle-state";
122*4882a593Smuzhiyun            entry-latency-us = <1000>;
123*4882a593Smuzhiyun            exit-latency-us = <2000>;
124*4882a593Smuzhiyun            min-residency-us = <10000>;
125*4882a593Smuzhiyun        };
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun        DOMAIN_PWR_DN: domain-pwr-dn {
128*4882a593Smuzhiyun            compatible = "domain-idle-state";
129*4882a593Smuzhiyun            entry-latency-us = <5000>;
130*4882a593Smuzhiyun            exit-latency-us = <8000>;
131*4882a593Smuzhiyun            min-residency-us = <7000>;
132*4882a593Smuzhiyun        };
133*4882a593Smuzhiyun    };
134