exynos4_tmu 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. Kernel driver exynos4_tmu
  2. =================
  3. Supported chips:
  4. * ARM SAMSUNG EXYNOS4 series of SoC
  5. Prefix: 'exynos4-tmu'
  6. Datasheet: Not publicly available
  7. Authors: Donggeun Kim <dg77.kim@samsung.com>
  8. Description
  9. -----------
  10. This driver allows to read temperature inside SAMSUNG EXYNOS4 series of SoC.
  11. The chip only exposes the measured 8-bit temperature code value
  12. through a register.
  13. Temperature can be taken from the temperature code.
  14. There are three equations converting from temperature to temperature code.
  15. The three equations are:
  16. 1. Two point trimming
  17. Tc = (T - 25) * (TI2 - TI1) / (85 - 25) + TI1
  18. 2. One point trimming
  19. Tc = T + TI1 - 25
  20. 3. No trimming
  21. Tc = T + 50
  22. Tc: Temperature code, T: Temperature,
  23. TI1: Trimming info for 25 degree Celsius (stored at TRIMINFO register)
  24. Temperature code measured at 25 degree Celsius which is unchanged
  25. TI2: Trimming info for 85 degree Celsius (stored at TRIMINFO register)
  26. Temperature code measured at 85 degree Celsius which is unchanged
  27. TMU(Thermal Management Unit) in EXYNOS4 generates interrupt
  28. when temperature exceeds pre-defined levels.
  29. The maximum number of configurable threshold is four.
  30. The threshold levels are defined as follows:
  31. Level_0: current temperature > trigger_level_0 + threshold
  32. Level_1: current temperature > trigger_level_1 + threshold
  33. Level_2: current temperature > trigger_level_2 + threshold
  34. Level_3: current temperature > trigger_level_3 + threshold
  35. The threshold and each trigger_level are set
  36. through the corresponding registers.
  37. When an interrupt occurs, this driver notify user space of
  38. one of four threshold levels for the interrupt
  39. through kobject_uevent_env and sysfs_notify functions.
  40. Although an interrupt condition for level_0 can be set,
  41. it is not notified to user space through sysfs_notify function.
  42. Sysfs Interface
  43. ---------------
  44. name name of the temperature sensor
  45. RO
  46. temp1_input temperature
  47. RO
  48. temp1_max temperature for level_1 interrupt
  49. RO
  50. temp1_crit temperature for level_2 interrupt
  51. RO
  52. temp1_emergency temperature for level_3 interrupt
  53. RO
  54. temp1_max_alarm alarm for level_1 interrupt
  55. RO
  56. temp1_crit_alarm
  57. alarm for level_2 interrupt
  58. RO
  59. temp1_emergency_alarm
  60. alarm for level_3 interrupt
  61. RO