thermal: exynos: Add extra entries in the tmu platform data
[deliverable/linux.git] / drivers / thermal / samsung / exynos_tmu.h
CommitLineData
9d97e5c8 1/*
0c1836a6 2 * exynos_tmu.h - Samsung EXYNOS TMU (Thermal Management Unit)
9d97e5c8
DK
3 *
4 * Copyright (C) 2011 Samsung Electronics
5 * Donggeun Kim <dg77.kim@samsung.com>
0c1836a6 6 * Amit Daniel Kachhap <amit.daniel@samsung.com>
9d97e5c8
DK
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
0c1836a6
ADK
23#ifndef _EXYNOS_TMU_H
24#define _EXYNOS_TMU_H
7e0b55e6 25#include <linux/cpu_cooling.h>
9d97e5c8 26
0c1836a6
ADK
27#include "exynos_thermal_common.h"
28
9d97e5c8
DK
29enum calibration_type {
30 TYPE_ONE_POINT_TRIMMING,
31 TYPE_TWO_POINT_TRIMMING,
32 TYPE_NONE,
33};
34
bb34b4c8
ADK
35enum calibration_mode {
36 SW_MODE,
37 HW_MODE,
38};
39
f22d9c03
ADK
40enum soc_type {
41 SOC_ARCH_EXYNOS4210 = 1,
42 SOC_ARCH_EXYNOS,
43};
7e0b55e6 44
9d97e5c8 45/**
f22d9c03 46 * struct exynos_tmu_platform_data
9d97e5c8
DK
47 * @threshold: basic temperature for generating interrupt
48 * 25 <= threshold <= 125 [unit: degree Celsius]
4f0a6847
JL
49 * @threshold_falling: differntial value for setting threshold
50 * of temperature falling interrupt.
9d97e5c8
DK
51 * @trigger_levels: array for each interrupt levels
52 * [unit: degree Celsius]
53 * 0: temperature for trigger_level0 interrupt
54 * condition for trigger_level0 interrupt:
55 * current temperature > threshold + trigger_levels[0]
56 * 1: temperature for trigger_level1 interrupt
57 * condition for trigger_level1 interrupt:
58 * current temperature > threshold + trigger_levels[1]
59 * 2: temperature for trigger_level2 interrupt
60 * condition for trigger_level2 interrupt:
61 * current temperature > threshold + trigger_levels[2]
62 * 3: temperature for trigger_level3 interrupt
63 * condition for trigger_level3 interrupt:
64 * current temperature > threshold + trigger_levels[3]
bb34b4c8
ADK
65 * @trigger_type: defines the type of trigger. Possible values are,
66 * THROTTLE_ACTIVE trigger type
67 * THROTTLE_PASSIVE trigger type
68 * SW_TRIP trigger type
69 * HW_TRIP
70 * @trigger_enable[]: array to denote which trigger levels are enabled.
71 * 1 = enable trigger_level[] interrupt,
72 * 0 = disable trigger_level[] interrupt
73 * @max_trigger_level: max trigger level supported by the TMU
9d97e5c8
DK
74 * @gain: gain of amplifier in the positive-TC generator block
75 * 0 <= gain <= 15
76 * @reference_voltage: reference voltage of amplifier
77 * in the positive-TC generator block
78 * 0 <= reference_voltage <= 31
f22d9c03
ADK
79 * @noise_cancel_mode: noise cancellation mode
80 * 000, 100, 101, 110 and 111 can be different modes
81 * @type: determines the type of SOC
82 * @efuse_value: platform defined fuse value
bb34b4c8
ADK
83 * @min_efuse_value: minimum valid trimming data
84 * @max_efuse_value: maximum valid trimming data
85 * @first_point_trim: temp value of the first point trimming
86 * @second_point_trim: temp value of the second point trimming
87 * @default_temp_offset: default temperature offset in case of no trimming
9d97e5c8 88 * @cal_type: calibration type for temperature
bb34b4c8 89 * @cal_mode: calibration mode for temperature
7e0b55e6
ADK
90 * @freq_clip_table: Table representing frequency reduction percentage.
91 * @freq_tab_count: Count of the above table as frequency reduction may
92 * applicable to only some of the trigger levels.
9d97e5c8 93 *
f22d9c03 94 * This structure is required for configuration of exynos_tmu driver.
9d97e5c8 95 */
f22d9c03 96struct exynos_tmu_platform_data {
9d97e5c8 97 u8 threshold;
4f0a6847 98 u8 threshold_falling;
bb34b4c8
ADK
99 u8 trigger_levels[MAX_TRIP_COUNT];
100 enum trigger_type trigger_type[MAX_TRIP_COUNT];
101 bool trigger_enable[MAX_TRIP_COUNT];
102 u8 max_trigger_level;
9d97e5c8
DK
103 u8 gain;
104 u8 reference_voltage;
f22d9c03 105 u8 noise_cancel_mode;
bb34b4c8 106
f22d9c03 107 u32 efuse_value;
bb34b4c8
ADK
108 u32 min_efuse_value;
109 u32 max_efuse_value;
110 u8 first_point_trim;
111 u8 second_point_trim;
112 u8 default_temp_offset;
9d97e5c8
DK
113
114 enum calibration_type cal_type;
bb34b4c8 115 enum calibration_mode cal_mode;
f22d9c03 116 enum soc_type type;
7e0b55e6
ADK
117 struct freq_clip_table freq_tab[4];
118 unsigned int freq_tab_count;
9d97e5c8 119};
0c1836a6 120#endif /* _EXYNOS_TMU_H */
This page took 0.179152 seconds and 5 git commands to generate.