Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 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 | |
| 7 | title: Rockchip SRAM for IO Voltage Domains |
| 8 | |
| 9 | maintainers: |
| 10 | - Heiko Stuebner <heiko@sntech.de> |
| 11 | |
| 12 | description: | |
| 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 | |
| 45 | properties: |
| 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,rk3328-io-voltage-domain |
| 54 | - rockchip,rk3368-io-voltage-domain |
| 55 | - rockchip,rk3368-pmu-io-voltage-domain |
| 56 | - rockchip,rk3399-io-voltage-domain |
| 57 | - rockchip,rk3399-pmu-io-voltage-domain |
| 58 | - rockchip,rk3568-pmu-io-voltage-domain |
| 59 | - rockchip,rv1108-io-voltage-domain |
| 60 | - rockchip,rv1108-pmu-io-voltage-domain |
| 61 | - rockchip,rv1126-pmu-io-voltage-domain |
| 62 | |
| 63 | required: |
| 64 | - compatible |
| 65 | |
| 66 | unevaluatedProperties: false |
| 67 | |
| 68 | allOf: |
| 69 | - $ref: "#/$defs/px30" |
| 70 | - $ref: "#/$defs/px30-pmu" |
| 71 | - $ref: "#/$defs/rk3188" |
| 72 | - $ref: "#/$defs/rk3228" |
| 73 | - $ref: "#/$defs/rk3288" |
| 74 | - $ref: "#/$defs/rk3328" |
| 75 | - $ref: "#/$defs/rk3368" |
| 76 | - $ref: "#/$defs/rk3368-pmu" |
| 77 | - $ref: "#/$defs/rk3399" |
| 78 | - $ref: "#/$defs/rk3399-pmu" |
| 79 | - $ref: "#/$defs/rk3568-pmu" |
| 80 | - $ref: "#/$defs/rv1108" |
| 81 | - $ref: "#/$defs/rv1108-pmu" |
| 82 | - $ref: "#/$defs/rv1126-pmu" |
| 83 | |
| 84 | $defs: |
| 85 | px30: |
| 86 | if: |
| 87 | properties: |
| 88 | compatible: |
| 89 | contains: |
| 90 | const: rockchip,px30-io-voltage-domain |
| 91 | |
| 92 | then: |
| 93 | properties: |
| 94 | vccio1-supply: |
| 95 | description: The supply connected to VCCIO1. |
| 96 | vccio2-supply: |
| 97 | description: The supply connected to VCCIO2. |
| 98 | vccio3-supply: |
| 99 | description: The supply connected to VCCIO3. |
| 100 | vccio4-supply: |
| 101 | description: The supply connected to VCCIO4. |
| 102 | vccio5-supply: |
| 103 | description: The supply connected to VCCIO5. |
| 104 | vccio6-supply: |
| 105 | description: The supply connected to VCCIO6. |
| 106 | vccio-oscgpi-supply: |
| 107 | description: The supply connected to VCCIO_OSCGPI. |
| 108 | |
| 109 | px30-pmu: |
| 110 | if: |
| 111 | properties: |
| 112 | compatible: |
| 113 | contains: |
| 114 | const: rockchip,px30-pmu-io-voltage-domain |
| 115 | |
| 116 | then: |
| 117 | properties: |
| 118 | pmuio1-supply: |
| 119 | description: The supply connected to PMUIO1. |
| 120 | pmuio2-supply: |
| 121 | description: The supply connected to PMUIO2. |
| 122 | |
| 123 | rk3188: |
| 124 | if: |
| 125 | properties: |
| 126 | compatible: |
| 127 | contains: |
| 128 | const: rockchip,rk3188-io-voltage-domain |
| 129 | |
| 130 | then: |
| 131 | properties: |
| 132 | ap0-supply: |
| 133 | description: The supply connected to AP0_VCC. |
| 134 | ap1-supply: |
| 135 | description: The supply connected to AP1_VCC. |
| 136 | cif-supply: |
| 137 | description: The supply connected to CIF_VCC. |
| 138 | flash-supply: |
| 139 | description: The supply connected to FLASH_VCC. |
| 140 | lcdc0-supply: |
| 141 | description: The supply connected to LCD0_VCC. |
| 142 | lcdc1-supply: |
| 143 | description: The supply connected to LCD1_VCC. |
| 144 | vccio0-supply: |
| 145 | description: The supply connected to VCCIO0. |
| 146 | vccio1-supply: |
| 147 | description: The supply connected to VCCIO1. Also labeled as VCCIO2. |
| 148 | |
| 149 | rk3228: |
| 150 | if: |
| 151 | properties: |
| 152 | compatible: |
| 153 | contains: |
| 154 | const: rockchip,rk3228-io-voltage-domain |
| 155 | |
| 156 | then: |
| 157 | properties: |
| 158 | vccio1-supply: |
| 159 | description: The supply connected to VCCIO1. |
| 160 | vccio2-supply: |
| 161 | description: The supply connected to VCCIO2. |
| 162 | vccio3-supply: |
| 163 | description: The supply connected to VCCIO3. |
| 164 | vccio4-supply: |
| 165 | description: The supply connected to VCCIO4. |
| 166 | |
| 167 | rk3288: |
| 168 | if: |
| 169 | properties: |
| 170 | compatible: |
| 171 | contains: |
| 172 | const: rockchip,rk3288-io-voltage-domain |
| 173 | |
| 174 | then: |
| 175 | properties: |
| 176 | audio-supply: |
| 177 | description: The supply connected to APIO4_VDD. |
| 178 | bb-supply: |
| 179 | description: The supply connected to APIO5_VDD. |
| 180 | dvp-supply: |
| 181 | description: The supply connected to DVPIO_VDD. |
| 182 | flash0-supply: |
| 183 | description: The supply connected to FLASH0_VDD. Typically for eMMC. |
| 184 | flash1-supply: |
| 185 | description: The supply connected to FLASH1_VDD. Also known as SDIO1. |
| 186 | gpio30-supply: |
| 187 | description: The supply connected to APIO1_VDD. |
| 188 | gpio1830-supply: |
| 189 | description: The supply connected to APIO2_VDD. |
| 190 | lcdc-supply: |
| 191 | description: The supply connected to LCDC_VDD. |
| 192 | sdcard-supply: |
| 193 | description: The supply connected to SDMMC0_VDD. |
| 194 | wifi-supply: |
| 195 | description: The supply connected to APIO3_VDD. Also known as SDIO0. |
| 196 | |
| 197 | rk3328: |
| 198 | if: |
| 199 | properties: |
| 200 | compatible: |
| 201 | contains: |
| 202 | const: rockchip,rk3328-io-voltage-domain |
| 203 | |
| 204 | then: |
| 205 | properties: |
| 206 | vccio1-supply: |
| 207 | description: The supply connected to VCCIO1. |
| 208 | vccio2-supply: |
| 209 | description: The supply connected to VCCIO2. |
| 210 | vccio3-supply: |
| 211 | description: The supply connected to VCCIO3. |
| 212 | vccio4-supply: |
| 213 | description: The supply connected to VCCIO4. |
| 214 | vccio5-supply: |
| 215 | description: The supply connected to VCCIO5. |
| 216 | vccio6-supply: |
| 217 | description: The supply connected to VCCIO6. |
| 218 | pmuio-supply: |
| 219 | description: The supply connected to VCCIO_PMU. |
| 220 | |
| 221 | rk3368: |
| 222 | if: |
| 223 | properties: |
| 224 | compatible: |
| 225 | contains: |
| 226 | const: rockchip,rk3368-io-voltage-domain |
| 227 | |
| 228 | then: |
| 229 | properties: |
| 230 | audio-supply: |
| 231 | description: The supply connected to APIO3_VDD. |
| 232 | dvp-supply: |
| 233 | description: The supply connected to DVPIO_VDD. |
| 234 | flash0-supply: |
| 235 | description: The supply connected to FLASH0_VDD. Typically for eMMC. |
| 236 | gpio30-supply: |
| 237 | description: The supply connected to APIO1_VDD. |
| 238 | gpio1830-supply: |
| 239 | description: The supply connected to APIO4_VDD. |
| 240 | sdcard-supply: |
| 241 | description: The supply connected to SDMMC0_VDD. |
| 242 | wifi-supply: |
| 243 | description: The supply connected to APIO2_VDD. Also known as SDIO0. |
| 244 | |
| 245 | rk3368-pmu: |
| 246 | if: |
| 247 | properties: |
| 248 | compatible: |
| 249 | contains: |
| 250 | const: rockchip,rk3368-pmu-io-voltage-domain |
| 251 | |
| 252 | then: |
| 253 | properties: |
| 254 | pmu-supply: |
| 255 | description: The supply connected to PMUIO_VDD. |
| 256 | vop-supply: |
| 257 | description: The supply connected to LCDC_VDD. |
| 258 | |
| 259 | rk3399: |
| 260 | if: |
| 261 | properties: |
| 262 | compatible: |
| 263 | contains: |
| 264 | const: rockchip,rk3399-io-voltage-domain |
| 265 | |
| 266 | then: |
| 267 | properties: |
| 268 | audio-supply: |
| 269 | description: The supply connected to APIO5_VDD. |
| 270 | bt656-supply: |
| 271 | description: The supply connected to APIO2_VDD. |
| 272 | gpio1830-supply: |
| 273 | description: The supply connected to APIO4_VDD. |
| 274 | sdmmc-supply: |
| 275 | description: The supply connected to SDMMC0_VDD. |
| 276 | |
| 277 | rk3399-pmu: |
| 278 | if: |
| 279 | properties: |
| 280 | compatible: |
| 281 | contains: |
| 282 | const: rockchip,rk3399-pmu-io-voltage-domain |
| 283 | |
| 284 | then: |
| 285 | properties: |
| 286 | pmu1830-supply: |
| 287 | description: The supply connected to PMUIO2_VDD. |
| 288 | |
| 289 | rk3568-pmu: |
| 290 | if: |
| 291 | properties: |
| 292 | compatible: |
| 293 | contains: |
| 294 | const: rockchip,rk3568-pmu-io-voltage-domain |
| 295 | |
| 296 | then: |
| 297 | properties: |
| 298 | pmuio1-supply: |
| 299 | description: The supply connected to PMUIO1. |
| 300 | pmuio2-supply: |
| 301 | description: The supply connected to PMUIO2. |
| 302 | vccio1-supply: |
| 303 | description: The supply connected to VCCIO1. |
| 304 | vccio2-supply: |
| 305 | description: The supply connected to VCCIO2. |
| 306 | vccio3-supply: |
| 307 | description: The supply connected to VCCIO3. |
| 308 | vccio4-supply: |
| 309 | description: The supply connected to VCCIO4. |
| 310 | vccio5-supply: |
| 311 | description: The supply connected to VCCIO5. |
| 312 | vccio6-supply: |
| 313 | description: The supply connected to VCCIO6. |
| 314 | vccio7-supply: |
| 315 | description: The supply connected to VCCIO7. |
| 316 | |
| 317 | rv1108: |
| 318 | if: |
| 319 | properties: |
| 320 | compatible: |
| 321 | contains: |
| 322 | const: rockchip,rv1108-io-voltage-domain |
| 323 | |
| 324 | then: |
| 325 | properties: |
| 326 | vccio1-supply: |
| 327 | description: The supply connected to APIO1_VDD. |
| 328 | vccio2-supply: |
| 329 | description: The supply connected to APIO2_VDD. |
| 330 | vccio3-supply: |
| 331 | description: The supply connected to APIO3_VDD. |
| 332 | vccio5-supply: |
| 333 | description: The supply connected to APIO5_VDD. |
| 334 | vccio6-supply: |
| 335 | description: The supply connected to APIO6_VDD. |
| 336 | |
| 337 | rv1108-pmu: |
| 338 | if: |
| 339 | properties: |
| 340 | compatible: |
| 341 | contains: |
| 342 | const: rockchip,rv1108-pmu-io-voltage-domain |
| 343 | |
| 344 | then: |
| 345 | properties: |
| 346 | pmu-supply: |
| 347 | description: The supply connected to PMUIO_VDD. |
| 348 | |
| 349 | rv1126-pmu: |
| 350 | if: |
| 351 | properties: |
| 352 | compatible: |
| 353 | contains: |
| 354 | const: rockchip,rv1126-pmu-io-voltage-domain |
| 355 | |
| 356 | then: |
| 357 | properties: |
| 358 | vccio1-supply: |
| 359 | description: The supply connected to VCCIO1. |
| 360 | vccio2-supply: |
| 361 | description: The supply connected to VCCIO2. |
| 362 | vccio3-supply: |
| 363 | description: The supply connected to VCCIO3. |
| 364 | vccio4-supply: |
| 365 | description: The supply connected to VCCIO4. |
| 366 | vccio5-supply: |
| 367 | description: The supply connected to VCCIO5. |
| 368 | vccio6-supply: |
| 369 | description: The supply connected to VCCIO6. |
| 370 | vccio7-supply: |
| 371 | description: The supply connected to VCCIO7. |
| 372 | pmuio0-supply: |
| 373 | description: The supply connected to PMUIO0. |
| 374 | pmuio1-supply: |
| 375 | description: The supply connected to PMUIO1. |
| 376 | |
| 377 | examples: |
| 378 | - | |
| 379 | io-domains { |
| 380 | compatible = "rockchip,rk3288-io-voltage-domain"; |
| 381 | audio-supply = <&vcc18_codec>; |
| 382 | bb-supply = <&vcc33_io>; |
| 383 | dvp-supply = <&vcc_18>; |
| 384 | flash0-supply = <&vcc18_flashio>; |
| 385 | gpio1830-supply = <&vcc33_io>; |
| 386 | gpio30-supply = <&vcc33_pmuio>; |
| 387 | lcdc-supply = <&vcc33_lcd>; |
| 388 | sdcard-supply = <&vccio_sd>; |
| 389 | wifi-supply = <&vcc18_wl>; |
| 390 | }; |