1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/hwmon/adi,ltc2947.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Analog Devices LTC2947 high precision power and energy monitor
10 - Nuno Sá <nuno.sa@analog.com>
13 Analog Devices LTC2947 high precision power and energy monitor over SPI or I2C.
15 https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf
27 The LTC2947 uses either a trimmed internal oscillator or an external clock
28 as the time base for determining the integration period to represent time,
29 charge and energy. When an external clock is used, this property must be
33 adi,accumulator-ctl-pol:
35 This property controls the polarity of current that is accumulated to
36 calculate charge and energy so that, they can be only accumulated for
37 positive current for example. Since there are two sets of registers for
38 the accumulated values, this entry can also have two items which sets
39 energy1/charge1 and energy2/charger2 respectively. Check table 12 of the
40 datasheet for more information on the supported options.
41 $ref: /schemas/types.yaml#/definitions/uint32-array
48 adi,accumulation-deadband-microamp:
50 This property controls the Accumulation Dead band which allows to set the
51 level of current below which no accumulation takes place.
52 $ref: /schemas/types.yaml#/definitions/uint32
58 This property controls the GPIO polarity. Setting it to one makes the GPIO
59 active high, setting it to zero makets it active low. When this property
60 is present, the GPIO is automatically configured as output and set to
61 control a fan as a function of measured temperature.
62 $ref: /schemas/types.yaml#/definitions/uint32
68 When set, this property sets the GPIO as input. It is then used to control
69 the accumulation of charge, energy and time. This function can be
70 enabled/configured separately for each of the two sets of accumulation
71 registers. Check table 13 of the datasheet for more information on the
72 supported options. This property cannot be used together with
74 $ref: /schemas/types.yaml#/definitions/uint32-array
86 additionalProperties: false
94 ltc2947_spi: ltc2947@0 {
95 compatible = "adi,ltc2947";
97 /* accumulation takes place always for energ1/charge1. */
98 /* accumulation only on positive current for energy2/charge2. */
99 adi,accumulator-ctl-pol = <0 1>;