|
| 1 | +# SPDX-License-Identifier: GPL-2.0 |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: Rockchip Power Domains |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Elaine Zhang <zhangqing@rock-chips.com> |
| 11 | + - Heiko Stuebner <heiko@sntech.de> |
| 12 | + |
| 13 | +description: | |
| 14 | + Rockchip processors include support for multiple power domains |
| 15 | + which can be powered up/down by software based on different |
| 16 | + application scenarios to save power. |
| 17 | +
|
| 18 | + Power domains contained within power-controller node are |
| 19 | + generic power domain providers documented in |
| 20 | + Documentation/devicetree/bindings/power/power-domain.yaml. |
| 21 | +
|
| 22 | + IP cores belonging to a power domain should contain a |
| 23 | + "power-domains" property that is a phandle for the |
| 24 | + power domain node representing the domain. |
| 25 | +
|
| 26 | +properties: |
| 27 | + $nodename: |
| 28 | + const: power-controller |
| 29 | + |
| 30 | + compatible: |
| 31 | + enum: |
| 32 | + - rockchip,px30-power-controller |
| 33 | + - rockchip,rk3036-power-controller |
| 34 | + - rockchip,rk3066-power-controller |
| 35 | + - rockchip,rk3128-power-controller |
| 36 | + - rockchip,rk3188-power-controller |
| 37 | + - rockchip,rk3228-power-controller |
| 38 | + - rockchip,rk3288-power-controller |
| 39 | + - rockchip,rk3328-power-controller |
| 40 | + - rockchip,rk3366-power-controller |
| 41 | + - rockchip,rk3368-power-controller |
| 42 | + - rockchip,rk3399-power-controller |
| 43 | + |
| 44 | + "#power-domain-cells": |
| 45 | + const: 1 |
| 46 | + |
| 47 | + "#address-cells": |
| 48 | + const: 1 |
| 49 | + |
| 50 | + "#size-cells": |
| 51 | + const: 0 |
| 52 | + |
| 53 | +required: |
| 54 | + - compatible |
| 55 | + - "#power-domain-cells" |
| 56 | + |
| 57 | +additionalProperties: false |
| 58 | + |
| 59 | +patternProperties: |
| 60 | + "^power-domain@[0-9a-f]+$": |
| 61 | + |
| 62 | + $ref: "#/$defs/pd-node" |
| 63 | + |
| 64 | + unevaluatedProperties: false |
| 65 | + |
| 66 | + properties: |
| 67 | + "#address-cells": |
| 68 | + const: 1 |
| 69 | + |
| 70 | + "#size-cells": |
| 71 | + const: 0 |
| 72 | + |
| 73 | + patternProperties: |
| 74 | + "^power-domain@[0-9a-f]+$": |
| 75 | + |
| 76 | + $ref: "#/$defs/pd-node" |
| 77 | + |
| 78 | + unevaluatedProperties: false |
| 79 | + |
| 80 | + properties: |
| 81 | + "#address-cells": |
| 82 | + const: 1 |
| 83 | + |
| 84 | + "#size-cells": |
| 85 | + const: 0 |
| 86 | + |
| 87 | + patternProperties: |
| 88 | + "^power-domain@[0-9a-f]+$": |
| 89 | + |
| 90 | + $ref: "#/$defs/pd-node" |
| 91 | + |
| 92 | + unevaluatedProperties: false |
| 93 | + |
| 94 | + properties: |
| 95 | + "#power-domain-cells": |
| 96 | + const: 0 |
| 97 | + |
| 98 | +$defs: |
| 99 | + pd-node: |
| 100 | + type: object |
| 101 | + description: | |
| 102 | + Represents the power domains within the power controller node. |
| 103 | +
|
| 104 | + properties: |
| 105 | + reg: |
| 106 | + maxItems: 1 |
| 107 | + description: | |
| 108 | + Power domain index. Valid values are defined in |
| 109 | + "include/dt-bindings/power/px30-power.h" |
| 110 | + "include/dt-bindings/power/rk3036-power.h" |
| 111 | + "include/dt-bindings/power/rk3066-power.h" |
| 112 | + "include/dt-bindings/power/rk3128-power.h" |
| 113 | + "include/dt-bindings/power/rk3188-power.h" |
| 114 | + "include/dt-bindings/power/rk3228-power.h" |
| 115 | + "include/dt-bindings/power/rk3288-power.h" |
| 116 | + "include/dt-bindings/power/rk3328-power.h" |
| 117 | + "include/dt-bindings/power/rk3366-power.h" |
| 118 | + "include/dt-bindings/power/rk3368-power.h" |
| 119 | + "include/dt-bindings/power/rk3399-power.h" |
| 120 | +
|
| 121 | + clocks: |
| 122 | + minItems: 1 |
| 123 | + maxItems: 30 |
| 124 | + description: | |
| 125 | + A number of phandles to clocks that need to be enabled |
| 126 | + while power domain switches state. |
| 127 | +
|
| 128 | + pm_qos: |
| 129 | + $ref: /schemas/types.yaml#/definitions/phandle-array |
| 130 | + description: | |
| 131 | + A number of phandles to qos blocks which need to be saved and restored |
| 132 | + while power domain switches state. |
| 133 | +
|
| 134 | + "#power-domain-cells": |
| 135 | + enum: [0, 1] |
| 136 | + description: |
| 137 | + Must be 0 for nodes representing a single PM domain and 1 for nodes |
| 138 | + providing multiple PM domains. |
| 139 | + |
| 140 | + required: |
| 141 | + - reg |
| 142 | + - "#power-domain-cells" |
| 143 | + |
| 144 | +examples: |
| 145 | + - | |
| 146 | + #include <dt-bindings/clock/rk3399-cru.h> |
| 147 | + #include <dt-bindings/power/rk3399-power.h> |
| 148 | +
|
| 149 | + soc { |
| 150 | + #address-cells = <2>; |
| 151 | + #size-cells = <2>; |
| 152 | +
|
| 153 | + qos_hdcp: qos@ffa90000 { |
| 154 | + compatible = "rockchip,rk3399-qos", "syscon"; |
| 155 | + reg = <0x0 0xffa90000 0x0 0x20>; |
| 156 | + }; |
| 157 | +
|
| 158 | + qos_iep: qos@ffa98000 { |
| 159 | + compatible = "rockchip,rk3399-qos", "syscon"; |
| 160 | + reg = <0x0 0xffa98000 0x0 0x20>; |
| 161 | + }; |
| 162 | +
|
| 163 | + qos_rga_r: qos@ffab0000 { |
| 164 | + compatible = "rockchip,rk3399-qos", "syscon"; |
| 165 | + reg = <0x0 0xffab0000 0x0 0x20>; |
| 166 | + }; |
| 167 | +
|
| 168 | + qos_rga_w: qos@ffab0080 { |
| 169 | + compatible = "rockchip,rk3399-qos", "syscon"; |
| 170 | + reg = <0x0 0xffab0080 0x0 0x20>; |
| 171 | + }; |
| 172 | +
|
| 173 | + qos_video_m0: qos@ffab8000 { |
| 174 | + compatible = "rockchip,rk3399-qos", "syscon"; |
| 175 | + reg = <0x0 0xffab8000 0x0 0x20>; |
| 176 | + }; |
| 177 | +
|
| 178 | + qos_video_m1_r: qos@ffac0000 { |
| 179 | + compatible = "rockchip,rk3399-qos", "syscon"; |
| 180 | + reg = <0x0 0xffac0000 0x0 0x20>; |
| 181 | + }; |
| 182 | +
|
| 183 | + qos_video_m1_w: qos@ffac0080 { |
| 184 | + compatible = "rockchip,rk3399-qos", "syscon"; |
| 185 | + reg = <0x0 0xffac0080 0x0 0x20>; |
| 186 | + }; |
| 187 | +
|
| 188 | + power-management@ff310000 { |
| 189 | + compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd"; |
| 190 | + reg = <0x0 0xff310000 0x0 0x1000>; |
| 191 | +
|
| 192 | + power-controller { |
| 193 | + compatible = "rockchip,rk3399-power-controller"; |
| 194 | + #power-domain-cells = <1>; |
| 195 | + #address-cells = <1>; |
| 196 | + #size-cells = <0>; |
| 197 | +
|
| 198 | + /* These power domains are grouped by VD_CENTER */ |
| 199 | + power-domain@RK3399_PD_IEP { |
| 200 | + reg = <RK3399_PD_IEP>; |
| 201 | + clocks = <&cru ACLK_IEP>, |
| 202 | + <&cru HCLK_IEP>; |
| 203 | + pm_qos = <&qos_iep>; |
| 204 | + #power-domain-cells = <0>; |
| 205 | + }; |
| 206 | + power-domain@RK3399_PD_RGA { |
| 207 | + reg = <RK3399_PD_RGA>; |
| 208 | + clocks = <&cru ACLK_RGA>, |
| 209 | + <&cru HCLK_RGA>; |
| 210 | + pm_qos = <&qos_rga_r>, |
| 211 | + <&qos_rga_w>; |
| 212 | + #power-domain-cells = <0>; |
| 213 | + }; |
| 214 | + power-domain@RK3399_PD_VCODEC { |
| 215 | + reg = <RK3399_PD_VCODEC>; |
| 216 | + clocks = <&cru ACLK_VCODEC>, |
| 217 | + <&cru HCLK_VCODEC>; |
| 218 | + pm_qos = <&qos_video_m0>; |
| 219 | + #power-domain-cells = <0>; |
| 220 | + }; |
| 221 | + power-domain@RK3399_PD_VDU { |
| 222 | + reg = <RK3399_PD_VDU>; |
| 223 | + clocks = <&cru ACLK_VDU>, |
| 224 | + <&cru HCLK_VDU>; |
| 225 | + pm_qos = <&qos_video_m1_r>, |
| 226 | + <&qos_video_m1_w>; |
| 227 | + #power-domain-cells = <0>; |
| 228 | + }; |
| 229 | + power-domain@RK3399_PD_VIO { |
| 230 | + reg = <RK3399_PD_VIO>; |
| 231 | + #power-domain-cells = <1>; |
| 232 | + #address-cells = <1>; |
| 233 | + #size-cells = <0>; |
| 234 | +
|
| 235 | + power-domain@RK3399_PD_HDCP { |
| 236 | + reg = <RK3399_PD_HDCP>; |
| 237 | + clocks = <&cru ACLK_HDCP>, |
| 238 | + <&cru HCLK_HDCP>, |
| 239 | + <&cru PCLK_HDCP>; |
| 240 | + pm_qos = <&qos_hdcp>; |
| 241 | + #power-domain-cells = <0>; |
| 242 | + }; |
| 243 | + }; |
| 244 | + }; |
| 245 | + }; |
| 246 | + }; |
0 commit comments