summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/garg/battery.c35
-rw-r--r--board/garg/board.h3
2 files changed, 34 insertions, 4 deletions
diff --git a/board/garg/battery.c b/board/garg/battery.c
index 70d6891d4f..119023877e 100644
--- a/board/garg/battery.c
+++ b/board/garg/battery.c
@@ -32,8 +32,8 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* Simplo 916Q2286H battery information */
- [BATTERY_SIMPLO] = {
+ /* Simplo SDI 916Q2286H battery information */
+ [BATTERY_SIMPLO_SDI] = {
.fuel_gauge = {
.manuf_name = "SMP-SDI3320",
.ship_mode = {
@@ -60,7 +60,36 @@ const struct board_batt_params board_battery_info[] = {
.discharging_max_c = 60,
},
},
+
+ /* Simplo BYD 916Q2294H battery information */
+ [BATTERY_SIMPLO_BYD] = {
+ .fuel_gauge = {
+ .manuf_name = "SMP-LP485780",
+ .ship_mode = {
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x0,
+ .reg_mask = 0x0002,
+ .disconnect_val = 0x0,
+ },
+ },
+ .batt_info = {
+ .voltage_max = TARGET_WITH_MARGIN(13200, 5), /* mV */
+ .voltage_normal = 11550,
+ .voltage_min = 9000,
+ .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,
+ },
+ },
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SIMPLO;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SIMPLO_SDI;
diff --git a/board/garg/board.h b/board/garg/board.h
index 0e614067a0..218f794b0d 100644
--- a/board/garg/board.h
+++ b/board/garg/board.h
@@ -99,7 +99,8 @@ enum sensor_id {
/* List of possible batteries */
enum battery_type {
- BATTERY_SIMPLO,
+ BATTERY_SIMPLO_SDI,
+ BATTERY_SIMPLO_BYD,
BATTERY_TYPE_COUNT,
};