1aa1b784dSJonathan Cameron# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2aa1b784dSJonathan Cameron%YAML 1.2
3aa1b784dSJonathan Cameron---
4aa1b784dSJonathan Cameron$id: http://devicetree.org/schemas/iio/adc/adi,ad7280a.yaml#
5aa1b784dSJonathan Cameron$schema: http://devicetree.org/meta-schemas/core.yaml#
6aa1b784dSJonathan Cameron
7aa1b784dSJonathan Camerontitle: Analog Devices AD7280a Lithium Ion Battery Monitoring System
8aa1b784dSJonathan Cameron
9aa1b784dSJonathan Cameronmaintainers:
10aa1b784dSJonathan Cameron  - Michael Hennerich <michael.hennerich@analog.com>
11aa1b784dSJonathan Cameron  - Jonathan Cameron <jic23@kernel.org>
12aa1b784dSJonathan Cameron
13aa1b784dSJonathan Camerondescription: |
14aa1b784dSJonathan Cameron  Bindings for the Analog Devices AD7280a Battery Monitoring System.
15aa1b784dSJonathan Cameron  Used in devices such as hybrid electric cars, battery backup and power tools.
16aa1b784dSJonathan Cameron  Multiple chips can be daisy chained and accessed via a single SPI interface.
17aa1b784dSJonathan Cameron  Data sheet found here:
18aa1b784dSJonathan Cameron    https://www.analog.com/media/en/technical-documentation/data-sheets/AD7280A.pdf
19aa1b784dSJonathan Cameron
20aa1b784dSJonathan Cameronproperties:
21aa1b784dSJonathan Cameron  compatible:
22aa1b784dSJonathan Cameron    const: adi,ad7280a
23aa1b784dSJonathan Cameron
24aa1b784dSJonathan Cameron  reg:
25aa1b784dSJonathan Cameron    maxItems: 1
26aa1b784dSJonathan Cameron
27aa1b784dSJonathan Cameron  interrupts:
28aa1b784dSJonathan Cameron    description: IRQ line for the ADC
29aa1b784dSJonathan Cameron    maxItems: 1
30aa1b784dSJonathan Cameron
31aa1b784dSJonathan Cameron  adi,voltage-alert-last-chan:
32aa1b784dSJonathan Cameron    $ref: /schemas/types.yaml#/definitions/uint32
33aa1b784dSJonathan Cameron    description:
34aa1b784dSJonathan Cameron      Allows limiting of scope of which channels are considered for voltage
35aa1b784dSJonathan Cameron      alerts, typically because not all are wired to anything. Only applies to
36aa1b784dSJonathan Cameron      last device in the daisy chain.
37aa1b784dSJonathan Cameron    default: 5
38aa1b784dSJonathan Cameron    enum: [3, 4, 5]
39aa1b784dSJonathan Cameron
40aa1b784dSJonathan Cameron  adi,acquisition-time-ns:
41aa1b784dSJonathan Cameron    description:
42aa1b784dSJonathan Cameron      Additional time may be needed to charge the sampling capacitors depending
43aa1b784dSJonathan Cameron      on external writing.
44aa1b784dSJonathan Cameron    default: 400
45aa1b784dSJonathan Cameron    enum: [400, 800, 1200, 1600]
46aa1b784dSJonathan Cameron
47aa1b784dSJonathan Cameron  adi,thermistor-termination:
48aa1b784dSJonathan Cameron    type: boolean
49aa1b784dSJonathan Cameron    description:
50aa1b784dSJonathan Cameron      Enable the thermistor termination function.
51aa1b784dSJonathan Cameron
52aa1b784dSJonathan Cameronrequired:
53aa1b784dSJonathan Cameron  - compatible
54aa1b784dSJonathan Cameron  - reg
55aa1b784dSJonathan Cameron
56*80137388SKrzysztof KozlowskiallOf:
57*80137388SKrzysztof Kozlowski  - $ref: /schemas/spi/spi-peripheral-props.yaml#
58*80137388SKrzysztof Kozlowski
59*80137388SKrzysztof KozlowskiunevaluatedProperties: false
60aa1b784dSJonathan Cameron
61aa1b784dSJonathan Cameronexamples:
62aa1b784dSJonathan Cameron  - |
63aa1b784dSJonathan Cameron    spi {
64aa1b784dSJonathan Cameron      #address-cells = <1>;
65aa1b784dSJonathan Cameron      #size-cells = <0>;
66aa1b784dSJonathan Cameron
67aa1b784dSJonathan Cameron      adc@0 {
68aa1b784dSJonathan Cameron        compatible = "adi,ad7280a";
69aa1b784dSJonathan Cameron        reg = <0>;
70aa1b784dSJonathan Cameron        spi-max-frequency = <700000>;
71aa1b784dSJonathan Cameron        interrupt-parent = <&gpio>;
72aa1b784dSJonathan Cameron        interrupts = <25 2>;
73aa1b784dSJonathan Cameron        adi,thermistor-termination;
74aa1b784dSJonathan Cameron        adi,acquisition-time-ns = <800>;
75aa1b784dSJonathan Cameron        adi,voltage-alert-last-chan = <5>;
76aa1b784dSJonathan Cameron      };
77aa1b784dSJonathan Cameron    };
78aa1b784dSJonathan Cameron...
79