tmp513.rst 2.6 KB

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