xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/maxim,max17201.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*0e8011faSEmmanuel Vadot%YAML 1.2
3*0e8011faSEmmanuel Vadot---
4*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
5*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0e8011faSEmmanuel Vadot
7*0e8011faSEmmanuel Vadottitle: Maxim MAX17201 fuel gauge
8*0e8011faSEmmanuel Vadot
9*0e8011faSEmmanuel Vadotmaintainers:
10*0e8011faSEmmanuel Vadot  - Dimitri Fedrau <dima.fedrau@gmail.com>
11*0e8011faSEmmanuel Vadot
12*0e8011faSEmmanuel VadotallOf:
13*0e8011faSEmmanuel Vadot  - $ref: power-supply.yaml#
14*0e8011faSEmmanuel Vadot
15*0e8011faSEmmanuel Vadotproperties:
16*0e8011faSEmmanuel Vadot  compatible:
17*0e8011faSEmmanuel Vadot    oneOf:
18*0e8011faSEmmanuel Vadot      - const: maxim,max17201
19*0e8011faSEmmanuel Vadot      - items:
20*0e8011faSEmmanuel Vadot          - enum:
21*0e8011faSEmmanuel Vadot              - maxim,max17205
22*0e8011faSEmmanuel Vadot          - const: maxim,max17201
23*0e8011faSEmmanuel Vadot
24*0e8011faSEmmanuel Vadot  reg:
25*0e8011faSEmmanuel Vadot    items:
26*0e8011faSEmmanuel Vadot      - description: ModelGauge m5 registers
27*0e8011faSEmmanuel Vadot      - description: Nonvolatile registers
28*0e8011faSEmmanuel Vadot
29*0e8011faSEmmanuel Vadot  reg-names:
30*0e8011faSEmmanuel Vadot    items:
31*0e8011faSEmmanuel Vadot      - const: m5
32*0e8011faSEmmanuel Vadot      - const: nvmem
33*0e8011faSEmmanuel Vadot
34*0e8011faSEmmanuel Vadot  interrupts:
35*0e8011faSEmmanuel Vadot    maxItems: 1
36*0e8011faSEmmanuel Vadot
37*0e8011faSEmmanuel Vadotrequired:
38*0e8011faSEmmanuel Vadot  - compatible
39*0e8011faSEmmanuel Vadot  - reg
40*0e8011faSEmmanuel Vadot  - reg-names
41*0e8011faSEmmanuel Vadot
42*0e8011faSEmmanuel VadotunevaluatedProperties: false
43*0e8011faSEmmanuel Vadot
44*0e8011faSEmmanuel Vadotexamples:
45*0e8011faSEmmanuel Vadot  - |
46*0e8011faSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
47*0e8011faSEmmanuel Vadot    i2c {
48*0e8011faSEmmanuel Vadot      #address-cells = <1>;
49*0e8011faSEmmanuel Vadot      #size-cells = <0>;
50*0e8011faSEmmanuel Vadot
51*0e8011faSEmmanuel Vadot      fuel-gauge@36 {
52*0e8011faSEmmanuel Vadot        compatible = "maxim,max17201";
53*0e8011faSEmmanuel Vadot        reg = <0x36>, <0xb>;
54*0e8011faSEmmanuel Vadot        reg-names = "m5", "nvmem";
55*0e8011faSEmmanuel Vadot        interrupt-parent = <&gpio0>;
56*0e8011faSEmmanuel Vadot        interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
57*0e8011faSEmmanuel Vadot      };
58*0e8011faSEmmanuel Vadot    };
59