tsc1641.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .. SPDX-License-Identifier: GPL-2.0-only
  2. Kernel driver tsc1641
  3. =====================
  4. Supported chips:
  5. * ST TSC1641
  6. Prefix: 'tsc1641'
  7. Addresses scanned: -
  8. Datasheet:
  9. https://www.st.com/resource/en/datasheet/tsc1641.pdf
  10. Author:
  11. - Igor Reznichenko <igor@reznichenko.net>
  12. Description
  13. -----------
  14. The TSC1641 is a high-precision current, voltage, power, and temperature
  15. monitoring analog front-end (AFE). It monitors bidirectional current into a
  16. shunt resistor and load voltage up to 60 V in a synchronized way. Digital bus
  17. interface is I2C/SMbus. The TSC1641 allows the assertion of several alerts
  18. regarding the voltage, current, power and temperature.
  19. Usage Notes
  20. -----------
  21. The TSC1641 driver requires the value of the external shunt resistor to
  22. correctly compute current and power measurements. The resistor value, in
  23. micro-ohms, should be provided either through the device tree property
  24. "shunt-resistor-micro-ohms" or via writable sysfs attribute "shunt_resistor".
  25. Please refer to the Documentation/devicetree/bindings/hwmon/st,tsc1641.yaml
  26. for bindings if the device tree is used.
  27. Supported range of shunt resistor values is from 100 uOhm to 655.35 mOhm, in
  28. 10 uOhm steps.
  29. When selecting the value keep in mind device maximum DC power measurement is
  30. 1600W. See datasheet p.22 for ST recommendations on selecting shunt value.
  31. If the shunt resistor value is not specified in the device tree, the driver
  32. initializes it to 1000 uOhm by default. Users may configure the correct shunt
  33. resistor value at runtime by writing to the "shunt_resistor" sysfs attribute.
  34. The driver only supports continuous operating mode.
  35. Measurement ranges:
  36. ================ ===============================================================
  37. Current Bidirectional, dependent on shunt
  38. Bus voltage 0-60V
  39. Maximum DC power 1600W
  40. Temperature -40C to +125C
  41. ================ ===============================================================
  42. Sysfs entries
  43. -------------
  44. ==================== ===========================================================
  45. in0_input bus voltage (mV)
  46. in0_max bus voltage max alarm limit (mV)
  47. in0_max_alarm bus voltage max alarm limit exceeded
  48. in0_min bus voltage min alarm limit (mV)
  49. in0_min_alarm bus voltage min alarm limit exceeded
  50. curr1_input current measurement (mA)
  51. curr1_max current max alarm limit (mA)
  52. curr1_max_alarm current max alarm limit exceeded
  53. curr1_min current min alarm limit (mA)
  54. curr1_min_alarm current min alarm limit exceeded
  55. power1_input power measurement (uW)
  56. power1_max power max alarm limit (uW)
  57. power1_max_alarm power max alarm limit exceeded
  58. shunt_resistor shunt resistor value (uOhms)
  59. temp1_input temperature measurement (mdegC)
  60. temp1_max temperature max alarm limit (mdegC)
  61. temp1_max_alarm temperature max alarm limit exceeded
  62. update_interval data conversion time (1 - 33ms), longer conversion time
  63. corresponds to higher effective resolution in bits
  64. ==================== ===========================================================