Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 
0005 $id: http://devicetree.org/schemas/hwmon/ti,ina2xx.yaml#
0006 $schema: http://devicetree.org/meta-schemas/core.yaml#
0007 
0008 title: Texas Instruments INA209 family of power/voltage monitors
0009 
0010 maintainers:
0011   - Krzysztof Kozlowski <krzk@kernel.org>
0012 
0013 description: |
0014   The INA209 is a high-side current shunt and power monitor with
0015   an I2C interface.
0016 
0017   Datasheets:
0018     https://www.ti.com/product/INA209
0019 
0020 properties:
0021   compatible:
0022     enum:
0023       - ti,ina209
0024       - ti,ina219
0025       - ti,ina220
0026       - ti,ina226
0027       - ti,ina230
0028       - ti,ina231
0029       - ti,ina238
0030 
0031   reg:
0032     maxItems: 1
0033 
0034   shunt-resistor:
0035     description:
0036       Shunt resistor value in micro-Ohm.
0037     $ref: /schemas/types.yaml#/definitions/uint32
0038 
0039   ti,shunt-gain:
0040     description: |
0041       Programmable gain divisor for the shunt voltage accuracy and range. This
0042       property only applies to devices that have configurable PGA/ADCRANGE. The
0043       gain value is used configure the gain and to convert the shunt voltage,
0044       current and power register values when reading measurements from the
0045       device.
0046 
0047       For devices that have a configurable PGA (e.g. INA209, INA219, INA220),
0048       the gain value maps directly with the PG bits of the config register.
0049 
0050       For devices that have ADCRANGE configuration (e.g. INA238) a shunt-gain
0051       value of 1 maps to ADCRANGE=1 where no gain divisor is applied to the
0052       shunt voltage, and a value of 4 maps to ADCRANGE=0 such that a wider
0053       voltage range is used.
0054 
0055       The default value is device dependent, and is defined by the reset value
0056       of PGA/ADCRANGE in the respective configuration registers.
0057     $ref: /schemas/types.yaml#/definitions/uint32
0058     enum: [1, 2, 4, 8]
0059 
0060 required:
0061   - compatible
0062   - reg
0063 
0064 additionalProperties: false
0065 
0066 examples:
0067   - |
0068     i2c {
0069         #address-cells = <1>;
0070         #size-cells = <0>;
0071 
0072         power-sensor@44 {
0073             compatible = "ti,ina220";
0074             reg = <0x44>;
0075             shunt-resistor = <1000>;
0076         };
0077     };