1 ========================
2 Kernel driver exynos_tmu
3 ========================
7 * ARM Samsung Exynos4, Exynos5 series of SoC
9 Datasheet: Not publicly available
11 Authors: Donggeun Kim <dg77.kim@samsung.com>
12 Authors: Amit Daniel <amit.daniel@samsung.com>
14 TMU controller Description:
15 ---------------------------
17 This driver allows to read temperature inside Samsung Exynos4/5 series of SoC.
19 The chip only exposes the measured 8-bit temperature code value
21 Temperature can be taken from the temperature code.
22 There are three equations converting from temperature to temperature code.
24 The three equations are:
25 1. Two point trimming::
27 Tc = (T - 25) * (TI2 - TI1) / (85 - 25) + TI1
29 2. One point trimming::
38 Temperature code, T: Temperature,
40 Trimming info for 25 degree Celsius (stored at TRIMINFO register)
41 Temperature code measured at 25 degree Celsius which is unchanged
43 Trimming info for 85 degree Celsius (stored at TRIMINFO register)
44 Temperature code measured at 85 degree Celsius which is unchanged
46 TMU(Thermal Management Unit) in Exynos4/5 generates interrupt
47 when temperature exceeds pre-defined levels.
48 The maximum number of configurable threshold is five.
49 The threshold levels are defined as follows::
51 Level_0: current temperature > trigger_level_0 + threshold
52 Level_1: current temperature > trigger_level_1 + threshold
53 Level_2: current temperature > trigger_level_2 + threshold
54 Level_3: current temperature > trigger_level_3 + threshold
56 The threshold and each trigger_level are set
57 through the corresponding registers.
59 When an interrupt occurs, this driver notify kernel thermal framework
60 with the function exynos_report_trigger.
61 Although an interrupt condition for level_0 can be set,
62 it can be used to synchronize the cooling action.
64 TMU driver description:
65 -----------------------
67 The exynos thermal driver is structured as::
69 Kernel Core thermal framework
70 (thermal_core.c, step_wise.c, cpufreq_cooling.c)
74 TMU configuration data -----> TMU Driver <----> Exynos Core thermal wrapper
75 (exynos_tmu_data.c) (exynos_tmu.c) (exynos_thermal_common.c)
76 (exynos_tmu_data.h) (exynos_tmu.h) (exynos_thermal_common.h)
78 a) TMU configuration data:
79 This consist of TMU register offsets/bitfields
80 described through structure exynos_tmu_registers. Also several
81 other platform data (struct exynos_tmu_platform_data) members
82 are used to configure the TMU.
84 This component initialises the TMU controller and sets different
85 thresholds. It invokes core thermal implementation with the call
86 exynos_report_trigger.
87 c) Exynos Core thermal wrapper:
88 This provides 3 wrapper function to use the
89 Kernel core thermal framework. They are exynos_unregister_thermal,
90 exynos_register_thermal and exynos_report_trigger.