0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 Kernel driver tmp513
0004 ====================
0005
0006 Supported chips:
0007
0008 * Texas Instruments TMP512
0009
0010 Prefix: 'tmp512'
0011
0012 Datasheet: https://www.ti.com/lit/ds/symlink/tmp512.pdf
0013
0014 * Texas Instruments TMP513
0015
0016 Prefix: 'tmp513'
0017
0018 Datasheet: https://www.ti.com/lit/ds/symlink/tmp513.pdf
0019
0020 Authors:
0021
0022 Eric Tremblay <etremblay@distech-controls.com>
0023
0024 Description
0025 -----------
0026
0027 This driver implements support for Texas Instruments TMP512, and TMP513.
0028 The TMP512 (dual-channel) and TMP513 (triple-channel) are system monitors
0029 that include remote sensors, a local temperature sensor, and a high-side current
0030 shunt monitor. These system monitors have the capability of measuring remote
0031 temperatures, on-chip temperatures, and system voltage/power/current
0032 consumption.
0033
0034 The temperatures are measured in degrees Celsius with a range of
0035 -40 to + 125 degrees with a resolution of 0.0625 degree C.
0036
0037 For hysteresis value, only the first channel is writable. Writing to it
0038 will affect all other values since each channels are sharing the same
0039 hysteresis value. The hysteresis is in degrees Celsius with a range of
0040 0 to 127.5 degrees with a resolution of 0.5 degree.
0041
0042 The driver exports the temperature values via the following sysfs files:
0043
0044 **temp[1-4]_input**
0045
0046 **temp[1-4]_crit**
0047
0048 **temp[1-4]_crit_alarm**
0049
0050 **temp[1-4]_crit_hyst**
0051
0052 The driver read the shunt voltage from the chip and convert it to current.
0053 The readable range depends on the "ti,pga-gain" property (default to 8) and the
0054 shunt resistor value. The value resolution will be equal to 10uV/Rshunt.
0055
0056 The driver exports the shunt currents values via the following sysFs files:
0057
0058 **curr1_input**
0059
0060 **curr1_lcrit**
0061
0062 **curr1_lcrit_alarm**
0063
0064 **curr1_crit**
0065
0066 **curr1_crit_alarm**
0067
0068 The bus voltage range is read from the chip with a resolution of 4mV. The chip
0069 can be configurable in two different range (32V or 16V) using the
0070 ti,bus-range-microvolt property in the devicetree.
0071
0072 The driver exports the bus voltage values via the following sysFs files:
0073
0074 **in0_input**
0075
0076 **in0_lcrit**
0077
0078 **in0_lcrit_alarm**
0079
0080 **in0_crit**
0081
0082 **in0_crit_alarm**
0083
0084 The bus power and bus currents range and resolution depends on the calibration
0085 register value. Those values are calculate by the hardware using those
0086 formulas:
0087
0088 Current = (ShuntVoltage * CalibrationRegister) / 4096
0089 Power = (Current * BusVoltage) / 5000
0090
0091 The driver exports the bus current and bus power values via the following
0092 sysFs files:
0093
0094 **curr2_input**
0095
0096 **power1_input**
0097
0098 **power1_crit**
0099
0100 **power1_crit_alarm**
0101
0102 The calibration process follow the procedure of the datasheet (without overflow)
0103 and depend on the shunt resistor value and the pga_gain value.