exynos_thermal 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 kernel thermal framework
  38. with the function exynos4_report_trigger.
  39. Although an interrupt condition for level_0 can be set,
  40. it can be used to synchronize the cooling action.