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