File Index
Files and directories
Sign in
FILE

ti,ina2xx.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml YAML
  1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2%YAML 1.2
  3---
  4$id: http://devicetree.org/schemas/hwmon/ti,ina2xx.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Texas Instruments INA209 family of power/voltage monitors
  8
  9maintainers:
 10  - Krzysztof Kozlowski <krzk@kernel.org>
 11
 12description: |
 13  The INA209 is a high-side current shunt and power monitor with
 14  an I2C interface.
 15
 16  Datasheets:
 17    https://www.ti.com/product/INA209
 18
 19properties:
 20  compatible:
 21    enum:
 22      - silergy,sq52206
 23      - silergy,sy24655
 24      - ti,ina209
 25      - ti,ina219
 26      - ti,ina220
 27      - ti,ina226
 28      - ti,ina228
 29      - ti,ina230
 30      - ti,ina231
 31      - ti,ina233
 32      - ti,ina237
 33      - ti,ina238
 34      - ti,ina260
 35      - ti,ina700
 36      - ti,ina780
 37
 38  reg:
 39    maxItems: 1
 40
 41  "#io-channel-cells":
 42    const: 1
 43
 44  shunt-resistor:
 45    description:
 46      Shunt resistor value in micro-Ohm.
 47    $ref: /schemas/types.yaml#/definitions/uint32
 48
 49  ti,shunt-gain:
 50    description: |
 51      Programmable gain divisor for the shunt voltage accuracy and range. This
 52      property only applies to devices that have configurable PGA/ADCRANGE. The
 53      gain value is used configure the gain and to convert the shunt voltage,
 54      current and power register values when reading measurements from the
 55      device.
 56
 57      For devices that have a configurable PGA (e.g. INA209, INA219, INA220),
 58      the gain value maps directly with the PG bits of the config register.
 59
 60      For devices that have ADCRANGE configuration (e.g. INA238) a shunt-gain
 61      value of 1 maps to ADCRANGE=1 where no gain divisor is applied to the
 62      shunt voltage, and a value of 4 maps to ADCRANGE=0 such that a wider
 63      voltage range is used.
 64
 65      For SQ52206,the shunt-gain value 1 mapps to ADCRANGE=10/11, the value 2
 66      mapps to ADCRANGE=01, and the value 4 mapps to ADCRANGE=00.
 67
 68      The default value is device dependent, and is defined by the reset value
 69      of PGA/ADCRANGE in the respective configuration registers.
 70    $ref: /schemas/types.yaml#/definitions/uint32
 71    enum: [1, 2, 4, 8]
 72
 73  vs-supply:
 74    description: phandle to the regulator that provides the VS supply typically
 75      in range from 2.7 V to 5.5 V.
 76
 77  ti,alert-polarity-active-high:
 78    description: Alert pin is asserted based on the value of Alert polarity Bit
 79      of Mask/Enable register. Default value is Normal (0 which maps to
 80      active-low open collector). The other value is Inverted
 81      (1 which maps to active-high open collector). Specify this property to set
 82      the alert polarity to active-high.
 83    $ref: /schemas/types.yaml#/definitions/flag
 84
 85  ti,maximum-expected-current-microamp:
 86    description: |
 87      This value indicates the maximum current in microamps that you can
 88      expect to measure with ina233 in your circuit.
 89
 90      This value will be used to calculate the Current_LSB and current/power
 91      coefficient for the pmbus and to calibrate the IC.
 92    minimum: 32768
 93    maximum: 4294967295
 94    default: 32768000
 95
 96required:
 97  - compatible
 98  - reg
 99
100allOf:
101  - $ref: hwmon-common.yaml#
102  - if:
103      properties:
104        compatible:
105          contains:
106            enum:
107              - silergy,sq52206
108              - silergy,sy24655
109              - ti,ina209
110              - ti,ina219
111              - ti,ina220
112              - ti,ina226
113              - ti,ina228
114              - ti,ina230
115              - ti,ina231
116              - ti,ina237
117              - ti,ina238
118              - ti,ina260
119              - ti,ina700
120              - ti,ina780
121    then:
122      properties:
123        ti,maximum-expected-current-microamp: false
124
125  - if:
126      properties:
127        compatible:
128          contains:
129            enum:
130              - silergy,sy24655
131              - ti,ina209
132              - ti,ina219
133              - ti,ina220
134              - ti,ina226
135              - ti,ina230
136              - ti,ina231
137              - ti,ina260
138              - ti,ina700
139              - ti,ina780
140    then:
141      properties:
142        ti,shunt-gain: false
143
144  - if:
145      properties:
146        compatible:
147          contains:
148            enum:
149              - ti,ina700
150              - ti,ina780
151    then:
152      properties:
153        shunt-resistor: false
154
155unevaluatedProperties: false
156
157examples:
158  - |
159    i2c {
160        #address-cells = <1>;
161        #size-cells = <0>;
162
163        power-sensor@44 {
164            compatible = "ti,ina220";
165            reg = <0x44>;
166            #io-channel-cells = <1>;
167            label = "vdd_3v0";
168            shunt-resistor = <1000>;
169            vs-supply = <&vdd_3v0>;
170            ti,alert-polarity-active-high;
171        };
172    };
~/ Read-only file preview.