0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/power/power-domain.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Generic PM domains
0008
0009 maintainers:
0010 - Rafael J. Wysocki <rjw@rjwysocki.net>
0011 - Kevin Hilman <khilman@kernel.org>
0012 - Ulf Hansson <ulf.hansson@linaro.org>
0013
0014 description: |+
0015 System on chip designs are often divided into multiple PM domains that can be
0016 used for power gating of selected IP blocks for power saving by reduced leakage
0017 current.
0018
0019 This device tree binding can be used to bind PM domain consumer devices with
0020 their PM domains provided by PM domain providers. A PM domain provider can be
0021 represented by any node in the device tree and can provide one or more PM
0022 domains. A consumer node can refer to the provider by a phandle and a set of
0023 phandle arguments (so called PM domain specifiers) of length specified by the
0024 \#power-domain-cells property in the PM domain provider node.
0025
0026 properties:
0027 $nodename:
0028 pattern: "^(power-controller|power-domain)([@-].*)?$"
0029
0030 domain-idle-states:
0031 $ref: /schemas/types.yaml#/definitions/phandle-array
0032 items:
0033 maxItems: 1
0034 description: |
0035 Phandles of idle states that defines the available states for the
0036 power-domain provider. The idle state definitions are compatible with the
0037 domain-idle-state bindings, specified in ./domain-idle-state.yaml.
0038
0039 Note that, the domain-idle-state property reflects the idle states of this
0040 PM domain and not the idle states of the devices or sub-domains in the PM
0041 domain. Devices and sub-domains have their own idle states independent of
0042 the parent domain's idle states. In the absence of this property, the
0043 domain would be considered as capable of being powered-on or powered-off.
0044
0045 operating-points-v2:
0046 $ref: /schemas/types.yaml#/definitions/phandle-array
0047 items:
0048 maxItems: 1
0049 description:
0050 Phandles to the OPP tables of power domains provided by a power domain
0051 provider. If the provider provides a single power domain only or all
0052 the power domains provided by the provider have identical OPP tables,
0053 then this shall contain a single phandle. Refer to ../opp/opp-v2-base.yaml
0054 for more information.
0055
0056 "#power-domain-cells":
0057 description:
0058 Number of cells in a PM domain specifier. Typically 0 for nodes
0059 representing a single PM domain and 1 for nodes providing multiple PM
0060 domains (e.g. power controllers), but can be any value as specified
0061 by device tree binding documentation of particular provider.
0062
0063 power-domains:
0064 description:
0065 A phandle and PM domain specifier as defined by bindings of the power
0066 controller specified by phandle. Some power domains might be powered
0067 from another power domain (or have other hardware specific
0068 dependencies). For representing such dependency a standard PM domain
0069 consumer binding is used. When provided, all domains created
0070 by the given provider should be subdomains of the domain specified
0071 by this binding.
0072
0073 required:
0074 - "#power-domain-cells"
0075
0076 additionalProperties: true
0077
0078 examples:
0079 - |
0080 power: power-controller@12340000 {
0081 compatible = "foo,power-controller";
0082 reg = <0x12340000 0x1000>;
0083 #power-domain-cells = <1>;
0084 };
0085
0086 // The node above defines a power controller that is a PM domain provider and
0087 // expects one cell as its phandle argument.
0088
0089 - |
0090 parent2: power-controller@12340000 {
0091 compatible = "foo,power-controller";
0092 reg = <0x12340000 0x1000>;
0093 #power-domain-cells = <1>;
0094 };
0095
0096 child2: power-controller@12341000 {
0097 compatible = "foo,power-controller";
0098 reg = <0x12341000 0x1000>;
0099 power-domains = <&parent2 0>;
0100 #power-domain-cells = <1>;
0101 };
0102
0103 // The nodes above define two power controllers: 'parent' and 'child'.
0104 // Domains created by the 'child' power controller are subdomains of '0' power
0105 // domain provided by the 'parent' power controller.
0106
0107 - |
0108 parent3: power-controller@12340000 {
0109 compatible = "foo,power-controller";
0110 reg = <0x12340000 0x1000>;
0111 #power-domain-cells = <0>;
0112 domain-idle-states = <&DOMAIN_RET>, <&DOMAIN_PWR_DN>;
0113 };
0114
0115 child3: power-controller@12341000 {
0116 compatible = "foo,power-controller";
0117 reg = <0x12341000 0x1000>;
0118 power-domains = <&parent3>;
0119 #power-domain-cells = <0>;
0120 domain-idle-states = <&DOMAIN_PWR_DN>;
0121 };
0122
0123 domain-idle-states {
0124 DOMAIN_RET: domain-retention {
0125 compatible = "domain-idle-state";
0126 entry-latency-us = <1000>;
0127 exit-latency-us = <2000>;
0128 min-residency-us = <10000>;
0129 };
0130
0131 DOMAIN_PWR_DN: domain-pwr-dn {
0132 compatible = "domain-idle-state";
0133 entry-latency-us = <5000>;
0134 exit-latency-us = <8000>;
0135 min-residency-us = <7000>;
0136 };
0137 };