xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/maxim,max8903.yaml (revision b97ee269eae3cbaf35c18f51a459aea581c2a7dc)
12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
22eb4d8dcSEmmanuel Vadot%YAML 1.2
32eb4d8dcSEmmanuel Vadot---
4*b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/maxim,max8903.yaml#
5*b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
62eb4d8dcSEmmanuel Vadot
72eb4d8dcSEmmanuel Vadottitle: Maxim Semiconductor MAX8903 Battery Charger
82eb4d8dcSEmmanuel Vadot
92eb4d8dcSEmmanuel Vadotmaintainers:
102eb4d8dcSEmmanuel Vadot  - Sebastian Reichel <sre@kernel.org>
112eb4d8dcSEmmanuel Vadot
122eb4d8dcSEmmanuel VadotallOf:
132eb4d8dcSEmmanuel Vadot  - $ref: power-supply.yaml#
142eb4d8dcSEmmanuel Vadot
152eb4d8dcSEmmanuel Vadotproperties:
162eb4d8dcSEmmanuel Vadot  compatible:
172eb4d8dcSEmmanuel Vadot    const: maxim,max8903
182eb4d8dcSEmmanuel Vadot
192eb4d8dcSEmmanuel Vadot  dok-gpios:
202eb4d8dcSEmmanuel Vadot    maxItems: 1
212eb4d8dcSEmmanuel Vadot    description: Valid DC power has been detected (active low, input)
222eb4d8dcSEmmanuel Vadot
232eb4d8dcSEmmanuel Vadot  uok-gpios:
242eb4d8dcSEmmanuel Vadot    maxItems: 1
252eb4d8dcSEmmanuel Vadot    description: Valid USB power has been detected (active low, input)
262eb4d8dcSEmmanuel Vadot
272eb4d8dcSEmmanuel Vadot  cen-gpios:
282eb4d8dcSEmmanuel Vadot    maxItems: 1
292eb4d8dcSEmmanuel Vadot    description: Charge enable pin (active low, output)
302eb4d8dcSEmmanuel Vadot
312eb4d8dcSEmmanuel Vadot  chg-gpios:
322eb4d8dcSEmmanuel Vadot    maxItems: 1
332eb4d8dcSEmmanuel Vadot    description: Charger status pin (active low, input)
342eb4d8dcSEmmanuel Vadot
352eb4d8dcSEmmanuel Vadot  flt-gpios:
362eb4d8dcSEmmanuel Vadot    maxItems: 1
372eb4d8dcSEmmanuel Vadot    description: Fault pin (active low, output)
382eb4d8dcSEmmanuel Vadot
392eb4d8dcSEmmanuel Vadot  dcm-gpios:
402eb4d8dcSEmmanuel Vadot    maxItems: 1
412eb4d8dcSEmmanuel Vadot    description: Current limit mode setting (DC=1 or USB=0, output)
422eb4d8dcSEmmanuel Vadot
432eb4d8dcSEmmanuel Vadot  usus-gpios:
442eb4d8dcSEmmanuel Vadot    maxItems: 1
452eb4d8dcSEmmanuel Vadot    description: USB suspend pin (active high, output)
462eb4d8dcSEmmanuel Vadot
472eb4d8dcSEmmanuel Vadotrequired:
482eb4d8dcSEmmanuel Vadot  - compatible
492eb4d8dcSEmmanuel Vadot
502eb4d8dcSEmmanuel VadotanyOf:
512eb4d8dcSEmmanuel Vadot  - required:
522eb4d8dcSEmmanuel Vadot      - dok-gpios
532eb4d8dcSEmmanuel Vadot  - required:
542eb4d8dcSEmmanuel Vadot      - uok-gpios
552eb4d8dcSEmmanuel Vadot
562eb4d8dcSEmmanuel VadotadditionalProperties: false
572eb4d8dcSEmmanuel Vadot
582eb4d8dcSEmmanuel Vadotexamples:
592eb4d8dcSEmmanuel Vadot  - |
602eb4d8dcSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
612eb4d8dcSEmmanuel Vadot    charger {
622eb4d8dcSEmmanuel Vadot      compatible = "maxim,max8903";
632eb4d8dcSEmmanuel Vadot      dok-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
642eb4d8dcSEmmanuel Vadot      flt-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
652eb4d8dcSEmmanuel Vadot      chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
662eb4d8dcSEmmanuel Vadot      cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
672eb4d8dcSEmmanuel Vadot    };
68