Skip to content

Commit ac4246b

Browse files
Jett Rinkchrome-bot
authored andcommitted
phaser: add Sunwoda L18D3PG1 battery information
BRANCH=none BUG=b:78770233 TEST=builds Change-Id: Ic6880ba1f1c89c175320c434a6574540d5efbd36 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1099574 Commit-Ready: Justin TerAvest <teravest@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org>
1 parent 2415374 commit ac4246b

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

board/phaser/battery.c

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
* address, mask, and disconnect value need to be provided.
3333
*/
3434
const struct board_batt_params board_battery_info[] = {
35-
/* TODO(b/78770233): Add real battery information from datasheets */
3635
/* Panasonic AP1505L Battery Information */
3736
[BATTERY_PANASONIC] = {
3837
.fuel_gauge = {
@@ -114,6 +113,33 @@ const struct board_batt_params board_battery_info[] = {
114113
.discharging_max_c = 73,
115114
},
116115
},
116+
/* Sunwoda L18D3PG1 */
117+
[BATTERY_SUNWODA] = {
118+
.fuel_gauge = {
119+
.manuf_name = "SUNWODA",
120+
.ship_mode = {
121+
.reg_addr = 0x34,
122+
.reg_data = { 0x0000, 0x1000 },
123+
},
124+
.fet = {
125+
.reg_addr = 0x34,
126+
.reg_mask = 0x0100,
127+
.disconnect_val = 0x0100,
128+
}
129+
},
130+
.batt_info = {
131+
.voltage_max = 13050, /* mV */
132+
.voltage_normal = 11250, /* mV */
133+
.voltage_min = 9000, /* mV */
134+
.precharge_current = 200, /* mA */
135+
.start_charging_min_c = 0,
136+
.start_charging_max_c = 60,
137+
.charging_min_c = 0,
138+
.charging_max_c = 60,
139+
.discharging_min_c = -20,
140+
.discharging_max_c = 60,
141+
},
142+
},
117143
};
118144
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
119145

board/phaser/board.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ enum battery_type {
3737
BATTERY_PANASONIC,
3838
BATTERY_SMP,
3939
BATTERY_LGC,
40+
BATTERY_SUNWODA,
4041
BATTERY_TYPE_COUNT,
4142
};
4243

0 commit comments

Comments
 (0)