summaryrefslogtreecommitdiff
path: root/board/redrix
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2021-07-13 14:57:24 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-21 02:19:26 +0000
commit5189460816847ea2779d864db30df672c314a849 (patch)
tree776fad9c38c7eb58d6bfeb88221cc245f2790fef /board/redrix
parentc1acd051f35d1a46a3ec4454886f1de1b68558ff (diff)
downloadchrome-ec-5189460816847ea2779d864db30df672c314a849.tar.gz
redrix: Add battery configuration
[Simply copy from: https://crrev.com/c/1971511] Add Dynapack CosMX battery configuration. The battery was the same as Jinlon. BUG=b:190797341 BRANCH=none TEST=make buildall -j Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I6aedb010c2d3300ee12ebe0b4be5d99c874aac9d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3023512 Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'board/redrix')
-rw-r--r--board/redrix/battery.c70
-rw-r--r--board/redrix/board.h3
2 files changed, 20 insertions, 53 deletions
diff --git a/board/redrix/battery.c b/board/redrix/battery.c
index a18ab029b6..4e74b92acb 100644
--- a/board/redrix/battery.c
+++ b/board/redrix/battery.c
@@ -10,7 +10,7 @@
#include "compile_time_macros.h"
/*
- * Battery info for all Brya battery types. Note that the fields
+ * Battery info for all Redrix battery types. Note that the fields
* start_charging_min/max and charging_min/max are not used for the charger.
* The effective temperature limits are given by discharging_min/max_c.
*
@@ -32,67 +32,35 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* POW-TECH GQA05 Battery Information */
- [BATTERY_POWER_TECH] = {
- /* BQ40Z50 Fuel Gauge */
+ /* DynaPack CosMX Battery Information */
+ [BATTERY_DYNAPACK_COS] = {
.fuel_gauge = {
- .manuf_name = "POW-TECH",
- .device_name = "BATGQA05L22",
+ .manuf_name = "333-2C-14-A",
.ship_mode = {
- .reg_addr = 0x00,
+ .reg_addr = 0x0,
.reg_data = { 0x0010, 0x0010 },
},
.fet = {
.mfgacc_support = 1,
- .reg_addr = 0x00,
- .reg_mask = 0x2000, /* XDSG */
- .disconnect_val = 0x2000,
- }
- },
- .batt_info = {
- .voltage_max = TARGET_WITH_MARGIN(13050, 5),
- .voltage_normal = 11400, /* mV */
- .voltage_min = 9000, /* mV */
- .precharge_current = 280, /* 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,
- },
- },
- /* LGC L17L3PB0 Battery Information */
- /*
- * Battery info provided by ODM on b/143477210, comment #11
- */
- [BATTERY_LGC011] = {
- .fuel_gauge = {
- .manuf_name = "LGC",
- .ship_mode = {
- .reg_addr = 0x00,
- .reg_data = { 0x0010, 0x0010 },
- },
- .fet = {
.reg_addr = 0x0,
- .reg_mask = 0x6000,
- .disconnect_val = 0x6000,
- }
+ .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 = 8800, /* mV */
+ .voltage_normal = 7700,
+ .voltage_min = 6000,
+ .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_POWER_TECH;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_DYNAPACK_COS;
diff --git a/board/redrix/board.h b/board/redrix/board.h
index 62abc99b6c..c43c34a662 100644
--- a/board/redrix/board.h
+++ b/board/redrix/board.h
@@ -222,8 +222,7 @@ enum ioex_port {
};
enum battery_type {
- BATTERY_POWER_TECH,
- BATTERY_LGC011,
+ BATTERY_DYNAPACK_COS,
BATTERY_TYPE_COUNT
};