17ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 27ef62cebSEmmanuel Vadot%YAML 1.2 37ef62cebSEmmanuel Vadot--- 47ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/mediatek,mt6370.yaml# 57ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 67ef62cebSEmmanuel Vadot 77ef62cebSEmmanuel Vadottitle: MediaTek MT6370 SubPMIC 87ef62cebSEmmanuel Vadot 97ef62cebSEmmanuel Vadotmaintainers: 107ef62cebSEmmanuel Vadot - ChiYuan Huang <cy_huang@richtek.com> 117ef62cebSEmmanuel Vadot 127ef62cebSEmmanuel Vadotdescription: | 137ef62cebSEmmanuel Vadot MT6370 is a highly-integrated smart power management IC, which includes a 147ef62cebSEmmanuel Vadot single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C & 157ef62cebSEmmanuel Vadot Power Delivery (PD) controller, dual flash LED current sources, a RGB LED 167ef62cebSEmmanuel Vadot driver, a backlight WLED driver, a display bias driver and a general LDO for 177ef62cebSEmmanuel Vadot portable devices. 187ef62cebSEmmanuel Vadot 197ef62cebSEmmanuel Vadotproperties: 207ef62cebSEmmanuel Vadot compatible: 217ef62cebSEmmanuel Vadot const: mediatek,mt6370 227ef62cebSEmmanuel Vadot 237ef62cebSEmmanuel Vadot reg: 247ef62cebSEmmanuel Vadot maxItems: 1 257ef62cebSEmmanuel Vadot 267ef62cebSEmmanuel Vadot wakeup-source: true 277ef62cebSEmmanuel Vadot 287ef62cebSEmmanuel Vadot interrupts: 297ef62cebSEmmanuel Vadot maxItems: 1 307ef62cebSEmmanuel Vadot 317ef62cebSEmmanuel Vadot interrupt-controller: true 327ef62cebSEmmanuel Vadot 337ef62cebSEmmanuel Vadot "#interrupt-cells": 347ef62cebSEmmanuel Vadot const: 1 357ef62cebSEmmanuel Vadot 367ef62cebSEmmanuel Vadot adc: 377ef62cebSEmmanuel Vadot type: object 38*fac71e4eSEmmanuel Vadot additionalProperties: false 397ef62cebSEmmanuel Vadot description: | 407ef62cebSEmmanuel Vadot Provides 9 channels for system monitoring, including VBUSDIV5 (lower 417ef62cebSEmmanuel Vadot accuracy, higher measure range), VBUSDIV2 (higher accuracy, lower 427ef62cebSEmmanuel Vadot measure range), VBAT, VSYS, CHG_VDDP, TS_BAT, IBUS, IBAT, and TEMP_JC. 437ef62cebSEmmanuel Vadot 447ef62cebSEmmanuel Vadot properties: 457ef62cebSEmmanuel Vadot compatible: 467ef62cebSEmmanuel Vadot const: mediatek,mt6370-adc 477ef62cebSEmmanuel Vadot 487ef62cebSEmmanuel Vadot "#io-channel-cells": 497ef62cebSEmmanuel Vadot const: 1 507ef62cebSEmmanuel Vadot 517ef62cebSEmmanuel Vadot required: 527ef62cebSEmmanuel Vadot - compatible 537ef62cebSEmmanuel Vadot - "#io-channel-cells" 547ef62cebSEmmanuel Vadot 557ef62cebSEmmanuel Vadot backlight: 567ef62cebSEmmanuel Vadot type: object 577ef62cebSEmmanuel Vadot $ref: /schemas/leds/backlight/mediatek,mt6370-backlight.yaml# 587ef62cebSEmmanuel Vadot 597ef62cebSEmmanuel Vadot charger: 607ef62cebSEmmanuel Vadot type: object 617ef62cebSEmmanuel Vadot $ref: /schemas/power/supply/mediatek,mt6370-charger.yaml# 627ef62cebSEmmanuel Vadot 637ef62cebSEmmanuel Vadot tcpc: 647ef62cebSEmmanuel Vadot type: object 657ef62cebSEmmanuel Vadot $ref: /schemas/usb/mediatek,mt6370-tcpc.yaml# 667ef62cebSEmmanuel Vadot 677ef62cebSEmmanuel Vadot indicator: 687ef62cebSEmmanuel Vadot type: object 697ef62cebSEmmanuel Vadot $ref: /schemas/leds/mediatek,mt6370-indicator.yaml# 707ef62cebSEmmanuel Vadot 717ef62cebSEmmanuel Vadot flashlight: 727ef62cebSEmmanuel Vadot type: object 737ef62cebSEmmanuel Vadot $ref: /schemas/leds/mediatek,mt6370-flashlight.yaml# 747ef62cebSEmmanuel Vadot 757ef62cebSEmmanuel Vadot regulators: 767ef62cebSEmmanuel Vadot type: object 77*fac71e4eSEmmanuel Vadot additionalProperties: false 787ef62cebSEmmanuel Vadot description: | 797ef62cebSEmmanuel Vadot List all supported regulators, which support the control for DisplayBias 807ef62cebSEmmanuel Vadot voltages and one general purpose LDO which commonly used to drive the 817ef62cebSEmmanuel Vadot vibrator. 827ef62cebSEmmanuel Vadot 837ef62cebSEmmanuel Vadot patternProperties: 847ef62cebSEmmanuel Vadot "^(dsvbst|vibldo)$": 857ef62cebSEmmanuel Vadot $ref: /schemas/regulator/regulator.yaml# 867ef62cebSEmmanuel Vadot type: object 877ef62cebSEmmanuel Vadot unevaluatedProperties: false 887ef62cebSEmmanuel Vadot 897ef62cebSEmmanuel Vadot "^(dsvpos|dsvneg)$": 907ef62cebSEmmanuel Vadot $ref: /schemas/regulator/regulator.yaml# 917ef62cebSEmmanuel Vadot type: object 927ef62cebSEmmanuel Vadot unevaluatedProperties: false 937ef62cebSEmmanuel Vadot 947ef62cebSEmmanuel Vadot properties: 957ef62cebSEmmanuel Vadot enable-gpios: 967ef62cebSEmmanuel Vadot maxItems: 1 977ef62cebSEmmanuel Vadot 987ef62cebSEmmanuel Vadotrequired: 997ef62cebSEmmanuel Vadot - compatible 1007ef62cebSEmmanuel Vadot - reg 1017ef62cebSEmmanuel Vadot - interrupts 1027ef62cebSEmmanuel Vadot - interrupt-controller 1037ef62cebSEmmanuel Vadot - "#interrupt-cells" 1047ef62cebSEmmanuel Vadot - regulators 1057ef62cebSEmmanuel Vadot - adc 1067ef62cebSEmmanuel Vadot - backlight 1077ef62cebSEmmanuel Vadot - indicator 1087ef62cebSEmmanuel Vadot - tcpc 1097ef62cebSEmmanuel Vadot - charger 1107ef62cebSEmmanuel Vadot - flashlight 1117ef62cebSEmmanuel Vadot 1127ef62cebSEmmanuel VadotadditionalProperties: false 1137ef62cebSEmmanuel Vadot 1147ef62cebSEmmanuel Vadotexamples: 1157ef62cebSEmmanuel Vadot - | 1167ef62cebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 1177ef62cebSEmmanuel Vadot #include <dt-bindings/leds/common.h> 1187ef62cebSEmmanuel Vadot #include <dt-bindings/iio/adc/mediatek,mt6370_adc.h> 1197ef62cebSEmmanuel Vadot #include <dt-bindings/usb/pd.h> 1207ef62cebSEmmanuel Vadot i2c { 1217ef62cebSEmmanuel Vadot #address-cells = <1>; 1227ef62cebSEmmanuel Vadot #size-cells = <0>; 1237ef62cebSEmmanuel Vadot 1247ef62cebSEmmanuel Vadot pmic@34 { 1257ef62cebSEmmanuel Vadot compatible = "mediatek,mt6370"; 1267ef62cebSEmmanuel Vadot reg = <0x34>; 1277ef62cebSEmmanuel Vadot wakeup-source; 1287ef62cebSEmmanuel Vadot interrupts-extended = <&gpio26 3 IRQ_TYPE_LEVEL_LOW>; 1297ef62cebSEmmanuel Vadot interrupt-controller; 1307ef62cebSEmmanuel Vadot #interrupt-cells = <1>; 1317ef62cebSEmmanuel Vadot 1327ef62cebSEmmanuel Vadot mt6370_adc: adc { 1337ef62cebSEmmanuel Vadot compatible = "mediatek,mt6370-adc"; 1347ef62cebSEmmanuel Vadot #io-channel-cells = <1>; 1357ef62cebSEmmanuel Vadot }; 1367ef62cebSEmmanuel Vadot 1377ef62cebSEmmanuel Vadot backlight { 1387ef62cebSEmmanuel Vadot compatible = "mediatek,mt6370-backlight"; 1397ef62cebSEmmanuel Vadot mediatek,bled-channel-use = /bits/ 8 <15>; 1407ef62cebSEmmanuel Vadot }; 1417ef62cebSEmmanuel Vadot 1427ef62cebSEmmanuel Vadot charger { 1437ef62cebSEmmanuel Vadot compatible = "mediatek,mt6370-charger"; 1447ef62cebSEmmanuel Vadot interrupts = <68>, <48>, <6>; 1457ef62cebSEmmanuel Vadot interrupt-names = "uvp_d_evt", "attach_i", "mivr"; 1467ef62cebSEmmanuel Vadot io-channels = <&mt6370_adc MT6370_CHAN_IBUS>; 1477ef62cebSEmmanuel Vadot 1487ef62cebSEmmanuel Vadot mt6370_otg_vbus: usb-otg-vbus-regulator { 1497ef62cebSEmmanuel Vadot regulator-name = "mt6370-usb-otg-vbus"; 1507ef62cebSEmmanuel Vadot regulator-min-microvolt = <4350000>; 1517ef62cebSEmmanuel Vadot regulator-max-microvolt = <5800000>; 1527ef62cebSEmmanuel Vadot regulator-min-microamp = <500000>; 1537ef62cebSEmmanuel Vadot regulator-max-microamp = <3000000>; 1547ef62cebSEmmanuel Vadot }; 1557ef62cebSEmmanuel Vadot }; 1567ef62cebSEmmanuel Vadot 1577ef62cebSEmmanuel Vadot indicator { 1587ef62cebSEmmanuel Vadot compatible = "mediatek,mt6370-indicator"; 1597ef62cebSEmmanuel Vadot #address-cells = <1>; 1607ef62cebSEmmanuel Vadot #size-cells = <0>; 1617ef62cebSEmmanuel Vadot 1627ef62cebSEmmanuel Vadot multi-led@0 { 1637ef62cebSEmmanuel Vadot reg = <0>; 1647ef62cebSEmmanuel Vadot function = LED_FUNCTION_INDICATOR; 1657ef62cebSEmmanuel Vadot color = <LED_COLOR_ID_RGB>; 1667ef62cebSEmmanuel Vadot led-max-microamp = <24000>; 1677ef62cebSEmmanuel Vadot #address-cells = <1>; 1687ef62cebSEmmanuel Vadot #size-cells = <0>; 1697ef62cebSEmmanuel Vadot led@0 { 1707ef62cebSEmmanuel Vadot reg = <0>; 1717ef62cebSEmmanuel Vadot color = <LED_COLOR_ID_RED>; 1727ef62cebSEmmanuel Vadot }; 1737ef62cebSEmmanuel Vadot led@1 { 1747ef62cebSEmmanuel Vadot reg = <1>; 1757ef62cebSEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 1767ef62cebSEmmanuel Vadot }; 1777ef62cebSEmmanuel Vadot led@2 { 1787ef62cebSEmmanuel Vadot reg = <2>; 1797ef62cebSEmmanuel Vadot color = <LED_COLOR_ID_BLUE>; 1807ef62cebSEmmanuel Vadot }; 1817ef62cebSEmmanuel Vadot }; 1827ef62cebSEmmanuel Vadot led@3 { 1837ef62cebSEmmanuel Vadot reg = <3>; 1847ef62cebSEmmanuel Vadot function = LED_FUNCTION_INDICATOR; 1857ef62cebSEmmanuel Vadot color = <LED_COLOR_ID_WHITE>; 1867ef62cebSEmmanuel Vadot led-max-microamp = <6000>; 1877ef62cebSEmmanuel Vadot }; 1887ef62cebSEmmanuel Vadot }; 1897ef62cebSEmmanuel Vadot 1907ef62cebSEmmanuel Vadot flashlight { 1917ef62cebSEmmanuel Vadot compatible = "mediatek,mt6370-flashlight"; 1927ef62cebSEmmanuel Vadot #address-cells = <1>; 1937ef62cebSEmmanuel Vadot #size-cells = <0>; 1947ef62cebSEmmanuel Vadot led@0 { 1957ef62cebSEmmanuel Vadot reg = <0>; 1967ef62cebSEmmanuel Vadot led-sources = <0>; 1977ef62cebSEmmanuel Vadot function = LED_FUNCTION_FLASH; 1987ef62cebSEmmanuel Vadot color = <LED_COLOR_ID_WHITE>; 1997ef62cebSEmmanuel Vadot function-enumerator = <1>; 2007ef62cebSEmmanuel Vadot led-max-microamp = <200000>; 2017ef62cebSEmmanuel Vadot flash-max-microamp = <500000>; 2027ef62cebSEmmanuel Vadot flash-max-timeout-us = <1248000>; 2037ef62cebSEmmanuel Vadot }; 2047ef62cebSEmmanuel Vadot led@1 { 2057ef62cebSEmmanuel Vadot reg = <1>; 2067ef62cebSEmmanuel Vadot led-sources = <1>; 2077ef62cebSEmmanuel Vadot function = LED_FUNCTION_FLASH; 2087ef62cebSEmmanuel Vadot color = <LED_COLOR_ID_WHITE>; 2097ef62cebSEmmanuel Vadot function-enumerator = <2>; 2107ef62cebSEmmanuel Vadot led-max-microamp = <200000>; 2117ef62cebSEmmanuel Vadot flash-max-microamp = <500000>; 2127ef62cebSEmmanuel Vadot flash-max-timeout-us = <1248000>; 2137ef62cebSEmmanuel Vadot }; 2147ef62cebSEmmanuel Vadot }; 2157ef62cebSEmmanuel Vadot 2167ef62cebSEmmanuel Vadot tcpc { 2177ef62cebSEmmanuel Vadot compatible = "mediatek,mt6370-tcpc"; 2187ef62cebSEmmanuel Vadot interrupts-extended = <&gpio26 4 IRQ_TYPE_LEVEL_LOW>; 2197ef62cebSEmmanuel Vadot 2207ef62cebSEmmanuel Vadot connector { 2217ef62cebSEmmanuel Vadot compatible = "usb-c-connector"; 2227ef62cebSEmmanuel Vadot label = "USB-C"; 2237ef62cebSEmmanuel Vadot vbus-supply = <&mt6370_otg_vbus>; 2247ef62cebSEmmanuel Vadot data-role = "dual"; 2257ef62cebSEmmanuel Vadot power-role = "dual"; 2267ef62cebSEmmanuel Vadot try-power-role = "sink"; 2277ef62cebSEmmanuel Vadot source-pdos = <PDO_FIXED(5000, 1000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>; 2287ef62cebSEmmanuel Vadot sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>; 2297ef62cebSEmmanuel Vadot op-sink-microwatt = <10000000>; 2307ef62cebSEmmanuel Vadot 2317ef62cebSEmmanuel Vadot ports { 2327ef62cebSEmmanuel Vadot #address-cells = <1>; 2337ef62cebSEmmanuel Vadot #size-cells = <0>; 2347ef62cebSEmmanuel Vadot 2357ef62cebSEmmanuel Vadot port@0 { 2367ef62cebSEmmanuel Vadot reg = <0>; 2377ef62cebSEmmanuel Vadot endpoint { 2387ef62cebSEmmanuel Vadot remote-endpoint = <&usb_hs>; 2397ef62cebSEmmanuel Vadot }; 2407ef62cebSEmmanuel Vadot }; 2417ef62cebSEmmanuel Vadot port@1 { 2427ef62cebSEmmanuel Vadot reg = <1>; 2437ef62cebSEmmanuel Vadot endpoint { 2447ef62cebSEmmanuel Vadot remote-endpoint = <&usb_ss>; 2457ef62cebSEmmanuel Vadot }; 2467ef62cebSEmmanuel Vadot }; 2477ef62cebSEmmanuel Vadot port@2 { 2487ef62cebSEmmanuel Vadot reg = <2>; 2497ef62cebSEmmanuel Vadot endpoint { 2507ef62cebSEmmanuel Vadot remote-endpoint = <&dp_aux>; 2517ef62cebSEmmanuel Vadot }; 2527ef62cebSEmmanuel Vadot }; 2537ef62cebSEmmanuel Vadot }; 2547ef62cebSEmmanuel Vadot }; 2557ef62cebSEmmanuel Vadot }; 2567ef62cebSEmmanuel Vadot 2577ef62cebSEmmanuel Vadot regulators { 2587ef62cebSEmmanuel Vadot dsvbst { 2597ef62cebSEmmanuel Vadot regulator-name = "mt6370-dsv-vbst"; 2607ef62cebSEmmanuel Vadot regulator-min-microvolt = <4000000>; 2617ef62cebSEmmanuel Vadot regulator-max-microvolt = <6200000>; 2627ef62cebSEmmanuel Vadot }; 2637ef62cebSEmmanuel Vadot dsvpos { 2647ef62cebSEmmanuel Vadot regulator-name = "mt6370-dsv-vpos"; 2657ef62cebSEmmanuel Vadot regulator-min-microvolt = <4000000>; 2667ef62cebSEmmanuel Vadot regulator-max-microvolt = <6000000>; 2677ef62cebSEmmanuel Vadot regulator-boot-on; 2687ef62cebSEmmanuel Vadot }; 2697ef62cebSEmmanuel Vadot dsvneg { 2707ef62cebSEmmanuel Vadot regulator-name = "mt6370-dsv-vneg"; 2717ef62cebSEmmanuel Vadot regulator-min-microvolt = <4000000>; 2727ef62cebSEmmanuel Vadot regulator-max-microvolt = <6000000>; 2737ef62cebSEmmanuel Vadot regulator-boot-on; 2747ef62cebSEmmanuel Vadot }; 2757ef62cebSEmmanuel Vadot vibldo { 2767ef62cebSEmmanuel Vadot regulator-name = "mt6370-vib-ldo"; 2777ef62cebSEmmanuel Vadot regulator-min-microvolt = <1600000>; 2787ef62cebSEmmanuel Vadot regulator-max-microvolt = <4000000>; 2797ef62cebSEmmanuel Vadot }; 2807ef62cebSEmmanuel Vadot }; 2817ef62cebSEmmanuel Vadot }; 2827ef62cebSEmmanuel Vadot }; 283