aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/hwmon/ina238.rst
blob: 43950d1ec551f7f93a5110a40a4e007b49894cba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.. SPDX-License-Identifier: GPL-2.0-only

Kernel driver ina238
====================

Supported chips:

  * Texas Instruments INA228

    Prefix: 'ina228'

    Addresses: I2C 0x40 - 0x4f

    Datasheet:
	https://www.ti.com/lit/gpn/ina228

  * Texas Instruments INA237

    Prefix: 'ina237'

    Addresses: I2C 0x40 - 0x4f

    Datasheet:
	https://www.ti.com/lit/gpn/ina237

  * Texas Instruments INA238

    Prefix: 'ina238'

    Addresses: I2C 0x40 - 0x4f

    Datasheet:
	https://www.ti.com/lit/gpn/ina238

  * Texas Instruments INA700

    Datasheet:
	https://www.ti.com/product/ina700

  * Texas Instruments INA780

    Datasheet:
	https://www.ti.com/product/ina780a

  * Silergy SQ52206

    Prefix: 'SQ52206'

    Addresses: I2C 0x40 - 0x4f

Author: Nathan Rossi <nathan.rossi@digi.com>

Description
-----------

The INA238 is a current shunt, power and temperature monitor with an I2C
interface. It includes a number of programmable functions including alerts,
conversion rate, sample averaging and selectable shunt voltage accuracy.

The shunt value in micro-ohms can be set via device properties, either from
platform code or from device tree data. Please refer to
Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml for bindings if
device tree is used.

INA237 is a functionally equivalent variant of INA238 with slightly
different accuracy. INA228 is another variant of INA238 with higher ADC
resolution. This chip also reports the energy.

INA700 and INA780 are variants of the chip series with built-in shunt resistor.
They also report the energy.

SQ52206 is a mostly compatible chip from Sylergy. It reports the energy
as well as the peak power consumption.

Sysfs entries
-------------

======================= =======================================================
in0_input		Shunt voltage (mV)
in0_min			Minimum shunt voltage threshold (mV)
in0_min_alarm		Minimum shunt voltage alarm
in0_max			Maximum shunt voltage threshold (mV)
in0_max_alarm		Maximum shunt voltage alarm

in1_input		Bus voltage (mV)
in1_min			Minimum bus voltage threshold (mV)
in1_min_alarm		Minimum shunt voltage alarm
in1_max			Maximum bus voltage threshold (mV)
in1_max_alarm		Maximum shunt voltage alarm

power1_input		Power measurement (uW)
power1_max		Maximum power threshold (uW)
power1_max_alarm	Maximum power alarm
power1_input_highest	Peak Power (uW)
				(SQ52206 only)

curr1_input		Current measurement (mA)
curr1_min		Minimum current threshold (mA)
curr1_min_alarm		Minimum current alarm
curr1_max		Maximum current threshold (mA)
curr1_max_alarm		Maximum current alarm

energy1_input		Energy measurement (uJ)
				(SQ52206, INA237, and INA780 only)

temp1_input		Die temperature measurement (mC)
temp1_max		Maximum die temperature threshold (mC)
temp1_max_alarm		Maximum die temperature alarm
======================= =======================================================