brintos

brintos / linux-shallow public Read only

0
0
Text · 3.8 KiB · 5f10f12 Raw
122 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/ti,ina3221.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Texas Instruments INA3221 Current and Voltage Monitor8 9maintainers:10  - Jean Delvare <jdelvare@suse.com>11  - Guenter Roeck <linux@roeck-us.net>12 13properties:14  compatible:15    const: ti,ina322116 17  reg:18    maxItems: 119 20  ti,single-shot:21    description: |22      This chip has two power modes: single-shot (chip takes one measurement23      and then shuts itself down) and continuous (chip takes continuous24      measurements). The continuous mode is more reliable and suitable for25      hardware monitor type device, but the single-shot mode is more power-26      friendly and useful for battery-powered device which cares power27      consumptions while still needs some measurements occasionally.28 29      If this property is present, the single-shot mode will be used, instead30      of the default continuous one for monitoring.31    $ref: /schemas/types.yaml#/definitions/flag32 33  "#address-cells":34    description: Required only if a child node is present.35    const: 136 37  "#size-cells":38    description: Required only if a child node is present.39    const: 040 41patternProperties:42  "^input@[0-2]$":43    description: The node contains optional child nodes for three channels.44      Each child node describes the information of input source. Input channels45      default to enabled in the chip. Unless channels are explicitly disabled46      in device-tree, input channels will be enabled.47    type: object48    additionalProperties: false49    properties:50      reg:51        description: Must be 0, 1 and 2, corresponding to the IN1, IN2 or IN352          ports of the INA3221, respectively.53        enum: [ 0, 1, 2 ]54 55      label:56        description: name of the input source57 58      shunt-resistor-micro-ohms:59        description: shunt resistor value in micro-Ohm60 61      ti,summation-disable:62        description: |63          The INA3221 has a critical alert pin that can be controlled by the64          summation control function. This function adds the single65          shunt-voltage conversions for the desired channels in order to66          compare the combined sum to the programmed limit. The Shunt-Voltage67          Sum Limit register contains the programmed value that is compared68          to the value in the Shunt-Voltage Sum register in order to69          determine if the total summed limit is exceeded. If the70          shunt-voltage sum limit value is exceeded, the critical alert pin71          is asserted.72 73          For the summation limit to have a meaningful value, it is necessary74          to use the same shunt-resistor value on all enabled channels. If75          this is not the case or if a channel should not be used for76          triggering the critical alert pin, then this property can be used77          exclude specific channels from the summation control function.78        type: boolean79 80    required:81      - reg82 83required:84  - compatible85  - reg86 87additionalProperties: false88 89examples:90  - |91    i2c {92        #address-cells = <1>;93        #size-cells = <0>;94 95        power-sensor@40 {96            compatible = "ti,ina3221";97            reg = <0x40>;98            #address-cells = <1>;99            #size-cells = <0>;100 101            input@0 {102                reg = <0x0>;103                /*104                 * Input channels are enabled by default in the device and so105                 * to disable, must be explicitly disabled in device-tree.106                 */107                status = "disabled";108            };109 110            input@1 {111                reg = <0x1>;112                shunt-resistor-micro-ohms = <5000>;113            };114 115            input@2 {116                reg = <0x2>;117                label = "VDD_5V";118                shunt-resistor-micro-ohms = <5000>;119            };120        };121    };122