ARM: tegra12: set CPU rate to 2.2GHz for sku 0x87
[linux-3.10.git] / arch / arm / mach-tegra / battery-ini-model-data.h
1 /*
2  * battery-ini-model-data.h: Battery INI model data for different platforms.
3  *
4  * Copyright (c) 2013, NVIDIA Corporation. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  */
19
20 #ifndef _MACH_TEGRA_BATTERY_INI_MODEL_DATA_H
21 #define _MACH_TEGRA_BATTERY_INI_MODEL_DATA_H
22
23 #include <linux/max17048_battery.h>
24 #include <linux/power/max17042_battery.h>
25
26 /*
27  * Battery model data for YOKU 4100mA for MAX17048 for TN8.
28  * System shutdown voltage: 3.0V
29  * INI Files: 1283683
30  */
31 static struct max17048_battery_model __maybe_unused
32                         tn8_yoku_4100mA_max17048_battery = {
33         .rcomp          = 57,
34         .soccheck_A     = 119,
35         .soccheck_B     = 121,
36         .bits           = 18,
37         .alert_threshold = 0x00,
38         .one_percent_alerts = 0x40,
39         .alert_on_reset = 0x40,
40         .rcomp_seg      = 0x0200,
41         .hibernate      = 0x3080,
42         .vreset         = 0x3c96,
43         .valert         = 0x00ff,
44         .ocvtest        = 55952,
45         .data_tbl = {
46                 0x98, 0x80, 0xB3, 0x50, 0xB7, 0x90, 0xB9, 0x00,
47                 0xBA, 0x70, 0xBC, 0x10, 0xBC, 0x50, 0xBC, 0xA0,
48                 0xBD, 0x20, 0xBE, 0x30, 0xBF, 0x40, 0xC2, 0xF0,
49                 0xC4, 0x20, 0xC7, 0xE0, 0xCB, 0xF0, 0xD0, 0x90,
50                 0x00, 0x40, 0x06, 0x70, 0x0E, 0x50, 0x12, 0x00,
51                 0x18, 0xD0, 0x33, 0x10, 0x31, 0x40, 0x35, 0xD0,
52                 0x18, 0xD0, 0x19, 0x00, 0x0B, 0xF0, 0x0C, 0x10,
53                 0x0D, 0x10, 0x07, 0x90, 0x08, 0x00, 0x08, 0x00,
54         },
55 };
56
57 /*
58  * Battery model data for YOKU 4100mA for MAX17048 for Macallan.
59  * System shutdown voltage: 3.0V
60  * INI Files: 1283683
61  */
62 static struct max17048_battery_model __maybe_unused
63                         macallan_yoku_4100mA_max17048_battery = {
64         .rcomp          = 57,
65         .soccheck_A     = 119,
66         .soccheck_B     = 121,
67         .bits           = 18,
68         .alert_threshold = 0x00,
69         .one_percent_alerts = 0x40,
70         .alert_on_reset = 0x40,
71         .rcomp_seg      = 0x0200,
72         .hibernate      = 0x3080,
73         .vreset         = 0x3c96,
74         .valert         = 0x00ff,
75         .ocvtest        = 55952,
76         .data_tbl = {
77                 0x98, 0x80, 0xB3, 0x50, 0xB7, 0x90, 0xB9, 0x00,
78                 0xBA, 0x70, 0xBC, 0x10, 0xBC, 0x50, 0xBC, 0xA0,
79                 0xBD, 0x20, 0xBE, 0x30, 0xBF, 0x40, 0xC2, 0xF0,
80                 0xC4, 0x20, 0xC7, 0xE0, 0xCB, 0xF0, 0xD0, 0x90,
81                 0x00, 0x40, 0x06, 0x70, 0x0E, 0x50, 0x12, 0x00,
82                 0x18, 0xD0, 0x33, 0x10, 0x31, 0x40, 0x35, 0xD0,
83                 0x18, 0xD0, 0x19, 0x00, 0x0B, 0xF0, 0x0C, 0x10,
84                 0x0D, 0x10, 0x07, 0x90, 0x08, 0x00, 0x08, 0x00,
85         },
86 };
87
88 /*
89  * Battery model data for YOKU 3900mA for MAX17048 for Macallan.
90  * System shutdown voltage: 3.0V
91  * INI Files: 1283683
92  */
93 static struct max17048_battery_model __maybe_unused
94                         macallan_yoku_3900mA_max17048_battery = {
95         .rcomp          = 102,
96         .soccheck_A     = 237,
97         .soccheck_B     = 239,
98         .bits           = 19,
99         .alert_threshold = 0x00,
100         .one_percent_alerts = 0x40,
101         .alert_on_reset = 0x40,
102         .rcomp_seg      = 0x0080,
103         .hibernate      = 0x3080,
104         .vreset         = 0x3c96,
105         .valert         = 0xD4AA,
106         .ocvtest        = 55952,
107         .data_tbl = {
108                 0x98, 0x60, 0xB0, 0xC0, 0xB7, 0xB0, 0xBA, 0x10,
109                 0xBB, 0xE0, 0xBC, 0x10, 0xBC, 0xC0, 0xBD, 0xF0,
110                 0xBF, 0x00, 0xC0, 0x10, 0xC1, 0xF0, 0xC4, 0x00,
111                 0xC6, 0x70, 0xC8, 0xE0, 0xCA, 0x80, 0xD0, 0x90,
112                 0x00, 0x80, 0x06, 0xA0, 0x21, 0x40, 0x22, 0x80,
113                 0x49, 0x90, 0x6C, 0x80, 0x45, 0xA0, 0x2D, 0xE0,
114                 0x2D, 0xC0, 0x17, 0x80, 0x1A, 0x00, 0x18, 0xA0,
115                 0x18, 0x20, 0x15, 0x40, 0x0E, 0xA0, 0x0E, 0xA0,
116         },
117 };
118
119 /*
120  * Battery model data for YOKU 2000mA for MAX17042 for Pluto.
121  * System shutdown voltage: 2.9V
122  * INI Files: 1264825
123  */
124 static struct max17042_config_data __maybe_unused
125                         pluto_yoku_2000mA_max17042_battery = {
126         .valrt_thresh = 0xff00,
127         .talrt_thresh = 0xff00,
128         .soc_alrt_thresh = 0xff00,
129         .shdntimer = 0xe000,
130         .design_cap = 0x1085,
131         .at_rate = 0x0000,
132         .tgain = 0xBC94,
133         .toff = 0x84BA,
134         .vempty = 0x93DA,
135         .qrtbl00 = 0x2184,
136         .qrtbl10 = 0x1300,
137         .qrtbl20 = 0x0c00,
138         .qrtbl30 = 0x0880,
139         .full_soc_thresh = 0x5A00,
140         .rcomp0 = 0x0052,
141         .tcompc0 = 0x1F2D,
142         .ichgt_term = 0x0140,
143         .temp_nom = 0x1400,
144         .temp_lim = 0x2305,
145         .filter_cfg = 0x87A4,
146         .config = 0x2210,
147         .learn_cfg = 0x2606,
148         .misc_cfg = 0x0810,
149         .fullcap =  0x1085,
150         .fullcapnom = 0x1085,
151         .lavg_empty = 0x1000,
152         .dqacc = 0x01f4,
153         .dpacc = 0x3200,
154         .fctc = 0x05e0,
155         .kempty0 = 0x0600,
156         .cell_technology = POWER_SUPPLY_TECHNOLOGY_LION,
157         .cell_char_tbl = {
158                 /* Data to be written from 0x80h */
159                 0x9380, 0xAB70, 0xAFA0, 0xB3E0, 0xB790, 0xBB40,
160                 0xBBD0, 0xBC70, 0xBD90, 0xBE30, 0xC0F0, 0xC380,
161                 0xC710, 0xCA90, 0xCF70, 0xD480,
162                 /* Data to be written from 0x90h */
163                 0x00B0, 0x0610, 0x0600, 0x06F0, 0x0700, 0x2410,
164                 0x2040, 0x2460, 0x1CE0, 0x09F0, 0x0AB0, 0x08E0,
165                 0x0880, 0x06F0, 0x05D0, 0x05D0,
166                 /* Data to be written from 0xA0h */
167                 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
168                 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
169                 0x0100, 0x0100, 0x0100, 0x0100,
170         },
171 };
172
173 /*
174  * Battery model data for YOKU 2000mA for MAX17048 for ceres.
175  * System shutdown voltage: 3.1V
176  * INI Files: 1178638
177  */
178 static struct max17048_battery_model __maybe_unused
179                         ceres_yoku_2000_ssv_3_1_max17048_battery = {
180         .rcomp          = 71,
181         .soccheck_A     = 223,
182         .soccheck_B     = 225,
183         .bits           = 19,
184         .alert_threshold= 0x00,
185         .one_percent_alerts = 0x40,
186         .alert_on_reset = 0x40,
187         .rcomp_seg      = 0x0080,
188         .hibernate      = 0x3080,
189         .vreset         = 0x3c96,
190         .valert         = 0xD4AA,
191         .ocvtest        = 57040,
192         .data_tbl = {
193                 0xA5, 0xF0, 0xAF, 0xB0, 0xB6, 0x60, 0xBA, 0xE0,
194                 0xBC, 0x00, 0xBC, 0x60, 0xBC, 0xB0, 0xBD, 0x60,
195                 0xBE, 0x20, 0xC1, 0x50, 0xC4, 0x40, 0xC7, 0x00,
196                 0xC9, 0xF0, 0xCD, 0x70, 0xD0, 0xF0, 0xD4, 0xD0,
197                 0x06, 0x60, 0x0E, 0x20, 0x0E, 0x00, 0x32, 0x00,
198                 0x6C, 0x80, 0x79, 0x60, 0x1D, 0x40, 0x4D, 0x20,
199                 0x13, 0xC0, 0x15, 0x60, 0x11, 0x80, 0x13, 0x80,
200                 0x0D, 0xE0, 0x0D, 0xE0, 0x09, 0xE0, 0x09, 0xE0,
201         },
202 };
203
204 /*
205  * Battery model data for p2454 MAX17048 for Shiled.
206  * System shutdown voltage: 3.1V
207  */
208 static struct max17048_battery_model __maybe_unused
209                         max17048_mdata_p2454 = {
210         .rcomp          = 152,
211         .soccheck_A     = 206,
212         .soccheck_B     = 208,
213         .bits           = 19,
214         .alert_threshold = 0x00,
215         .one_percent_alerts = 0x40,
216         .alert_on_reset = 0x40,
217         .rcomp_seg      = 0x0080,
218         .hibernate      = 0x3080,
219         .vreset         = 0x3c96,
220         .valert         = 0xD4AA,
221         .ocvtest        = 55744,
222         .data_tbl = {
223                 0xA2, 0x80, 0xA8, 0xF0, 0xAE, 0xD0, 0xB0, 0x90,
224                 0xB2, 0x60, 0xB3, 0xF0, 0xB5, 0x80, 0xB7, 0x20,
225                 0xB8, 0xD0, 0xBC, 0x00, 0xBE, 0x20, 0xC0, 0x20,
226                 0xC3, 0xD0, 0xC9, 0x80, 0xCE, 0xA0, 0xCF, 0xC0,
227                 0x0A, 0x60, 0x0D, 0xE0, 0x1D, 0x00, 0x1D, 0xE0,
228                 0x1F, 0xE0, 0x1F, 0xE0, 0x11, 0xC0, 0x11, 0x20,
229                 0x14, 0x60, 0x0B, 0xE0, 0x14, 0x80, 0x14, 0xC0,
230                 0x0E, 0x20, 0x12, 0xA0, 0x03, 0x60, 0x03, 0x60,
231         },
232 };
233
234 /*
235  * Battery model data for p2560  MAX17048 for Shiled.
236  * System shutdown voltage: 3.1V
237  */
238 static struct max17048_battery_model __maybe_unused
239                         max17048_mdata_p2560 = {
240         .rcomp          = 105,
241         .soccheck_A     = 240,
242         .soccheck_B     = 242,
243         .bits           = 19,
244         .alert_threshold = 0x00,
245         .one_percent_alerts = 0x40,
246         .alert_on_reset = 0x40,
247         .rcomp_seg      = 0x0080,
248         .hibernate      = 0x3080,
249         .vreset         = 0x3c96,
250         .valert         = 0xD4AA,
251         .ocvtest        = 55728,
252         .data_tbl = {
253                 0xA9, 0x90, 0xB1, 0x60, 0xB5, 0xC0, 0xB7, 0x80,
254                 0xBA, 0xF0, 0xBB, 0xA0, 0xBB, 0xE0, 0xBC, 0x50,
255                 0xBC, 0xC0, 0xBD, 0x30, 0xBE, 0xD0, 0xC0, 0x90,
256                 0xC1, 0xD0, 0xC6, 0x70, 0xCA, 0xD0, 0xCF, 0xB0,
257                 0x0A, 0xF0, 0x0D, 0xE0, 0x0B, 0x30, 0x01, 0x90,
258                 0x53, 0xB0, 0x78, 0xD0, 0x77, 0xB0, 0x7C, 0xF0,
259                 0x7A, 0x70, 0x13, 0xE0, 0x13, 0x90, 0x1F, 0x30,
260                 0x19, 0x00, 0x12, 0x10, 0x10, 0xB0, 0x10, 0xB0,
261         },
262 };
263
264 #endif