1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: MediaTek MT6397/MT6323 PMIC 8 9maintainers: 10 - Sen Chu <sen.chu@mediatek.com> 11 - Macpaul Lin <macpaul.lin@mediatek.com> 12 13description: | 14 MT6397/MT6323 is a power management system chip. 15 Please see the sub-modules below for supported features. 16 17 MT6397/MT6323 is a multifunction device with the following sub modules: 18 - Regulators 19 - RTC 20 - ADC 21 - Audio codec 22 - GPIO 23 - Clock 24 - LED 25 - Keys 26 - Power controller 27 28 It is interfaced to host controller using SPI interface by a proprietary hardware 29 called PMIC wrapper or pwrap. MT6397/MT6323 PMIC is a child device of pwrap. 30 See the following for pwrap node definitions: 31 Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml 32 33properties: 34 compatible: 35 oneOf: 36 - enum: 37 - mediatek,mt6323 38 - mediatek,mt6331 # "mediatek,mt6331" for PMIC MT6331 and MT6332. 39 - mediatek,mt6328 40 - mediatek,mt6358 41 - mediatek,mt6359 42 - mediatek,mt6397 43 - items: 44 - enum: 45 - mediatek,mt6366 46 - const: mediatek,mt6358 47 48 interrupts: 49 maxItems: 1 50 51 interrupt-controller: true 52 53 "#interrupt-cells": 54 const: 2 55 56 rtc: 57 type: object 58 $ref: /schemas/rtc/rtc.yaml# 59 unevaluatedProperties: false 60 description: 61 MT6397 Real Time Clock. 62 63 properties: 64 compatible: 65 oneOf: 66 - enum: 67 - mediatek,mt6323-rtc 68 - mediatek,mt6331-rtc 69 - mediatek,mt6358-rtc 70 - mediatek,mt6397-rtc 71 - items: 72 - enum: 73 - mediatek,mt6366-rtc 74 - const: mediatek,mt6358-rtc 75 76 start-year: true 77 78 required: 79 - compatible 80 81 regulators: 82 type: object 83 description: 84 List of child nodes that specify the regulators. 85 additionalProperties: true 86 87 properties: 88 compatible: 89 oneOf: 90 - enum: 91 - mediatek,mt6323-regulator 92 - mediatek,mt6328-regulator 93 - mediatek,mt6358-regulator 94 - mediatek,mt6359-regulator 95 - mediatek,mt6397-regulator 96 - items: 97 - enum: 98 - mediatek,mt6366-regulator 99 - const: mediatek,mt6358-regulator 100 101 required: 102 - compatible 103 104 adc: 105 type: object 106 $ref: /schemas/iio/adc/mediatek,mt6359-auxadc.yaml# 107 unevaluatedProperties: false 108 109 audio-codec: 110 type: object 111 description: 112 Audio codec support with MT6358 and MT6397. 113 additionalProperties: true 114 115 properties: 116 compatible: 117 oneOf: 118 - enum: 119 - mediatek,mt6358-sound 120 - mediatek,mt6359-codec 121 - mediatek,mt6397-codec 122 - items: 123 - enum: 124 - mediatek,mt6366-sound 125 - const: mediatek,mt6358-sound 126 127 required: 128 - compatible 129 130 clocks: 131 type: object 132 additionalProperties: false 133 description: 134 This is a clock buffer node for mt6397. However, there are no sub nodes 135 or any public document exposed in public. 136 137 properties: 138 compatible: 139 const: mediatek,mt6397-clk 140 141 '#clock-cells': 142 const: 1 143 144 required: 145 - compatible 146 147 leds: 148 type: object 149 additionalProperties: false 150 description: | 151 MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED 152 controllers are defined as the subnode of the function node provided by MT6323 153 PMIC controller that is being defined as one kind of Muti-Function Device (MFD) 154 using shared bus called PMIC wrapper for each subfunction to access remote 155 MT6323 PMIC hardware. 156 157 Each led is represented as a child node of the mediatek,mt6323-led that 158 describes the initial behavior for each LED physically and currently only four 159 LED child nodes can be supported. 160 161 properties: 162 compatible: 163 enum: 164 - mediatek,mt6323-led 165 - mediatek,mt6331-led 166 - mediatek,mt6332-led 167 168 reg: 169 maxItems: 1 170 171 "#address-cells": 172 const: 1 173 174 "#size-cells": 175 const: 0 176 177 patternProperties: 178 "^led@[0-3]$": 179 type: object 180 $ref: /schemas/leds/common.yaml# 181 unevaluatedProperties: false 182 183 properties: 184 reg: 185 description: 186 LED channel number (0..3) 187 minimum: 0 188 maximum: 3 189 190 required: 191 - reg 192 193 required: 194 - compatible 195 - "#address-cells" 196 - "#size-cells" 197 198 keys: 199 type: object 200 $ref: /schemas/input/mediatek,pmic-keys.yaml 201 unevaluatedProperties: false 202 description: 203 Power and Home keys. 204 205 power-controller: 206 type: object 207 additionalProperties: false 208 description: 209 The power controller which could be found on PMIC is responsible for 210 externally powering off or on the remote MediaTek SoC through the 211 circuit BBPU (baseband power up). 212 213 properties: 214 compatible: 215 const: mediatek,mt6323-pwrc 216 217 '#power-domain-cells': 218 const: 0 219 220 pinctrl: 221 type: object 222 $ref: /schemas/pinctrl/mediatek,mt65xx-pinctrl.yaml 223 unevaluatedProperties: false 224 description: 225 Pin controller 226 227required: 228 - compatible 229 - regulators 230 231additionalProperties: false 232 233examples: 234 - | 235 #include <dt-bindings/interrupt-controller/arm-gic.h> 236 #include <dt-bindings/leds/common.h> 237 238 pmic { 239 compatible = "mediatek,mt6323"; 240 interrupt-parent = <&pio>; 241 interrupts = <150 IRQ_TYPE_LEVEL_HIGH>; 242 interrupt-controller; 243 #interrupt-cells = <2>; 244 245 leds { 246 compatible = "mediatek,mt6323-led"; 247 #address-cells = <1>; 248 #size-cells = <0>; 249 }; 250 251 regulators { 252 compatible = "mediatek,mt6323-regulator"; 253 254 buck_vproc { 255 regulator-name = "vproc"; 256 regulator-min-microvolt = < 700000>; 257 regulator-max-microvolt = <1350000>; 258 regulator-ramp-delay = <12500>; 259 regulator-always-on; 260 regulator-boot-on; 261 }; 262 263 buck_vsys { 264 regulator-name = "vsys"; 265 regulator-min-microvolt = <1400000>; 266 regulator-max-microvolt = <2987500>; 267 regulator-ramp-delay = <25000>; 268 regulator-always-on; 269 regulator-boot-on; 270 }; 271 272 buck_vpa { 273 regulator-name = "vpa"; 274 regulator-min-microvolt = < 500000>; 275 regulator-max-microvolt = <3650000>; 276 }; 277 278 ldo_vtcxo { 279 regulator-name = "vtcxo"; 280 regulator-min-microvolt = <2800000>; 281 regulator-max-microvolt = <2800000>; 282 regulator-enable-ramp-delay = <90>; 283 regulator-always-on; 284 regulator-boot-on; 285 }; 286 287 ldo_vcn28 { 288 regulator-name = "vcn28"; 289 regulator-min-microvolt = <2800000>; 290 regulator-max-microvolt = <2800000>; 291 regulator-enable-ramp-delay = <185>; 292 }; 293 294 ldo_vcn33_bt { 295 regulator-name = "vcn33_bt"; 296 regulator-min-microvolt = <3300000>; 297 regulator-max-microvolt = <3600000>; 298 regulator-enable-ramp-delay = <185>; 299 }; 300 301 ldo_vcn33_wifi { 302 regulator-name = "vcn33_wifi"; 303 regulator-min-microvolt = <3300000>; 304 regulator-max-microvolt = <3600000>; 305 regulator-enable-ramp-delay = <185>; 306 }; 307 308 ldo_va { 309 regulator-name = "va"; 310 regulator-min-microvolt = <2800000>; 311 regulator-max-microvolt = <2800000>; 312 regulator-enable-ramp-delay = <216>; 313 regulator-always-on; 314 regulator-boot-on; 315 }; 316 317 ldo_vcama { 318 regulator-name = "vcama"; 319 regulator-min-microvolt = <1500000>; 320 regulator-max-microvolt = <2800000>; 321 regulator-enable-ramp-delay = <216>; 322 }; 323 324 ldo_vio28 { 325 regulator-name = "vio28"; 326 regulator-min-microvolt = <2800000>; 327 regulator-max-microvolt = <2800000>; 328 regulator-enable-ramp-delay = <216>; 329 regulator-always-on; 330 regulator-boot-on; 331 }; 332 333 ldo_vusb { 334 regulator-name = "vusb"; 335 regulator-min-microvolt = <3300000>; 336 regulator-max-microvolt = <3300000>; 337 regulator-enable-ramp-delay = <216>; 338 regulator-boot-on; 339 }; 340 341 ldo_vmc { 342 regulator-name = "vmc"; 343 regulator-min-microvolt = <1800000>; 344 regulator-max-microvolt = <3300000>; 345 regulator-enable-ramp-delay = <36>; 346 regulator-boot-on; 347 }; 348 349 ldo_vmch { 350 regulator-name = "vmch"; 351 regulator-min-microvolt = <3000000>; 352 regulator-max-microvolt = <3300000>; 353 regulator-enable-ramp-delay = <36>; 354 regulator-boot-on; 355 }; 356 357 ldo_vemc3v3 { 358 regulator-name = "vemc3v3"; 359 regulator-min-microvolt = <3000000>; 360 regulator-max-microvolt = <3300000>; 361 regulator-enable-ramp-delay = <36>; 362 regulator-boot-on; 363 }; 364 365 ldo_vgp1 { 366 regulator-name = "vgp1"; 367 regulator-min-microvolt = <1200000>; 368 regulator-max-microvolt = <3300000>; 369 regulator-enable-ramp-delay = <216>; 370 }; 371 372 ldo_vgp2 { 373 regulator-name = "vgp2"; 374 regulator-min-microvolt = <1200000>; 375 regulator-max-microvolt = <3000000>; 376 regulator-enable-ramp-delay = <216>; 377 }; 378 379 ldo_vgp3 { 380 regulator-name = "vgp3"; 381 regulator-min-microvolt = <1200000>; 382 regulator-max-microvolt = <1800000>; 383 regulator-enable-ramp-delay = <216>; 384 }; 385 386 ldo_vcn18 { 387 regulator-name = "vcn18"; 388 regulator-min-microvolt = <1800000>; 389 regulator-max-microvolt = <1800000>; 390 regulator-enable-ramp-delay = <216>; 391 }; 392 393 ldo_vsim1 { 394 regulator-name = "vsim1"; 395 regulator-min-microvolt = <1800000>; 396 regulator-max-microvolt = <3000000>; 397 regulator-enable-ramp-delay = <216>; 398 }; 399 400 ldo_vsim2 { 401 regulator-name = "vsim2"; 402 regulator-min-microvolt = <1800000>; 403 regulator-max-microvolt = <3000000>; 404 regulator-enable-ramp-delay = <216>; 405 }; 406 407 ldo_vrtc { 408 regulator-name = "vrtc"; 409 regulator-min-microvolt = <2800000>; 410 regulator-max-microvolt = <2800000>; 411 regulator-always-on; 412 regulator-boot-on; 413 }; 414 415 ldo_vcamaf { 416 regulator-name = "vcamaf"; 417 regulator-min-microvolt = <1200000>; 418 regulator-max-microvolt = <3300000>; 419 regulator-enable-ramp-delay = <216>; 420 }; 421 422 ldo_vibr { 423 regulator-name = "vibr"; 424 regulator-min-microvolt = <1200000>; 425 regulator-max-microvolt = <3300000>; 426 regulator-enable-ramp-delay = <36>; 427 }; 428 429 ldo_vrf18 { 430 regulator-name = "vrf18"; 431 regulator-min-microvolt = <1825000>; 432 regulator-max-microvolt = <1825000>; 433 regulator-enable-ramp-delay = <187>; 434 }; 435 436 ldo_vm { 437 regulator-name = "vm"; 438 regulator-min-microvolt = <1200000>; 439 regulator-max-microvolt = <1800000>; 440 regulator-enable-ramp-delay = <216>; 441 regulator-always-on; 442 regulator-boot-on; 443 }; 444 445 ldo_vio18 { 446 regulator-name = "vio18"; 447 regulator-min-microvolt = <1800000>; 448 regulator-max-microvolt = <1800000>; 449 regulator-enable-ramp-delay = <216>; 450 regulator-always-on; 451 regulator-boot-on; 452 }; 453 454 ldo_vcamd { 455 regulator-name = "vcamd"; 456 regulator-min-microvolt = <1200000>; 457 regulator-max-microvolt = <1800000>; 458 regulator-enable-ramp-delay = <216>; 459 }; 460 461 ldo_vcamio { 462 regulator-name = "vcamio"; 463 regulator-min-microvolt = <1800000>; 464 regulator-max-microvolt = <1800000>; 465 regulator-enable-ramp-delay = <216>; 466 }; 467 }; 468 469 keys { 470 compatible = "mediatek,mt6323-keys"; 471 mediatek,long-press-mode = <1>; 472 power-off-time-sec = <0>; 473 474 power { 475 linux,keycodes = <116>; 476 wakeup-source; 477 }; 478 479 home { 480 linux,keycodes = <114>; 481 }; 482 }; 483 484 power-controller { 485 compatible = "mediatek,mt6323-pwrc"; 486 #power-domain-cells = <0>; 487 }; 488 489 rtc { 490 compatible = "mediatek,mt6323-rtc"; 491 }; 492 }; 493 494 - | 495 #include <dt-bindings/input/input.h> 496 #include <dt-bindings/interrupt-controller/arm-gic.h> 497 498 pmic { 499 compatible = "mediatek,mt6358"; 500 interrupt-controller; 501 #interrupt-cells = <2>; 502 503 audio-codec { 504 compatible = "mediatek,mt6358-sound"; 505 Avdd-supply = <&mt6358_vaud28_reg>; 506 mediatek,dmic-mode = <0>; 507 }; 508 509 regulators { 510 compatible = "mediatek,mt6358-regulator"; 511 512 buck_vdram1 { 513 regulator-name = "vdram1"; 514 regulator-min-microvolt = <500000>; 515 regulator-max-microvolt = <2087500>; 516 regulator-ramp-delay = <12500>; 517 regulator-enable-ramp-delay = <0>; 518 regulator-always-on; 519 regulator-allowed-modes = <0 1>; 520 }; 521 522 // ... 523 524 ldo_vsim2 { 525 regulator-name = "vsim2"; 526 regulator-min-microvolt = <1700000>; 527 regulator-max-microvolt = <3100000>; 528 regulator-enable-ramp-delay = <540>; 529 }; 530 }; 531 532 rtc { 533 compatible = "mediatek,mt6358-rtc"; 534 }; 535 536 keys { 537 compatible = "mediatek,mt6358-keys"; 538 539 power { 540 linux,keycodes = <KEY_POWER>; 541 wakeup-source; 542 }; 543 544 home { 545 linux,keycodes = <KEY_HOME>; 546 }; 547 }; 548 }; 549 550 - | 551 #include <dt-bindings/interrupt-controller/arm-gic.h> 552 553 pmic { 554 compatible = "mediatek,mt6397"; 555 556 interrupt-parent = <&pio>; 557 interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>; 558 interrupt-controller; 559 #interrupt-cells = <2>; 560 561 audio-codec { 562 compatible = "mediatek,mt6397-codec"; 563 }; 564 565 clocks { 566 compatible = "mediatek,mt6397-clk"; 567 #clock-cells = <1>; 568 }; 569 570 pinctrl { 571 compatible = "mediatek,mt6397-pinctrl"; 572 gpio-controller; 573 #gpio-cells = <2>; 574 }; 575 576 regulators { 577 compatible = "mediatek,mt6397-regulator"; 578 579 buck_vpca15 { 580 regulator-name = "vpca15"; 581 regulator-min-microvolt = < 850000>; 582 regulator-max-microvolt = <1350000>; 583 regulator-ramp-delay = <12500>; 584 regulator-enable-ramp-delay = <200>; 585 }; 586 587 // ... 588 589 ldo_vibr { 590 regulator-name = "vibr"; 591 regulator-min-microvolt = <1200000>; 592 regulator-max-microvolt = <3300000>; 593 regulator-enable-ramp-delay = <218>; 594 }; 595 }; 596 597 rtc { 598 compatible = "mediatek,mt6397-rtc"; 599 }; 600 }; 601