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