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 <rjw@rjwysocki.net> 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 leakage 17 current. 18 19 This device tree binding can be used to bind PM domain consumer devices with 20 their PM domains provided by PM domain providers. A PM domain provider can be 21 represented by any node in the device tree and can provide one or more PM 22 domains. A consumer node can refer to the provider by a phandle and a set of 23 phandle arguments (so called PM domain specifiers) of length specified by the 24 \#power-domain-cells property in the PM domain provider node. 25 26properties: 27 $nodename: 28 pattern: "^(power-controller|power-domain)(@.*)?$" 29 30 domain-idle-states: 31 $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. 44 45 operating-points-v2: 46 $ref: /schemas/types.yaml#/definitions/phandle-array 47 description: 48 Phandles to the OPP tables of power domains provided by a power domain 49 provider. If the provider provides a single power domain only or all 50 the power domains provided by the provider have identical OPP tables, 51 then this shall contain a single phandle. Refer to ../opp/opp.txt 52 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 71required: 72 - "#power-domain-cells" 73 74examples: 75 - | 76 power: power-controller@12340000 { 77 compatible = "foo,power-controller"; 78 reg = <0x12340000 0x1000>; 79 #power-domain-cells = <1>; 80 }; 81 82 // The node above defines a power controller that is a PM domain provider and 83 // expects one cell as its phandle argument. 84 85 - | 86 parent2: power-controller@12340000 { 87 compatible = "foo,power-controller"; 88 reg = <0x12340000 0x1000>; 89 #power-domain-cells = <1>; 90 }; 91 92 child2: power-controller@12341000 { 93 compatible = "foo,power-controller"; 94 reg = <0x12341000 0x1000>; 95 power-domains = <&parent2 0>; 96 #power-domain-cells = <1>; 97 }; 98 99 // The nodes above define two power controllers: 'parent' and 'child'. 100 // Domains created by the 'child' power controller are subdomains of '0' power 101 // domain provided by the 'parent' power controller. 102 103 - | 104 parent3: power-controller@12340000 { 105 compatible = "foo,power-controller"; 106 reg = <0x12340000 0x1000>; 107 #power-domain-cells = <0>; 108 domain-idle-states = <&DOMAIN_RET>, <&DOMAIN_PWR_DN>; 109 }; 110 111 child3: power-controller@12341000 { 112 compatible = "foo,power-controller"; 113 reg = <0x12341000 0x1000>; 114 power-domains = <&parent3>; 115 #power-domain-cells = <0>; 116 domain-idle-states = <&DOMAIN_PWR_DN>; 117 }; 118 119 DOMAIN_RET: state@0 { 120 compatible = "domain-idle-state"; 121 reg = <0x0 0x0>; 122 entry-latency-us = <1000>; 123 exit-latency-us = <2000>; 124 min-residency-us = <10000>; 125 }; 126 127 DOMAIN_PWR_DN: state@1 { 128 compatible = "domain-idle-state"; 129 reg = <0x1 0x0>; 130 entry-latency-us = <5000>; 131 exit-latency-us = <8000>; 132 min-residency-us = <7000>; 133 }; 134