xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/mediatek,mt6370-charger.yaml (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
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 Charger
8
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-charger
19
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 USB
24      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 know
27      the result of BC1.2 detection.
28      When the IRQ "MT6370_IRQ_CHG_MIVR" is triggered, it means that the
29      hardware enters the "Minimum Input Voltage Regulation loop" and
30      a workaround needs to be applied at this time.
31      In summary, "MT6370_IRQ_OVPCTRL_UVP_D", "MT6370_IRQ_ATTACH" and
32      "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_evt
41      - const: attach_i
42      - const: mivr
43
44  io-channels:
45    description: |
46      Use ADC channel to read VBUS, IBUS, IBAT, etc., info.
47    minItems: 1
48    items:
49      - description: |
50          VBUS voltage with lower accuracy (+-75mV) but higher measure
51          range (1~22V)
52      - description: |
53          VBUS voltage with higher accuracy (+-30mV) but lower measure
54          range (1~9.76V)
55      - description: the main system input voltage
56      - description: battery voltage
57      - description: battery temperature-sense input voltage
58      - description: IBUS current (required)
59      - description: battery current
60      - description: |
61          regulated output voltage to supply for the PWM low-side gate driver
62          and the bootstrap capacitor
63      - description: IC junction temperature
64
65  io-channel-names:
66    minItems: 1
67    items:
68      - const: vbusdiv5
69      - const: vbusdiv2
70      - const: vsys
71      - const: vbat
72      - const: ts_bat
73      - const: ibus
74      - const: ibat
75      - const: chg_vddp
76      - const: temp_jc
77
78  usb-otg-vbus-regulator:
79    type: object
80    description: OTG boost regulator.
81    unevaluatedProperties: false
82    $ref: /schemas/regulator/regulator.yaml#
83
84    properties:
85      enable-gpios:
86        maxItems: 1
87
88required:
89  - compatible
90  - interrupts
91  - interrupt-names
92  - io-channels
93
94additionalProperties: false
95
96...
97