bms-batterydata-samsung-4450mah.c 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* Copyright (c) 2013, Samsung Electronics Co. All rights reserved.
  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. #include <linux/batterydata-lib.h>
  13. static struct single_row_lut fcc_temp = {
  14. .x = {-20, 0, 25, 40, 60},
  15. .y = {4294, 4316, 4327, 4328, 4318},
  16. .cols = 5
  17. };
  18. static struct single_row_lut fcc_sf = {
  19. .x = {0},
  20. .y = {100},
  21. .cols = 1
  22. };
  23. static struct sf_lut rbatt_sf = {
  24. .rows = 30,
  25. .cols = 5,
  26. .row_entries = {-20, 0, 25, 40, 60},
  27. .percent = {100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25, 20, 16, 13, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1},
  28. .sf = {
  29. {1398, 289, 100, 83, 78},
  30. {1383, 297, 103, 85, 79},
  31. {1383, 296, 103, 84, 79},
  32. {1376, 300, 106, 86, 80},
  33. {1331, 297, 110, 88, 81},
  34. {1248, 302, 119, 93, 83},
  35. {1232, 283, 123, 95, 85},
  36. {1223, 281, 122, 103, 90},
  37. {1230, 282, 106, 89, 83},
  38. {1253, 280, 101, 84, 80},
  39. {1287, 283, 101, 86, 80},
  40. {1333, 285, 104, 88, 82},
  41. {1384, 285, 106, 90, 84},
  42. {1439, 283, 107, 89, 84},
  43. {1500, 283, 107, 87, 82},
  44. {1574, 293, 105, 85, 81},
  45. {1659, 320, 105, 85, 80},
  46. {1749, 354, 103, 84, 80},
  47. {1853, 386, 100, 84, 80},
  48. {1990, 407, 104, 86, 81},
  49. {2058, 414, 106, 88, 82},
  50. {2120, 414, 111, 90, 83},
  51. {2178, 403, 114, 91, 84},
  52. {1938, 367, 119, 92, 85},
  53. {2026, 375, 121, 92, 83},
  54. {2358, 380, 118, 89, 82},
  55. {2839, 394, 112, 86, 82},
  56. {3641, 403, 111, 89, 83},
  57. {5186, 420, 115, 93, 92},
  58. {5186, 420, 115, 93, 92}, //QC Comment{11656, 3216, 2786, 600, 1146},
  59. }
  60. };
  61. static struct pc_temp_ocv_lut pc_temp_ocv = {
  62. .rows = 31,
  63. .cols = 5,
  64. .temp = {-20, 0, 25, 40, 60},
  65. .percent = {100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25, 20, 16, 13, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
  66. .ocv = {
  67. {4319, 4319, 4314, 4309, 4302},
  68. {4217, 4249, 4252, 4249, 4245},
  69. {4142, 4193, 4199, 4197, 4193},
  70. {4090, 4139, 4149, 4146, 4142},
  71. {4030, 4087, 4100, 4097, 4093},
  72. {3953, 4036, 4062, 4057, 4048},
  73. {3904, 3964, 3998, 4002, 4005},
  74. {3863, 3922, 3952, 3962, 3962},
  75. {3832, 3892, 3906, 3910, 3910},
  76. {3808, 3862, 3872, 3873, 3873},
  77. {3788, 3834, 3846, 3847, 3847},
  78. {3769, 3810, 3823, 3824, 3824},
  79. {3750, 3786, 3804, 3805, 3805},
  80. {3731, 3765, 3786, 3786, 3785},
  81. {3710, 3746, 3769, 3768, 3760},
  82. {3686, 3731, 3751, 3747, 3736},
  83. {3658, 3719, 3727, 3722, 3709},
  84. {3629, 3707, 3704, 3698, 3685},
  85. {3604, 3696, 3691, 3682, 3671},
  86. {3581, 3684, 3689, 3681, 3669},
  87. {3569, 3677, 3687, 3680, 3668},
  88. {3554, 3667, 3686, 3679, 3667},
  89. {3538, 3656, 3684, 3678, 3665},
  90. {3521, 3642, 3679, 3674, 3659},
  91. {3500, 3624, 3665, 3662, 3641},
  92. {3475, 3599, 3637, 3633, 3602},
  93. {3444, 3568, 3591, 3584, 3549},
  94. {3405, 3521, 3525, 3519, 3477},
  95. {3352, 3447, 3427, 3425, 3376},
  96. {3264, 3307, 3275, 3277, 3220},
  97. {3000, 3000, 3000, 3000, 3000}
  98. }
  99. };
  100. struct bms_battery_data samsung_4450mAH_data = {
  101. .fcc = 4450,
  102. .fcc_temp_lut = &fcc_temp,
  103. .fcc_sf_lut = &fcc_sf,
  104. .pc_temp_ocv_lut = &pc_temp_ocv,
  105. .rbatt_sf_lut = &rbatt_sf,
  106. .default_rbatt_mohm = 130
  107. };