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 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 - silergy,sy24655 24 - ti,ina209 25 - ti,ina219 26 - ti,ina220 27 - ti,ina226 28 - ti,ina230 29 - ti,ina231 30 - ti,ina237 31 - ti,ina238 32 - ti,ina260 33 34 reg: 35 maxItems: 1 36 37 "#io-channel-cells": 38 const: 1 39 40 shunt-resistor: 41 description: 42 Shunt resistor value in micro-Ohm. 43 $ref: /schemas/types.yaml#/definitions/uint32 44 45 ti,shunt-gain: 46 description: | 47 Programmable gain divisor for the shunt voltage accuracy and range. This 48 property only applies to devices that have configurable PGA/ADCRANGE. The 49 gain value is used configure the gain and to convert the shunt voltage, 50 current and power register values when reading measurements from the 51 device. 52 53 For devices that have a configurable PGA (e.g. INA209, INA219, INA220), 54 the gain value maps directly with the PG bits of the config register. 55 56 For devices that have ADCRANGE configuration (e.g. INA238) a shunt-gain 57 value of 1 maps to ADCRANGE=1 where no gain divisor is applied to the 58 shunt voltage, and a value of 4 maps to ADCRANGE=0 such that a wider 59 voltage range is used. 60 61 The default value is device dependent, and is defined by the reset value 62 of PGA/ADCRANGE in the respective configuration registers. 63 $ref: /schemas/types.yaml#/definitions/uint32 64 enum: [1, 2, 4, 8] 65 66 vs-supply: 67 description: phandle to the regulator that provides the VS supply typically 68 in range from 2.7 V to 5.5 V. 69 70 ti,alert-polarity-active-high: 71 description: Alert pin is asserted based on the value of Alert polarity Bit 72 of Mask/Enable register. Default value is Normal (0 which maps to 73 active-low open collector). The other value is Inverted 74 (1 which maps to active-high open collector). Specify this property to set 75 the alert polarity to active-high. 76 $ref: /schemas/types.yaml#/definitions/flag 77 78required: 79 - compatible 80 - reg 81 82allOf: 83 - $ref: hwmon-common.yaml# 84 85unevaluatedProperties: false 86 87examples: 88 - | 89 i2c { 90 #address-cells = <1>; 91 #size-cells = <0>; 92 93 power-sensor@44 { 94 compatible = "ti,ina220"; 95 reg = <0x44>; 96 #io-channel-cells = <1>; 97 label = "vdd_3v0"; 98 shunt-resistor = <1000>; 99 vs-supply = <&vdd_3v0>; 100 ti,alert-polarity-active-high; 101 }; 102 }; 103