18c2ecf20Sopenharmony_ci* Generic PM domains
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciSystem on chip designs are often divided into multiple PM domains that can be
48c2ecf20Sopenharmony_ciused for power gating of selected IP blocks for power saving by reduced leakage
58c2ecf20Sopenharmony_cicurrent.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciThis device tree binding can be used to bind PM domain consumer devices with
88c2ecf20Sopenharmony_citheir PM domains provided by PM domain providers. A PM domain provider can be
98c2ecf20Sopenharmony_cirepresented by any node in the device tree and can provide one or more PM
108c2ecf20Sopenharmony_cidomains. A consumer node can refer to the provider by a phandle and a set of
118c2ecf20Sopenharmony_ciphandle arguments (so called PM domain specifiers) of length specified by the
128c2ecf20Sopenharmony_ci#power-domain-cells property in the PM domain provider node.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci==PM domain providers==
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciSee power-domain.yaml.
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci==PM domain consumers==
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciRequired properties:
218c2ecf20Sopenharmony_ci - power-domains : A list of PM domain specifiers, as defined by bindings of
228c2ecf20Sopenharmony_ci		the power controller that is the PM domain provider.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciOptional properties:
258c2ecf20Sopenharmony_ci - power-domain-names : A list of power domain name strings sorted in the same
268c2ecf20Sopenharmony_ci		order as the power-domains property. Consumers drivers will use
278c2ecf20Sopenharmony_ci		power-domain-names to match power domains with power-domains
288c2ecf20Sopenharmony_ci		specifiers.
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciExample:
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci	leaky-device@12350000 {
338c2ecf20Sopenharmony_ci		compatible = "foo,i-leak-current";
348c2ecf20Sopenharmony_ci		reg = <0x12350000 0x1000>;
358c2ecf20Sopenharmony_ci		power-domains = <&power 0>;
368c2ecf20Sopenharmony_ci		power-domain-names = "io";
378c2ecf20Sopenharmony_ci	};
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci	leaky-device@12351000 {
408c2ecf20Sopenharmony_ci		compatible = "foo,i-leak-current";
418c2ecf20Sopenharmony_ci		reg = <0x12351000 0x1000>;
428c2ecf20Sopenharmony_ci		power-domains = <&power 0>, <&power 1> ;
438c2ecf20Sopenharmony_ci		power-domain-names = "io", "clk";
448c2ecf20Sopenharmony_ci	};
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ciThe first example above defines a typical PM domain consumer device, which is
478c2ecf20Sopenharmony_cilocated inside a PM domain with index 0 of a power controller represented by a
488c2ecf20Sopenharmony_cinode with the label "power".
498c2ecf20Sopenharmony_ciIn the second example the consumer device are partitioned across two PM domains,
508c2ecf20Sopenharmony_cithe first with index 0 and the second with index 1, of a power controller that
518c2ecf20Sopenharmony_ciis represented by a node with the label "power".
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciOptional properties:
548c2ecf20Sopenharmony_ci- required-opps: This contains phandle to an OPP node in another device's OPP
558c2ecf20Sopenharmony_ci  table. It may contain an array of phandles, where each phandle points to an
568c2ecf20Sopenharmony_ci  OPP of a different device. It should not contain multiple phandles to the OPP
578c2ecf20Sopenharmony_ci  nodes in the same OPP table. This specifies the minimum required OPP of the
588c2ecf20Sopenharmony_ci  device(s), whose OPP's phandle is present in this property, for the
598c2ecf20Sopenharmony_ci  functioning of the current device at the current OPP (where this property is
608c2ecf20Sopenharmony_ci  present).
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ciExample:
638c2ecf20Sopenharmony_ci- OPP table for domain provider that provides two domains.
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci	domain0_opp_table: opp-table0 {
668c2ecf20Sopenharmony_ci		compatible = "operating-points-v2";
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci		domain0_opp_0: opp-1000000000 {
698c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1000000000>;
708c2ecf20Sopenharmony_ci			opp-microvolt = <975000 970000 985000>;
718c2ecf20Sopenharmony_ci		};
728c2ecf20Sopenharmony_ci		domain0_opp_1: opp-1100000000 {
738c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1100000000>;
748c2ecf20Sopenharmony_ci			opp-microvolt = <1000000 980000 1010000>;
758c2ecf20Sopenharmony_ci		};
768c2ecf20Sopenharmony_ci	};
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci	domain1_opp_table: opp-table1 {
798c2ecf20Sopenharmony_ci		compatible = "operating-points-v2";
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci		domain1_opp_0: opp-1200000000 {
828c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1200000000>;
838c2ecf20Sopenharmony_ci			opp-microvolt = <975000 970000 985000>;
848c2ecf20Sopenharmony_ci		};
858c2ecf20Sopenharmony_ci		domain1_opp_1: opp-1300000000 {
868c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1300000000>;
878c2ecf20Sopenharmony_ci			opp-microvolt = <1000000 980000 1010000>;
888c2ecf20Sopenharmony_ci		};
898c2ecf20Sopenharmony_ci	};
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci	power: power-controller@12340000 {
928c2ecf20Sopenharmony_ci		compatible = "foo,power-controller";
938c2ecf20Sopenharmony_ci		reg = <0x12340000 0x1000>;
948c2ecf20Sopenharmony_ci		#power-domain-cells = <1>;
958c2ecf20Sopenharmony_ci		operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
968c2ecf20Sopenharmony_ci	};
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci	leaky-device0@12350000 {
998c2ecf20Sopenharmony_ci		compatible = "foo,i-leak-current";
1008c2ecf20Sopenharmony_ci		reg = <0x12350000 0x1000>;
1018c2ecf20Sopenharmony_ci		power-domains = <&power 0>;
1028c2ecf20Sopenharmony_ci		required-opps = <&domain0_opp_0>;
1038c2ecf20Sopenharmony_ci	};
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci	leaky-device1@12350000 {
1068c2ecf20Sopenharmony_ci		compatible = "foo,i-leak-current";
1078c2ecf20Sopenharmony_ci		reg = <0x12350000 0x1000>;
1088c2ecf20Sopenharmony_ci		power-domains = <&power 1>;
1098c2ecf20Sopenharmony_ci		required-opps = <&domain1_opp_1>;
1108c2ecf20Sopenharmony_ci	};
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci[1]. Documentation/devicetree/bindings/power/domain-idle-state.yaml
113