blob: df86c2c92037530ef2a1fff24668ddf66851cedb [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# 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
8title: Texas Instruments INA209 family of power/voltage monitors
9
10maintainers:
11 - Krzysztof Kozlowski <krzk@kernel.org>
12
13description: |
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
20properties:
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
Tom Rini6bb92fc2024-05-20 09:54:58 -060031 - ti,ina260
Tom Rini53633a82024-02-29 12:33:36 -050032
33 reg:
34 maxItems: 1
35
Tom Rini6bb92fc2024-05-20 09:54:58 -060036 "#io-channel-cells":
37 const: 1
38
Tom Rini53633a82024-02-29 12:33:36 -050039 shunt-resistor:
40 description:
41 Shunt resistor value in micro-Ohm.
42 $ref: /schemas/types.yaml#/definitions/uint32
43
44 ti,shunt-gain:
45 description: |
46 Programmable gain divisor for the shunt voltage accuracy and range. This
47 property only applies to devices that have configurable PGA/ADCRANGE. The
48 gain value is used configure the gain and to convert the shunt voltage,
49 current and power register values when reading measurements from the
50 device.
51
52 For devices that have a configurable PGA (e.g. INA209, INA219, INA220),
53 the gain value maps directly with the PG bits of the config register.
54
55 For devices that have ADCRANGE configuration (e.g. INA238) a shunt-gain
56 value of 1 maps to ADCRANGE=1 where no gain divisor is applied to the
57 shunt voltage, and a value of 4 maps to ADCRANGE=0 such that a wider
58 voltage range is used.
59
60 The default value is device dependent, and is defined by the reset value
61 of PGA/ADCRANGE in the respective configuration registers.
62 $ref: /schemas/types.yaml#/definitions/uint32
63 enum: [1, 2, 4, 8]
64
65 vs-supply:
66 description: phandle to the regulator that provides the VS supply typically
67 in range from 2.7 V to 5.5 V.
68
69required:
70 - compatible
71 - reg
72
Tom Rini6bb92fc2024-05-20 09:54:58 -060073allOf:
74 - $ref: hwmon-common.yaml#
75
76unevaluatedProperties: false
Tom Rini53633a82024-02-29 12:33:36 -050077
78examples:
79 - |
80 i2c {
81 #address-cells = <1>;
82 #size-cells = <0>;
83
84 power-sensor@44 {
85 compatible = "ti,ina220";
86 reg = <0x44>;
Tom Rini6bb92fc2024-05-20 09:54:58 -060087 #io-channel-cells = <1>;
88 label = "vdd_3v0";
Tom Rini53633a82024-02-29 12:33:36 -050089 shunt-resistor = <1000>;
90 vs-supply = <&vdd_3v0>;
91 };
92 };