chagall_battery_data.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. static struct battery_data_t samsung_battery_data[] = {
  22. /* SDI battery data (High voltage 4.35V) */
  23. {
  24. .Capacity = 0x3CD8, /* CHAGALL : 7788mAh */
  25. .low_battery_comp_voltage = 3500,
  26. .low_battery_table = {
  27. /* range, slope, offset */
  28. {-5000, 0, 0}, /* dummy for top limit */
  29. {-1250, 0, 3320},
  30. {-750, 97, 3451},
  31. {-100, 96, 3461},
  32. {0, 0, 3456},
  33. },
  34. .temp_adjust_table = {
  35. /* range, slope, offset */
  36. {47000, 122, 8950},
  37. {60000, 200, 51000},
  38. {100000, 0, 0}, /* dummy for top limit */
  39. },
  40. .type_str = "SDI",
  41. }
  42. };
  43. #define CAPACITY_MAX 992
  44. #define CAPACITY_MAX_MARGIN 50
  45. #define CAPACITY_MIN 0
  46. static sec_bat_adc_table_data_t temp_table[] = {
  47. {1100, 1100},
  48. {668, 900},
  49. {657, 800},
  50. {613, 700},
  51. {556, 600},
  52. {486, 500},
  53. {402, 400},
  54. {306, 300},
  55. {199, 200},
  56. {90, 100},
  57. {-3, 0},
  58. {-93, -100},
  59. {-161, -200},
  60. {-350, -400},
  61. };
  62. static sec_bat_adc_table_data_t chg_temp_table[] = {
  63. {0, 0},
  64. };
  65. #if defined(CONFIG_MACH_CHAGALL_SPR) || defined(CONFIG_MACH_CHAGALL_USC)
  66. #define TEMP_HIGH_THRESHOLD_EVENT 560
  67. #define TEMP_HIGH_RECOVERY_EVENT 480
  68. #define TEMP_LOW_THRESHOLD_EVENT -50
  69. #define TEMP_LOW_RECOVERY_EVENT 0
  70. #define TEMP_HIGH_THRESHOLD_NORMAL 560
  71. #define TEMP_HIGH_RECOVERY_NORMAL 480
  72. #define TEMP_LOW_THRESHOLD_NORMAL -50
  73. #define TEMP_LOW_RECOVERY_NORMAL 0
  74. #define TEMP_HIGH_THRESHOLD_LPM 520
  75. #define TEMP_HIGH_RECOVERY_LPM 472
  76. #define TEMP_LOW_THRESHOLD_LPM 10
  77. #define TEMP_LOW_RECOVERY_LPM 25
  78. #else //CONFIG_MACH_CHAGALL_VZW
  79. #define TEMP_HIGH_THRESHOLD_EVENT 567
  80. #define TEMP_HIGH_RECOVERY_EVENT 480
  81. #define TEMP_LOW_THRESHOLD_EVENT -50
  82. #define TEMP_LOW_RECOVERY_EVENT 0
  83. #define TEMP_HIGH_THRESHOLD_NORMAL 567
  84. #define TEMP_HIGH_RECOVERY_NORMAL 480
  85. #define TEMP_LOW_THRESHOLD_NORMAL -50
  86. #define TEMP_LOW_RECOVERY_NORMAL 0
  87. #define TEMP_HIGH_THRESHOLD_LPM 520
  88. #define TEMP_HIGH_RECOVERY_LPM 472
  89. #define TEMP_LOW_THRESHOLD_LPM -20
  90. #define TEMP_LOW_RECOVERY_LPM 0
  91. #endif
  92. #endif /* __SEC_BATTERY_DATA_H */