xref: /linux/Documentation/devicetree/bindings/hwmon/adi,ltc2947.yaml (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
18ae93ea7SNuno Sá# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28ae93ea7SNuno Sá%YAML 1.2
38ae93ea7SNuno Sá---
404dbd865SRob Herring$id: http://devicetree.org/schemas/hwmon/adi,ltc2947.yaml#
58ae93ea7SNuno Sá$schema: http://devicetree.org/meta-schemas/core.yaml#
68ae93ea7SNuno Sá
78ae93ea7SNuno Sátitle: Analog Devices LTC2947 high precision power and energy monitor
88ae93ea7SNuno Sá
98ae93ea7SNuno Sámaintainers:
108ae93ea7SNuno Sá  - Nuno Sá <nuno.sa@analog.com>
118ae93ea7SNuno Sá
128ae93ea7SNuno Sádescription: |
138ae93ea7SNuno Sá  Analog Devices LTC2947 high precision power and energy monitor over SPI or I2C.
148ae93ea7SNuno Sá
158ae93ea7SNuno Sá  https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf
168ae93ea7SNuno Sá
178ae93ea7SNuno Sáproperties:
188ae93ea7SNuno Sá  compatible:
198ae93ea7SNuno Sá    enum:
208ae93ea7SNuno Sá      - adi,ltc2947
218ae93ea7SNuno Sá
228ae93ea7SNuno Sá  reg:
238ae93ea7SNuno Sá    maxItems: 1
248ae93ea7SNuno Sá
258ae93ea7SNuno Sá  clocks:
268ae93ea7SNuno Sá    description:
278ae93ea7SNuno Sá      The LTC2947 uses either a trimmed internal oscillator or an external clock
288ae93ea7SNuno Sá      as the time base for determining the integration period to represent time,
298ae93ea7SNuno Sá      charge and energy. When an external clock is used, this property must be
308ae93ea7SNuno Sá      set accordingly.
318ae93ea7SNuno Sá    maxItems: 1
328ae93ea7SNuno Sá
338ae93ea7SNuno Sá  adi,accumulator-ctl-pol:
348ae93ea7SNuno Sá    description:
358ae93ea7SNuno Sá      This property controls the polarity of current that is accumulated to
368ae93ea7SNuno Sá      calculate charge and energy so that, they can be only accumulated for
378ae93ea7SNuno Sá      positive current for example. Since there are two sets of registers for
388ae93ea7SNuno Sá      the accumulated values, this entry can also have two items which sets
398ae93ea7SNuno Sá      energy1/charge1 and energy2/charger2 respectively. Check table 12 of the
408ae93ea7SNuno Sá      datasheet for more information on the supported options.
41*3d21a460SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32-array
42*3d21a460SRob Herring    minItems: 2
438ae93ea7SNuno Sá    maxItems: 2
448ae93ea7SNuno Sá    items:
458ae93ea7SNuno Sá      enum: [0, 1, 2, 3]
468ae93ea7SNuno Sá      default: 0
478ae93ea7SNuno Sá
488ae93ea7SNuno Sá  adi,accumulation-deadband-microamp:
498ae93ea7SNuno Sá    description:
508ae93ea7SNuno Sá      This property controls the Accumulation Dead band which allows to set the
518ae93ea7SNuno Sá      level of current below which no accumulation takes place.
528ae93ea7SNuno Sá    maximum: 255
538ae93ea7SNuno Sá    default: 0
548ae93ea7SNuno Sá
558ae93ea7SNuno Sá  adi,gpio-out-pol:
568ae93ea7SNuno Sá    description:
578ae93ea7SNuno Sá      This property controls the GPIO polarity. Setting it to one makes the GPIO
588ae93ea7SNuno Sá      active high, setting it to zero makets it active low. When this property
598ae93ea7SNuno Sá      is present, the GPIO is automatically configured as output and set to
608ae93ea7SNuno Sá      control a fan as a function of measured temperature.
61*3d21a460SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
628ae93ea7SNuno Sá    enum: [0, 1]
638ae93ea7SNuno Sá    default: 0
648ae93ea7SNuno Sá
658ae93ea7SNuno Sá  adi,gpio-in-accum:
668ae93ea7SNuno Sá    description:
678ae93ea7SNuno Sá      When set, this property sets the GPIO as input. It is then used to control
688ae93ea7SNuno Sá      the accumulation of charge, energy and time. This function can be
698ae93ea7SNuno Sá      enabled/configured separately for each of the two sets of accumulation
708ae93ea7SNuno Sá      registers. Check table 13 of the datasheet for more information on the
718ae93ea7SNuno Sá      supported options. This property cannot be used together with
728ae93ea7SNuno Sá      adi,gpio-out-pol.
73*3d21a460SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32-array
74*3d21a460SRob Herring    minItems: 2
758ae93ea7SNuno Sá    maxItems: 2
768ae93ea7SNuno Sá    items:
778ae93ea7SNuno Sá      enum: [0, 1, 2]
788ae93ea7SNuno Sá      default: 0
798ae93ea7SNuno Sá
808ae93ea7SNuno Sárequired:
818ae93ea7SNuno Sá  - compatible
828ae93ea7SNuno Sá  - reg
838ae93ea7SNuno Sá
848ae93ea7SNuno Sá
857f464532SRob HerringadditionalProperties: false
867f464532SRob Herring
878ae93ea7SNuno Sáexamples:
888ae93ea7SNuno Sá  - |
898ae93ea7SNuno Sá    spi {
908ae93ea7SNuno Sá        #address-cells = <1>;
918ae93ea7SNuno Sá        #size-cells = <0>;
928ae93ea7SNuno Sá
938ae93ea7SNuno Sá        ltc2947_spi: ltc2947@0 {
948ae93ea7SNuno Sá            compatible = "adi,ltc2947";
958ae93ea7SNuno Sá            reg = <0>;
968ae93ea7SNuno Sá            /* accumulation takes place always for energ1/charge1. */
978ae93ea7SNuno Sá            /* accumulation only on positive current for energy2/charge2. */
988ae93ea7SNuno Sá            adi,accumulator-ctl-pol = <0 1>;
998ae93ea7SNuno Sá        };
1008ae93ea7SNuno Sá    };
1018ae93ea7SNuno Sá...
102