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