ARM: tegra: macallan: add Yoku 3900 battery data for Max17048
[linux-2.6.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 Macallan.
28  * System shutdown voltage: 3.0V
29  * INI Files: 1283683
30  */
31 static struct max17048_battery_model __maybe_unused
32                         macallan_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 3900mA 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_3900mA_max17048_battery = {
64         .rcomp          = 102,
65         .soccheck_A     = 237,
66         .soccheck_B     = 239,
67         .bits           = 19,
68         .alert_threshold = 0x00,
69         .one_percent_alerts = 0x40,
70         .alert_on_reset = 0x40,
71         .rcomp_seg      = 0x0080,
72         .hibernate      = 0x3080,
73         .vreset         = 0x3c96,
74         .valert         = 0xD4AA,
75         .ocvtest        = 55952,
76         .data_tbl = {
77                 0x98, 0x60, 0xB0, 0xC0, 0xB7, 0xB0, 0xBA, 0x10,
78                 0xBB, 0xE0, 0xBC, 0x10, 0xBC, 0xC0, 0xBD, 0xF0,
79                 0xBF, 0x00, 0xC0, 0x10, 0xC1, 0xF0, 0xC4, 0x00,
80                 0xC6, 0x70, 0xC8, 0xE0, 0xCA, 0x80, 0xD0, 0x90,
81                 0x00, 0x80, 0x06, 0xA0, 0x21, 0x40, 0x22, 0x80,
82                 0x49, 0x90, 0x6C, 0x80, 0x45, 0xA0, 0x2D, 0xE0,
83                 0x2D, 0xC0, 0x17, 0x80, 0x1A, 0x00, 0x18, 0xA0,
84                 0x18, 0x20, 0x15, 0x40, 0x0E, 0xA0, 0x0E, 0xA0,
85         },
86 };
87
88 /*
89  * Battery model data for YOKU 2000mA for MAX17042 for Pluto.
90  * System shutdown voltage: 2.9V
91  * INI Files: 1264825
92  */
93 static struct max17042_config_data __maybe_unused
94                         pluto_yoku_2000mA_max17042_battery = {
95         .valrt_thresh = 0xff00,
96         .talrt_thresh = 0xff00,
97         .soc_alrt_thresh = 0xff00,
98         .shdntimer = 0xe000,
99         .design_cap = 0x1085,
100         .at_rate = 0x0000,
101         .tgain = 0xBC94,
102         .toff = 0x84BA,
103         .vempty = 0x93DA,
104         .qrtbl00 = 0x2184,
105         .qrtbl10 = 0x1300,
106         .qrtbl20 = 0x0c00,
107         .qrtbl30 = 0x0880,
108         .full_soc_thresh = 0x5A00,
109         .rcomp0 = 0x0052,
110         .tcompc0 = 0x1F2D,
111         .ichgt_term = 0x0140,
112         .temp_nom = 0x1400,
113         .temp_lim = 0x2305,
114         .filter_cfg = 0x87A4,
115         .config = 0x2210,
116         .learn_cfg = 0x2606,
117         .misc_cfg = 0x0810,
118         .fullcap =  0x1085,
119         .fullcapnom = 0x1085,
120         .lavg_empty = 0x1000,
121         .dqacc = 0x01f4,
122         .dpacc = 0x3200,
123         .fctc = 0x05e0,
124         .kempty0 = 0x0600,
125         .cell_technology = POWER_SUPPLY_TECHNOLOGY_LION,
126         .cell_char_tbl = {
127                 /* Data to be written from 0x80h */
128                 0x9380, 0xAB70, 0xAFA0, 0xB3E0, 0xB790, 0xBB40,
129                 0xBBD0, 0xBC70, 0xBD90, 0xBE30, 0xC0F0, 0xC380,
130                 0xC710, 0xCA90, 0xCF70, 0xD480,
131                 /* Data to be written from 0x90h */
132                 0x00B0, 0x0610, 0x0600, 0x06F0, 0x0700, 0x2410,
133                 0x2040, 0x2460, 0x1CE0, 0x09F0, 0x0AB0, 0x08E0,
134                 0x0880, 0x06F0, 0x05D0, 0x05D0,
135                 /* Data to be written from 0xA0h */
136                 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
137                 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
138                 0x0100, 0x0100, 0x0100, 0x0100,
139         },
140 };
141 #endif