97 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/power/supply/mediatek,mt6370-charger.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: MediaTek MT6370 Battery Charger8 9maintainers:10 - ChiaEn Wu <chiaen_wu@richtek.com>11 12description: |13 This module is part of the MT6370 MFD device.14 Provides Battery Charger, Boost for OTG devices and BC1.2 detection.15 16properties:17 compatible:18 const: mediatek,mt6370-charger19 20 interrupts:21 description: |22 Specify what irqs are needed to be handled by MT6370 Charger driver.23 We need to use the IRQ "MT6370_IRQ_OVPCTRL_UVP_D" to know when USB24 is plugged in, and then the driver will enable BC1.2 detection.25 After the hardware of MT6370 completes the BC1.2 detection,26 IRQ "MT6370_IRQ_ATTACH" will be triggered, and the driver will know27 the result of BC1.2 detection.28 When the IRQ "MT6370_IRQ_CHG_MIVR" is triggered, it means that the29 hardware enters the "Minimum Input Voltage Regulation loop" and30 a workaround needs to be applied at this time.31 In summary, "MT6370_IRQ_OVPCTRL_UVP_D", "MT6370_IRQ_ATTACH" and32 "MT6370_IRQ_CHG_MIVR" are required in this charger driver.33 items:34 - description: irq of "USB is plugged in"35 - description: irq of "BC1.2 is done"36 - description: irq of "Minimum Input Voltage Regulation loop is active"37 38 interrupt-names:39 items:40 - const: uvp_d_evt41 - const: attach_i42 - const: mivr43 44 io-channels:45 description: |46 Use ADC channel to read VBUS, IBUS, IBAT, etc., info.47 minItems: 148 items:49 - description: |50 VBUS voltage with lower accuracy (+-75mV) but higher measure51 range (1~22V)52 - description: |53 VBUS voltage with higher accuracy (+-30mV) but lower measure54 range (1~9.76V)55 - description: the main system input voltage56 - description: battery voltage57 - description: battery temperature-sense input voltage58 - description: IBUS current (required)59 - description: battery current60 - description: |61 regulated output voltage to supply for the PWM low-side gate driver62 and the bootstrap capacitor63 - description: IC junction temperature64 65 io-channel-names:66 minItems: 167 items:68 - const: vbusdiv569 - const: vbusdiv270 - const: vsys71 - const: vbat72 - const: ts_bat73 - const: ibus74 - const: ibat75 - const: chg_vddp76 - const: temp_jc77 78 usb-otg-vbus-regulator:79 type: object80 description: OTG boost regulator.81 unevaluatedProperties: false82 $ref: /schemas/regulator/regulator.yaml#83 84 properties:85 enable-gpios:86 maxItems: 187 88required:89 - compatible90 - interrupts91 - interrupt-names92 - io-channels93 94additionalProperties: false95 96...97