Go to the documentation of this file.
23 #ifndef __OMAP_BANDGAP_H
24 #define __OMAP_BANDGAP_H
27 #include <linux/types.h>
31 #define OMAP4430_BGAP_TSHUT_SHIFT 11
32 #define OMAP4430_BGAP_TSHUT_MASK (1 << 11)
35 #define OMAP4430_BGAP_TEMPSOFF_SHIFT 12
36 #define OMAP4430_BGAP_TEMPSOFF_MASK (1 << 12)
37 #define OMAP4430_SINGLE_MODE_SHIFT 10
38 #define OMAP4430_SINGLE_MODE_MASK (1 << 10)
39 #define OMAP4430_BGAP_TEMP_SENSOR_SOC_SHIFT 9
40 #define OMAP4430_BGAP_TEMP_SENSOR_SOC_MASK (1 << 9)
41 #define OMAP4430_BGAP_TEMP_SENSOR_EOCZ_SHIFT 8
42 #define OMAP4430_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 8)
43 #define OMAP4430_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0
44 #define OMAP4430_BGAP_TEMP_SENSOR_DTEMP_MASK (0xff << 0)
46 #define OMAP4430_ADC_START_VALUE 0
47 #define OMAP4430_ADC_END_VALUE 127
48 #define OMAP4430_MAX_FREQ 32768
49 #define OMAP4430_MIN_FREQ 32768
50 #define OMAP4430_MIN_TEMP -40000
51 #define OMAP4430_MAX_TEMP 125000
52 #define OMAP4430_HYST_VAL 5000
55 #define OMAP4460_BGAP_TEMPSOFF_SHIFT 13
56 #define OMAP4460_BGAP_TEMPSOFF_MASK (1 << 13)
57 #define OMAP4460_BGAP_TEMP_SENSOR_SOC_SHIFT 11
58 #define OMAP4460_BGAP_TEMP_SENSOR_SOC_MASK (1 << 11)
59 #define OMAP4460_BGAP_TEMP_SENSOR_EOCZ_SHIFT 10
60 #define OMAP4460_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 10)
61 #define OMAP4460_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0
62 #define OMAP4460_BGAP_TEMP_SENSOR_DTEMP_MASK (0x3ff << 0)
65 #define OMAP4460_SINGLE_MODE_SHIFT 31
66 #define OMAP4460_SINGLE_MODE_MASK (1 << 31)
67 #define OMAP4460_MASK_HOT_SHIFT 1
68 #define OMAP4460_MASK_HOT_MASK (1 << 1)
69 #define OMAP4460_MASK_COLD_SHIFT 0
70 #define OMAP4460_MASK_COLD_MASK (1 << 0)
73 #define OMAP4460_COUNTER_SHIFT 0
74 #define OMAP4460_COUNTER_MASK (0xffffff << 0)
77 #define OMAP4460_T_HOT_SHIFT 16
78 #define OMAP4460_T_HOT_MASK (0x3ff << 16)
79 #define OMAP4460_T_COLD_SHIFT 0
80 #define OMAP4460_T_COLD_MASK (0x3ff << 0)
83 #define OMAP4460_TSHUT_HOT_SHIFT 16
84 #define OMAP4460_TSHUT_HOT_MASK (0x3ff << 16)
85 #define OMAP4460_TSHUT_COLD_SHIFT 0
86 #define OMAP4460_TSHUT_COLD_MASK (0x3ff << 0)
89 #define OMAP4460_CLEAN_STOP_SHIFT 3
90 #define OMAP4460_CLEAN_STOP_MASK (1 << 3)
91 #define OMAP4460_BGAP_ALERT_SHIFT 2
92 #define OMAP4460_BGAP_ALERT_MASK (1 << 2)
93 #define OMAP4460_HOT_FLAG_SHIFT 1
94 #define OMAP4460_HOT_FLAG_MASK (1 << 1)
95 #define OMAP4460_COLD_FLAG_SHIFT 0
96 #define OMAP4460_COLD_FLAG_MASK (1 << 0)
99 #define OMAP5430_BGAP_TEMP_SENSOR_SOC_SHIFT 12
100 #define OMAP5430_BGAP_TEMP_SENSOR_SOC_MASK (1 << 12)
101 #define OMAP5430_BGAP_TEMPSOFF_SHIFT 11
102 #define OMAP5430_BGAP_TEMPSOFF_MASK (1 << 11)
103 #define OMAP5430_BGAP_TEMP_SENSOR_EOCZ_SHIFT 10
104 #define OMAP5430_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 10)
105 #define OMAP5430_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0
106 #define OMAP5430_BGAP_TEMP_SENSOR_DTEMP_MASK (0x3ff << 0)
109 #define OMAP5430_MASK_HOT_CORE_SHIFT 5
110 #define OMAP5430_MASK_HOT_CORE_MASK (1 << 5)
111 #define OMAP5430_MASK_COLD_CORE_SHIFT 4
112 #define OMAP5430_MASK_COLD_CORE_MASK (1 << 4)
113 #define OMAP5430_MASK_HOT_MM_SHIFT 3
114 #define OMAP5430_MASK_HOT_MM_MASK (1 << 3)
115 #define OMAP5430_MASK_COLD_MM_SHIFT 2
116 #define OMAP5430_MASK_COLD_MM_MASK (1 << 2)
117 #define OMAP5430_MASK_HOT_MPU_SHIFT 1
118 #define OMAP5430_MASK_HOT_MPU_MASK (1 << 1)
119 #define OMAP5430_MASK_COLD_MPU_SHIFT 0
120 #define OMAP5430_MASK_COLD_MPU_MASK (1 << 0)
123 #define OMAP5430_REPEAT_MODE_SHIFT 31
124 #define OMAP5430_REPEAT_MODE_MASK (1 << 31)
125 #define OMAP5430_COUNTER_SHIFT 0
126 #define OMAP5430_COUNTER_MASK (0xffffff << 0)
129 #define OMAP5430_T_HOT_SHIFT 16
130 #define OMAP5430_T_HOT_MASK (0x3ff << 16)
131 #define OMAP5430_T_COLD_SHIFT 0
132 #define OMAP5430_T_COLD_MASK (0x3ff << 0)
135 #define OMAP5430_TSHUT_HOT_SHIFT 16
136 #define OMAP5430_TSHUT_HOT_MASK (0x3ff << 16)
137 #define OMAP5430_TSHUT_COLD_SHIFT 0
138 #define OMAP5430_TSHUT_COLD_MASK (0x3ff << 0)
141 #define OMAP5430_BGAP_ALERT_SHIFT 31
142 #define OMAP5430_BGAP_ALERT_MASK (1 << 31)
143 #define OMAP5430_HOT_CORE_FLAG_SHIFT 5
144 #define OMAP5430_HOT_CORE_FLAG_MASK (1 << 5)
145 #define OMAP5430_COLD_CORE_FLAG_SHIFT 4
146 #define OMAP5430_COLD_CORE_FLAG_MASK (1 << 4)
147 #define OMAP5430_HOT_MM_FLAG_SHIFT 3
148 #define OMAP5430_HOT_MM_FLAG_MASK (1 << 3)
149 #define OMAP5430_COLD_MM_FLAG_SHIFT 2
150 #define OMAP5430_COLD_MM_FLAG_MASK (1 << 2)
151 #define OMAP5430_HOT_MPU_FLAG_SHIFT 1
152 #define OMAP5430_HOT_MPU_FLAG_MASK (1 << 1)
153 #define OMAP5430_COLD_MPU_FLAG_SHIFT 0
154 #define OMAP5430_COLD_MPU_FLAG_MASK (1 << 0)
159 #define OMAP4430_FUSE_OPP_BGAP 0x0
160 #define OMAP4430_TEMP_SENSOR_CTRL_OFFSET 0xCC
163 #define OMAP4460_FUSE_OPP_BGAP 0x0
164 #define OMAP4460_TEMP_SENSOR_CTRL_OFFSET 0xCC
165 #define OMAP4460_BGAP_CTRL_OFFSET 0x118
166 #define OMAP4460_BGAP_COUNTER_OFFSET 0x11C
167 #define OMAP4460_BGAP_THRESHOLD_OFFSET 0x120
168 #define OMAP4460_BGAP_TSHUT_OFFSET 0x124
169 #define OMAP4460_BGAP_STATUS_OFFSET 0x128
172 #define OMAP5430_FUSE_OPP_BGAP_GPU 0x0
173 #define OMAP5430_TEMP_SENSOR_GPU_OFFSET 0x150
174 #define OMAP5430_BGAP_COUNTER_GPU_OFFSET 0x1C0
175 #define OMAP5430_BGAP_THRESHOLD_GPU_OFFSET 0x1A8
176 #define OMAP5430_BGAP_TSHUT_GPU_OFFSET 0x1B4
178 #define OMAP5430_FUSE_OPP_BGAP_MPU 0x4
179 #define OMAP5430_TEMP_SENSOR_MPU_OFFSET 0x14C
180 #define OMAP5430_BGAP_CTRL_OFFSET 0x1A0
181 #define OMAP5430_BGAP_COUNTER_MPU_OFFSET 0x1BC
182 #define OMAP5430_BGAP_THRESHOLD_MPU_OFFSET 0x1A4
183 #define OMAP5430_BGAP_TSHUT_MPU_OFFSET 0x1B0
184 #define OMAP5430_BGAP_STATUS_OFFSET 0x1C8
186 #define OMAP5430_FUSE_OPP_BGAP_CORE 0x8
187 #define OMAP5430_TEMP_SENSOR_CORE_OFFSET 0x154
188 #define OMAP5430_BGAP_COUNTER_CORE_OFFSET 0x1C4
189 #define OMAP5430_BGAP_THRESHOLD_CORE_OFFSET 0x1AC
190 #define OMAP5430_BGAP_TSHUT_CORE_OFFSET 0x1B8
192 #define OMAP4460_TSHUT_HOT 900
193 #define OMAP4460_TSHUT_COLD 895
194 #define OMAP4460_T_HOT 800
195 #define OMAP4460_T_COLD 795
196 #define OMAP4460_MAX_FREQ 1500000
197 #define OMAP4460_MIN_FREQ 1000000
198 #define OMAP4460_MIN_TEMP -40000
199 #define OMAP4460_MAX_TEMP 123000
200 #define OMAP4460_HYST_VAL 5000
201 #define OMAP4460_ADC_START_VALUE 530
202 #define OMAP4460_ADC_END_VALUE 932
204 #define OMAP5430_MPU_TSHUT_HOT 915
205 #define OMAP5430_MPU_TSHUT_COLD 900
206 #define OMAP5430_MPU_T_HOT 800
207 #define OMAP5430_MPU_T_COLD 795
208 #define OMAP5430_MPU_MAX_FREQ 1500000
209 #define OMAP5430_MPU_MIN_FREQ 1000000
210 #define OMAP5430_MPU_MIN_TEMP -40000
211 #define OMAP5430_MPU_MAX_TEMP 125000
212 #define OMAP5430_MPU_HYST_VAL 5000
213 #define OMAP5430_ADC_START_VALUE 532
214 #define OMAP5430_ADC_END_VALUE 934
217 #define OMAP5430_GPU_TSHUT_HOT 915
218 #define OMAP5430_GPU_TSHUT_COLD 900
219 #define OMAP5430_GPU_T_HOT 800
220 #define OMAP5430_GPU_T_COLD 795
221 #define OMAP5430_GPU_MAX_FREQ 1500000
222 #define OMAP5430_GPU_MIN_FREQ 1000000
223 #define OMAP5430_GPU_MIN_TEMP -40000
224 #define OMAP5430_GPU_MAX_TEMP 125000
225 #define OMAP5430_GPU_HYST_VAL 5000
227 #define OMAP5430_CORE_TSHUT_HOT 915
228 #define OMAP5430_CORE_TSHUT_COLD 900
229 #define OMAP5430_CORE_T_HOT 800
230 #define OMAP5430_CORE_T_COLD 795
231 #define OMAP5430_CORE_MAX_FREQ 1500000
232 #define OMAP5430_CORE_MIN_FREQ 1000000
233 #define OMAP5430_CORE_MIN_TEMP -40000
234 #define OMAP5430_CORE_MAX_TEMP 125000
235 #define OMAP5430_CORE_HYST_VAL 5000
390 #define OMAP_BANDGAP_FEATURE_TSHUT (1 << 0)
391 #define OMAP_BANDGAP_FEATURE_TSHUT_CONFIG (1 << 1)
392 #define OMAP_BANDGAP_FEATURE_TALERT (1 << 2)
393 #define OMAP_BANDGAP_FEATURE_MODE_CONFIG (1 << 3)
394 #define OMAP_BANDGAP_FEATURE_COUNTER (1 << 4)
395 #define OMAP_BANDGAP_FEATURE_POWER_SWITCH (1 << 5)
396 #define OMAP_BANDGAP_HAS(b, f) \
397 ((b)->conf->features & OMAP_BANDGAP_FEATURE_ ## f)
425 #ifdef CONFIG_OMAP4_THERMAL
430 #define omap4430_data NULL
431 #define omap4460_data NULL
432 #define omap4470_data NULL
435 #ifdef CONFIG_OMAP5_THERMAL
438 #define omap5430_data NULL