| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601 |
- # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
- %YAML 1.2
- ---
- $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
- $schema: http://devicetree.org/meta-schemas/core.yaml#
- title: MediaTek MT6397/MT6323 PMIC
- maintainers:
- - Sen Chu <sen.chu@mediatek.com>
- - Macpaul Lin <macpaul.lin@mediatek.com>
- description: |
- MT6397/MT6323 is a power management system chip.
- Please see the sub-modules below for supported features.
- MT6397/MT6323 is a multifunction device with the following sub modules:
- - Regulators
- - RTC
- - ADC
- - Audio codec
- - GPIO
- - Clock
- - LED
- - Keys
- - Power controller
- It is interfaced to host controller using SPI interface by a proprietary hardware
- called PMIC wrapper or pwrap. MT6397/MT6323 PMIC is a child device of pwrap.
- See the following for pwrap node definitions:
- Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
- properties:
- compatible:
- oneOf:
- - enum:
- - mediatek,mt6323
- - mediatek,mt6331 # "mediatek,mt6331" for PMIC MT6331 and MT6332.
- - mediatek,mt6328
- - mediatek,mt6358
- - mediatek,mt6359
- - mediatek,mt6397
- - items:
- - enum:
- - mediatek,mt6366
- - const: mediatek,mt6358
- interrupts:
- maxItems: 1
- interrupt-controller: true
- "#interrupt-cells":
- const: 2
- rtc:
- type: object
- $ref: /schemas/rtc/rtc.yaml#
- unevaluatedProperties: false
- description:
- MT6397 Real Time Clock.
- properties:
- compatible:
- oneOf:
- - enum:
- - mediatek,mt6323-rtc
- - mediatek,mt6331-rtc
- - mediatek,mt6358-rtc
- - mediatek,mt6397-rtc
- - items:
- - enum:
- - mediatek,mt6366-rtc
- - const: mediatek,mt6358-rtc
- start-year: true
- required:
- - compatible
- regulators:
- type: object
- description:
- List of child nodes that specify the regulators.
- additionalProperties: true
- properties:
- compatible:
- oneOf:
- - enum:
- - mediatek,mt6323-regulator
- - mediatek,mt6328-regulator
- - mediatek,mt6331-regulator
- - mediatek,mt6358-regulator
- - mediatek,mt6359-regulator
- - mediatek,mt6397-regulator
- - items:
- - enum:
- - mediatek,mt6366-regulator
- - const: mediatek,mt6358-regulator
- required:
- - compatible
- adc:
- type: object
- $ref: /schemas/iio/adc/mediatek,mt6359-auxadc.yaml#
- unevaluatedProperties: false
- audio-codec:
- type: object
- description:
- Audio codec support with MT6358 and MT6397.
- additionalProperties: true
- properties:
- compatible:
- oneOf:
- - enum:
- - mediatek,mt6358-sound
- - mediatek,mt6359-codec
- - mediatek,mt6397-codec
- - items:
- - enum:
- - mediatek,mt6366-sound
- - const: mediatek,mt6358-sound
- required:
- - compatible
- clocks:
- type: object
- additionalProperties: false
- description:
- This is a clock buffer node for mt6397. However, there are no sub nodes
- or any public document exposed in public.
- properties:
- compatible:
- const: mediatek,mt6397-clk
- '#clock-cells':
- const: 1
- required:
- - compatible
- leds:
- type: object
- additionalProperties: false
- description: |
- MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED
- controllers are defined as the subnode of the function node provided by MT6323
- PMIC controller that is being defined as one kind of Muti-Function Device (MFD)
- using shared bus called PMIC wrapper for each subfunction to access remote
- MT6323 PMIC hardware.
- Each led is represented as a child node of the mediatek,mt6323-led that
- describes the initial behavior for each LED physically and currently only four
- LED child nodes can be supported.
- properties:
- compatible:
- enum:
- - mediatek,mt6323-led
- - mediatek,mt6331-led
- - mediatek,mt6332-led
- reg:
- maxItems: 1
- "#address-cells":
- const: 1
- "#size-cells":
- const: 0
- patternProperties:
- "^led@[0-3]$":
- type: object
- $ref: /schemas/leds/common.yaml#
- unevaluatedProperties: false
- properties:
- reg:
- description:
- LED channel number (0..3)
- minimum: 0
- maximum: 3
- required:
- - reg
- required:
- - compatible
- - "#address-cells"
- - "#size-cells"
- keys:
- type: object
- $ref: /schemas/input/mediatek,pmic-keys.yaml
- unevaluatedProperties: false
- description:
- Power and Home keys.
- power-controller:
- type: object
- additionalProperties: false
- description:
- The power controller which could be found on PMIC is responsible for
- externally powering off or on the remote MediaTek SoC through the
- circuit BBPU (baseband power up).
- properties:
- compatible:
- const: mediatek,mt6323-pwrc
- '#power-domain-cells':
- const: 0
- pinctrl:
- type: object
- $ref: /schemas/pinctrl/mediatek,mt65xx-pinctrl.yaml
- unevaluatedProperties: false
- description:
- Pin controller
- required:
- - compatible
- - regulators
- additionalProperties: false
- examples:
- - |
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- #include <dt-bindings/leds/common.h>
- pmic {
- compatible = "mediatek,mt6323";
- interrupt-parent = <&pio>;
- interrupts = <150 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- leds {
- compatible = "mediatek,mt6323-led";
- #address-cells = <1>;
- #size-cells = <0>;
- };
- regulators {
- compatible = "mediatek,mt6323-regulator";
- buck_vproc {
- regulator-name = "vproc";
- regulator-min-microvolt = < 700000>;
- regulator-max-microvolt = <1350000>;
- regulator-ramp-delay = <12500>;
- regulator-always-on;
- regulator-boot-on;
- };
- buck_vsys {
- regulator-name = "vsys";
- regulator-min-microvolt = <1400000>;
- regulator-max-microvolt = <2987500>;
- regulator-ramp-delay = <25000>;
- regulator-always-on;
- regulator-boot-on;
- };
- buck_vpa {
- regulator-name = "vpa";
- regulator-min-microvolt = < 500000>;
- regulator-max-microvolt = <3650000>;
- };
- ldo_vtcxo {
- regulator-name = "vtcxo";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- regulator-enable-ramp-delay = <90>;
- regulator-always-on;
- regulator-boot-on;
- };
- ldo_vcn28 {
- regulator-name = "vcn28";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- regulator-enable-ramp-delay = <185>;
- };
- ldo_vcn33_bt {
- regulator-name = "vcn33_bt";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3600000>;
- regulator-enable-ramp-delay = <185>;
- };
- ldo_vcn33_wifi {
- regulator-name = "vcn33_wifi";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3600000>;
- regulator-enable-ramp-delay = <185>;
- };
- ldo_va {
- regulator-name = "va";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- regulator-enable-ramp-delay = <216>;
- regulator-always-on;
- regulator-boot-on;
- };
- ldo_vcama {
- regulator-name = "vcama";
- regulator-min-microvolt = <1500000>;
- regulator-max-microvolt = <2800000>;
- regulator-enable-ramp-delay = <216>;
- };
- ldo_vio28 {
- regulator-name = "vio28";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- regulator-enable-ramp-delay = <216>;
- regulator-always-on;
- regulator-boot-on;
- };
- ldo_vusb {
- regulator-name = "vusb";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-enable-ramp-delay = <216>;
- regulator-boot-on;
- };
- ldo_vmc {
- regulator-name = "vmc";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3300000>;
- regulator-enable-ramp-delay = <36>;
- regulator-boot-on;
- };
- ldo_vmch {
- regulator-name = "vmch";
- regulator-min-microvolt = <3000000>;
- regulator-max-microvolt = <3300000>;
- regulator-enable-ramp-delay = <36>;
- regulator-boot-on;
- };
- ldo_vemc3v3 {
- regulator-name = "vemc3v3";
- regulator-min-microvolt = <3000000>;
- regulator-max-microvolt = <3300000>;
- regulator-enable-ramp-delay = <36>;
- regulator-boot-on;
- };
- ldo_vgp1 {
- regulator-name = "vgp1";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <3300000>;
- regulator-enable-ramp-delay = <216>;
- };
- ldo_vgp2 {
- regulator-name = "vgp2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <3000000>;
- regulator-enable-ramp-delay = <216>;
- };
- ldo_vgp3 {
- regulator-name = "vgp3";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1800000>;
- regulator-enable-ramp-delay = <216>;
- };
- ldo_vcn18 {
- regulator-name = "vcn18";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-enable-ramp-delay = <216>;
- };
- ldo_vsim1 {
- regulator-name = "vsim1";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3000000>;
- regulator-enable-ramp-delay = <216>;
- };
- ldo_vsim2 {
- regulator-name = "vsim2";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3000000>;
- regulator-enable-ramp-delay = <216>;
- };
- ldo_vrtc {
- regulator-name = "vrtc";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- regulator-always-on;
- regulator-boot-on;
- };
- ldo_vcamaf {
- regulator-name = "vcamaf";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <3300000>;
- regulator-enable-ramp-delay = <216>;
- };
- ldo_vibr {
- regulator-name = "vibr";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <3300000>;
- regulator-enable-ramp-delay = <36>;
- };
- ldo_vrf18 {
- regulator-name = "vrf18";
- regulator-min-microvolt = <1825000>;
- regulator-max-microvolt = <1825000>;
- regulator-enable-ramp-delay = <187>;
- };
- ldo_vm {
- regulator-name = "vm";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1800000>;
- regulator-enable-ramp-delay = <216>;
- regulator-always-on;
- regulator-boot-on;
- };
- ldo_vio18 {
- regulator-name = "vio18";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-enable-ramp-delay = <216>;
- regulator-always-on;
- regulator-boot-on;
- };
- ldo_vcamd {
- regulator-name = "vcamd";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1800000>;
- regulator-enable-ramp-delay = <216>;
- };
- ldo_vcamio {
- regulator-name = "vcamio";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-enable-ramp-delay = <216>;
- };
- };
- keys {
- compatible = "mediatek,mt6323-keys";
- mediatek,long-press-mode = <1>;
- power-off-time-sec = <0>;
- power {
- linux,keycodes = <116>;
- wakeup-source;
- };
- home {
- linux,keycodes = <114>;
- };
- };
- power-controller {
- compatible = "mediatek,mt6323-pwrc";
- #power-domain-cells = <0>;
- };
- rtc {
- compatible = "mediatek,mt6323-rtc";
- };
- };
- - |
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- pmic {
- compatible = "mediatek,mt6358";
- interrupt-controller;
- #interrupt-cells = <2>;
- audio-codec {
- compatible = "mediatek,mt6358-sound";
- Avdd-supply = <&mt6358_vaud28_reg>;
- mediatek,dmic-mode = <0>;
- };
- regulators {
- compatible = "mediatek,mt6358-regulator";
- buck_vdram1 {
- regulator-name = "vdram1";
- regulator-min-microvolt = <500000>;
- regulator-max-microvolt = <2087500>;
- regulator-ramp-delay = <12500>;
- regulator-enable-ramp-delay = <0>;
- regulator-always-on;
- regulator-allowed-modes = <0 1>;
- };
- // ...
- ldo_vsim2 {
- regulator-name = "vsim2";
- regulator-min-microvolt = <1700000>;
- regulator-max-microvolt = <3100000>;
- regulator-enable-ramp-delay = <540>;
- };
- };
- rtc {
- compatible = "mediatek,mt6358-rtc";
- };
- keys {
- compatible = "mediatek,mt6358-keys";
- power {
- linux,keycodes = <KEY_POWER>;
- wakeup-source;
- };
- home {
- linux,keycodes = <KEY_HOME>;
- };
- };
- };
- - |
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- pmic {
- compatible = "mediatek,mt6397";
- interrupt-parent = <&pio>;
- interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- audio-codec {
- compatible = "mediatek,mt6397-codec";
- };
- clocks {
- compatible = "mediatek,mt6397-clk";
- #clock-cells = <1>;
- };
- pinctrl {
- compatible = "mediatek,mt6397-pinctrl";
- gpio-controller;
- #gpio-cells = <2>;
- };
- regulators {
- compatible = "mediatek,mt6397-regulator";
- buck_vpca15 {
- regulator-name = "vpca15";
- regulator-min-microvolt = < 850000>;
- regulator-max-microvolt = <1350000>;
- regulator-ramp-delay = <12500>;
- regulator-enable-ramp-delay = <200>;
- };
- // ...
- ldo_vibr {
- regulator-name = "vibr";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <3300000>;
- regulator-enable-ramp-delay = <218>;
- };
- };
- rtc {
- compatible = "mediatek,mt6397-rtc";
- };
- };
|