xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/maxim,max8903.yaml (revision 2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc)
1*2eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2*2eb4d8dcSEmmanuel Vadot%YAML 1.2
3*2eb4d8dcSEmmanuel Vadot---
4*2eb4d8dcSEmmanuel Vadot$id: "http://devicetree.org/schemas/power/supply/maxim,max8903.yaml#"
5*2eb4d8dcSEmmanuel Vadot$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6*2eb4d8dcSEmmanuel Vadot
7*2eb4d8dcSEmmanuel Vadottitle: Maxim Semiconductor MAX8903 Battery Charger
8*2eb4d8dcSEmmanuel Vadot
9*2eb4d8dcSEmmanuel Vadotmaintainers:
10*2eb4d8dcSEmmanuel Vadot  - Sebastian Reichel <sre@kernel.org>
11*2eb4d8dcSEmmanuel Vadot
12*2eb4d8dcSEmmanuel VadotallOf:
13*2eb4d8dcSEmmanuel Vadot  - $ref: power-supply.yaml#
14*2eb4d8dcSEmmanuel Vadot
15*2eb4d8dcSEmmanuel Vadotproperties:
16*2eb4d8dcSEmmanuel Vadot  compatible:
17*2eb4d8dcSEmmanuel Vadot    const: maxim,max8903
18*2eb4d8dcSEmmanuel Vadot
19*2eb4d8dcSEmmanuel Vadot  dok-gpios:
20*2eb4d8dcSEmmanuel Vadot    maxItems: 1
21*2eb4d8dcSEmmanuel Vadot    description: Valid DC power has been detected (active low, input)
22*2eb4d8dcSEmmanuel Vadot
23*2eb4d8dcSEmmanuel Vadot  uok-gpios:
24*2eb4d8dcSEmmanuel Vadot    maxItems: 1
25*2eb4d8dcSEmmanuel Vadot    description: Valid USB power has been detected (active low, input)
26*2eb4d8dcSEmmanuel Vadot
27*2eb4d8dcSEmmanuel Vadot  cen-gpios:
28*2eb4d8dcSEmmanuel Vadot    maxItems: 1
29*2eb4d8dcSEmmanuel Vadot    description: Charge enable pin (active low, output)
30*2eb4d8dcSEmmanuel Vadot
31*2eb4d8dcSEmmanuel Vadot  chg-gpios:
32*2eb4d8dcSEmmanuel Vadot    maxItems: 1
33*2eb4d8dcSEmmanuel Vadot    description: Charger status pin (active low, input)
34*2eb4d8dcSEmmanuel Vadot
35*2eb4d8dcSEmmanuel Vadot  flt-gpios:
36*2eb4d8dcSEmmanuel Vadot    maxItems: 1
37*2eb4d8dcSEmmanuel Vadot    description: Fault pin (active low, output)
38*2eb4d8dcSEmmanuel Vadot
39*2eb4d8dcSEmmanuel Vadot  dcm-gpios:
40*2eb4d8dcSEmmanuel Vadot    maxItems: 1
41*2eb4d8dcSEmmanuel Vadot    description: Current limit mode setting (DC=1 or USB=0, output)
42*2eb4d8dcSEmmanuel Vadot
43*2eb4d8dcSEmmanuel Vadot  usus-gpios:
44*2eb4d8dcSEmmanuel Vadot    maxItems: 1
45*2eb4d8dcSEmmanuel Vadot    description: USB suspend pin (active high, output)
46*2eb4d8dcSEmmanuel Vadot
47*2eb4d8dcSEmmanuel Vadotrequired:
48*2eb4d8dcSEmmanuel Vadot  - compatible
49*2eb4d8dcSEmmanuel Vadot
50*2eb4d8dcSEmmanuel VadotanyOf:
51*2eb4d8dcSEmmanuel Vadot  - required:
52*2eb4d8dcSEmmanuel Vadot      - dok-gpios
53*2eb4d8dcSEmmanuel Vadot  - required:
54*2eb4d8dcSEmmanuel Vadot      - uok-gpios
55*2eb4d8dcSEmmanuel Vadot
56*2eb4d8dcSEmmanuel VadotadditionalProperties: false
57*2eb4d8dcSEmmanuel Vadot
58*2eb4d8dcSEmmanuel Vadotexamples:
59*2eb4d8dcSEmmanuel Vadot  - |
60*2eb4d8dcSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
61*2eb4d8dcSEmmanuel Vadot    charger {
62*2eb4d8dcSEmmanuel Vadot      compatible = "maxim,max8903";
63*2eb4d8dcSEmmanuel Vadot      dok-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
64*2eb4d8dcSEmmanuel Vadot      flt-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
65*2eb4d8dcSEmmanuel Vadot      chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
66*2eb4d8dcSEmmanuel Vadot      cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
67*2eb4d8dcSEmmanuel Vadot    };
68