1*2bc68e58SChiYuan Huang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*2bc68e58SChiYuan Huang%YAML 1.2
3*2bc68e58SChiYuan Huang---
4*2bc68e58SChiYuan Huang$id: http://devicetree.org/schemas/power/supply/richtek,rt9471.yaml#
5*2bc68e58SChiYuan Huang$schema: http://devicetree.org/meta-schemas/core.yaml#
6*2bc68e58SChiYuan Huang
7*2bc68e58SChiYuan Huangtitle: Richtek RT9471 3A Single Cell Switching Battery charger
8*2bc68e58SChiYuan Huang
9*2bc68e58SChiYuan Huangmaintainers:
10*2bc68e58SChiYuan Huang  - Alina Yu <alina_yu@richtek.com>
11*2bc68e58SChiYuan Huang  - ChiYuan Huang <cy_huang@richtek.com>
12*2bc68e58SChiYuan Huang
13*2bc68e58SChiYuan Huangdescription: |
14*2bc68e58SChiYuan Huang  RT9471 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for
15*2bc68e58SChiYuan Huang  portable applications. It supports USB BC1.2 port detection, current and
16*2bc68e58SChiYuan Huang  voltage regulations in both charging and boost mode.
17*2bc68e58SChiYuan Huang
18*2bc68e58SChiYuan Huang  Datasheet is available at
19*2bc68e58SChiYuan Huang  https://www.richtek.com/assets/product_file/RT9471=RT9471D/DS9471D-02.pdf
20*2bc68e58SChiYuan Huang
21*2bc68e58SChiYuan Huangproperties:
22*2bc68e58SChiYuan Huang  compatible:
23*2bc68e58SChiYuan Huang    const: richtek,rt9471
24*2bc68e58SChiYuan Huang
25*2bc68e58SChiYuan Huang  reg:
26*2bc68e58SChiYuan Huang    maxItems: 1
27*2bc68e58SChiYuan Huang
28*2bc68e58SChiYuan Huang  charge-enable-gpios:
29*2bc68e58SChiYuan Huang    description: GPIO used to turn on and off charging.
30*2bc68e58SChiYuan Huang    maxItems: 1
31*2bc68e58SChiYuan Huang
32*2bc68e58SChiYuan Huang  wakeup-source: true
33*2bc68e58SChiYuan Huang
34*2bc68e58SChiYuan Huang  interrupts:
35*2bc68e58SChiYuan Huang    maxItems: 1
36*2bc68e58SChiYuan Huang
37*2bc68e58SChiYuan Huang  usb-otg-vbus-regulator:
38*2bc68e58SChiYuan Huang    type: object
39*2bc68e58SChiYuan Huang    $ref: /schemas/regulator/regulator.yaml#
40*2bc68e58SChiYuan Huang    unevaluatedProperties: false
41*2bc68e58SChiYuan Huang
42*2bc68e58SChiYuan Huangrequired:
43*2bc68e58SChiYuan Huang  - compatible
44*2bc68e58SChiYuan Huang  - reg
45*2bc68e58SChiYuan Huang  - wakeup-source
46*2bc68e58SChiYuan Huang  - interrupts
47*2bc68e58SChiYuan Huang
48*2bc68e58SChiYuan HuangadditionalProperties: false
49*2bc68e58SChiYuan Huang
50*2bc68e58SChiYuan Huangexamples:
51*2bc68e58SChiYuan Huang  - |
52*2bc68e58SChiYuan Huang    #include <dt-bindings/interrupt-controller/irq.h>
53*2bc68e58SChiYuan Huang    #include <dt-bindings/gpio/gpio.h>
54*2bc68e58SChiYuan Huang    i2c {
55*2bc68e58SChiYuan Huang      #address-cells = <1>;
56*2bc68e58SChiYuan Huang      #size-cells = <0>;
57*2bc68e58SChiYuan Huang
58*2bc68e58SChiYuan Huang      charger@53 {
59*2bc68e58SChiYuan Huang        compatible = "richtek,rt9471";
60*2bc68e58SChiYuan Huang        reg = <0x53>;
61*2bc68e58SChiYuan Huang        charge-enable-gpios = <&gpio26 1 GPIO_ACTIVE_LOW>;
62*2bc68e58SChiYuan Huang        wakeup-source;
63*2bc68e58SChiYuan Huang        interrupts-extended = <&gpio_intc 32 IRQ_TYPE_EDGE_FALLING>;
64*2bc68e58SChiYuan Huang
65*2bc68e58SChiYuan Huang        usb-otg-vbus-regulator {
66*2bc68e58SChiYuan Huang          regulator-name = "usb-otg-vbus";
67*2bc68e58SChiYuan Huang          regulator-min-microvolt = <4850000>;
68*2bc68e58SChiYuan Huang          regulator-max-microvolt = <5300000>;
69*2bc68e58SChiYuan Huang          regulator-min-microamp = <500000>;
70*2bc68e58SChiYuan Huang          regulator-max-microamp = <1200000>;
71*2bc68e58SChiYuan Huang        };
72*2bc68e58SChiYuan Huang      };
73*2bc68e58SChiYuan Huang    };
74