xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/mediatek,mt6370-charger.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1*7ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*7ef62cebSEmmanuel Vadot%YAML 1.2
3*7ef62cebSEmmanuel Vadot---
4*7ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/mediatek,mt6370-charger.yaml#
5*7ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*7ef62cebSEmmanuel Vadot
7*7ef62cebSEmmanuel Vadottitle: MediaTek MT6370 Battery Charger
8*7ef62cebSEmmanuel Vadot
9*7ef62cebSEmmanuel Vadotmaintainers:
10*7ef62cebSEmmanuel Vadot  - ChiaEn Wu <chiaen_wu@richtek.com>
11*7ef62cebSEmmanuel Vadot
12*7ef62cebSEmmanuel Vadotdescription: |
13*7ef62cebSEmmanuel Vadot  This module is part of the MT6370 MFD device.
14*7ef62cebSEmmanuel Vadot  Provides Battery Charger, Boost for OTG devices and BC1.2 detection.
15*7ef62cebSEmmanuel Vadot
16*7ef62cebSEmmanuel Vadotproperties:
17*7ef62cebSEmmanuel Vadot  compatible:
18*7ef62cebSEmmanuel Vadot    const: mediatek,mt6370-charger
19*7ef62cebSEmmanuel Vadot
20*7ef62cebSEmmanuel Vadot  interrupts:
21*7ef62cebSEmmanuel Vadot    description: |
22*7ef62cebSEmmanuel Vadot      Specify what irqs are needed to be handled by MT6370 Charger driver.
23*7ef62cebSEmmanuel Vadot      We need to use the IRQ "MT6370_IRQ_OVPCTRL_UVP_D" to know when USB
24*7ef62cebSEmmanuel Vadot      is plugged in, and then the driver will enable BC1.2 detection.
25*7ef62cebSEmmanuel Vadot      After the hardware of MT6370 completes the BC1.2 detection,
26*7ef62cebSEmmanuel Vadot      IRQ "MT6370_IRQ_ATTACH" will be triggered, and the driver will know
27*7ef62cebSEmmanuel Vadot      the result of BC1.2 detection.
28*7ef62cebSEmmanuel Vadot      When the IRQ "MT6370_IRQ_CHG_MIVR" is triggered, it means that the
29*7ef62cebSEmmanuel Vadot      hardware enters the "Minimum Input Voltage Regulation loop" and
30*7ef62cebSEmmanuel Vadot      a workaround needs to be applied at this time.
31*7ef62cebSEmmanuel Vadot      In summary, "MT6370_IRQ_OVPCTRL_UVP_D", "MT6370_IRQ_ATTACH" and
32*7ef62cebSEmmanuel Vadot      "MT6370_IRQ_CHG_MIVR" are required in this charger driver.
33*7ef62cebSEmmanuel Vadot    items:
34*7ef62cebSEmmanuel Vadot      - description: irq of "USB is plugged in"
35*7ef62cebSEmmanuel Vadot      - description: irq of "BC1.2 is done"
36*7ef62cebSEmmanuel Vadot      - description: irq of "Minimum Input Voltage Regulation loop is active"
37*7ef62cebSEmmanuel Vadot
38*7ef62cebSEmmanuel Vadot  interrupt-names:
39*7ef62cebSEmmanuel Vadot    items:
40*7ef62cebSEmmanuel Vadot      - const: uvp_d_evt
41*7ef62cebSEmmanuel Vadot      - const: attach_i
42*7ef62cebSEmmanuel Vadot      - const: mivr
43*7ef62cebSEmmanuel Vadot
44*7ef62cebSEmmanuel Vadot  io-channels:
45*7ef62cebSEmmanuel Vadot    description: |
46*7ef62cebSEmmanuel Vadot      Use ADC channel to read VBUS, IBUS, IBAT, etc., info.
47*7ef62cebSEmmanuel Vadot    minItems: 1
48*7ef62cebSEmmanuel Vadot    items:
49*7ef62cebSEmmanuel Vadot      - description: |
50*7ef62cebSEmmanuel Vadot          VBUS voltage with lower accuracy (+-75mV) but higher measure
51*7ef62cebSEmmanuel Vadot          range (1~22V)
52*7ef62cebSEmmanuel Vadot      - description: |
53*7ef62cebSEmmanuel Vadot          VBUS voltage with higher accuracy (+-30mV) but lower measure
54*7ef62cebSEmmanuel Vadot          range (1~9.76V)
55*7ef62cebSEmmanuel Vadot      - description: the main system input voltage
56*7ef62cebSEmmanuel Vadot      - description: battery voltage
57*7ef62cebSEmmanuel Vadot      - description: battery temperature-sense input voltage
58*7ef62cebSEmmanuel Vadot      - description: IBUS current (required)
59*7ef62cebSEmmanuel Vadot      - description: battery current
60*7ef62cebSEmmanuel Vadot      - description: |
61*7ef62cebSEmmanuel Vadot          regulated output voltage to supply for the PWM low-side gate driver
62*7ef62cebSEmmanuel Vadot          and the bootstrap capacitor
63*7ef62cebSEmmanuel Vadot      - description: IC junction temperature
64*7ef62cebSEmmanuel Vadot
65*7ef62cebSEmmanuel Vadot  io-channel-names:
66*7ef62cebSEmmanuel Vadot    minItems: 1
67*7ef62cebSEmmanuel Vadot    items:
68*7ef62cebSEmmanuel Vadot      - const: vbusdiv5
69*7ef62cebSEmmanuel Vadot      - const: vbusdiv2
70*7ef62cebSEmmanuel Vadot      - const: vsys
71*7ef62cebSEmmanuel Vadot      - const: vbat
72*7ef62cebSEmmanuel Vadot      - const: ts_bat
73*7ef62cebSEmmanuel Vadot      - const: ibus
74*7ef62cebSEmmanuel Vadot      - const: ibat
75*7ef62cebSEmmanuel Vadot      - const: chg_vddp
76*7ef62cebSEmmanuel Vadot      - const: temp_jc
77*7ef62cebSEmmanuel Vadot
78*7ef62cebSEmmanuel Vadot  usb-otg-vbus-regulator:
79*7ef62cebSEmmanuel Vadot    type: object
80*7ef62cebSEmmanuel Vadot    description: OTG boost regulator.
81*7ef62cebSEmmanuel Vadot    unevaluatedProperties: false
82*7ef62cebSEmmanuel Vadot    $ref: /schemas/regulator/regulator.yaml#
83*7ef62cebSEmmanuel Vadot
84*7ef62cebSEmmanuel Vadot    properties:
85*7ef62cebSEmmanuel Vadot      enable-gpios:
86*7ef62cebSEmmanuel Vadot        maxItems: 1
87*7ef62cebSEmmanuel Vadot
88*7ef62cebSEmmanuel Vadotrequired:
89*7ef62cebSEmmanuel Vadot  - compatible
90*7ef62cebSEmmanuel Vadot  - interrupts
91*7ef62cebSEmmanuel Vadot  - interrupt-names
92*7ef62cebSEmmanuel Vadot  - io-channels
93*7ef62cebSEmmanuel Vadot
94*7ef62cebSEmmanuel VadotadditionalProperties: false
95*7ef62cebSEmmanuel Vadot
96*7ef62cebSEmmanuel Vadot...
97