David Keitel | 8f2601b | 2012-02-14 22:31:07 -0800 | [diff] [blame^] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/mfd/pm8xxx/pm8921-bms.h> |
| 14 | |
David Keitel | 8f2601b | 2012-02-14 22:31:07 -0800 | [diff] [blame^] | 15 | static struct single_row_lut palladium_1500_fcc_temp = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 16 | .x = {-30, -20, -10, 0, 10, 25, 40, 60}, |
| 17 | .y = {1103, 1179, 1284, 1330, 1420, 1511, 1541, 1571}, |
| 18 | .cols = 8, |
| 19 | }; |
| 20 | |
David Keitel | 8f2601b | 2012-02-14 22:31:07 -0800 | [diff] [blame^] | 21 | static struct single_row_lut palladium_1500_fcc_sf = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 22 | .x = {100, 200, 300, 400, 500}, |
| 23 | .y = {97, 93, 93, 90, 87}, |
| 24 | .cols = 5, |
| 25 | }; |
| 26 | |
David Keitel | 8f2601b | 2012-02-14 22:31:07 -0800 | [diff] [blame^] | 27 | static struct pc_sf_lut palladium_1500_pc_sf = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 28 | .rows = 10, |
| 29 | .cols = 5, |
| 30 | .cycles = {100, 200, 300, 400, 500}, |
| 31 | .percent = {100, 90, 80, 70, 60, 50, 40, 30, 20, 10}, |
| 32 | .sf = { |
| 33 | {97, 93, 93, 90, 87}, |
| 34 | {97, 93, 93, 90, 87}, |
| 35 | {98, 94, 92, 89, 86}, |
| 36 | {98, 94, 92, 89, 86}, |
| 37 | {99, 94, 92, 88, 86}, |
| 38 | {99, 95, 92, 88, 87}, |
| 39 | {99, 95, 92, 88, 87}, |
| 40 | {99, 95, 92, 88, 87}, |
| 41 | {99, 95, 92, 88, 87}, |
| 42 | {99, 95, 92, 88, 87} |
| 43 | }, |
| 44 | }; |
| 45 | |
David Keitel | 8f2601b | 2012-02-14 22:31:07 -0800 | [diff] [blame^] | 46 | static struct pc_temp_ocv_lut palladium_1500_pc_temp_ocv = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 47 | .rows = 29, |
| 48 | .cols = 8, |
| 49 | .temp = {-30, -20, -10, 0, 10, 25, 40, 60}, |
| 50 | .percent = {100, 95, 90, 85, 80, 75, 70, 65, 60, 55, |
| 51 | 50, 45, 40, 35, 30, 25, 20, 15, 10, 9, |
| 52 | 8, 7, 6, 5, 4, 3, 2, 1, 0 |
| 53 | }, |
| 54 | .ocv = { |
| 55 | {3673, 3814, 3945, 4025, 4106, 4176, 4218, 4260}, |
| 56 | {3613, 3751, 3880, 3959, 4038, 4107, 4149, 4190}, |
| 57 | {3573, 3710, 3837, 3916, 3994, 4062, 4103, 4144}, |
| 58 | {3534, 3670, 3796, 3873, 3951, 4019, 4059, 4099}, |
| 59 | {3491, 3625, 3749, 3826, 3902, 3969, 4009, 4049}, |
| 60 | {3464, 3597, 3721, 3796, 3872, 3939, 3978, 4018}, |
| 61 | {3436, 3568, 3691, 3766, 3841, 3907, 3946, 3985}, |
| 62 | {3407, 3537, 3659, 3733, 3808, 3873, 3912, 3951}, |
| 63 | {3377, 3507, 3627, 3701, 3775, 3840, 3878, 3917}, |
| 64 | {3355, 3484, 3604, 3677, 3751, 3815, 3853, 3891}, |
| 65 | {3339, 3467, 3586, 3659, 3732, 3796, 3834, 3872}, |
| 66 | {3324, 3452, 3570, 3643, 3716, 3780, 3818, 3855}, |
| 67 | {3312, 3440, 3558, 3630, 3703, 3766, 3804, 3842}, |
| 68 | {3303, 3430, 3548, 3620, 3692, 3756, 3793, 3831}, |
| 69 | {3297, 3424, 3541, 3614, 3686, 3749, 3787, 3824}, |
| 70 | {3288, 3414, 3531, 3603, 3675, 3738, 3776, 3813}, |
| 71 | {3272, 3398, 3514, 3586, 3658, 3720, 3757, 3795}, |
| 72 | {3240, 3365, 3480, 3551, 3622, 3684, 3721, 3758}, |
| 73 | {3224, 3348, 3463, 3533, 3604, 3666, 3702, 3739}, |
| 74 | {3221, 3344, 3459, 3530, 3600, 3662, 3695, 3728}, |
| 75 | {3216, 3340, 3454, 3525, 3595, 3657, 3686, 3715}, |
| 76 | {3212, 3335, 3449, 3520, 3590, 3652, 3677, 3703}, |
| 77 | {3203, 3326, 3440, 3510, 3580, 3642, 3664, 3686}, |
| 78 | {3185, 3307, 3420, 3490, 3560, 3621, 3639, 3657}, |
| 79 | {3176, 3298, 3411, 3481, 3550, 3611, 3626, 3640}, |
| 80 | {3151, 3272, 3384, 3453, 3522, 3583, 3593, 3604}, |
| 81 | {3106, 3225, 3335, 3446, 3472, 3531, 3538, 3545}, |
| 82 | {3021, 3217, 3245, 3417, 3429, 3435, 3439, 3442}, |
| 83 | {3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000} |
| 84 | }, |
| 85 | }; |
| 86 | |
David Keitel | 8f2601b | 2012-02-14 22:31:07 -0800 | [diff] [blame^] | 87 | struct pm8921_bms_battery_data palladium_1500_data = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 88 | .fcc = 1500, |
David Keitel | 8f2601b | 2012-02-14 22:31:07 -0800 | [diff] [blame^] | 89 | .fcc_temp_lut = &palladium_1500_fcc_temp, |
| 90 | .fcc_sf_lut = &palladium_1500_fcc_sf, |
| 91 | .pc_temp_ocv_lut = &palladium_1500_pc_temp_ocv, |
| 92 | .pc_sf_lut = &palladium_1500_pc_sf, |
| 93 | }; |
| 94 | |
| 95 | static struct single_row_lut desay_5200_fcc_temp = { |
| 96 | .x = {-20, 0, 25, 40}, |
| 97 | .y = {5690, 5722, 5722, 5727}, |
| 98 | .cols = 4 |
| 99 | }; |
| 100 | |
| 101 | static struct single_row_lut desay_5200_fcc_sf = { |
| 102 | .x = {0}, |
| 103 | .y = {100}, |
| 104 | .cols = 1 |
| 105 | }; |
| 106 | |
| 107 | static struct pc_temp_ocv_lut desay_5200_pc_temp_ocv = { |
| 108 | .rows = 29, |
| 109 | .cols = 4, |
| 110 | .temp = {-20, 0, 25, 40}, |
| 111 | .percent = {100, 95, 90, 85, 80, 75, 70, 65, 60, 55, |
| 112 | 50, 45, 40, 35, 30, 25, 20, 15, 10, 9, 8, |
| 113 | 7, 6, 5, 4, 3, 2, 1, 0 |
| 114 | }, |
| 115 | .ocv = { |
| 116 | {4185, 4184, 4181, 4178}, |
| 117 | {4103, 4117, 4120, 4119}, |
| 118 | {4044, 4067, 4074, 4073}, |
| 119 | {3987, 4019, 4031, 4030}, |
| 120 | {3941, 3974, 3992, 3992}, |
| 121 | {3902, 3936, 3958, 3957}, |
| 122 | {3866, 3901, 3926, 3926}, |
| 123 | {3835, 3870, 3891, 3896}, |
| 124 | {3811, 3842, 3855, 3858}, |
| 125 | {3792, 3818, 3827, 3827}, |
| 126 | {3776, 3795, 3806, 3806}, |
| 127 | {3762, 3778, 3789, 3790}, |
| 128 | {3748, 3765, 3777, 3777}, |
| 129 | {3735, 3752, 3767, 3765}, |
| 130 | {3720, 3739, 3756, 3754}, |
| 131 | {3704, 3726, 3743, 3736}, |
| 132 | {3685, 3712, 3723, 3716}, |
| 133 | {3664, 3697, 3695, 3689}, |
| 134 | {3623, 3672, 3669, 3664}, |
| 135 | {3611, 3666, 3666, 3661}, |
| 136 | {3597, 3659, 3662, 3658}, |
| 137 | {3579, 3648, 3657, 3653}, |
| 138 | {3559, 3630, 3644, 3639}, |
| 139 | {3532, 3600, 3612, 3606}, |
| 140 | {3497, 3558, 3565, 3559}, |
| 141 | {3450, 3500, 3504, 3498}, |
| 142 | {3380, 3417, 3421, 3416}, |
| 143 | {3265, 3287, 3296, 3293}, |
| 144 | {3000, 3000, 3000, 3000} |
| 145 | }, |
| 146 | }; |
| 147 | |
| 148 | static struct pc_sf_lut desay_5200_pc_sf = { |
| 149 | .rows = 1, |
| 150 | .cols = 1, |
| 151 | .cycles = {0}, |
| 152 | .percent = {100}, |
| 153 | .sf = { |
| 154 | {100} |
| 155 | }, |
| 156 | }; |
| 157 | |
| 158 | struct pm8921_bms_battery_data desay_5200_data = { |
| 159 | .fcc = 5200, |
| 160 | .fcc_temp_lut = &desay_5200_fcc_temp, |
| 161 | .fcc_sf_lut = &desay_5200_fcc_sf, |
| 162 | .pc_temp_ocv_lut = &desay_5200_pc_temp_ocv, |
| 163 | .pc_sf_lut = &desay_5200_pc_sf, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 164 | }; |