brintos

brintos / linux-shallow public Read only

0
0
Text · 3.1 KiB · 1529353 Raw
102 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/hwmon/adi,ltc2947.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Analog Devices LTC2947 high precision power and energy monitor8 9maintainers:10  - Nuno Sá <nuno.sa@analog.com>11 12description: |13  Analog Devices LTC2947 high precision power and energy monitor over SPI or I2C.14 15  https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf16 17properties:18  compatible:19    enum:20      - adi,ltc294721 22  reg:23    maxItems: 124 25  clocks:26    description:27      The LTC2947 uses either a trimmed internal oscillator or an external clock28      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 be30      set accordingly.31    maxItems: 132 33  adi,accumulator-ctl-pol:34    description:35      This property controls the polarity of current that is accumulated to36      calculate charge and energy so that, they can be only accumulated for37      positive current for example. Since there are two sets of registers for38      the accumulated values, this entry can also have two items which sets39      energy1/charge1 and energy2/charger2 respectively. Check table 12 of the40      datasheet for more information on the supported options.41    $ref: /schemas/types.yaml#/definitions/uint32-array42    minItems: 243    maxItems: 244    items:45      enum: [0, 1, 2, 3]46      default: 047 48  adi,accumulation-deadband-microamp:49    description:50      This property controls the Accumulation Dead band which allows to set the51      level of current below which no accumulation takes place.52    maximum: 25553    default: 054 55  adi,gpio-out-pol:56    description:57      This property controls the GPIO polarity. Setting it to one makes the GPIO58      active high, setting it to zero makets it active low. When this property59      is present, the GPIO is automatically configured as output and set to60      control a fan as a function of measured temperature.61    $ref: /schemas/types.yaml#/definitions/uint3262    enum: [0, 1]63    default: 064 65  adi,gpio-in-accum:66    description:67      When set, this property sets the GPIO as input. It is then used to control68      the accumulation of charge, energy and time. This function can be69      enabled/configured separately for each of the two sets of accumulation70      registers. Check table 13 of the datasheet for more information on the71      supported options. This property cannot be used together with72      adi,gpio-out-pol.73    $ref: /schemas/types.yaml#/definitions/uint32-array74    minItems: 275    maxItems: 276    items:77      enum: [0, 1, 2]78      default: 079 80required:81  - compatible82  - reg83 84 85additionalProperties: false86 87examples:88  - |89    spi {90        #address-cells = <1>;91        #size-cells = <0>;92 93        ltc2947_spi: ltc2947@0 {94            compatible = "adi,ltc2947";95            reg = <0>;96            /* accumulation takes place always for energ1/charge1. */97            /* accumulation only on positive current for energy2/charge2. */98            adi,accumulator-ctl-pol = <0 1>;99        };100    };101...102