xref: /openbmc/linux/Documentation/hwmon/ina209.rst (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
17ebd8b66SMauro Carvalho ChehabKernel driver ina209
27ebd8b66SMauro Carvalho Chehab====================
37ebd8b66SMauro Carvalho Chehab
47ebd8b66SMauro Carvalho ChehabSupported chips:
57ebd8b66SMauro Carvalho Chehab
67ebd8b66SMauro Carvalho Chehab  * Burr-Brown / Texas Instruments INA209
77ebd8b66SMauro Carvalho Chehab
87ebd8b66SMauro Carvalho Chehab    Prefix: 'ina209'
97ebd8b66SMauro Carvalho Chehab
107ebd8b66SMauro Carvalho Chehab    Addresses scanned: -
117ebd8b66SMauro Carvalho Chehab
127ebd8b66SMauro Carvalho Chehab    Datasheet:
13*009f429fSAlexander A. Klimov	https://www.ti.com/lit/gpn/ina209
147ebd8b66SMauro Carvalho Chehab
157ebd8b66SMauro Carvalho ChehabAuthor:
167ebd8b66SMauro Carvalho Chehab	- Paul Hays <Paul.Hays@cattail.ca>
177ebd8b66SMauro Carvalho Chehab	- Ira W. Snyder <iws@ovro.caltech.edu>
187ebd8b66SMauro Carvalho Chehab	- Guenter Roeck <linux@roeck-us.net>
197ebd8b66SMauro Carvalho Chehab
207ebd8b66SMauro Carvalho Chehab
217ebd8b66SMauro Carvalho ChehabDescription
227ebd8b66SMauro Carvalho Chehab-----------
237ebd8b66SMauro Carvalho Chehab
247ebd8b66SMauro Carvalho ChehabThe TI / Burr-Brown INA209 monitors voltage, current, and power on the high side
257ebd8b66SMauro Carvalho Chehabof a D.C. power supply. It can perform measurements and calculations in the
267ebd8b66SMauro Carvalho Chehabbackground to supply readings at any time. It includes a programmable
277ebd8b66SMauro Carvalho Chehabcalibration multiplier to scale the displayed current and power values.
287ebd8b66SMauro Carvalho Chehab
297ebd8b66SMauro Carvalho Chehab
307ebd8b66SMauro Carvalho ChehabSysfs entries
317ebd8b66SMauro Carvalho Chehab-------------
327ebd8b66SMauro Carvalho Chehab
337ebd8b66SMauro Carvalho ChehabThe INA209 chip is highly configurable both via hardwiring and via
347ebd8b66SMauro Carvalho Chehabthe I2C bus. See the datasheet for details.
357ebd8b66SMauro Carvalho Chehab
367ebd8b66SMauro Carvalho ChehabThis tries to expose most monitoring features of the hardware via
377ebd8b66SMauro Carvalho Chehabsysfs. It does not support every feature of this chip.
387ebd8b66SMauro Carvalho Chehab
397ebd8b66SMauro Carvalho Chehab======================= =======================================================
407ebd8b66SMauro Carvalho Chehabin0_input		shunt voltage (mV)
417ebd8b66SMauro Carvalho Chehabin0_input_highest	shunt voltage historical maximum reading (mV)
427ebd8b66SMauro Carvalho Chehabin0_input_lowest	shunt voltage historical minimum reading (mV)
437ebd8b66SMauro Carvalho Chehabin0_reset_history	reset shunt voltage history
447ebd8b66SMauro Carvalho Chehabin0_max			shunt voltage max alarm limit (mV)
457ebd8b66SMauro Carvalho Chehabin0_min			shunt voltage min alarm limit (mV)
467ebd8b66SMauro Carvalho Chehabin0_crit_max		shunt voltage crit max alarm limit (mV)
477ebd8b66SMauro Carvalho Chehabin0_crit_min		shunt voltage crit min alarm limit (mV)
487ebd8b66SMauro Carvalho Chehabin0_max_alarm		shunt voltage max alarm limit exceeded
497ebd8b66SMauro Carvalho Chehabin0_min_alarm		shunt voltage min alarm limit exceeded
507ebd8b66SMauro Carvalho Chehabin0_crit_max_alarm	shunt voltage crit max alarm limit exceeded
517ebd8b66SMauro Carvalho Chehabin0_crit_min_alarm	shunt voltage crit min alarm limit exceeded
527ebd8b66SMauro Carvalho Chehab
537ebd8b66SMauro Carvalho Chehabin1_input		bus voltage (mV)
547ebd8b66SMauro Carvalho Chehabin1_input_highest	bus voltage historical maximum reading (mV)
557ebd8b66SMauro Carvalho Chehabin1_input_lowest	bus voltage historical minimum reading (mV)
567ebd8b66SMauro Carvalho Chehabin1_reset_history	reset bus voltage history
577ebd8b66SMauro Carvalho Chehabin1_max			bus voltage max alarm limit (mV)
587ebd8b66SMauro Carvalho Chehabin1_min			bus voltage min alarm limit (mV)
597ebd8b66SMauro Carvalho Chehabin1_crit_max		bus voltage crit max alarm limit (mV)
607ebd8b66SMauro Carvalho Chehabin1_crit_min		bus voltage crit min alarm limit (mV)
617ebd8b66SMauro Carvalho Chehabin1_max_alarm		bus voltage max alarm limit exceeded
627ebd8b66SMauro Carvalho Chehabin1_min_alarm		bus voltage min alarm limit exceeded
637ebd8b66SMauro Carvalho Chehabin1_crit_max_alarm	bus voltage crit max alarm limit exceeded
647ebd8b66SMauro Carvalho Chehabin1_crit_min_alarm	bus voltage crit min alarm limit exceeded
657ebd8b66SMauro Carvalho Chehab
667ebd8b66SMauro Carvalho Chehabpower1_input		power measurement (uW)
677ebd8b66SMauro Carvalho Chehabpower1_input_highest	power historical maximum reading (uW)
687ebd8b66SMauro Carvalho Chehabpower1_reset_history	reset power history
697ebd8b66SMauro Carvalho Chehabpower1_max		power max alarm limit (uW)
707ebd8b66SMauro Carvalho Chehabpower1_crit		power crit alarm limit (uW)
717ebd8b66SMauro Carvalho Chehabpower1_max_alarm	power max alarm limit exceeded
727ebd8b66SMauro Carvalho Chehabpower1_crit_alarm	power crit alarm limit exceeded
737ebd8b66SMauro Carvalho Chehab
747ebd8b66SMauro Carvalho Chehabcurr1_input		current measurement (mA)
757ebd8b66SMauro Carvalho Chehab
767ebd8b66SMauro Carvalho Chehabupdate_interval		data conversion time; affects number of samples used
777ebd8b66SMauro Carvalho Chehab			to average results for shunt and bus voltages.
787ebd8b66SMauro Carvalho Chehab======================= =======================================================
797ebd8b66SMauro Carvalho Chehab
807ebd8b66SMauro Carvalho ChehabGeneral Remarks
817ebd8b66SMauro Carvalho Chehab---------------
827ebd8b66SMauro Carvalho Chehab
837ebd8b66SMauro Carvalho ChehabThe power and current registers in this chip require that the calibration
847ebd8b66SMauro Carvalho Chehabregister is programmed correctly before they are used. Normally this is expected
857ebd8b66SMauro Carvalho Chehabto be done in the BIOS. In the absence of BIOS programming, the shunt resistor
867ebd8b66SMauro Carvalho Chehabvoltage can be provided using platform data. The driver uses platform data from
877ebd8b66SMauro Carvalho Chehabthe ina2xx driver for this purpose. If calibration register data is not provided
887ebd8b66SMauro Carvalho Chehabvia platform data, the driver checks if the calibration register has been
897ebd8b66SMauro Carvalho Chehabprogrammed (ie has a value not equal to zero). If so, this value is retained.
907ebd8b66SMauro Carvalho ChehabOtherwise, a default value reflecting a shunt resistor value of 10 mOhm is
917ebd8b66SMauro Carvalho Chehabprogrammed into the calibration register.
927ebd8b66SMauro Carvalho Chehab
937ebd8b66SMauro Carvalho Chehab
947ebd8b66SMauro Carvalho ChehabOutput Pins
957ebd8b66SMauro Carvalho Chehab-----------
967ebd8b66SMauro Carvalho Chehab
977ebd8b66SMauro Carvalho ChehabOutput pin programming is a board feature which depends on the BIOS. It is
987ebd8b66SMauro Carvalho Chehaboutside the scope of a hardware monitoring driver to enable or disable output
997ebd8b66SMauro Carvalho Chehabpins.
100