1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
/*
* Copyright 2012 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* Header file for tmu support
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASM_ARCH_TMU_H
#define __ASM_ARCH_TMU_H
#include <linux/platform_data/exynos_thermal.h>
#define MUX_ADDR_VALUE 6
#define TMU_SAVE_NUM 10
#define TMU_DC_VALUE 25
#define UNUSED_THRESHOLD 0xFF
#define COLD_TEMP 19
#define HOT_NORMAL_TEMP 95
#define HOT_CRITICAL_TEMP 110
#define MIF_TH_TEMP1 85
#define MIF_TH_TEMP2 95
#if defined(CONFIG_SOC_EXYNOS5430_REV_1)
#define GPU_TH_TEMP1 90
#define GPU_TH_TEMP2 95
#define GPU_TH_TEMP3 100
#define GPU_TH_TEMP4 105
#define GPU_TH_TEMP5 115
#elif defined(CONFIG_SOC_EXYNOS5422)
#define GPU_TH_TEMP1 80
#define GPU_TH_TEMP2 90
#define GPU_TH_TEMP3 95
#define GPU_TH_TEMP4 100
#define GPU_TH_TEMP5 110
#elif defined(CONFIG_SOC_EXYNOS5433)
#define GPU_TH_TEMP1 95
#define GPU_TH_TEMP2 100
#define GPU_TH_TEMP3 105
#define GPU_TH_TEMP4 110
#define GPU_TH_TEMP5 115
#else
#define GPU_TH_TEMP1 85
#define GPU_TH_TEMP2 90
#define GPU_TH_TEMP3 95
#define GPU_TH_TEMP4 100
#define GPU_TH_TEMP5 110
#endif
enum tmu_status_t {
TMU_STATUS_INIT = 0,
TMU_STATUS_NORMAL,
TMU_STATUS_THROTTLED,
TMU_STATUS_TRIPPED,
};
enum mif_noti_state_t {
MIF_TH_LV1 = 4,
MIF_TH_LV2,
MIF_TH_LV3,
};
enum tmu_noti_state_t {
TMU_NORMAL,
TMU_COLD,
TMU_HOT,
TMU_CRITICAL,
TMU_95,
TMU_109,
TMU_110,
TMU_111, // for detect thermal runaway caused by fimc
};
enum gpu_noti_state_t {
GPU_NORMAL,
GPU_COLD,
GPU_THROTTLING1,
GPU_THROTTLING2,
GPU_THROTTLING3,
GPU_THROTTLING4,
GPU_TRIPPING,
};
enum mif_thermal_state_t {
MIF_NORMAL = 0,
MIF_THROTTLING1,
MIF_THROTTLING2,
MIF_TRIPPING,
};
#ifdef CONFIG_EXYNOS_THERMAL
extern int exynos_tmu_add_notifier(struct notifier_block *n);
extern int exynos_gpu_add_notifier(struct notifier_block *n);
#else
static inline int exynos_tmu_add_notifier(struct notifier_block *n)
{
return 0;
}
#endif
#if defined(CONFIG_EXYNOS_THERMAL) && (defined(CONFIG_SOC_EXYNOS5430) || defined(CONFIG_SOC_EXYNOS5433))
extern void exynos_tmu_core_control(bool on, int id);
#else
static inline void exynos_tmu_core_control(bool on, int id)
{
return;
}
#endif
#endif /* __ASM_ARCH_TMU_H */
|