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