Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 1 | Kernel driver ina2xx |
| 2 | ==================== |
| 3 | |
| 4 | Supported chips: |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 5 | |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 6 | * Texas Instruments INA219 |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 7 | |
| 8 | |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 9 | Prefix: 'ina219' |
| 10 | Addresses: I2C 0x40 - 0x4f |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 11 | |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 12 | Datasheet: Publicly available at the Texas Instruments website |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 13 | |
| 14 | http://www.ti.com/ |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 15 | |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 16 | * Texas Instruments INA220 |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 17 | |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 18 | Prefix: 'ina220' |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 19 | |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 20 | Addresses: I2C 0x40 - 0x4f |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 21 | |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 22 | Datasheet: Publicly available at the Texas Instruments website |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 23 | |
| 24 | http://www.ti.com/ |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 25 | |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 26 | * Texas Instruments INA226 |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 27 | |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 28 | Prefix: 'ina226' |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 29 | |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 30 | Addresses: I2C 0x40 - 0x4f |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 31 | |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 32 | Datasheet: Publicly available at the Texas Instruments website |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 33 | |
| 34 | http://www.ti.com/ |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 35 | |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 36 | * Texas Instruments INA230 |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 37 | |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 38 | Prefix: 'ina230' |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 39 | |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 40 | Addresses: I2C 0x40 - 0x4f |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 41 | |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 42 | Datasheet: Publicly available at the Texas Instruments website |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 43 | |
| 44 | http://www.ti.com/ |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 45 | |
Kevin Hilman | add513b | 2015-01-14 17:34:58 -0800 | [diff] [blame] | 46 | * Texas Instruments INA231 |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 47 | |
Kevin Hilman | add513b | 2015-01-14 17:34:58 -0800 | [diff] [blame] | 48 | Prefix: 'ina231' |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 49 | |
Kevin Hilman | add513b | 2015-01-14 17:34:58 -0800 | [diff] [blame] | 50 | Addresses: I2C 0x40 - 0x4f |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 51 | |
Kevin Hilman | add513b | 2015-01-14 17:34:58 -0800 | [diff] [blame] | 52 | Datasheet: Publicly available at the Texas Instruments website |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 53 | |
| 54 | http://www.ti.com/ |
Kevin Hilman | add513b | 2015-01-14 17:34:58 -0800 | [diff] [blame] | 55 | |
Lothar Felten | 3ad8670 | 2018-08-14 09:09:37 +0200 | [diff] [blame] | 56 | Author: Lothar Felten <lothar.felten@gmail.com> |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 57 | |
| 58 | Description |
| 59 | ----------- |
| 60 | |
| 61 | The INA219 is a high-side current shunt and power monitor with an I2C |
| 62 | interface. The INA219 monitors both shunt drop and supply voltage, with |
| 63 | programmable conversion times and filtering. |
| 64 | |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 65 | The INA220 is a high or low side current shunt and power monitor with an I2C |
| 66 | interface. The INA220 monitors both shunt drop and supply voltage. |
| 67 | |
Felten, Lothar | f7c2fe3 | 2012-05-12 04:36:38 -0400 | [diff] [blame] | 68 | The INA226 is a current shunt and power monitor with an I2C interface. |
| 69 | The INA226 monitors both a shunt voltage drop and bus supply voltage. |
| 70 | |
Kevin Hilman | add513b | 2015-01-14 17:34:58 -0800 | [diff] [blame] | 71 | INA230 and INA231 are high or low side current shunt and power monitors |
| 72 | with an I2C interface. The chips monitor both a shunt voltage drop and |
| 73 | bus supply voltage. |
Guenter Roeck | dc92cd0 | 2012-05-12 11:33:11 -0700 | [diff] [blame] | 74 | |
Bartosz Golaszewski | 8a5fc79 | 2015-01-05 15:20:55 +0100 | [diff] [blame] | 75 | The shunt value in micro-ohms can be set via platform data or device tree at |
| 76 | compile-time or via the shunt_resistor attribute in sysfs at run-time. Please |
Mauro Carvalho Chehab | 34962fb | 2018-05-08 15:14:57 -0300 | [diff] [blame] | 77 | refer to the Documentation/devicetree/bindings/hwmon/ina2xx.txt for bindings |
Tang Yuantian | 31e7ad7 | 2013-06-19 14:50:20 +0800 | [diff] [blame] | 78 | if the device tree is used. |
Bartosz Golaszewski | 72a87a4 | 2015-01-09 17:03:42 +0100 | [diff] [blame] | 79 | |
| 80 | Additionally ina226 supports update_interval attribute as described in |
Mauro Carvalho Chehab | 7ebd8b66 | 2019-04-17 06:46:29 -0300 | [diff] [blame] | 81 | Documentation/hwmon/sysfs-interface.rst. Internally the interval is the sum of |
Bartosz Golaszewski | 72a87a4 | 2015-01-09 17:03:42 +0100 | [diff] [blame] | 82 | bus and shunt voltage conversion times multiplied by the averaging rate. We |
| 83 | don't touch the conversion times and only modify the number of averages. The |
| 84 | lower limit of the update_interval is 2 ms, the upper limit is 2253 ms. |
| 85 | The actual programmed interval may vary from the desired value. |
Nicolin Chen | 9a629d7 | 2018-11-19 12:31:16 -0800 | [diff] [blame] | 86 | |
| 87 | General sysfs entries |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 88 | --------------------- |
Nicolin Chen | 9a629d7 | 2018-11-19 12:31:16 -0800 | [diff] [blame] | 89 | |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 90 | ======================= =============================== |
Nicolin Chen | 9a629d7 | 2018-11-19 12:31:16 -0800 | [diff] [blame] | 91 | in0_input Shunt voltage(mV) channel |
| 92 | in1_input Bus voltage(mV) channel |
| 93 | curr1_input Current(mA) measurement channel |
| 94 | power1_input Power(uW) measurement channel |
| 95 | shunt_resistor Shunt resistance(uOhm) channel |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 96 | ======================= =============================== |
Nicolin Chen | 9a629d7 | 2018-11-19 12:31:16 -0800 | [diff] [blame] | 97 | |
| 98 | Sysfs entries for ina226, ina230 and ina231 only |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 99 | ------------------------------------------------ |
Nicolin Chen | 9a629d7 | 2018-11-19 12:31:16 -0800 | [diff] [blame] | 100 | |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 101 | ======================= ==================================================== |
Nicolin Chen | 9a629d7 | 2018-11-19 12:31:16 -0800 | [diff] [blame] | 102 | update_interval data conversion time; affects number of samples used |
| 103 | to average results for shunt and bus voltages. |
Mauro Carvalho Chehab | b32570a | 2019-04-17 06:46:27 -0300 | [diff] [blame] | 104 | ======================= ==================================================== |