summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/dalboz/battery.c97
-rw-r--r--board/dalboz/board.h4
2 files changed, 81 insertions, 20 deletions
diff --git a/board/dalboz/battery.c b/board/dalboz/battery.c
index 33e4e9ce5d..5a90a767c8 100644
--- a/board/dalboz/battery.c
+++ b/board/dalboz/battery.c
@@ -32,34 +32,93 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* AP18F4M */
- [BATTERY_AP18F4M] = {
+ /* SMP L19M3PG1 */
+ [BATTERY_SMP] = {
.fuel_gauge = {
- .manuf_name = "Murata KT00404001",
+ .manuf_name = "SMP",
+ .device_name = "L19M3PG1",
.ship_mode = {
- .reg_addr = 0x3A,
- .reg_data = { 0xC574, 0xC574 },
+ .reg_addr = 0x34,
+ .reg_data = { 0x0000, 0x1000 },
},
.fet = {
- .reg_addr = 0x0,
- .reg_mask = 0x2000,
- .disconnect_val = 0x2000,
+ .reg_addr = 0x34,
+ .reg_mask = 0x0100,
+ .disconnect_val = 0x0100,
}
},
.batt_info = {
- .voltage_max = 8700,
- .voltage_normal = 7600,
- .voltage_min = 5500,
- .precharge_current = 256,
- .start_charging_min_c = 0,
- .start_charging_max_c = 50,
- .charging_min_c = 0,
- .charging_max_c = 60,
- .discharging_min_c = -20,
- .discharging_max_c = 75,
+ .voltage_max = 13200, /* mV */
+ .voltage_normal = 11520, /* mV */
+ .voltage_min = 9000, /* mV */
+ .precharge_current = 200, /* mA */
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 60,
+ .charging_min_c = 0,
+ .charging_max_c = 50,
+ .discharging_min_c = -20,
+ .discharging_max_c = 73,
+ },
+ },
+
+ /* LGC L19L3PG1 */
+ [BATTERY_LGC] = {
+ .fuel_gauge = {
+ .manuf_name = "LGC",
+ .device_name = "L19L3PG1",
+ .ship_mode = {
+ .reg_addr = 0x34,
+ .reg_data = { 0x0000, 0x1000 },
+ },
+ .fet = {
+ .reg_addr = 0x34,
+ .reg_mask = 0x0100,
+ .disconnect_val = 0x0100,
+ }
+ },
+ .batt_info = {
+ .voltage_max = 13200, /* mV */
+ .voltage_normal = 11550, /* mV */
+ .voltage_min = 9000, /* mV */
+ .precharge_current = 200, /* mA */
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 60,
+ .charging_min_c = 0,
+ .charging_max_c = 50,
+ .discharging_min_c = -20,
+ .discharging_max_c = 73,
+ },
+ },
+
+ /* Celxpert L19C3PG1 */
+ [BATTERY_CEL] = {
+ .fuel_gauge = {
+ .manuf_name = "Celxpert",
+ .device_name = "L19C3PG1",
+ .ship_mode = {
+ .reg_addr = 0x34,
+ .reg_data = { 0x0000, 0x1000 },
+ },
+ .fet = {
+ .reg_addr = 0x34,
+ .reg_mask = 0x0100,
+ .disconnect_val = 0x0100,
+ }
+ },
+ .batt_info = {
+ .voltage_max = 13200, /* mV */
+ .voltage_normal = 11520, /* mV */
+ .voltage_min = 9000, /* mV */
+ .precharge_current = 200, /* mA */
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 60,
+ .charging_min_c = 0,
+ .charging_max_c = 50,
+ .discharging_min_c = -20,
+ .discharging_max_c = 70,
},
},
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_AP18F4M;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SMP;
diff --git a/board/dalboz/board.h b/board/dalboz/board.h
index b316ab7d72..5b6fc18e3f 100644
--- a/board/dalboz/board.h
+++ b/board/dalboz/board.h
@@ -61,7 +61,9 @@ extern enum gpio_signal GPIO_PCH_PWRBTN_L;
extern enum gpio_signal GPIO_PCH_SYS_PWROK;
enum battery_type {
- BATTERY_AP18F4M,
+ BATTERY_SMP,
+ BATTERY_LGC,
+ BATTERY_CEL,
BATTERY_TYPE_COUNT,
};