summaryrefslogtreecommitdiff
path: root/board/eldrid
diff options
context:
space:
mode:
authorlennon chen <lennon_chen@wistron.corp-partner.google.com>2020-08-24 19:45:05 +0800
committerCommit Bot <commit-bot@chromium.org>2020-08-25 22:48:03 +0000
commit9b9de8217b14b7259afd34d8544678a3f41d4f02 (patch)
tree4a861c0cfa83bd730bde3c814801c0015c57a15f /board/eldrid
parenteaeab6255d3fa08ce818bb18c9c8dc0f8d72f608 (diff)
downloadchrome-ec-9b9de8217b14b7259afd34d8544678a3f41d4f02.tar.gz
Eldrid: Add batteries configuration
Add batteries: 1.SIMPLO HIGHPOWER battery 2.COSMX battery BUG=none BRANCH=none TEST=make buildall -j Change-Id: Iac959e5e3f0199f616b9ebbeda3aabced82d3ea2 Signed-off-by: lennon chen <lennon_chen@wistron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2371789 Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'board/eldrid')
-rw-r--r--board/eldrid/battery.c70
-rw-r--r--board/eldrid/board.h3
2 files changed, 50 insertions, 23 deletions
diff --git a/board/eldrid/battery.c b/board/eldrid/battery.c
index 9b356a8efd..01c2937fe0 100644
--- a/board/eldrid/battery.c
+++ b/board/eldrid/battery.c
@@ -32,37 +32,63 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* LGC\011 L17L3PB0 Battery Information */
- /*
- * Battery info provided by ODM on b/143477210, comment #11
- */
- [BATTERY_LGC011] = {
+ /* SMP 996QA193H Battery Information */
+ [BATTERY_SIMPLO_HIGHPOWER] = {
.fuel_gauge = {
- .manuf_name = "LGC",
+ .manuf_name = "333-1D-11-A",
.ship_mode = {
- .reg_addr = 0x00,
- .reg_data = { 0x10, 0x10 },
+ .reg_addr = 0x0,
+ .reg_data = { 0x0010, 0x0010 },
},
.fet = {
+ .mfgacc_support = 1,
.reg_addr = 0x0,
- .reg_mask = 0x6000,
- .disconnect_val = 0x6000,
- }
+ .reg_mask = 0x0006,
+ .disconnect_val = 0x0,
+ },
+ },
+ .batt_info = {
+ .voltage_max = 13200, /* mV */
+ .voltage_normal = 11550, /* mV */
+ .voltage_min = 9000, /* mV */
+ .precharge_current = 256, /* mA */
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 45,
+ .charging_min_c = 0,
+ .charging_max_c = 45,
+ .discharging_min_c = -20,
+ .discharging_max_c = 60,
+ },
+ },
+ /* Cosmx CA407792G Battery Information */
+ [BATTERY_COSMX] = {
+ .fuel_gauge = {
+ .manuf_name = "333-AC-11-A",
+ .ship_mode = {
+ .reg_addr = 0x0,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x0,
+ .reg_mask = 0x0006,
+ .disconnect_val = 0x0,
+ },
},
.batt_info = {
- .voltage_max = TARGET_WITH_MARGIN(13200, 5),
- .voltage_normal = 11550, /* mV */
- .voltage_min = 9000, /* mV */
- .precharge_current = 256, /* mA */
- .start_charging_min_c = 0,
- .start_charging_max_c = 45,
- .charging_min_c = 0,
- .charging_max_c = 60,
- .discharging_min_c = 0,
- .discharging_max_c = 75,
+ .voltage_max = 13200, /* mV */
+ .voltage_normal = 11550, /* mV */
+ .voltage_min = 9000, /* mV */
+ .precharge_current = 256, /* mA */
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 45,
+ .charging_min_c = 0,
+ .charging_max_c = 45,
+ .discharging_min_c = -10,
+ .discharging_max_c = 60,
},
},
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_LGC011;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SIMPLO_HIGHPOWER;
diff --git a/board/eldrid/board.h b/board/eldrid/board.h
index d2923c440e..f23e369dcf 100644
--- a/board/eldrid/board.h
+++ b/board/eldrid/board.h
@@ -166,7 +166,8 @@
#include "registers.h"
enum battery_type {
- BATTERY_LGC011,
+ BATTERY_SIMPLO_HIGHPOWER,
+ BATTERY_COSMX,
BATTERY_TYPE_COUNT,
};