102 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---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 monitors9 10maintainers:11 - Krzysztof Kozlowski <krzk@kernel.org>12 13description: |14 The INA209 is a high-side current shunt and power monitor with15 an I2C interface.16 17 Datasheets:18 https://www.ti.com/product/INA20919 20properties:21 compatible:22 enum:23 - ti,ina20924 - ti,ina21925 - ti,ina22026 - ti,ina22627 - ti,ina23028 - ti,ina23129 - ti,ina23730 - ti,ina23831 - ti,ina26032 33 reg:34 maxItems: 135 36 "#io-channel-cells":37 const: 138 39 shunt-resistor:40 description:41 Shunt resistor value in micro-Ohm.42 $ref: /schemas/types.yaml#/definitions/uint3243 44 ti,shunt-gain:45 description: |46 Programmable gain divisor for the shunt voltage accuracy and range. This47 property only applies to devices that have configurable PGA/ADCRANGE. The48 gain value is used configure the gain and to convert the shunt voltage,49 current and power register values when reading measurements from the50 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-gain56 value of 1 maps to ADCRANGE=1 where no gain divisor is applied to the57 shunt voltage, and a value of 4 maps to ADCRANGE=0 such that a wider58 voltage range is used.59 60 The default value is device dependent, and is defined by the reset value61 of PGA/ADCRANGE in the respective configuration registers.62 $ref: /schemas/types.yaml#/definitions/uint3263 enum: [1, 2, 4, 8]64 65 vs-supply:66 description: phandle to the regulator that provides the VS supply typically67 in range from 2.7 V to 5.5 V.68 69 ti,alert-polarity-active-high:70 description: Alert pin is asserted based on the value of Alert polarity Bit71 of Mask/Enable register. Default value is Normal (0 which maps to72 active-low open collector). The other value is Inverted73 (1 which maps to active-high open collector). Specify this property to set74 the alert polarity to active-high.75 $ref: /schemas/types.yaml#/definitions/flag76 77required:78 - compatible79 - reg80 81allOf:82 - $ref: hwmon-common.yaml#83 84unevaluatedProperties: false85 86examples:87 - |88 i2c {89 #address-cells = <1>;90 #size-cells = <0>;91 92 power-sensor@44 {93 compatible = "ti,ina220";94 reg = <0x44>;95 #io-channel-cells = <1>;96 label = "vdd_3v0";97 shunt-resistor = <1000>;98 vs-supply = <&vdd_3v0>;99 ti,alert-polarity-active-high;100 };101 };102