162306a36Sopenharmony_ci* Generic PM domains
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciSystem on chip designs are often divided into multiple PM domains that can be
462306a36Sopenharmony_ciused for power gating of selected IP blocks for power saving by reduced leakage
562306a36Sopenharmony_cicurrent.
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciThis device tree binding can be used to bind PM domain consumer devices with
862306a36Sopenharmony_citheir PM domains provided by PM domain providers. A PM domain provider can be
962306a36Sopenharmony_cirepresented by any node in the device tree and can provide one or more PM
1062306a36Sopenharmony_cidomains. A consumer node can refer to the provider by a phandle and a set of
1162306a36Sopenharmony_ciphandle arguments (so called PM domain specifiers) of length specified by the
1262306a36Sopenharmony_ci#power-domain-cells property in the PM domain provider node.
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci==PM domain providers==
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciSee power-domain.yaml.
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci==PM domain consumers==
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciRequired properties:
2162306a36Sopenharmony_ci - power-domains : A list of PM domain specifiers, as defined by bindings of
2262306a36Sopenharmony_ci		the power controller that is the PM domain provider.
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ciOptional properties:
2562306a36Sopenharmony_ci - power-domain-names : A list of power domain name strings sorted in the same
2662306a36Sopenharmony_ci		order as the power-domains property. Consumers drivers will use
2762306a36Sopenharmony_ci		power-domain-names to match power domains with power-domains
2862306a36Sopenharmony_ci		specifiers.
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ciExample:
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci	leaky-device@12350000 {
3362306a36Sopenharmony_ci		compatible = "foo,i-leak-current";
3462306a36Sopenharmony_ci		reg = <0x12350000 0x1000>;
3562306a36Sopenharmony_ci		power-domains = <&power 0>;
3662306a36Sopenharmony_ci		power-domain-names = "io";
3762306a36Sopenharmony_ci	};
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci	leaky-device@12351000 {
4062306a36Sopenharmony_ci		compatible = "foo,i-leak-current";
4162306a36Sopenharmony_ci		reg = <0x12351000 0x1000>;
4262306a36Sopenharmony_ci		power-domains = <&power 0>, <&power 1> ;
4362306a36Sopenharmony_ci		power-domain-names = "io", "clk";
4462306a36Sopenharmony_ci	};
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ciThe first example above defines a typical PM domain consumer device, which is
4762306a36Sopenharmony_cilocated inside a PM domain with index 0 of a power controller represented by a
4862306a36Sopenharmony_cinode with the label "power".
4962306a36Sopenharmony_ciIn the second example the consumer device are partitioned across two PM domains,
5062306a36Sopenharmony_cithe first with index 0 and the second with index 1, of a power controller that
5162306a36Sopenharmony_ciis represented by a node with the label "power".
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ciOptional properties:
5462306a36Sopenharmony_ci- required-opps: This contains phandle to an OPP node in another device's OPP
5562306a36Sopenharmony_ci  table. It may contain an array of phandles, where each phandle points to an
5662306a36Sopenharmony_ci  OPP of a different device. It should not contain multiple phandles to the OPP
5762306a36Sopenharmony_ci  nodes in the same OPP table. This specifies the minimum required OPP of the
5862306a36Sopenharmony_ci  device(s), whose OPP's phandle is present in this property, for the
5962306a36Sopenharmony_ci  functioning of the current device at the current OPP (where this property is
6062306a36Sopenharmony_ci  present).
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ciExample:
6362306a36Sopenharmony_ci- OPP table for domain provider that provides two domains.
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci	domain0_opp_table: opp-table0 {
6662306a36Sopenharmony_ci		compatible = "operating-points-v2";
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ci		domain0_opp_0: opp-1000000000 {
6962306a36Sopenharmony_ci			opp-hz = /bits/ 64 <1000000000>;
7062306a36Sopenharmony_ci			opp-microvolt = <975000 970000 985000>;
7162306a36Sopenharmony_ci		};
7262306a36Sopenharmony_ci		domain0_opp_1: opp-1100000000 {
7362306a36Sopenharmony_ci			opp-hz = /bits/ 64 <1100000000>;
7462306a36Sopenharmony_ci			opp-microvolt = <1000000 980000 1010000>;
7562306a36Sopenharmony_ci		};
7662306a36Sopenharmony_ci	};
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci	domain1_opp_table: opp-table1 {
7962306a36Sopenharmony_ci		compatible = "operating-points-v2";
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci		domain1_opp_0: opp-1200000000 {
8262306a36Sopenharmony_ci			opp-hz = /bits/ 64 <1200000000>;
8362306a36Sopenharmony_ci			opp-microvolt = <975000 970000 985000>;
8462306a36Sopenharmony_ci		};
8562306a36Sopenharmony_ci		domain1_opp_1: opp-1300000000 {
8662306a36Sopenharmony_ci			opp-hz = /bits/ 64 <1300000000>;
8762306a36Sopenharmony_ci			opp-microvolt = <1000000 980000 1010000>;
8862306a36Sopenharmony_ci		};
8962306a36Sopenharmony_ci	};
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci	power: power-controller@12340000 {
9262306a36Sopenharmony_ci		compatible = "foo,power-controller";
9362306a36Sopenharmony_ci		reg = <0x12340000 0x1000>;
9462306a36Sopenharmony_ci		#power-domain-cells = <1>;
9562306a36Sopenharmony_ci		operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
9662306a36Sopenharmony_ci	};
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci	leaky-device0@12350000 {
9962306a36Sopenharmony_ci		compatible = "foo,i-leak-current";
10062306a36Sopenharmony_ci		reg = <0x12350000 0x1000>;
10162306a36Sopenharmony_ci		power-domains = <&power 0>;
10262306a36Sopenharmony_ci		required-opps = <&domain0_opp_0>;
10362306a36Sopenharmony_ci	};
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci	leaky-device1@12350000 {
10662306a36Sopenharmony_ci		compatible = "foo,i-leak-current";
10762306a36Sopenharmony_ci		reg = <0x12350000 0x1000>;
10862306a36Sopenharmony_ci		power-domains = <&power 1>;
10962306a36Sopenharmony_ci		required-opps = <&domain1_opp_1>;
11062306a36Sopenharmony_ci	};
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci[1]. Documentation/devicetree/bindings/power/domain-idle-state.yaml
113