power_domain.txt 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. * Generic PM domains
  2. System on chip designs are often divided into multiple PM domains that can be
  3. used for power gating of selected IP blocks for power saving by reduced leakage
  4. current.
  5. This device tree binding can be used to bind PM domain consumer devices with
  6. their PM domains provided by PM domain providers. A PM domain provider can be
  7. represented by any node in the device tree and can provide one or more PM
  8. domains. A consumer node can refer to the provider by a phandle and a set of
  9. phandle arguments (so called PM domain specifiers) of length specified by the
  10. #power-domain-cells property in the PM domain provider node.
  11. ==PM domain providers==
  12. Required properties:
  13. - #power-domain-cells : Number of cells in a PM domain specifier;
  14. Typically 0 for nodes representing a single PM domain and 1 for nodes
  15. providing multiple PM domains (e.g. power controllers), but can be any value
  16. as specified by device tree binding documentation of particular provider.
  17. Optional properties:
  18. - power-domains : A phandle and PM domain specifier as defined by bindings of
  19. the power controller specified by phandle.
  20. Some power domains might be powered from another power domain (or have
  21. other hardware specific dependencies). For representing such dependency
  22. a standard PM domain consumer binding is used. When provided, all domains
  23. created by the given provider should be subdomains of the domain
  24. specified by this binding. More details about power domain specifier are
  25. available in the next section.
  26. - domain-idle-states : A phandle of an idle-state that shall be soaked into a
  27. generic domain power state. The idle state definitions are
  28. compatible with domain-idle-state specified in [1]. phandles
  29. that are not compatible with domain-idle-state will be
  30. ignored.
  31. The domain-idle-state property reflects the idle state of this PM domain and
  32. not the idle states of the devices or sub-domains in the PM domain. Devices
  33. and sub-domains have their own idle-states independent of the parent
  34. domain's idle states. In the absence of this property, the domain would be
  35. considered as capable of being powered-on or powered-off.
  36. - operating-points-v2 : Phandles to the OPP tables of power domains provided by
  37. a power domain provider. If the provider provides a single power domain only
  38. or all the power domains provided by the provider have identical OPP tables,
  39. then this shall contain a single phandle. Refer to ../opp/opp.txt for more
  40. information.
  41. Example:
  42. power: power-controller@12340000 {
  43. compatible = "foo,power-controller";
  44. reg = <0x12340000 0x1000>;
  45. #power-domain-cells = <1>;
  46. };
  47. The node above defines a power controller that is a PM domain provider and
  48. expects one cell as its phandle argument.
  49. Example 2:
  50. parent: power-controller@12340000 {
  51. compatible = "foo,power-controller";
  52. reg = <0x12340000 0x1000>;
  53. #power-domain-cells = <1>;
  54. };
  55. child: power-controller@12341000 {
  56. compatible = "foo,power-controller";
  57. reg = <0x12341000 0x1000>;
  58. power-domains = <&parent 0>;
  59. #power-domain-cells = <1>;
  60. };
  61. The nodes above define two power controllers: 'parent' and 'child'.
  62. Domains created by the 'child' power controller are subdomains of '0' power
  63. domain provided by the 'parent' power controller.
  64. Example 3:
  65. parent: power-controller@12340000 {
  66. compatible = "foo,power-controller";
  67. reg = <0x12340000 0x1000>;
  68. #power-domain-cells = <0>;
  69. domain-idle-states = <&DOMAIN_RET>, <&DOMAIN_PWR_DN>;
  70. };
  71. child: power-controller@12341000 {
  72. compatible = "foo,power-controller";
  73. reg = <0x12341000 0x1000>;
  74. power-domains = <&parent>;
  75. #power-domain-cells = <0>;
  76. domain-idle-states = <&DOMAIN_PWR_DN>;
  77. };
  78. DOMAIN_RET: state@0 {
  79. compatible = "domain-idle-state";
  80. reg = <0x0>;
  81. entry-latency-us = <1000>;
  82. exit-latency-us = <2000>;
  83. min-residency-us = <10000>;
  84. };
  85. DOMAIN_PWR_DN: state@1 {
  86. compatible = "domain-idle-state";
  87. reg = <0x1>;
  88. entry-latency-us = <5000>;
  89. exit-latency-us = <8000>;
  90. min-residency-us = <7000>;
  91. };
  92. ==PM domain consumers==
  93. Required properties:
  94. - power-domains : A list of PM domain specifiers, as defined by bindings of
  95. the power controller that is the PM domain provider.
  96. Optional properties:
  97. - power-domain-names : A list of power domain name strings sorted in the same
  98. order as the power-domains property. Consumers drivers will use
  99. power-domain-names to match power domains with power-domains
  100. specifiers.
  101. Example:
  102. leaky-device@12350000 {
  103. compatible = "foo,i-leak-current";
  104. reg = <0x12350000 0x1000>;
  105. power-domains = <&power 0>;
  106. power-domain-names = "io";
  107. };
  108. leaky-device@12351000 {
  109. compatible = "foo,i-leak-current";
  110. reg = <0x12351000 0x1000>;
  111. power-domains = <&power 0>, <&power 1> ;
  112. power-domain-names = "io", "clk";
  113. };
  114. The first example above defines a typical PM domain consumer device, which is
  115. located inside a PM domain with index 0 of a power controller represented by a
  116. node with the label "power".
  117. In the second example the consumer device are partitioned across two PM domains,
  118. the first with index 0 and the second with index 1, of a power controller that
  119. is represented by a node with the label "power".
  120. Optional properties:
  121. - required-opps: This contains phandle to an OPP node in another device's OPP
  122. table. It may contain an array of phandles, where each phandle points to an
  123. OPP of a different device. It should not contain multiple phandles to the OPP
  124. nodes in the same OPP table. This specifies the minimum required OPP of the
  125. device(s), whose OPP's phandle is present in this property, for the
  126. functioning of the current device at the current OPP (where this property is
  127. present).
  128. Example:
  129. - OPP table for domain provider that provides two domains.
  130. domain0_opp_table: opp-table0 {
  131. compatible = "operating-points-v2";
  132. domain0_opp_0: opp-1000000000 {
  133. opp-hz = /bits/ 64 <1000000000>;
  134. opp-microvolt = <975000 970000 985000>;
  135. };
  136. domain0_opp_1: opp-1100000000 {
  137. opp-hz = /bits/ 64 <1100000000>;
  138. opp-microvolt = <1000000 980000 1010000>;
  139. };
  140. };
  141. domain1_opp_table: opp-table1 {
  142. compatible = "operating-points-v2";
  143. domain1_opp_0: opp-1200000000 {
  144. opp-hz = /bits/ 64 <1200000000>;
  145. opp-microvolt = <975000 970000 985000>;
  146. };
  147. domain1_opp_1: opp-1300000000 {
  148. opp-hz = /bits/ 64 <1300000000>;
  149. opp-microvolt = <1000000 980000 1010000>;
  150. };
  151. };
  152. power: power-controller@12340000 {
  153. compatible = "foo,power-controller";
  154. reg = <0x12340000 0x1000>;
  155. #power-domain-cells = <1>;
  156. operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
  157. };
  158. leaky-device0@12350000 {
  159. compatible = "foo,i-leak-current";
  160. reg = <0x12350000 0x1000>;
  161. power-domains = <&power 0>;
  162. required-opps = <&domain0_opp_0>;
  163. };
  164. leaky-device1@12350000 {
  165. compatible = "foo,i-leak-current";
  166. reg = <0x12350000 0x1000>;
  167. power-domains = <&power 1>;
  168. required-opps = <&domain1_opp_1>;
  169. };
  170. [1]. Documentation/devicetree/bindings/power/domain-idle-state.txt