1# SPDX-License-Identifier: GPL-2.0 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/power/power-domain.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Generic PM domains 8 9maintainers: 10 - Rafael J. Wysocki <rafael@kernel.org> 11 - Kevin Hilman <khilman@kernel.org> 12 - Ulf Hansson <ulf.hansson@linaro.org> 13 14description: |+ 15 System on chip designs are often divided into multiple PM domains that can be 16 used for power gating of selected IP blocks for power saving by reduced 17 leakage current. Moreover, in some cases the similar PM domains may also be 18 capable of scaling performance for a group of IP blocks. 19 20 This device tree binding can be used to bind PM domain consumer devices with 21 their PM domains provided by PM domain providers. A PM domain provider can be 22 represented by any node in the device tree and can provide one or more PM 23 domains. A consumer node can refer to the provider by a phandle and a set of 24 phandle arguments (so called PM domain specifiers) of length specified by the 25 \#power-domain-cells property in the PM domain provider node. 26 27properties: 28 $nodename: 29 pattern: "^(power-controller|power-domain|performance-domain)([@-].*)?$" 30 31 domain-idle-states: 32 $ref: /schemas/types.yaml#/definitions/phandle-array 33 items: 34 maxItems: 1 35 description: | 36 Phandles of idle states that defines the available states for the 37 power-domain provider. The idle state definitions are compatible with the 38 domain-idle-state bindings, specified in ./domain-idle-state.yaml. 39 40 Note that, the domain-idle-state property reflects the idle states of this 41 PM domain and not the idle states of the devices or sub-domains in the PM 42 domain. Devices and sub-domains have their own idle states independent of 43 the parent domain's idle states. In the absence of this property, the 44 domain would be considered as capable of being powered-on or powered-off. 45 46 operating-points-v2: 47 description: 48 Phandles to the OPP tables of power domains that are capable of scaling 49 performance, provided by a power domain provider. If the provider provides 50 a single power domain only or all the power domains provided by the 51 provider have identical OPP tables, then this shall contain a single 52 phandle. Refer to ../opp/opp-v2-base.yaml for more information. 53 54 "#power-domain-cells": 55 description: 56 Number of cells in a PM domain specifier. Typically 0 for nodes 57 representing a single PM domain and 1 for nodes providing multiple PM 58 domains (e.g. power controllers), but can be any value as specified 59 by device tree binding documentation of particular provider. 60 61 power-domains: 62 description: 63 A phandle and PM domain specifier as defined by bindings of the power 64 controller specified by phandle. Some power domains might be powered 65 from another power domain (or have other hardware specific 66 dependencies). For representing such dependency a standard PM domain 67 consumer binding is used. When provided, all domains created 68 by the given provider should be subdomains of the domain specified 69 by this binding. 70 71 power-domains-child-ids: 72 $ref: /schemas/types.yaml#/definitions/uint32-array 73 description: 74 An array of child domain IDs that correspond to the power-domains 75 property. This property is only applicable to power domain providers 76 with "#power-domain-cells" > 0 (i.e., providers that supply multiple 77 power domains). It specifies which of the provider's child domains 78 should be associated with each parent domain listed in the power-domains 79 property. The number of elements in this array must match the number of 80 phandles in the power-domains property. Each element specifies the child 81 domain ID (index) that should be made a child domain of the corresponding 82 parent domain. This enables hierarchical power domain structures where 83 different child domains from the same provider can have different 84 parent domains. 85 86required: 87 - "#power-domain-cells" 88 89additionalProperties: true 90 91examples: 92 - | 93 power: power-controller@12340000 { 94 compatible = "foo,power-controller"; 95 reg = <0x12340000 0x1000>; 96 #power-domain-cells = <1>; 97 }; 98 99 // The node above defines a power controller that is a PM domain provider and 100 // expects one cell as its phandle argument. 101 102 - | 103 parent2: power-controller@12340000 { 104 compatible = "foo,power-controller"; 105 reg = <0x12340000 0x1000>; 106 #power-domain-cells = <1>; 107 }; 108 109 child2: power-controller@12341000 { 110 compatible = "foo,power-controller"; 111 reg = <0x12341000 0x1000>; 112 power-domains = <&parent2 0>; 113 #power-domain-cells = <1>; 114 }; 115 116 // The nodes above define two power controllers: 'parent' and 'child'. 117 // Domains created by the 'child' power controller are subdomains of '0' power 118 // domain provided by the 'parent' power controller. 119 120 - | 121 parent3: power-controller@12340000 { 122 compatible = "foo,power-controller"; 123 reg = <0x12340000 0x1000>; 124 #power-domain-cells = <0>; 125 domain-idle-states = <&DOMAIN_RET>, <&DOMAIN_PWR_DN>; 126 }; 127 128 child3: power-controller@12341000 { 129 compatible = "foo,power-controller"; 130 reg = <0x12341000 0x1000>; 131 power-domains = <&parent3>; 132 #power-domain-cells = <0>; 133 domain-idle-states = <&DOMAIN_PWR_DN>; 134 }; 135 136 domain-idle-states { 137 DOMAIN_RET: domain-retention { 138 compatible = "domain-idle-state"; 139 entry-latency-us = <1000>; 140 exit-latency-us = <2000>; 141 min-residency-us = <10000>; 142 }; 143 144 DOMAIN_PWR_DN: domain-pwr-dn { 145 compatible = "domain-idle-state"; 146 entry-latency-us = <5000>; 147 exit-latency-us = <8000>; 148 min-residency-us = <7000>; 149 }; 150 }; 151 152 - | 153 // Example: SCMI domain 15 -> MAIN_PD, SCMI domain 19 -> WKUP_PD 154 MAIN_PD: power-controller-main { 155 compatible = "foo,power-controller"; 156 #power-domain-cells = <0>; 157 }; 158 159 WKUP_PD: power-controller-wkup { 160 compatible = "foo,power-controller"; 161 #power-domain-cells = <0>; 162 }; 163 164 scmi_pds: power-controller-scmi { 165 compatible = "foo,power-controller"; 166 #power-domain-cells = <1>; 167 power-domains = <&MAIN_PD>, <&WKUP_PD>; 168 power-domains-child-ids = <15>, <19>; 169 }; 170