1*c66ec88fSEmmanuel Vadot* Rockchip Power Domains 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotRockchip processors include support for multiple power domains which can be 4*c66ec88fSEmmanuel Vadotpowered up/down by software based on different application scenes to save power. 5*c66ec88fSEmmanuel Vadot 6*c66ec88fSEmmanuel VadotRequired properties for power domain controller: 7*c66ec88fSEmmanuel Vadot- compatible: Should be one of the following. 8*c66ec88fSEmmanuel Vadot "rockchip,px30-power-controller" - for PX30 SoCs. 9*c66ec88fSEmmanuel Vadot "rockchip,rk3036-power-controller" - for RK3036 SoCs. 10*c66ec88fSEmmanuel Vadot "rockchip,rk3066-power-controller" - for RK3066 SoCs. 11*c66ec88fSEmmanuel Vadot "rockchip,rk3128-power-controller" - for RK3128 SoCs. 12*c66ec88fSEmmanuel Vadot "rockchip,rk3188-power-controller" - for RK3188 SoCs. 13*c66ec88fSEmmanuel Vadot "rockchip,rk3228-power-controller" - for RK3228 SoCs. 14*c66ec88fSEmmanuel Vadot "rockchip,rk3288-power-controller" - for RK3288 SoCs. 15*c66ec88fSEmmanuel Vadot "rockchip,rk3328-power-controller" - for RK3328 SoCs. 16*c66ec88fSEmmanuel Vadot "rockchip,rk3366-power-controller" - for RK3366 SoCs. 17*c66ec88fSEmmanuel Vadot "rockchip,rk3368-power-controller" - for RK3368 SoCs. 18*c66ec88fSEmmanuel Vadot "rockchip,rk3399-power-controller" - for RK3399 SoCs. 19*c66ec88fSEmmanuel Vadot- #power-domain-cells: Number of cells in a power-domain specifier. 20*c66ec88fSEmmanuel Vadot Should be 1 for multiple PM domains. 21*c66ec88fSEmmanuel Vadot- #address-cells: Should be 1. 22*c66ec88fSEmmanuel Vadot- #size-cells: Should be 0. 23*c66ec88fSEmmanuel Vadot 24*c66ec88fSEmmanuel VadotRequired properties for power domain sub nodes: 25*c66ec88fSEmmanuel Vadot- reg: index of the power domain, should use macros in: 26*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/px30-power.h" - for PX30 type power domain. 27*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3036-power.h" - for RK3036 type power domain. 28*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3066-power.h" - for RK3066 type power domain. 29*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3128-power.h" - for RK3128 type power domain. 30*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3188-power.h" - for RK3188 type power domain. 31*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3228-power.h" - for RK3228 type power domain. 32*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain. 33*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3328-power.h" - for RK3328 type power domain. 34*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3366-power.h" - for RK3366 type power domain. 35*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3368-power.h" - for RK3368 type power domain. 36*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3399-power.h" - for RK3399 type power domain. 37*c66ec88fSEmmanuel Vadot- clocks (optional): phandles to clocks which need to be enabled while power domain 38*c66ec88fSEmmanuel Vadot switches state. 39*c66ec88fSEmmanuel Vadot- pm_qos (optional): phandles to qos blocks which need to be saved and restored 40*c66ec88fSEmmanuel Vadot while power domain switches state. 41*c66ec88fSEmmanuel Vadot 42*c66ec88fSEmmanuel VadotQos Example: 43*c66ec88fSEmmanuel Vadot 44*c66ec88fSEmmanuel Vadot qos_gpu: qos_gpu@ffaf0000 { 45*c66ec88fSEmmanuel Vadot compatible ="syscon"; 46*c66ec88fSEmmanuel Vadot reg = <0x0 0xffaf0000 0x0 0x20>; 47*c66ec88fSEmmanuel Vadot }; 48*c66ec88fSEmmanuel Vadot 49*c66ec88fSEmmanuel VadotExample: 50*c66ec88fSEmmanuel Vadot 51*c66ec88fSEmmanuel Vadot power: power-controller { 52*c66ec88fSEmmanuel Vadot compatible = "rockchip,rk3288-power-controller"; 53*c66ec88fSEmmanuel Vadot #power-domain-cells = <1>; 54*c66ec88fSEmmanuel Vadot #address-cells = <1>; 55*c66ec88fSEmmanuel Vadot #size-cells = <0>; 56*c66ec88fSEmmanuel Vadot 57*c66ec88fSEmmanuel Vadot pd_gpu { 58*c66ec88fSEmmanuel Vadot reg = <RK3288_PD_GPU>; 59*c66ec88fSEmmanuel Vadot clocks = <&cru ACLK_GPU>; 60*c66ec88fSEmmanuel Vadot pm_qos = <&qos_gpu>; 61*c66ec88fSEmmanuel Vadot }; 62*c66ec88fSEmmanuel Vadot }; 63*c66ec88fSEmmanuel Vadot 64*c66ec88fSEmmanuel Vadot power: power-controller { 65*c66ec88fSEmmanuel Vadot compatible = "rockchip,rk3368-power-controller"; 66*c66ec88fSEmmanuel Vadot #power-domain-cells = <1>; 67*c66ec88fSEmmanuel Vadot #address-cells = <1>; 68*c66ec88fSEmmanuel Vadot #size-cells = <0>; 69*c66ec88fSEmmanuel Vadot 70*c66ec88fSEmmanuel Vadot pd_gpu_1 { 71*c66ec88fSEmmanuel Vadot reg = <RK3368_PD_GPU_1>; 72*c66ec88fSEmmanuel Vadot clocks = <&cru ACLK_GPU_CFG>; 73*c66ec88fSEmmanuel Vadot }; 74*c66ec88fSEmmanuel Vadot }; 75*c66ec88fSEmmanuel Vadot 76*c66ec88fSEmmanuel VadotExample 2: 77*c66ec88fSEmmanuel Vadot power: power-controller { 78*c66ec88fSEmmanuel Vadot compatible = "rockchip,rk3399-power-controller"; 79*c66ec88fSEmmanuel Vadot #power-domain-cells = <1>; 80*c66ec88fSEmmanuel Vadot #address-cells = <1>; 81*c66ec88fSEmmanuel Vadot #size-cells = <0>; 82*c66ec88fSEmmanuel Vadot 83*c66ec88fSEmmanuel Vadot pd_vio { 84*c66ec88fSEmmanuel Vadot #address-cells = <1>; 85*c66ec88fSEmmanuel Vadot #size-cells = <0>; 86*c66ec88fSEmmanuel Vadot reg = <RK3399_PD_VIO>; 87*c66ec88fSEmmanuel Vadot 88*c66ec88fSEmmanuel Vadot pd_vo { 89*c66ec88fSEmmanuel Vadot #address-cells = <1>; 90*c66ec88fSEmmanuel Vadot #size-cells = <0>; 91*c66ec88fSEmmanuel Vadot reg = <RK3399_PD_VO>; 92*c66ec88fSEmmanuel Vadot 93*c66ec88fSEmmanuel Vadot pd_vopb { 94*c66ec88fSEmmanuel Vadot reg = <RK3399_PD_VOPB>; 95*c66ec88fSEmmanuel Vadot }; 96*c66ec88fSEmmanuel Vadot 97*c66ec88fSEmmanuel Vadot pd_vopl { 98*c66ec88fSEmmanuel Vadot reg = <RK3399_PD_VOPL>; 99*c66ec88fSEmmanuel Vadot }; 100*c66ec88fSEmmanuel Vadot }; 101*c66ec88fSEmmanuel Vadot }; 102*c66ec88fSEmmanuel Vadot }; 103*c66ec88fSEmmanuel Vadot 104*c66ec88fSEmmanuel VadotNode of a device using power domains must have a power-domains property, 105*c66ec88fSEmmanuel Vadotcontaining a phandle to the power device node and an index specifying which 106*c66ec88fSEmmanuel Vadotpower domain to use. 107*c66ec88fSEmmanuel VadotThe index should use macros in: 108*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/px30-power.h" - for px30 type power domain. 109*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3036-power.h" - for rk3036 type power domain. 110*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3128-power.h" - for rk3128 type power domain. 111*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3128-power.h" - for rk3228 type power domain. 112*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain. 113*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3328-power.h" - for rk3328 type power domain. 114*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3366-power.h" - for rk3366 type power domain. 115*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3368-power.h" - for rk3368 type power domain. 116*c66ec88fSEmmanuel Vadot "include/dt-bindings/power/rk3399-power.h" - for rk3399 type power domain. 117*c66ec88fSEmmanuel Vadot 118*c66ec88fSEmmanuel VadotExample of the node using power domain: 119*c66ec88fSEmmanuel Vadot 120*c66ec88fSEmmanuel Vadot node { 121*c66ec88fSEmmanuel Vadot /* ... */ 122*c66ec88fSEmmanuel Vadot power-domains = <&power RK3288_PD_GPU>; 123*c66ec88fSEmmanuel Vadot /* ... */ 124*c66ec88fSEmmanuel Vadot }; 125*c66ec88fSEmmanuel Vadot 126*c66ec88fSEmmanuel Vadot node { 127*c66ec88fSEmmanuel Vadot /* ... */ 128*c66ec88fSEmmanuel Vadot power-domains = <&power RK3368_PD_GPU_1>; 129*c66ec88fSEmmanuel Vadot /* ... */ 130*c66ec88fSEmmanuel Vadot }; 131*c66ec88fSEmmanuel Vadot 132*c66ec88fSEmmanuel Vadot node { 133*c66ec88fSEmmanuel Vadot /* ... */ 134*c66ec88fSEmmanuel Vadot power-domains = <&power RK3399_PD_VOPB>; 135*c66ec88fSEmmanuel Vadot /* ... */ 136*c66ec88fSEmmanuel Vadot }; 137