1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: "http://devicetree.org/schemas/power/supply/maxim,max17042.yaml#"
5$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6
7title: Maxim 17042 fuel gauge series
8
9maintainers:
10  - Sebastian Reichel <sre@kernel.org>
11
12allOf:
13  - $ref: power-supply.yaml#
14
15properties:
16  compatible:
17    enum:
18      - maxim,max17042
19      - maxim,max17047
20      - maxim,max17050
21      - maxim,max17055
22
23  reg:
24    maxItems: 1
25
26  interrupts:
27    maxItems: 1
28
29  maxim,rsns-microohm:
30    $ref: /schemas/types.yaml#/definitions/uint32
31    description: |
32      Resistance of rsns resistor in micro Ohms (datasheet-recommended value is 10000).
33      Defining this property enables current-sense functionality.
34
35  maxim,cold-temp:
36    $ref: /schemas/types.yaml#/definitions/uint32
37    description: |
38      Temperature threshold to report battery as cold (in tenths of degree Celsius).
39      Default is not to report cold events.
40
41  maxim,over-heat-temp:
42    $ref: /schemas/types.yaml#/definitions/uint32
43    description: |
44      Temperature threshold to report battery as over heated (in tenths of degree Celsius).
45      Default is not to report over heating events.
46
47  maxim,dead-volt:
48    $ref: /schemas/types.yaml#/definitions/uint32
49    description: |
50      Voltage threshold to report battery as dead (in mV).
51      Default is not to report dead battery events.
52
53  maxim,over-volt:
54    $ref: /schemas/types.yaml#/definitions/uint32
55    description: |
56      Voltage threshold to report battery as over voltage (in mV).
57      Default is not to report over-voltage events.
58
59required:
60  - compatible
61  - reg
62
63additionalProperties: false
64
65examples:
66  - |
67    i2c0 {
68      #address-cells = <1>;
69      #size-cells = <0>;
70
71      battery@36 {
72        compatible = "maxim,max17042";
73        reg = <0x36>;
74        maxim,rsns-microohm = <10000>;
75        maxim,over-heat-temp = <600>;
76        maxim,over-volt = <4300>;
77      };
78    };
79