1# SPDX-License-Identifier: GPL-2.0 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/power/rockchip-io-domain.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Rockchip SRAM for IO Voltage Domains 8 9maintainers: 10 - Heiko Stuebner <heiko@sntech.de> 11 12description: | 13 IO domain voltages on some Rockchip SoCs are variable but need to be 14 kept in sync between the regulators and the SoC using a special 15 register. 16 17 A specific example using rk3288 18 If the regulator hooked up to a pin like SDMMC0_VDD is 3.3V then 19 bit 7 of GRF_IO_VSEL needs to be 0. If the regulator hooked up to 20 that same pin is 1.8V then bit 7 of GRF_IO_VSEL needs to be 1. 21 22 Said another way, this driver simply handles keeping bits in the SoCs 23 General Register File (GRF) in sync with the actual value of a voltage 24 hooked up to the pins. 25 26 Note that this driver specifically does not include 27 any logic for deciding what voltage we should set regulators to 28 any logic for deciding whether regulators (or internal SoC blocks) 29 should have power or not have power 30 31 If there were some other software that had the smarts of making 32 decisions about regulators, it would work in conjunction with this 33 driver. When that other software adjusted a regulators voltage then 34 this driver would handle telling the SoC about it. A good example is 35 vqmmc for SD. In that case the dw_mmc driver simply is told about a 36 regulator. It changes the regulator between 3.3V and 1.8V at the 37 right time. This driver notices the change and makes sure that the 38 SoC is on the same page. 39 40 You specify supplies using the standard regulator bindings by including 41 a phandle the relevant regulator. All specified supplies must be able 42 to report their voltage. The IO Voltage Domain for any non-specified 43 supplies will be not be touched. 44 45properties: 46 compatible: 47 enum: 48 - rockchip,px30-io-voltage-domain 49 - rockchip,px30-pmu-io-voltage-domain 50 - rockchip,rk3188-io-voltage-domain 51 - rockchip,rk3228-io-voltage-domain 52 - rockchip,rk3288-io-voltage-domain 53 - rockchip,rk3308-io-voltage-domain 54 - rockchip,rk3328-io-voltage-domain 55 - rockchip,rk3368-io-voltage-domain 56 - rockchip,rk3368-pmu-io-voltage-domain 57 - rockchip,rk3399-io-voltage-domain 58 - rockchip,rk3399-pmu-io-voltage-domain 59 - rockchip,rk3568-pmu-io-voltage-domain 60 - rockchip,rv1108-io-voltage-domain 61 - rockchip,rv1108-pmu-io-voltage-domain 62 - rockchip,rv1126-pmu-io-voltage-domain 63 64required: 65 - compatible 66 67unevaluatedProperties: false 68 69allOf: 70 - $ref: "#/$defs/px30" 71 - $ref: "#/$defs/px30-pmu" 72 - $ref: "#/$defs/rk3188" 73 - $ref: "#/$defs/rk3228" 74 - $ref: "#/$defs/rk3288" 75 - $ref: "#/$defs/rk3308" 76 - $ref: "#/$defs/rk3328" 77 - $ref: "#/$defs/rk3368" 78 - $ref: "#/$defs/rk3368-pmu" 79 - $ref: "#/$defs/rk3399" 80 - $ref: "#/$defs/rk3399-pmu" 81 - $ref: "#/$defs/rk3568-pmu" 82 - $ref: "#/$defs/rv1108" 83 - $ref: "#/$defs/rv1108-pmu" 84 - $ref: "#/$defs/rv1126-pmu" 85 86$defs: 87 px30: 88 if: 89 properties: 90 compatible: 91 contains: 92 const: rockchip,px30-io-voltage-domain 93 94 then: 95 properties: 96 vccio1-supply: 97 description: The supply connected to VCCIO1. 98 vccio2-supply: 99 description: The supply connected to VCCIO2. 100 vccio3-supply: 101 description: The supply connected to VCCIO3. 102 vccio4-supply: 103 description: The supply connected to VCCIO4. 104 vccio5-supply: 105 description: The supply connected to VCCIO5. 106 vccio6-supply: 107 description: The supply connected to VCCIO6. 108 vccio-oscgpi-supply: 109 description: The supply connected to VCCIO_OSCGPI. 110 111 px30-pmu: 112 if: 113 properties: 114 compatible: 115 contains: 116 const: rockchip,px30-pmu-io-voltage-domain 117 118 then: 119 properties: 120 pmuio1-supply: 121 description: The supply connected to PMUIO1. 122 pmuio2-supply: 123 description: The supply connected to PMUIO2. 124 125 rk3188: 126 if: 127 properties: 128 compatible: 129 contains: 130 const: rockchip,rk3188-io-voltage-domain 131 132 then: 133 properties: 134 ap0-supply: 135 description: The supply connected to AP0_VCC. 136 ap1-supply: 137 description: The supply connected to AP1_VCC. 138 cif-supply: 139 description: The supply connected to CIF_VCC. 140 flash-supply: 141 description: The supply connected to FLASH_VCC. 142 lcdc0-supply: 143 description: The supply connected to LCD0_VCC. 144 lcdc1-supply: 145 description: The supply connected to LCD1_VCC. 146 vccio0-supply: 147 description: The supply connected to VCCIO0. 148 vccio1-supply: 149 description: The supply connected to VCCIO1. Also labeled as VCCIO2. 150 151 rk3228: 152 if: 153 properties: 154 compatible: 155 contains: 156 const: rockchip,rk3228-io-voltage-domain 157 158 then: 159 properties: 160 vccio1-supply: 161 description: The supply connected to VCCIO1. 162 vccio2-supply: 163 description: The supply connected to VCCIO2. 164 vccio3-supply: 165 description: The supply connected to VCCIO3. 166 vccio4-supply: 167 description: The supply connected to VCCIO4. 168 169 rk3288: 170 if: 171 properties: 172 compatible: 173 contains: 174 const: rockchip,rk3288-io-voltage-domain 175 176 then: 177 properties: 178 audio-supply: 179 description: The supply connected to APIO4_VDD. 180 bb-supply: 181 description: The supply connected to APIO5_VDD. 182 dvp-supply: 183 description: The supply connected to DVPIO_VDD. 184 flash0-supply: 185 description: The supply connected to FLASH0_VDD. Typically for eMMC. 186 flash1-supply: 187 description: The supply connected to FLASH1_VDD. Also known as SDIO1. 188 gpio30-supply: 189 description: The supply connected to APIO1_VDD. 190 gpio1830-supply: 191 description: The supply connected to APIO2_VDD. 192 lcdc-supply: 193 description: The supply connected to LCDC_VDD. 194 sdcard-supply: 195 description: The supply connected to SDMMC0_VDD. 196 wifi-supply: 197 description: The supply connected to APIO3_VDD. Also known as SDIO0. 198 199 rk3308: 200 if: 201 properties: 202 compatible: 203 contains: 204 const: rockchip,rk3308-io-voltage-domain 205 206 then: 207 properties: 208 vccio0-supply: 209 description: The supply connected to VCCIO0. 210 vccio1-supply: 211 description: The supply connected to VCCIO1. 212 vccio2-supply: 213 description: The supply connected to VCCIO2. 214 vccio3-supply: 215 description: The supply connected to VCCIO3. 216 vccio4-supply: 217 description: The supply connected to VCCIO4. 218 vccio5-supply: 219 description: The supply connected to VCCIO5. 220 221 rk3328: 222 if: 223 properties: 224 compatible: 225 contains: 226 const: rockchip,rk3328-io-voltage-domain 227 228 then: 229 properties: 230 vccio1-supply: 231 description: The supply connected to VCCIO1. 232 vccio2-supply: 233 description: The supply connected to VCCIO2. 234 vccio3-supply: 235 description: The supply connected to VCCIO3. 236 vccio4-supply: 237 description: The supply connected to VCCIO4. 238 vccio5-supply: 239 description: The supply connected to VCCIO5. 240 vccio6-supply: 241 description: The supply connected to VCCIO6. 242 pmuio-supply: 243 description: The supply connected to VCCIO_PMU. 244 245 rk3368: 246 if: 247 properties: 248 compatible: 249 contains: 250 const: rockchip,rk3368-io-voltage-domain 251 252 then: 253 properties: 254 audio-supply: 255 description: The supply connected to APIO3_VDD. 256 dvp-supply: 257 description: The supply connected to DVPIO_VDD. 258 flash0-supply: 259 description: The supply connected to FLASH0_VDD. Typically for eMMC. 260 gpio30-supply: 261 description: The supply connected to APIO1_VDD. 262 gpio1830-supply: 263 description: The supply connected to APIO4_VDD. 264 sdcard-supply: 265 description: The supply connected to SDMMC0_VDD. 266 wifi-supply: 267 description: The supply connected to APIO2_VDD. Also known as SDIO0. 268 269 rk3368-pmu: 270 if: 271 properties: 272 compatible: 273 contains: 274 const: rockchip,rk3368-pmu-io-voltage-domain 275 276 then: 277 properties: 278 pmu-supply: 279 description: The supply connected to PMUIO_VDD. 280 vop-supply: 281 description: The supply connected to LCDC_VDD. 282 283 rk3399: 284 if: 285 properties: 286 compatible: 287 contains: 288 const: rockchip,rk3399-io-voltage-domain 289 290 then: 291 properties: 292 audio-supply: 293 description: The supply connected to APIO5_VDD. 294 bt656-supply: 295 description: The supply connected to APIO2_VDD. 296 gpio1830-supply: 297 description: The supply connected to APIO4_VDD. 298 sdmmc-supply: 299 description: The supply connected to SDMMC0_VDD. 300 301 rk3399-pmu: 302 if: 303 properties: 304 compatible: 305 contains: 306 const: rockchip,rk3399-pmu-io-voltage-domain 307 308 then: 309 properties: 310 pmu1830-supply: 311 description: The supply connected to PMUIO2_VDD. 312 313 rk3568-pmu: 314 if: 315 properties: 316 compatible: 317 contains: 318 const: rockchip,rk3568-pmu-io-voltage-domain 319 320 then: 321 properties: 322 pmuio1-supply: 323 description: The supply connected to PMUIO1. 324 pmuio2-supply: 325 description: The supply connected to PMUIO2. 326 vccio1-supply: 327 description: The supply connected to VCCIO1. 328 vccio2-supply: 329 description: The supply connected to VCCIO2. 330 vccio3-supply: 331 description: The supply connected to VCCIO3. 332 vccio4-supply: 333 description: The supply connected to VCCIO4. 334 vccio5-supply: 335 description: The supply connected to VCCIO5. 336 vccio6-supply: 337 description: The supply connected to VCCIO6. 338 vccio7-supply: 339 description: The supply connected to VCCIO7. 340 341 rv1108: 342 if: 343 properties: 344 compatible: 345 contains: 346 const: rockchip,rv1108-io-voltage-domain 347 348 then: 349 properties: 350 vccio1-supply: 351 description: The supply connected to APIO1_VDD. 352 vccio2-supply: 353 description: The supply connected to APIO2_VDD. 354 vccio3-supply: 355 description: The supply connected to APIO3_VDD. 356 vccio5-supply: 357 description: The supply connected to APIO5_VDD. 358 vccio6-supply: 359 description: The supply connected to APIO6_VDD. 360 361 rv1108-pmu: 362 if: 363 properties: 364 compatible: 365 contains: 366 const: rockchip,rv1108-pmu-io-voltage-domain 367 368 then: 369 properties: 370 pmu-supply: 371 description: The supply connected to PMUIO_VDD. 372 373 rv1126-pmu: 374 if: 375 properties: 376 compatible: 377 contains: 378 const: rockchip,rv1126-pmu-io-voltage-domain 379 380 then: 381 properties: 382 vccio1-supply: 383 description: The supply connected to VCCIO1. 384 vccio2-supply: 385 description: The supply connected to VCCIO2. 386 vccio3-supply: 387 description: The supply connected to VCCIO3. 388 vccio4-supply: 389 description: The supply connected to VCCIO4. 390 vccio5-supply: 391 description: The supply connected to VCCIO5. 392 vccio6-supply: 393 description: The supply connected to VCCIO6. 394 vccio7-supply: 395 description: The supply connected to VCCIO7. 396 pmuio0-supply: 397 description: The supply connected to PMUIO0. 398 pmuio1-supply: 399 description: The supply connected to PMUIO1. 400 401examples: 402 - | 403 io-domains { 404 compatible = "rockchip,rk3288-io-voltage-domain"; 405 audio-supply = <&vcc18_codec>; 406 bb-supply = <&vcc33_io>; 407 dvp-supply = <&vcc_18>; 408 flash0-supply = <&vcc18_flashio>; 409 gpio1830-supply = <&vcc33_io>; 410 gpio30-supply = <&vcc33_pmuio>; 411 lcdc-supply = <&vcc33_lcd>; 412 sdcard-supply = <&vccio_sd>; 413 wifi-supply = <&vcc18_wl>; 414 }; 415