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