| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
- %YAML 1.2
- ---
- $id: http://devicetree.org/schemas/mfd/mediatek,mt6370.yaml#
- $schema: http://devicetree.org/meta-schemas/core.yaml#
- title: MediaTek MT6370 SubPMIC
- maintainers:
- - ChiYuan Huang <cy_huang@richtek.com>
- description: |
- MT6370 is a highly-integrated smart power management IC, which includes a
- single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C &
- Power Delivery (PD) controller, dual flash LED current sources, a RGB LED
- driver, a backlight WLED driver, a display bias driver and a general LDO for
- portable devices.
- properties:
- compatible:
- const: mediatek,mt6370
- reg:
- maxItems: 1
- wakeup-source: true
- interrupts:
- maxItems: 1
- interrupt-controller: true
- "#interrupt-cells":
- const: 1
- adc:
- type: object
- additionalProperties: false
- description: |
- Provides 9 channels for system monitoring, including VBUSDIV5 (lower
- accuracy, higher measure range), VBUSDIV2 (higher accuracy, lower
- measure range), VBAT, VSYS, CHG_VDDP, TS_BAT, IBUS, IBAT, and TEMP_JC.
- properties:
- compatible:
- const: mediatek,mt6370-adc
- "#io-channel-cells":
- const: 1
- required:
- - compatible
- - "#io-channel-cells"
- backlight:
- type: object
- $ref: /schemas/leds/backlight/mediatek,mt6370-backlight.yaml#
- charger:
- type: object
- $ref: /schemas/power/supply/mediatek,mt6370-charger.yaml#
- tcpc:
- type: object
- $ref: /schemas/usb/mediatek,mt6370-tcpc.yaml#
- indicator:
- type: object
- $ref: /schemas/leds/mediatek,mt6370-indicator.yaml#
- flashlight:
- type: object
- $ref: /schemas/leds/mediatek,mt6370-flashlight.yaml#
- regulators:
- type: object
- additionalProperties: false
- description: |
- List all supported regulators, which support the control for DisplayBias
- voltages and one general purpose LDO which commonly used to drive the
- vibrator.
- patternProperties:
- "^(dsvbst|vibldo)$":
- $ref: /schemas/regulator/regulator.yaml#
- type: object
- unevaluatedProperties: false
- "^(dsvpos|dsvneg)$":
- $ref: /schemas/regulator/regulator.yaml#
- type: object
- unevaluatedProperties: false
- properties:
- enable-gpios:
- maxItems: 1
- required:
- - compatible
- - reg
- - interrupts
- - interrupt-controller
- - "#interrupt-cells"
- - regulators
- - adc
- - backlight
- - indicator
- - tcpc
- - charger
- - flashlight
- additionalProperties: false
- examples:
- - |
- #include <dt-bindings/interrupt-controller/irq.h>
- #include <dt-bindings/leds/common.h>
- #include <dt-bindings/iio/adc/mediatek,mt6370_adc.h>
- #include <dt-bindings/usb/pd.h>
- i2c {
- #address-cells = <1>;
- #size-cells = <0>;
- pmic@34 {
- compatible = "mediatek,mt6370";
- reg = <0x34>;
- wakeup-source;
- interrupts-extended = <&gpio26 3 IRQ_TYPE_LEVEL_LOW>;
- interrupt-controller;
- #interrupt-cells = <1>;
- mt6370_adc: adc {
- compatible = "mediatek,mt6370-adc";
- #io-channel-cells = <1>;
- };
- backlight {
- compatible = "mediatek,mt6370-backlight";
- mediatek,bled-channel-use = /bits/ 8 <15>;
- };
- charger {
- compatible = "mediatek,mt6370-charger";
- interrupts = <68>, <48>, <6>;
- interrupt-names = "uvp_d_evt", "attach_i", "mivr";
- io-channels = <&mt6370_adc MT6370_CHAN_IBUS>;
- mt6370_otg_vbus: usb-otg-vbus-regulator {
- regulator-name = "mt6370-usb-otg-vbus";
- regulator-min-microvolt = <4350000>;
- regulator-max-microvolt = <5800000>;
- regulator-min-microamp = <500000>;
- regulator-max-microamp = <3000000>;
- };
- };
- indicator {
- compatible = "mediatek,mt6370-indicator";
- #address-cells = <1>;
- #size-cells = <0>;
- multi-led@0 {
- reg = <0>;
- function = LED_FUNCTION_INDICATOR;
- color = <LED_COLOR_ID_RGB>;
- led-max-microamp = <24000>;
- #address-cells = <1>;
- #size-cells = <0>;
- led@0 {
- reg = <0>;
- color = <LED_COLOR_ID_RED>;
- };
- led@1 {
- reg = <1>;
- color = <LED_COLOR_ID_GREEN>;
- };
- led@2 {
- reg = <2>;
- color = <LED_COLOR_ID_BLUE>;
- };
- };
- led@3 {
- reg = <3>;
- function = LED_FUNCTION_INDICATOR;
- color = <LED_COLOR_ID_WHITE>;
- led-max-microamp = <6000>;
- };
- };
- flashlight {
- compatible = "mediatek,mt6370-flashlight";
- #address-cells = <1>;
- #size-cells = <0>;
- led@0 {
- reg = <0>;
- led-sources = <0>;
- function = LED_FUNCTION_FLASH;
- color = <LED_COLOR_ID_WHITE>;
- function-enumerator = <1>;
- led-max-microamp = <200000>;
- flash-max-microamp = <500000>;
- flash-max-timeout-us = <1248000>;
- };
- led@1 {
- reg = <1>;
- led-sources = <1>;
- function = LED_FUNCTION_FLASH;
- color = <LED_COLOR_ID_WHITE>;
- function-enumerator = <2>;
- led-max-microamp = <200000>;
- flash-max-microamp = <500000>;
- flash-max-timeout-us = <1248000>;
- };
- };
- tcpc {
- compatible = "mediatek,mt6370-tcpc";
- interrupts-extended = <&gpio26 4 IRQ_TYPE_LEVEL_LOW>;
- connector {
- compatible = "usb-c-connector";
- label = "USB-C";
- vbus-supply = <&mt6370_otg_vbus>;
- data-role = "dual";
- power-role = "dual";
- try-power-role = "sink";
- source-pdos = <PDO_FIXED(5000, 1000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
- sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
- op-sink-microwatt = <10000000>;
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>;
- endpoint {
- remote-endpoint = <&usb_hs>;
- };
- };
- port@1 {
- reg = <1>;
- endpoint {
- remote-endpoint = <&usb_ss>;
- };
- };
- port@2 {
- reg = <2>;
- endpoint {
- remote-endpoint = <&dp_aux>;
- };
- };
- };
- };
- };
- regulators {
- dsvbst {
- regulator-name = "mt6370-dsv-vbst";
- regulator-min-microvolt = <4000000>;
- regulator-max-microvolt = <6200000>;
- };
- dsvpos {
- regulator-name = "mt6370-dsv-vpos";
- regulator-min-microvolt = <4000000>;
- regulator-max-microvolt = <6000000>;
- regulator-boot-on;
- };
- dsvneg {
- regulator-name = "mt6370-dsv-vneg";
- regulator-min-microvolt = <4000000>;
- regulator-max-microvolt = <6000000>;
- regulator-boot-on;
- };
- vibldo {
- regulator-name = "mt6370-vib-ldo";
- regulator-min-microvolt = <1600000>;
- regulator-max-microvolt = <4000000>;
- };
- };
- };
- };
|