xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/power/power_domain.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* Generic PM domains
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunSystem on chip designs are often divided into multiple PM domains that can be
4*4882a593Smuzhiyunused for power gating of selected IP blocks for power saving by reduced leakage
5*4882a593Smuzhiyuncurrent.
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunThis device tree binding can be used to bind PM domain consumer devices with
8*4882a593Smuzhiyuntheir PM domains provided by PM domain providers. A PM domain provider can be
9*4882a593Smuzhiyunrepresented by any node in the device tree and can provide one or more PM
10*4882a593Smuzhiyundomains. A consumer node can refer to the provider by a phandle and a set of
11*4882a593Smuzhiyunphandle arguments (so called PM domain specifiers) of length specified by the
12*4882a593Smuzhiyun#power-domain-cells property in the PM domain provider node.
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun==PM domain providers==
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunSee power-domain.yaml.
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun==PM domain consumers==
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunRequired properties:
21*4882a593Smuzhiyun - power-domains : A list of PM domain specifiers, as defined by bindings of
22*4882a593Smuzhiyun		the power controller that is the PM domain provider.
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunOptional properties:
25*4882a593Smuzhiyun - power-domain-names : A list of power domain name strings sorted in the same
26*4882a593Smuzhiyun		order as the power-domains property. Consumers drivers will use
27*4882a593Smuzhiyun		power-domain-names to match power domains with power-domains
28*4882a593Smuzhiyun		specifiers.
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunExample:
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun	leaky-device@12350000 {
33*4882a593Smuzhiyun		compatible = "foo,i-leak-current";
34*4882a593Smuzhiyun		reg = <0x12350000 0x1000>;
35*4882a593Smuzhiyun		power-domains = <&power 0>;
36*4882a593Smuzhiyun		power-domain-names = "io";
37*4882a593Smuzhiyun	};
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun	leaky-device@12351000 {
40*4882a593Smuzhiyun		compatible = "foo,i-leak-current";
41*4882a593Smuzhiyun		reg = <0x12351000 0x1000>;
42*4882a593Smuzhiyun		power-domains = <&power 0>, <&power 1> ;
43*4882a593Smuzhiyun		power-domain-names = "io", "clk";
44*4882a593Smuzhiyun	};
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunThe first example above defines a typical PM domain consumer device, which is
47*4882a593Smuzhiyunlocated inside a PM domain with index 0 of a power controller represented by a
48*4882a593Smuzhiyunnode with the label "power".
49*4882a593SmuzhiyunIn the second example the consumer device are partitioned across two PM domains,
50*4882a593Smuzhiyunthe first with index 0 and the second with index 1, of a power controller that
51*4882a593Smuzhiyunis represented by a node with the label "power".
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunOptional properties:
54*4882a593Smuzhiyun- required-opps: This contains phandle to an OPP node in another device's OPP
55*4882a593Smuzhiyun  table. It may contain an array of phandles, where each phandle points to an
56*4882a593Smuzhiyun  OPP of a different device. It should not contain multiple phandles to the OPP
57*4882a593Smuzhiyun  nodes in the same OPP table. This specifies the minimum required OPP of the
58*4882a593Smuzhiyun  device(s), whose OPP's phandle is present in this property, for the
59*4882a593Smuzhiyun  functioning of the current device at the current OPP (where this property is
60*4882a593Smuzhiyun  present).
61*4882a593Smuzhiyun
62*4882a593SmuzhiyunExample:
63*4882a593Smuzhiyun- OPP table for domain provider that provides two domains.
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun	domain0_opp_table: opp-table0 {
66*4882a593Smuzhiyun		compatible = "operating-points-v2";
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun		domain0_opp_0: opp-1000000000 {
69*4882a593Smuzhiyun			opp-hz = /bits/ 64 <1000000000>;
70*4882a593Smuzhiyun			opp-microvolt = <975000 970000 985000>;
71*4882a593Smuzhiyun		};
72*4882a593Smuzhiyun		domain0_opp_1: opp-1100000000 {
73*4882a593Smuzhiyun			opp-hz = /bits/ 64 <1100000000>;
74*4882a593Smuzhiyun			opp-microvolt = <1000000 980000 1010000>;
75*4882a593Smuzhiyun		};
76*4882a593Smuzhiyun	};
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun	domain1_opp_table: opp-table1 {
79*4882a593Smuzhiyun		compatible = "operating-points-v2";
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun		domain1_opp_0: opp-1200000000 {
82*4882a593Smuzhiyun			opp-hz = /bits/ 64 <1200000000>;
83*4882a593Smuzhiyun			opp-microvolt = <975000 970000 985000>;
84*4882a593Smuzhiyun		};
85*4882a593Smuzhiyun		domain1_opp_1: opp-1300000000 {
86*4882a593Smuzhiyun			opp-hz = /bits/ 64 <1300000000>;
87*4882a593Smuzhiyun			opp-microvolt = <1000000 980000 1010000>;
88*4882a593Smuzhiyun		};
89*4882a593Smuzhiyun	};
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun	power: power-controller@12340000 {
92*4882a593Smuzhiyun		compatible = "foo,power-controller";
93*4882a593Smuzhiyun		reg = <0x12340000 0x1000>;
94*4882a593Smuzhiyun		#power-domain-cells = <1>;
95*4882a593Smuzhiyun		operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
96*4882a593Smuzhiyun	};
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun	leaky-device0@12350000 {
99*4882a593Smuzhiyun		compatible = "foo,i-leak-current";
100*4882a593Smuzhiyun		reg = <0x12350000 0x1000>;
101*4882a593Smuzhiyun		power-domains = <&power 0>;
102*4882a593Smuzhiyun		required-opps = <&domain0_opp_0>;
103*4882a593Smuzhiyun	};
104*4882a593Smuzhiyun
105*4882a593Smuzhiyun	leaky-device1@12350000 {
106*4882a593Smuzhiyun		compatible = "foo,i-leak-current";
107*4882a593Smuzhiyun		reg = <0x12350000 0x1000>;
108*4882a593Smuzhiyun		power-domains = <&power 1>;
109*4882a593Smuzhiyun		required-opps = <&domain1_opp_1>;
110*4882a593Smuzhiyun	};
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun[1]. Documentation/devicetree/bindings/power/domain-idle-state.yaml
113