1 .. SPDX-License-Identifier: GPL-2.0 2 3 Kernel driver tmp513 4 ==================== 5 6 Supported chips: 7 8 * Texas Instruments TMP512 9 10 Prefix: 'tmp512' 11 12 Datasheet: https://www.ti.com/lit/ds/symlink/tmp512.pdf 13 14 * Texas Instruments TMP513 15 16 Prefix: 'tmp513' 17 18 Datasheet: https://www.ti.com/lit/ds/symlink/tmp513.pdf 19 20 Authors: 21 22 Eric Tremblay <etremblay@distech-controls.com> 23 24 Description 25 ----------- 26 27 This driver implements support for Texas Instruments TMP512, and TMP513. 28 The TMP512 (dual-channel) and TMP513 (triple-channel) are system monitors 29 that include remote sensors, a local temperature sensor, and a high-side current 30 shunt monitor. These system monitors have the capability of measuring remote 31 temperatures, on-chip temperatures, and system voltage/power/current 32 consumption. 33 34 The temperatures are measured in degrees Celsius with a range of 35 -40 to + 125 degrees with a resolution of 0.0625 degree C. 36 37 For hysteresis value, only the first channel is writable. Writing to it 38 will affect all other values since each channels are sharing the same 39 hysteresis value. The hysteresis is in degrees Celsius with a range of 40 0 to 127.5 degrees with a resolution of 0.5 degree. 41 42 The driver exports the temperature values via the following sysfs files: 43 44 **temp[1-4]_input** 45 46 **temp[1-4]_crit** 47 48 **temp[1-4]_crit_alarm** 49 50 **temp[1-4]_crit_hyst** 51 52 The driver read the shunt voltage from the chip and convert it to current. 53 The readable range depends on the "ti,pga-gain" property (default to 8) and the 54 shunt resistor value. The value resolution will be equal to 10uV/Rshunt. 55 56 The driver exports the shunt currents values via the following sysFs files: 57 58 **curr1_input** 59 60 **curr1_lcrit** 61 62 **curr1_lcrit_alarm** 63 64 **curr1_crit** 65 66 **curr1_crit_alarm** 67 68 The bus voltage range is read from the chip with a resolution of 4mV. The chip 69 can be configurable in two different range (32V or 16V) using the 70 ti,bus-range-microvolt property in the devicetree. 71 72 The driver exports the bus voltage values via the following sysFs files: 73 74 **in0_input** 75 76 **in0_lcrit** 77 78 **in0_lcrit_alarm** 79 80 **in0_crit** 81 82 **in0_crit_alarm** 83 84 The bus power and bus currents range and resolution depends on the calibration 85 register value. Those values are calculate by the hardware using those 86 formulas: 87 88 Current = (ShuntVoltage * CalibrationRegister) / 4096 89 Power = (Current * BusVoltage) / 5000 90 91 The driver exports the bus current and bus power values via the following 92 sysFs files: 93 94 **curr2_input** 95 96 **power1_input** 97 98 **power1_crit** 99 100 **power1_crit_alarm** 101 102 The calibration process follow the procedure of the datasheet (without overflow) 103 and depend on the shunt resistor value and the pga_gain value.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.