162306a36Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 262306a36Sopenharmony_ci%YAML 1.2 362306a36Sopenharmony_ci--- 462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/power/supply/mediatek,mt6370-charger.yaml# 562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 662306a36Sopenharmony_ci 762306a36Sopenharmony_cititle: MediaTek MT6370 Battery Charger 862306a36Sopenharmony_ci 962306a36Sopenharmony_cimaintainers: 1062306a36Sopenharmony_ci - ChiaEn Wu <chiaen_wu@richtek.com> 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_cidescription: | 1362306a36Sopenharmony_ci This module is part of the MT6370 MFD device. 1462306a36Sopenharmony_ci Provides Battery Charger, Boost for OTG devices and BC1.2 detection. 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ciproperties: 1762306a36Sopenharmony_ci compatible: 1862306a36Sopenharmony_ci const: mediatek,mt6370-charger 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci interrupts: 2162306a36Sopenharmony_ci description: | 2262306a36Sopenharmony_ci Specify what irqs are needed to be handled by MT6370 Charger driver. 2362306a36Sopenharmony_ci We need to use the IRQ "MT6370_IRQ_OVPCTRL_UVP_D" to know when USB 2462306a36Sopenharmony_ci is plugged in, and then the driver will enable BC1.2 detection. 2562306a36Sopenharmony_ci After the hardware of MT6370 completes the BC1.2 detection, 2662306a36Sopenharmony_ci IRQ "MT6370_IRQ_ATTACH" will be triggered, and the driver will know 2762306a36Sopenharmony_ci the result of BC1.2 detection. 2862306a36Sopenharmony_ci When the IRQ "MT6370_IRQ_CHG_MIVR" is triggered, it means that the 2962306a36Sopenharmony_ci hardware enters the "Minimum Input Voltage Regulation loop" and 3062306a36Sopenharmony_ci a workaround needs to be applied at this time. 3162306a36Sopenharmony_ci In summary, "MT6370_IRQ_OVPCTRL_UVP_D", "MT6370_IRQ_ATTACH" and 3262306a36Sopenharmony_ci "MT6370_IRQ_CHG_MIVR" are required in this charger driver. 3362306a36Sopenharmony_ci items: 3462306a36Sopenharmony_ci - description: irq of "USB is plugged in" 3562306a36Sopenharmony_ci - description: irq of "BC1.2 is done" 3662306a36Sopenharmony_ci - description: irq of "Minimum Input Voltage Regulation loop is active" 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci interrupt-names: 3962306a36Sopenharmony_ci items: 4062306a36Sopenharmony_ci - const: uvp_d_evt 4162306a36Sopenharmony_ci - const: attach_i 4262306a36Sopenharmony_ci - const: mivr 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci io-channels: 4562306a36Sopenharmony_ci description: | 4662306a36Sopenharmony_ci Use ADC channel to read VBUS, IBUS, IBAT, etc., info. 4762306a36Sopenharmony_ci minItems: 1 4862306a36Sopenharmony_ci items: 4962306a36Sopenharmony_ci - description: | 5062306a36Sopenharmony_ci VBUS voltage with lower accuracy (+-75mV) but higher measure 5162306a36Sopenharmony_ci range (1~22V) 5262306a36Sopenharmony_ci - description: | 5362306a36Sopenharmony_ci VBUS voltage with higher accuracy (+-30mV) but lower measure 5462306a36Sopenharmony_ci range (1~9.76V) 5562306a36Sopenharmony_ci - description: the main system input voltage 5662306a36Sopenharmony_ci - description: battery voltage 5762306a36Sopenharmony_ci - description: battery temperature-sense input voltage 5862306a36Sopenharmony_ci - description: IBUS current (required) 5962306a36Sopenharmony_ci - description: battery current 6062306a36Sopenharmony_ci - description: | 6162306a36Sopenharmony_ci regulated output voltage to supply for the PWM low-side gate driver 6262306a36Sopenharmony_ci and the bootstrap capacitor 6362306a36Sopenharmony_ci - description: IC junction temperature 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci io-channel-names: 6662306a36Sopenharmony_ci minItems: 1 6762306a36Sopenharmony_ci items: 6862306a36Sopenharmony_ci - const: vbusdiv5 6962306a36Sopenharmony_ci - const: vbusdiv2 7062306a36Sopenharmony_ci - const: vsys 7162306a36Sopenharmony_ci - const: vbat 7262306a36Sopenharmony_ci - const: ts_bat 7362306a36Sopenharmony_ci - const: ibus 7462306a36Sopenharmony_ci - const: ibat 7562306a36Sopenharmony_ci - const: chg_vddp 7662306a36Sopenharmony_ci - const: temp_jc 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci usb-otg-vbus-regulator: 7962306a36Sopenharmony_ci type: object 8062306a36Sopenharmony_ci description: OTG boost regulator. 8162306a36Sopenharmony_ci unevaluatedProperties: false 8262306a36Sopenharmony_ci $ref: /schemas/regulator/regulator.yaml# 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci properties: 8562306a36Sopenharmony_ci enable-gpios: 8662306a36Sopenharmony_ci maxItems: 1 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_cirequired: 8962306a36Sopenharmony_ci - compatible 9062306a36Sopenharmony_ci - interrupts 9162306a36Sopenharmony_ci - interrupt-names 9262306a36Sopenharmony_ci - io-channels 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ciadditionalProperties: false 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci... 97