summaryrefslogtreecommitdiff
path: root/board/cret/battery.c
diff options
context:
space:
mode:
authorjohnwc_yeh <johnwc_yeh@compal.corp-partner.google.com>2021-05-26 16:45:55 +0800
committerCommit Bot <commit-bot@chromium.org>2021-06-03 05:20:00 +0000
commitab99cceef9c19ea6499fccbf973195d07825c24d (patch)
treeba4d3aebaf75c6bb72bc3cc905c08cee5a738ade /board/cret/battery.c
parentb34aa1516867aa631033b3254bf6ba22ab4598d5 (diff)
downloadchrome-ec-ab99cceef9c19ea6499fccbf973195d07825c24d.tar.gz
cret: Modify three battery parameter
Add three battery type for cret. And modify device name and device length to identify. 1. New battery type of manufacture name is same as BATTERY_BYD_1VX1H, BATTERY_SMP_ATL_VM732 and BATTERY_SMP_COS_VM732, so use device name to recognize. 2. The last three strings of the battery device name are the production date, need ignore,so modify the read length of the device name. BUG=b:183875170 BRANCH=dedede TEST=Battery can be found via EC log check and battery can be cutoff by ectool command. Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I1ab8116d8e6c41d3eeb48852058fbd71bee0eca6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919151 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/cret/battery.c')
-rw-r--r--board/cret/battery.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/board/cret/battery.c b/board/cret/battery.c
index b3804d01af..f450f80a45 100644
--- a/board/cret/battery.c
+++ b/board/cret/battery.c
@@ -33,10 +33,10 @@
*/
const struct board_batt_params board_battery_info[] = {
/* BYD Battery Information */
- [BATTERY_BYD_1VX1HYMD] = {
+ [BATTERY_BYD_1VX1H] = {
.fuel_gauge = {
.manuf_name = "BYD",
- .device_name = "1VX1HYMD",
+ .device_name = "DELL 1VX1H",
.ship_mode = {
.wb_support = 1,
.reg_addr = 0x44,
@@ -65,12 +65,11 @@ const struct board_batt_params board_battery_info[] = {
},
/* BYD Battery Information */
- [BATTERY_BYD_X0Y5MYMD] = {
+ [BATTERY_BYD_X0Y5M] = {
.fuel_gauge = {
.manuf_name = "BYD",
- .device_name = "X0Y5MYMD",
+ .device_name = "DELL X0Y5M",
.ship_mode = {
- .wb_support = 1,
.reg_addr = 0x00,
.reg_data = { 0x0010, 0x0010 },
},
@@ -190,10 +189,10 @@ const struct board_batt_params board_battery_info[] = {
},
/* SMP-ATL Battery Information */
- [BATTERY_SMP_ATL_VM73297U] = {
+ [BATTERY_SMP_ATL_VM732] = {
.fuel_gauge = {
.manuf_name = "SMP-ATL-3.61",
- .device_name = "VM73297U",
+ .device_name = "DELL VM732",
.ship_mode = {
.wb_support = 1,
.reg_addr = 0x44,
@@ -222,17 +221,16 @@ const struct board_batt_params board_battery_info[] = {
},
/* SMP-ATL Battery Information */
- [BATTERY_SMP_ATL_RF9H3YMD] = {
+ [BATTERY_SMP_ATL_RF9H3] = {
.fuel_gauge = {
.manuf_name = "SMP-ATL-3.61",
- .device_name = "RF9H3YMD",
+ .device_name = "DELL RF9H3",
.ship_mode = {
- .wb_support = 1,
.reg_addr = 0x00,
.reg_data = { 0x0010, 0x0010 },
},
.fet = {
- .reg_addr = 0x41,
+ .reg_addr = 0x43,
.reg_mask = 0x0001,
.disconnect_val = 0x0000,
.cfet_mask = 0x0002,
@@ -254,10 +252,10 @@ const struct board_batt_params board_battery_info[] = {
},
/* SMP-COS Battery Information */
- [BATTERY_SMP_COS_VM732835] = {
+ [BATTERY_SMP_COS_VM732] = {
.fuel_gauge = {
.manuf_name = "SMP-COS3.63",
- .device_name = "VM732835",
+ .device_name = "DELL VM732",
.ship_mode = {
.wb_support = 1,
.reg_addr = 0x44,
@@ -286,17 +284,16 @@ const struct board_batt_params board_battery_info[] = {
},
/* SMP-COS Battery Information */
- [BATTERY_SMP_COS_RF9H3YMD] = {
+ [BATTERY_SMP_COS_RF9H3] = {
.fuel_gauge = {
.manuf_name = "SMP-COS3.63",
- .device_name = "RF9H3YMD",
+ .device_name = "DELL RF9H3",
.ship_mode = {
- .wb_support = 1,
.reg_addr = 0x00,
.reg_data = { 0x0010, 0x0010 },
},
.fet = {
- .reg_addr = 0x41,
+ .reg_addr = 0x43,
.reg_mask = 0x0001,
.disconnect_val = 0x0000,
.cfet_mask = 0x0002,
@@ -439,4 +436,4 @@ const struct board_batt_params board_battery_info[] = {
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_BYD_1VX1HYMD;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_BYD_1VX1H;