194f1ab94SKrzysztof Kozlowski# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
294f1ab94SKrzysztof Kozlowski%YAML 1.2
394f1ab94SKrzysztof Kozlowski---
494f1ab94SKrzysztof Kozlowski
594f1ab94SKrzysztof Kozlowski$id: http://devicetree.org/schemas/hwmon/ti,ina2xx.yaml#
694f1ab94SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
794f1ab94SKrzysztof Kozlowski
894f1ab94SKrzysztof Kozlowskititle: Texas Instruments INA209 family of power/voltage monitors
994f1ab94SKrzysztof Kozlowski
1094f1ab94SKrzysztof Kozlowskimaintainers:
1194f1ab94SKrzysztof Kozlowski  - Krzysztof Kozlowski <krzk@kernel.org>
1294f1ab94SKrzysztof Kozlowski
1394f1ab94SKrzysztof Kozlowskidescription: |
1494f1ab94SKrzysztof Kozlowski  The INA209 is a high-side current shunt and power monitor with
1594f1ab94SKrzysztof Kozlowski  an I2C interface.
1694f1ab94SKrzysztof Kozlowski
1794f1ab94SKrzysztof Kozlowski  Datasheets:
1894f1ab94SKrzysztof Kozlowski    https://www.ti.com/product/INA209
1994f1ab94SKrzysztof Kozlowski
2094f1ab94SKrzysztof Kozlowskiproperties:
2194f1ab94SKrzysztof Kozlowski  compatible:
2294f1ab94SKrzysztof Kozlowski    enum:
2394f1ab94SKrzysztof Kozlowski      - ti,ina209
2494f1ab94SKrzysztof Kozlowski      - ti,ina219
2594f1ab94SKrzysztof Kozlowski      - ti,ina220
2694f1ab94SKrzysztof Kozlowski      - ti,ina226
2794f1ab94SKrzysztof Kozlowski      - ti,ina230
2894f1ab94SKrzysztof Kozlowski      - ti,ina231
29ed68a0efSNathan Rossi      - ti,ina238
3094f1ab94SKrzysztof Kozlowski
3194f1ab94SKrzysztof Kozlowski  reg:
3294f1ab94SKrzysztof Kozlowski    maxItems: 1
3394f1ab94SKrzysztof Kozlowski
3494f1ab94SKrzysztof Kozlowski  shunt-resistor:
3594f1ab94SKrzysztof Kozlowski    description:
3694f1ab94SKrzysztof Kozlowski      Shunt resistor value in micro-Ohm.
3794f1ab94SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/uint32
3894f1ab94SKrzysztof Kozlowski
398be23b9bSNathan Rossi  ti,shunt-gain:
408be23b9bSNathan Rossi    description: |
418be23b9bSNathan Rossi      Programmable gain divisor for the shunt voltage accuracy and range. This
428be23b9bSNathan Rossi      property only applies to devices that have configurable PGA/ADCRANGE. The
438be23b9bSNathan Rossi      gain value is used configure the gain and to convert the shunt voltage,
448be23b9bSNathan Rossi      current and power register values when reading measurements from the
458be23b9bSNathan Rossi      device.
468be23b9bSNathan Rossi
478be23b9bSNathan Rossi      For devices that have a configurable PGA (e.g. INA209, INA219, INA220),
488be23b9bSNathan Rossi      the gain value maps directly with the PG bits of the config register.
498be23b9bSNathan Rossi
508be23b9bSNathan Rossi      For devices that have ADCRANGE configuration (e.g. INA238) a shunt-gain
518be23b9bSNathan Rossi      value of 1 maps to ADCRANGE=1 where no gain divisor is applied to the
528be23b9bSNathan Rossi      shunt voltage, and a value of 4 maps to ADCRANGE=0 such that a wider
538be23b9bSNathan Rossi      voltage range is used.
548be23b9bSNathan Rossi
558be23b9bSNathan Rossi      The default value is device dependent, and is defined by the reset value
568be23b9bSNathan Rossi      of PGA/ADCRANGE in the respective configuration registers.
578be23b9bSNathan Rossi    $ref: /schemas/types.yaml#/definitions/uint32
588be23b9bSNathan Rossi    enum: [1, 2, 4, 8]
598be23b9bSNathan Rossi
60*4173a5bbSSvyatoslav Ryhel  vs-supply:
61*4173a5bbSSvyatoslav Ryhel    description: phandle to the regulator that provides the VS supply typically
62*4173a5bbSSvyatoslav Ryhel      in range from 2.7 V to 5.5 V.
63*4173a5bbSSvyatoslav Ryhel
6494f1ab94SKrzysztof Kozlowskirequired:
6594f1ab94SKrzysztof Kozlowski  - compatible
6694f1ab94SKrzysztof Kozlowski  - reg
6794f1ab94SKrzysztof Kozlowski
6894f1ab94SKrzysztof KozlowskiadditionalProperties: false
6994f1ab94SKrzysztof Kozlowski
7094f1ab94SKrzysztof Kozlowskiexamples:
7194f1ab94SKrzysztof Kozlowski  - |
7294f1ab94SKrzysztof Kozlowski    i2c {
7394f1ab94SKrzysztof Kozlowski        #address-cells = <1>;
7494f1ab94SKrzysztof Kozlowski        #size-cells = <0>;
7594f1ab94SKrzysztof Kozlowski
7694f1ab94SKrzysztof Kozlowski        power-sensor@44 {
7794f1ab94SKrzysztof Kozlowski            compatible = "ti,ina220";
7894f1ab94SKrzysztof Kozlowski            reg = <0x44>;
7994f1ab94SKrzysztof Kozlowski            shunt-resistor = <1000>;
80*4173a5bbSSvyatoslav Ryhel            vs-supply = <&vdd_3v0>;
8194f1ab94SKrzysztof Kozlowski        };
8294f1ab94SKrzysztof Kozlowski    };
83