194f1ab94SKrzysztof Kozlowski# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 294f1ab94SKrzysztof Kozlowski%YAML 1.2 394f1ab94SKrzysztof Kozlowski--- 494f1ab94SKrzysztof Kozlowski$id: http://devicetree.org/schemas/hwmon/ti,ina2xx.yaml# 594f1ab94SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml# 694f1ab94SKrzysztof Kozlowski 794f1ab94SKrzysztof Kozlowskititle: Texas Instruments INA209 family of power/voltage monitors 894f1ab94SKrzysztof Kozlowski 994f1ab94SKrzysztof Kozlowskimaintainers: 1094f1ab94SKrzysztof Kozlowski - Krzysztof Kozlowski <krzk@kernel.org> 1194f1ab94SKrzysztof Kozlowski 1294f1ab94SKrzysztof Kozlowskidescription: | 1394f1ab94SKrzysztof Kozlowski The INA209 is a high-side current shunt and power monitor with 1494f1ab94SKrzysztof Kozlowski an I2C interface. 1594f1ab94SKrzysztof Kozlowski 1694f1ab94SKrzysztof Kozlowski Datasheets: 1794f1ab94SKrzysztof Kozlowski https://www.ti.com/product/INA209 1894f1ab94SKrzysztof Kozlowski 1994f1ab94SKrzysztof Kozlowskiproperties: 2094f1ab94SKrzysztof Kozlowski compatible: 2194f1ab94SKrzysztof Kozlowski enum: 220196d07fSWenliang Yan - silergy,sy24655 2394f1ab94SKrzysztof Kozlowski - ti,ina209 2494f1ab94SKrzysztof Kozlowski - ti,ina219 2594f1ab94SKrzysztof Kozlowski - ti,ina220 2694f1ab94SKrzysztof Kozlowski - ti,ina226 2794f1ab94SKrzysztof Kozlowski - ti,ina230 2894f1ab94SKrzysztof Kozlowski - ti,ina231 29*52ffdbbdSLeo Yang - ti,ina233 30b1f05cb4SRichard Leitner - ti,ina237 31ed68a0efSNathan Rossi - ti,ina238 32f7ab2d18SMichal Simek - ti,ina260 3394f1ab94SKrzysztof Kozlowski 3494f1ab94SKrzysztof Kozlowski reg: 3594f1ab94SKrzysztof Kozlowski maxItems: 1 3694f1ab94SKrzysztof Kozlowski 37f29996d0SMichal Simek "#io-channel-cells": 38f29996d0SMichal Simek const: 1 39f29996d0SMichal Simek 4094f1ab94SKrzysztof Kozlowski shunt-resistor: 4194f1ab94SKrzysztof Kozlowski description: 4294f1ab94SKrzysztof Kozlowski Shunt resistor value in micro-Ohm. 4394f1ab94SKrzysztof Kozlowski $ref: /schemas/types.yaml#/definitions/uint32 4494f1ab94SKrzysztof Kozlowski 458be23b9bSNathan Rossi ti,shunt-gain: 468be23b9bSNathan Rossi description: | 478be23b9bSNathan Rossi Programmable gain divisor for the shunt voltage accuracy and range. This 488be23b9bSNathan Rossi property only applies to devices that have configurable PGA/ADCRANGE. The 498be23b9bSNathan Rossi gain value is used configure the gain and to convert the shunt voltage, 508be23b9bSNathan Rossi current and power register values when reading measurements from the 518be23b9bSNathan Rossi device. 528be23b9bSNathan Rossi 538be23b9bSNathan Rossi For devices that have a configurable PGA (e.g. INA209, INA219, INA220), 548be23b9bSNathan Rossi the gain value maps directly with the PG bits of the config register. 558be23b9bSNathan Rossi 568be23b9bSNathan Rossi For devices that have ADCRANGE configuration (e.g. INA238) a shunt-gain 578be23b9bSNathan Rossi value of 1 maps to ADCRANGE=1 where no gain divisor is applied to the 588be23b9bSNathan Rossi shunt voltage, and a value of 4 maps to ADCRANGE=0 such that a wider 598be23b9bSNathan Rossi voltage range is used. 608be23b9bSNathan Rossi 618be23b9bSNathan Rossi The default value is device dependent, and is defined by the reset value 628be23b9bSNathan Rossi of PGA/ADCRANGE in the respective configuration registers. 638be23b9bSNathan Rossi $ref: /schemas/types.yaml#/definitions/uint32 648be23b9bSNathan Rossi enum: [1, 2, 4, 8] 658be23b9bSNathan Rossi 664173a5bbSSvyatoslav Ryhel vs-supply: 674173a5bbSSvyatoslav Ryhel description: phandle to the regulator that provides the VS supply typically 684173a5bbSSvyatoslav Ryhel in range from 2.7 V to 5.5 V. 694173a5bbSSvyatoslav Ryhel 7094e33109SAmna Waseem ti,alert-polarity-active-high: 7194e33109SAmna Waseem description: Alert pin is asserted based on the value of Alert polarity Bit 7294e33109SAmna Waseem of Mask/Enable register. Default value is Normal (0 which maps to 7394e33109SAmna Waseem active-low open collector). The other value is Inverted 7494e33109SAmna Waseem (1 which maps to active-high open collector). Specify this property to set 7594e33109SAmna Waseem the alert polarity to active-high. 7694e33109SAmna Waseem $ref: /schemas/types.yaml#/definitions/flag 7794e33109SAmna Waseem 78*52ffdbbdSLeo Yang ti,maximum-expected-current-microamp: 79*52ffdbbdSLeo Yang description: | 80*52ffdbbdSLeo Yang This value indicates the maximum current in microamps that you can 81*52ffdbbdSLeo Yang expect to measure with ina233 in your circuit. 82*52ffdbbdSLeo Yang 83*52ffdbbdSLeo Yang This value will be used to calculate the Current_LSB and current/power 84*52ffdbbdSLeo Yang coefficient for the pmbus and to calibrate the IC. 85*52ffdbbdSLeo Yang minimum: 32768 86*52ffdbbdSLeo Yang maximum: 4294967295 87*52ffdbbdSLeo Yang default: 32768000 88*52ffdbbdSLeo Yang 8994f1ab94SKrzysztof Kozlowskirequired: 9094f1ab94SKrzysztof Kozlowski - compatible 9194f1ab94SKrzysztof Kozlowski - reg 9294f1ab94SKrzysztof Kozlowski 9367db0ea3SKrzysztof KozlowskiallOf: 9467db0ea3SKrzysztof Kozlowski - $ref: hwmon-common.yaml# 95*52ffdbbdSLeo Yang - if: 96*52ffdbbdSLeo Yang properties: 97*52ffdbbdSLeo Yang compatible: 98*52ffdbbdSLeo Yang contains: 99*52ffdbbdSLeo Yang enum: 100*52ffdbbdSLeo Yang - silergy,sy24655 101*52ffdbbdSLeo Yang - ti,ina209 102*52ffdbbdSLeo Yang - ti,ina219 103*52ffdbbdSLeo Yang - ti,ina220 104*52ffdbbdSLeo Yang - ti,ina226 105*52ffdbbdSLeo Yang - ti,ina230 106*52ffdbbdSLeo Yang - ti,ina231 107*52ffdbbdSLeo Yang - ti,ina237 108*52ffdbbdSLeo Yang - ti,ina238 109*52ffdbbdSLeo Yang - ti,ina260 110*52ffdbbdSLeo Yang then: 111*52ffdbbdSLeo Yang properties: 112*52ffdbbdSLeo Yang ti,maximum-expected-current-microamp: false 11367db0ea3SKrzysztof Kozlowski 11467db0ea3SKrzysztof KozlowskiunevaluatedProperties: false 11594f1ab94SKrzysztof Kozlowski 11694f1ab94SKrzysztof Kozlowskiexamples: 11794f1ab94SKrzysztof Kozlowski - | 11894f1ab94SKrzysztof Kozlowski i2c { 11994f1ab94SKrzysztof Kozlowski #address-cells = <1>; 12094f1ab94SKrzysztof Kozlowski #size-cells = <0>; 12194f1ab94SKrzysztof Kozlowski 12294f1ab94SKrzysztof Kozlowski power-sensor@44 { 12394f1ab94SKrzysztof Kozlowski compatible = "ti,ina220"; 12494f1ab94SKrzysztof Kozlowski reg = <0x44>; 125f29996d0SMichal Simek #io-channel-cells = <1>; 126eea32fafSMichal Simek label = "vdd_3v0"; 12794f1ab94SKrzysztof Kozlowski shunt-resistor = <1000>; 1284173a5bbSSvyatoslav Ryhel vs-supply = <&vdd_3v0>; 12994e33109SAmna Waseem ti,alert-polarity-active-high; 13094f1ab94SKrzysztof Kozlowski }; 13194f1ab94SKrzysztof Kozlowski }; 132