s_battery_data.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /*
  2. * battery_data.h
  3. * Samsung Mobile Battery data Header
  4. *
  5. *
  6. * Copyright (C) 2012 Samsung Electronics, Inc.
  7. *
  8. *
  9. * This software is licensed under the terms of the GNU General Public
  10. * License version 2, as published by the Free Software Foundation, and
  11. * may be copied, distributed, and modified under those terms.
  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. */
  19. #ifndef __SEC_BATTERY_DATA_H
  20. #define __SEC_BATTERY_DATA_H __FILE__
  21. #if defined(CONFIG_MACH_SLTE_CMCC) || defined(CONFIG_MACH_SLTE_CTC) || \
  22. defined(CONFIG_MACH_SLTE_CU) || defined(CONFIG_MACH_SLTE_TD)
  23. static struct battery_data_t samsung_battery_data[] = {
  24. {
  25. .RCOMP0 = 0x65,
  26. .RCOMP_charging = 0x65,
  27. .temp_cohot = -1400,
  28. .temp_cocold = -4700,
  29. .is_using_model_data = true,
  30. .type_str = "SDI",
  31. }
  32. };
  33. #else
  34. static struct battery_data_t samsung_battery_data[] = {
  35. {
  36. .RCOMP0 = 0x65,
  37. .RCOMP_charging = 0x65,
  38. .temp_cohot = -1400,
  39. .temp_cocold = -4700,
  40. .is_using_model_data = true,
  41. .type_str = "SDI",
  42. }
  43. };
  44. #endif
  45. #define CAPACITY_MAX 990
  46. #define CAPACITY_MAX_MARGIN 50
  47. #define CAPACITY_MIN 0
  48. #if defined(CONFIG_MACH_SLTE_CMCC) || defined(CONFIG_MACH_SLTE_CTC) || \
  49. defined(CONFIG_MACH_SLTE_CU) || defined(CONFIG_MACH_SLTE_TD)
  50. static sec_bat_adc_table_data_t temp_table[] = {
  51. {25859, 900},
  52. {25920, 850},
  53. {26006, 800},
  54. {26266, 750},
  55. {26500, 700},
  56. {27030, 650},
  57. {28150, 600},
  58. {28600, 550},
  59. {29121, 500},
  60. {29863, 450},
  61. {30692, 400},
  62. {31716, 350},
  63. {32619, 300},
  64. {33703, 250},
  65. {34827, 200},
  66. {35879, 150},
  67. {37055, 100},
  68. {38099, 50},
  69. {38997, 0},
  70. {39897, -50},
  71. {40539, -100},
  72. {41289, -150},
  73. {41762, -200},
  74. {42141, -250},
  75. {42437, -300},
  76. };
  77. #else
  78. static sec_bat_adc_table_data_t temp_table[] = {
  79. {25859, 900},
  80. {26080, 850},
  81. {26366, 800},
  82. {26686, 750},
  83. {27030, 700},
  84. {27434, 650},
  85. {28160, 600},
  86. {28502, 570},
  87. {28720, 550},
  88. {29117, 520},
  89. {29398, 500},
  90. {29843, 470},
  91. {30135, 450},
  92. {30692, 400},
  93. {31716, 350},
  94. {32619, 300},
  95. {33703, 250},
  96. {34827, 200},
  97. {35879, 150},
  98. {37055, 100},
  99. {38099, 50},
  100. {38997, 0},
  101. {39897, -50},
  102. {40593, -100},
  103. {41289, -150},
  104. {41762, -200},
  105. {42141, -250},
  106. {42437, -300},
  107. };
  108. #endif
  109. static sec_bat_adc_table_data_t chg_temp_table[] = {
  110. {0, 0},
  111. };
  112. #define TEMP_HIGHLIMIT_THRESHOLD_EVENT 800
  113. #define TEMP_HIGHLIMIT_RECOVERY_EVENT 750
  114. #define TEMP_HIGHLIMIT_THRESHOLD_NORMAL 800
  115. #define TEMP_HIGHLIMIT_RECOVERY_NORMAL 750
  116. #define TEMP_HIGHLIMIT_THRESHOLD_LPM 800
  117. #define TEMP_HIGHLIMIT_RECOVERY_LPM 750
  118. #if defined(CONFIG_MACH_SLTE_CMCC) || defined(CONFIG_MACH_SLTE_CTC) || \
  119. defined(CONFIG_MACH_SLTE_CU) || defined(CONFIG_MACH_SLTE_TD)
  120. #define TEMP_HIGH_THRESHOLD_EVENT 620
  121. #define TEMP_HIGH_RECOVERY_EVENT 470
  122. #define TEMP_LOW_THRESHOLD_EVENT -30
  123. #define TEMP_LOW_RECOVERY_EVENT 10
  124. #define TEMP_HIGH_THRESHOLD_NORMAL 600
  125. #define TEMP_HIGH_RECOVERY_NORMAL 460
  126. #define TEMP_LOW_THRESHOLD_NORMAL -30
  127. #define TEMP_LOW_RECOVERY_NORMAL 10
  128. #define TEMP_HIGH_THRESHOLD_LPM 600
  129. #define TEMP_HIGH_RECOVERY_LPM 460
  130. #define TEMP_LOW_THRESHOLD_LPM -40
  131. #define TEMP_LOW_RECOVERY_LPM 0
  132. #else
  133. #define TEMP_HIGH_THRESHOLD_EVENT 620
  134. #define TEMP_HIGH_RECOVERY_EVENT 465
  135. #define TEMP_LOW_THRESHOLD_EVENT -30
  136. #define TEMP_LOW_RECOVERY_EVENT 10
  137. #define TEMP_HIGH_THRESHOLD_NORMAL 540
  138. #define TEMP_HIGH_RECOVERY_NORMAL 465
  139. #define TEMP_LOW_THRESHOLD_NORMAL -30
  140. #define TEMP_LOW_RECOVERY_NORMAL 10
  141. #define TEMP_HIGH_THRESHOLD_LPM 530
  142. #define TEMP_HIGH_RECOVERY_LPM 490
  143. #define TEMP_LOW_THRESHOLD_LPM -40
  144. #define TEMP_LOW_RECOVERY_LPM 0
  145. #endif
  146. #if defined(CONFIG_BATTERY_SWELLING)
  147. #define BATT_SWELLING_HIGH_TEMP_BLOCK 450
  148. #define BATT_SWELLING_HIGH_TEMP_RECOV 400
  149. #define BATT_SWELLING_LOW_TEMP_BLOCK 100
  150. #define BATT_SWELLING_LOW_TEMP_RECOV 150
  151. #define BATT_SWELLING_HIGH_CHG_CURRENT 0
  152. #define BATT_SWELLING_LOW_CHG_CURRENT 0
  153. #define BATT_SWELLING_DROP_FLOAT_VOLTAGE 4200
  154. #define BATT_SWELLING_HIGH_RECHG_VOLTAGE 4150
  155. #define BATT_SWELLING_LOW_RECHG_VOLTAGE 4050
  156. #endif
  157. #endif /* __SEC_BATTERY_DATA_H */