Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | |
| 5 | $id: http://devicetree.org/schemas/hwmon/ti,ina2xx.yaml# |
| 6 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 7 | |
| 8 | title: Texas Instruments INA209 family of power/voltage monitors |
| 9 | |
| 10 | maintainers: |
| 11 | - Krzysztof Kozlowski <krzk@kernel.org> |
| 12 | |
| 13 | description: | |
| 14 | The INA209 is a high-side current shunt and power monitor with |
| 15 | an I2C interface. |
| 16 | |
| 17 | Datasheets: |
| 18 | https://www.ti.com/product/INA209 |
| 19 | |
| 20 | properties: |
| 21 | compatible: |
| 22 | enum: |
| 23 | - ti,ina209 |
| 24 | - ti,ina219 |
| 25 | - ti,ina220 |
| 26 | - ti,ina226 |
| 27 | - ti,ina230 |
| 28 | - ti,ina231 |
| 29 | - ti,ina237 |
| 30 | - ti,ina238 |
| 31 | |
| 32 | reg: |
| 33 | maxItems: 1 |
| 34 | |
| 35 | shunt-resistor: |
| 36 | description: |
| 37 | Shunt resistor value in micro-Ohm. |
| 38 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 39 | |
| 40 | ti,shunt-gain: |
| 41 | description: | |
| 42 | Programmable gain divisor for the shunt voltage accuracy and range. This |
| 43 | property only applies to devices that have configurable PGA/ADCRANGE. The |
| 44 | gain value is used configure the gain and to convert the shunt voltage, |
| 45 | current and power register values when reading measurements from the |
| 46 | device. |
| 47 | |
| 48 | For devices that have a configurable PGA (e.g. INA209, INA219, INA220), |
| 49 | the gain value maps directly with the PG bits of the config register. |
| 50 | |
| 51 | For devices that have ADCRANGE configuration (e.g. INA238) a shunt-gain |
| 52 | value of 1 maps to ADCRANGE=1 where no gain divisor is applied to the |
| 53 | shunt voltage, and a value of 4 maps to ADCRANGE=0 such that a wider |
| 54 | voltage range is used. |
| 55 | |
| 56 | The default value is device dependent, and is defined by the reset value |
| 57 | of PGA/ADCRANGE in the respective configuration registers. |
| 58 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 59 | enum: [1, 2, 4, 8] |
| 60 | |
| 61 | vs-supply: |
| 62 | description: phandle to the regulator that provides the VS supply typically |
| 63 | in range from 2.7 V to 5.5 V. |
| 64 | |
| 65 | required: |
| 66 | - compatible |
| 67 | - reg |
| 68 | |
| 69 | additionalProperties: false |
| 70 | |
| 71 | examples: |
| 72 | - | |
| 73 | i2c { |
| 74 | #address-cells = <1>; |
| 75 | #size-cells = <0>; |
| 76 | |
| 77 | power-sensor@44 { |
| 78 | compatible = "ti,ina220"; |
| 79 | reg = <0x44>; |
| 80 | shunt-resistor = <1000>; |
| 81 | vs-supply = <&vdd_3v0>; |
| 82 | }; |
| 83 | }; |