162306a36Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci$id: http://devicetree.org/schemas/hwmon/ti,ina2xx.yaml#
662306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
762306a36Sopenharmony_ci
862306a36Sopenharmony_cititle: Texas Instruments INA209 family of power/voltage monitors
962306a36Sopenharmony_ci
1062306a36Sopenharmony_cimaintainers:
1162306a36Sopenharmony_ci  - Krzysztof Kozlowski <krzk@kernel.org>
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_cidescription: |
1462306a36Sopenharmony_ci  The INA209 is a high-side current shunt and power monitor with
1562306a36Sopenharmony_ci  an I2C interface.
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci  Datasheets:
1862306a36Sopenharmony_ci    https://www.ti.com/product/INA209
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciproperties:
2162306a36Sopenharmony_ci  compatible:
2262306a36Sopenharmony_ci    enum:
2362306a36Sopenharmony_ci      - ti,ina209
2462306a36Sopenharmony_ci      - ti,ina219
2562306a36Sopenharmony_ci      - ti,ina220
2662306a36Sopenharmony_ci      - ti,ina226
2762306a36Sopenharmony_ci      - ti,ina230
2862306a36Sopenharmony_ci      - ti,ina231
2962306a36Sopenharmony_ci      - ti,ina238
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci  reg:
3262306a36Sopenharmony_ci    maxItems: 1
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci  shunt-resistor:
3562306a36Sopenharmony_ci    description:
3662306a36Sopenharmony_ci      Shunt resistor value in micro-Ohm.
3762306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci  ti,shunt-gain:
4062306a36Sopenharmony_ci    description: |
4162306a36Sopenharmony_ci      Programmable gain divisor for the shunt voltage accuracy and range. This
4262306a36Sopenharmony_ci      property only applies to devices that have configurable PGA/ADCRANGE. The
4362306a36Sopenharmony_ci      gain value is used configure the gain and to convert the shunt voltage,
4462306a36Sopenharmony_ci      current and power register values when reading measurements from the
4562306a36Sopenharmony_ci      device.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci      For devices that have a configurable PGA (e.g. INA209, INA219, INA220),
4862306a36Sopenharmony_ci      the gain value maps directly with the PG bits of the config register.
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci      For devices that have ADCRANGE configuration (e.g. INA238) a shunt-gain
5162306a36Sopenharmony_ci      value of 1 maps to ADCRANGE=1 where no gain divisor is applied to the
5262306a36Sopenharmony_ci      shunt voltage, and a value of 4 maps to ADCRANGE=0 such that a wider
5362306a36Sopenharmony_ci      voltage range is used.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci      The default value is device dependent, and is defined by the reset value
5662306a36Sopenharmony_ci      of PGA/ADCRANGE in the respective configuration registers.
5762306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
5862306a36Sopenharmony_ci    enum: [1, 2, 4, 8]
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci  vs-supply:
6162306a36Sopenharmony_ci    description: phandle to the regulator that provides the VS supply typically
6262306a36Sopenharmony_ci      in range from 2.7 V to 5.5 V.
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_cirequired:
6562306a36Sopenharmony_ci  - compatible
6662306a36Sopenharmony_ci  - reg
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ciadditionalProperties: false
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ciexamples:
7162306a36Sopenharmony_ci  - |
7262306a36Sopenharmony_ci    i2c {
7362306a36Sopenharmony_ci        #address-cells = <1>;
7462306a36Sopenharmony_ci        #size-cells = <0>;
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci        power-sensor@44 {
7762306a36Sopenharmony_ci            compatible = "ti,ina220";
7862306a36Sopenharmony_ci            reg = <0x44>;
7962306a36Sopenharmony_ci            shunt-resistor = <1000>;
8062306a36Sopenharmony_ci            vs-supply = <&vdd_3v0>;
8162306a36Sopenharmony_ci        };
8262306a36Sopenharmony_ci    };
83