1# SPDX-License-Identifier: GPL-2.0 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mfd/ti,twl.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Texas Instruments TWL family 8 9maintainers: 10 - Andreas Kemnade <andreas@kemnade.info> 11 12description: | 13 The TWLs are Integrated Power Management Chips. 14 Some versions might contain much more analog functions like 15 USB transceiver or Audio amplifier. 16 These chips are connected to an I2C bus. 17 18allOf: 19 - if: 20 properties: 21 compatible: 22 contains: 23 const: ti,twl4030 24 then: 25 patternProperties: 26 "^regulator-": 27 properties: 28 compatible: 29 enum: 30 - ti,twl4030-vaux1 31 - ti,twl4030-vaux2 32 - ti,twl4030-vaux3 33 - ti,twl4030-vaux4 34 - ti,twl4030-vmmc1 35 - ti,twl4030-vmmc2 36 - ti,twl4030-vpll1 37 - ti,twl4030-vpll2 38 - ti,twl4030-vsim 39 - ti,twl4030-vdac 40 - ti,twl4030-vintana2 41 - ti,twl4030-vio 42 - ti,twl4030-vdd1 43 - ti,twl4030-vdd2 44 - ti,twl4030-vintana1 45 - ti,twl4030-vintdig 46 - ti,twl4030-vusb1v5 47 - ti,twl4030-vusb1v8 48 - ti,twl4030-vusb3v1 49 ti,retain-on-reset: false 50 51 properties: 52 charger: 53 $ref: /schemas/power/supply/twl4030-charger.yaml 54 unevaluatedProperties: false 55 56 gpadc: false 57 58 usb-comparator: false 59 60 - if: 61 properties: 62 compatible: 63 contains: 64 const: ti,twl6030 65 then: 66 patternProperties: 67 "^regulator-": 68 properties: 69 compatible: 70 enum: 71 - ti,twl6030-vaux1 72 - ti,twl6030-vaux2 73 - ti,twl6030-vaux3 74 - ti,twl6030-vmmc 75 - ti,twl6030-vpp 76 - ti,twl6030-vusim 77 - ti,twl6030-vana 78 - ti,twl6030-vcxio 79 - ti,twl6030-vdac 80 - ti,twl6030-vusb 81 - ti,twl6030-v1v8 82 - ti,twl6030-v2v1 83 - ti,twl6030-vdd1 84 - ti,twl6030-vdd2 85 - ti,twl6030-vdd3 86 regulator-initial-mode: false 87 88 properties: 89 charger: 90 $ref: /schemas/power/supply/ti,twl6030-charger.yaml 91 unevaluatedProperties: false 92 93 gpadc: 94 properties: 95 compatible: 96 const: ti,twl6030-gpadc 97 98 pwrbutton: false 99 100 madc: false 101 102 watchdog: false 103 104 audio: false 105 106 keypad: false 107 108 twl4030-usb: false 109 110 gpio: false 111 112 power: false 113 114 - if: 115 properties: 116 compatible: 117 contains: 118 const: ti,twl6032 119 then: 120 patternProperties: 121 "^regulator-": 122 properties: 123 compatible: 124 enum: 125 - ti,twl6032-ldo1 126 - ti,twl6032-ldo2 127 - ti,twl6032-ldo3 128 - ti,twl6032-ldo4 129 - ti,twl6032-ldo5 130 - ti,twl6032-ldo6 131 - ti,twl6032-ldo7 132 - ti,twl6032-ldoln 133 - ti,twl6032-ldousb 134 - ti,twl6032-smps3 135 - ti,twl6032-smps4 136 - ti,twl6032-vio 137 regulator-initial-mode: false 138 139 properties: 140 charger: 141 $ref: /schemas/power/supply/ti,twl6030-charger.yaml 142 unevaluatedProperties: false 143 144 gpadc: 145 properties: 146 compatible: 147 const: ti,twl6032-gpadc 148 149 pwrbutton: false 150 151 madc: false 152 153 watchdog: false 154 155 audio: false 156 157 keypad: false 158 159 twl4030-usb: false 160 161 gpio: false 162 163 power: false 164 165properties: 166 compatible: 167 description: > 168 TWL4030 for integrated power-management/audio CODEC device used in 169 OMAP3 based boards. 170 171 TWL6030/32 for integrated power-management used in OMAP4 based boards 172 enum: 173 - ti,twl4030 174 - ti,twl6030 175 - ti,twl6032 176 177 reg: 178 maxItems: 1 179 180 interrupts: 181 maxItems: 1 182 183 interrupt-controller: true 184 185 system-power-controller: true 186 187 "#interrupt-cells": 188 const: 1 189 190 "#clock-cells": 191 const: 1 192 193 clocks: 194 maxItems: 1 195 196 clock-names: 197 const: fck 198 199 charger: 200 type: object 201 202 properties: 203 compatible: true 204 205 required: 206 - compatible 207 208 rtc: 209 type: object 210 additionalProperties: false 211 212 properties: 213 compatible: 214 const: ti,twl4030-rtc 215 interrupts: 216 maxItems: 1 217 218 madc: 219 type: object 220 $ref: /schemas/iio/adc/ti,twl4030-madc.yaml 221 unevaluatedProperties: false 222 223 pwrbutton: 224 type: object 225 additionalProperties: false 226 227 properties: 228 compatible: 229 const: ti,twl4030-pwrbutton 230 interrupts: 231 items: 232 - items: 233 const: 8 234 235 watchdog: 236 type: object 237 additionalProperties: false 238 239 properties: 240 compatible: 241 const: ti,twl4030-wdt 242 243 audio: 244 type: object 245 additionalProperties: true 246 247 properties: 248 compatible: 249 const: ti,twl4030-audio 250 251 required: 252 - compatible 253 254 keypad: 255 type: object 256 additionalProperties: true 257 258 properties: 259 compatible: 260 const: ti,twl4030-keypad 261 262 required: 263 - compatible 264 265 twl4030-usb: 266 type: object 267 additionalProperties: true 268 269 properties: 270 compatible: 271 const: ti,twl4030-usb 272 273 required: 274 - compatible 275 276 gpio: 277 type: object 278 additionalProperties: true 279 280 properties: 281 compatible: 282 const: ti,twl4030-gpio 283 284 required: 285 - compatible 286 287 power: 288 type: object 289 additionalProperties: false 290 description: > 291 The power management module inside the TWL4030 provides several 292 facilities to control the power resources, including power scripts. 293 294 For now, the binding only supports the complete shutdown of the 295 system after poweroff. 296 297 Board-specific compatible strings may be used for platform-specific 298 power configurations. 299 300 A board-specific compatible string (e.g., ti,twl4030-power-omap3-evm) 301 may be paired with a generic fallback (generally for power saving mode). 302 303 properties: 304 compatible: 305 oneOf: 306 # Case 1: A single compatible string is provided. 307 - enum: 308 - ti,twl4030-power 309 - ti,twl4030-power-reset 310 - ti,twl4030-power-idle 311 - ti,twl4030-power-idle-osc-off 312 - ti,twl4030-power-omap3-sdp 313 - ti,twl4030-power-omap3-ldp 314 - ti,twl4030-power-omap3-evm 315 316 # Case 2: The specific, valid fallback for 'idle-osc-off'. 317 - items: 318 - const: ti,twl4030-power-idle-osc-off 319 - const: ti,twl4030-power-idle 320 321 # Case 3: The specific, valid fallback for 'omap3-evm'. 322 - items: 323 - const: ti,twl4030-power-omap3-evm 324 - const: ti,twl4030-power-idle 325 326 ti,system-power-controller: 327 type: boolean 328 deprecated: true 329 description: > 330 DEPRECATED. The standard 'system-power-controller' 331 property on the parent node should be used instead. 332 333 ti,use_poweroff: 334 type: boolean 335 deprecated: true 336 description: DEPRECATED, to be removed. 337 338 required: 339 - compatible 340 341 gpadc: 342 type: object 343 $ref: /schemas/iio/adc/ti,twl6030-gpadc.yaml 344 unevaluatedProperties: false 345 346 properties: 347 compatible: true 348 349 usb-comparator: 350 type: object 351 additionalProperties: true 352 353 properties: 354 compatible: 355 const: ti,twl6030-usb 356 357 required: 358 - compatible 359 360 pwm: 361 type: object 362 $ref: /schemas/pwm/pwm.yaml# 363 unevaluatedProperties: false 364 description: 365 PWM controllers (PWM1 and PWM2 on TWL4030, PWM0 and PWM1 on TWL6030/32). 366 367 properties: 368 compatible: 369 enum: 370 - ti,twl4030-pwm 371 - ti,twl6030-pwm 372 373 '#pwm-cells': 374 const: 2 375 376 required: 377 - compatible 378 - '#pwm-cells' 379 380 pwmled: 381 type: object 382 $ref: /schemas/pwm/pwm.yaml# 383 unevaluatedProperties: false 384 description: > 385 PWM controllers connected to LED terminals (PWMA and PWMB on TWL4030. 386 387 LED PWM on TWL6030/32, mainly used as charging indicator LED). 388 389 properties: 390 compatible: 391 enum: 392 - ti,twl4030-pwmled 393 - ti,twl6030-pwmled 394 395 '#pwm-cells': 396 const: 2 397 398 required: 399 - compatible 400 - '#pwm-cells' 401 402patternProperties: 403 "^regulator-": 404 type: object 405 unevaluatedProperties: false 406 $ref: /schemas/regulator/regulator.yaml 407 408 properties: 409 compatible: true 410 regulator-initial-mode: 411 enum: 412 - 0x08 # Sleep mode, the nominal output voltage is maintained 413 # with low power consumption with low load current capability 414 - 0x0e # Active mode, the regulator can deliver its nominal output 415 # voltage with full-load current capability 416 417 ti,retain-on-reset: 418 description: > 419 Does not turn off the supplies during warm reset. 420 421 Could be needed for VMMC, as TWL6030 reset sequence for 422 this signal does not comply with the SD specification. 423 type: boolean 424 425unevaluatedProperties: false 426 427required: 428 - compatible 429 - reg 430 - interrupts 431 - interrupt-controller 432 - "#interrupt-cells" 433 434examples: 435 - | 436 i2c { 437 #address-cells = <1>; 438 #size-cells = <0>; 439 440 pmic@48 { 441 compatible = "ti,twl6030"; 442 reg = <0x48>; 443 interrupts = <39>; /* IRQ_SYS_1N cascaded to gic */ 444 interrupt-parent = <&gic>; 445 interrupt-controller; 446 #interrupt-cells = <1>; 447 448 charger { 449 compatible = "ti,twl6030-charger"; 450 interrupts = <2>, <5>; 451 io-channels = <&gpadc 10>; 452 io-channel-names = "vusb"; 453 monitored-battery = <&bat>; 454 }; 455 456 gpadc { 457 compatible = "ti,twl6030-gpadc"; 458 interrupts = <6>; 459 #io-channel-cells = <1>; 460 }; 461 462 rtc { 463 compatible = "ti,twl4030-rtc"; 464 interrupts = <8>; 465 }; 466 467 regulator-vaux1 { 468 compatible = "ti,twl6030-vaux1"; 469 regulator-min-microvolt = <1000000>; 470 regulator-max-microvolt = <3000000>; 471 }; 472 473 regulator-vmmc1 { 474 compatible = "ti,twl6030-vmmc"; 475 ti,retain-on-reset; 476 }; 477 478 pwm { 479 compatible = "ti,twl6030-pwm"; 480 #pwm-cells = <2>; 481 }; 482 483 pwmled { 484 compatible = "ti,twl6030-pwmled"; 485 #pwm-cells = <2>; 486 }; 487 }; 488 }; 489 490 - | 491 i2c { 492 #address-cells = <1>; 493 #size-cells = <0>; 494 495 pmic@48 { 496 compatible = "ti,twl4030"; 497 reg = <0x48>; 498 interrupts = <7>; /* SYS_NIRQ cascaded to intc */ 499 interrupt-parent = <&intc>; 500 interrupt-controller; 501 #interrupt-cells = <1>; 502 503 charger { 504 compatible = "ti,twl4030-bci"; 505 interrupts = <9>, <2>; 506 bci3v1-supply = <&vusb3v1>; 507 io-channels = <&twl_madc 11>; 508 io-channel-names = "vac"; 509 }; 510 511 twl_madc: madc { 512 compatible = "ti,twl4030-madc"; 513 interrupts = <3>; 514 #io-channel-cells = <1>; 515 }; 516 517 pwrbutton { 518 compatible = "ti,twl4030-pwrbutton"; 519 interrupts = <8>; 520 }; 521 522 rtc { 523 compatible = "ti,twl4030-rtc"; 524 interrupts = <11>; 525 }; 526 527 regulator-vaux1 { 528 compatible = "ti,twl4030-vaux1"; 529 regulator-min-microvolt = <1000000>; 530 regulator-max-microvolt = <3000000>; 531 regulator-initial-mode = <0xe>; 532 }; 533 534 vusb3v1: regulator-vusb3v1 { 535 compatible = "ti,twl4030-vusb3v1"; 536 }; 537 538 watchdog { 539 compatible = "ti,twl4030-wdt"; 540 }; 541 542 power { 543 compatible = "ti,twl4030-power"; 544 }; 545 546 pwm { 547 compatible = "ti,twl4030-pwm"; 548 #pwm-cells = <2>; 549 }; 550 551 pwmled { 552 compatible = "ti,twl4030-pwmled"; 553 #pwm-cells = <2>; 554 }; 555 }; 556 }; 557... 558