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