power_domain.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. See power-domain.yaml.
  13. ==PM domain consumers==
  14. Required properties:
  15. - power-domains : A list of PM domain specifiers, as defined by bindings of
  16. the power controller that is the PM domain provider.
  17. Optional properties:
  18. - power-domain-names : A list of power domain name strings sorted in the same
  19. order as the power-domains property. Consumers drivers will use
  20. power-domain-names to match power domains with power-domains
  21. specifiers.
  22. Example:
  23. leaky-device@12350000 {
  24. compatible = "foo,i-leak-current";
  25. reg = <0x12350000 0x1000>;
  26. power-domains = <&power 0>;
  27. power-domain-names = "io";
  28. };
  29. leaky-device@12351000 {
  30. compatible = "foo,i-leak-current";
  31. reg = <0x12351000 0x1000>;
  32. power-domains = <&power 0>, <&power 1> ;
  33. power-domain-names = "io", "clk";
  34. };
  35. The first example above defines a typical PM domain consumer device, which is
  36. located inside a PM domain with index 0 of a power controller represented by a
  37. node with the label "power".
  38. In the second example the consumer device are partitioned across two PM domains,
  39. the first with index 0 and the second with index 1, of a power controller that
  40. is represented by a node with the label "power".
  41. Optional properties:
  42. - required-opps: This contains phandle to an OPP node in another device's OPP
  43. table. It may contain an array of phandles, where each phandle points to an
  44. OPP of a different device. It should not contain multiple phandles to the OPP
  45. nodes in the same OPP table. This specifies the minimum required OPP of the
  46. device(s), whose OPP's phandle is present in this property, for the
  47. functioning of the current device at the current OPP (where this property is
  48. present).
  49. Example:
  50. - OPP table for domain provider that provides two domains.
  51. domain0_opp_table: opp-table0 {
  52. compatible = "operating-points-v2";
  53. domain0_opp_0: opp-1000000000 {
  54. opp-hz = /bits/ 64 <1000000000>;
  55. opp-microvolt = <975000 970000 985000>;
  56. };
  57. domain0_opp_1: opp-1100000000 {
  58. opp-hz = /bits/ 64 <1100000000>;
  59. opp-microvolt = <1000000 980000 1010000>;
  60. };
  61. };
  62. domain1_opp_table: opp-table1 {
  63. compatible = "operating-points-v2";
  64. domain1_opp_0: opp-1200000000 {
  65. opp-hz = /bits/ 64 <1200000000>;
  66. opp-microvolt = <975000 970000 985000>;
  67. };
  68. domain1_opp_1: opp-1300000000 {
  69. opp-hz = /bits/ 64 <1300000000>;
  70. opp-microvolt = <1000000 980000 1010000>;
  71. };
  72. };
  73. power: power-controller@12340000 {
  74. compatible = "foo,power-controller";
  75. reg = <0x12340000 0x1000>;
  76. #power-domain-cells = <1>;
  77. operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
  78. };
  79. leaky-device0@12350000 {
  80. compatible = "foo,i-leak-current";
  81. reg = <0x12350000 0x1000>;
  82. power-domains = <&power 0>;
  83. required-opps = <&domain0_opp_0>;
  84. };
  85. leaky-device1@12350000 {
  86. compatible = "foo,i-leak-current";
  87. reg = <0x12350000 0x1000>;
  88. power-domains = <&power 1>;
  89. required-opps = <&domain1_opp_1>;
  90. };
  91. [1]. Documentation/devicetree/bindings/power/domain-idle-state.yaml