summaryrefslogtreecommitdiff
path: root/baseboard/intelrvp
diff options
context:
space:
mode:
authorAyushee Shah <ayushee.shah@intel.com>2020-11-24 09:47:28 -0800
committerCommit Bot <commit-bot@chromium.org>2020-11-25 19:20:17 +0000
commitb67a2783ff93fd66980eb3b7d26d80ff38c3328e (patch)
treebfabc65dd944c1d3a2f413d8ee0fb5ad2b5c2483 /baseboard/intelrvp
parentef7bd34101fd0c5829175f163fb9dc5094df8541 (diff)
downloadchrome-ec-b67a2783ff93fd66980eb3b7d26d80ff38c3328e.tar.gz
Intelrvp:Separate battery configuration into board specific files
This CL adds the battery configuration from interlrvp baseboard to board specific file for Alderlake, Tigerlake and jasperlake platform so that same manufacturer battery but with different config params can be used on intended platforms. BUG=b:174129818 BRANCH=None TEST=Able to see correct battery configuration in "battery" EC command and can see the battery charging and discharging. Signed-off-by: Ayushee Shah <ayushee.shah@intel.com> Change-Id: I639eb4466c49dbdc01d31feb4ace8844a6b1ac87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2557763 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'baseboard/intelrvp')
-rw-r--r--baseboard/intelrvp/baseboard.h8
-rw-r--r--baseboard/intelrvp/battery.c110
-rw-r--r--baseboard/intelrvp/build.mk1
3 files changed, 0 insertions, 119 deletions
diff --git a/baseboard/intelrvp/baseboard.h b/baseboard/intelrvp/baseboard.h
index 48ababd771..8ed8600237 100644
--- a/baseboard/intelrvp/baseboard.h
+++ b/baseboard/intelrvp/baseboard.h
@@ -200,14 +200,6 @@ enum temp_sensor_id {
TEMP_SENSOR_COUNT,
};
-/* List of supported batteries */
-enum battery_type {
- BATTERY_SIMPLO_SMP_HHP_408,
- BATTERY_SIMPLO_SMP_CA_445,
- BATTERY_GETAC_SMP_HHP_408,
- BATTERY_TYPE_COUNT,
-};
-
/* TODO(b:132652892): Verify the below numbers. */
#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */
#define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */
diff --git a/baseboard/intelrvp/battery.c b/baseboard/intelrvp/battery.c
deleted file mode 100644
index ffabd3c723..0000000000
--- a/baseboard/intelrvp/battery.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- *
- * Battery pack vendor provided charging profile
- */
-
-#include "battery_fuel_gauge.h"
-#include "battery_smart.h"
-#include "common.h"
-#include "util.h"
-
-const struct board_batt_params board_battery_info[] = {
- /*
- * Simplo Battery (SMP-HHP-408) Information
- * Fuel gauge: BQ40Z50
- */
- [BATTERY_SIMPLO_SMP_HHP_408] = {
- .fuel_gauge = {
- .manuf_name = "SMP-HHP-408",
- .ship_mode = {
- .reg_addr = 0x00,
- .reg_data = { 0x0010, 0x0010 },
- },
- .fet = {
- .reg_addr = SB_BATTERY_STATUS,
- .reg_mask = STATUS_INITIALIZED,
- .disconnect_val = 0x0,
- }
- },
- .batt_info = {
- .voltage_max = 8700, /* mV */
- .voltage_normal = 7600,
- .voltage_min = 6100,
- .precharge_current = 204, /* mA */
- .start_charging_min_c = 0,
- .start_charging_max_c = 45,
- .charging_min_c = 0,
- .charging_max_c = 45,
- .discharging_min_c = 0,
- .discharging_max_c = 60,
- },
- },
-
- /*
- * Simplo Battery (SMP-CA-445) Information
- * Fuel gauge: BQ30Z554
- * TODO: SYSCROS-25972
- */
- [BATTERY_SIMPLO_SMP_CA_445] = {
- .fuel_gauge = {
- .manuf_name = "SMP-CA-445",
- .ship_mode = {
- .reg_addr = 0x00,
- .reg_data = { 0x0010, 0x0010 },
- },
- .fet = {
- .reg_addr = SB_BATTERY_STATUS,
- .reg_mask = STATUS_INITIALIZED,
- .disconnect_val = 0x0,
- }
- },
- .batt_info = {
- .voltage_max = 8700, /* mV */
- .voltage_normal = 7600,
- .voltage_min = 6100,
- .precharge_current = 150, /* 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,
- },
- },
-
- /*
- * Getac Battery (Getac SMP-HHP-408) Information
- * Fuel gauge: BQ40Z50-R3
- */
- [BATTERY_GETAC_SMP_HHP_408] = {
- .fuel_gauge = {
- .manuf_name = "Getac",
- .ship_mode = {
- .reg_addr = 0x00,
- .reg_data = { 0x0010, 0x0010 },
- },
- .fet = {
- .reg_addr = 0x0,
- .reg_mask = 0x6000,
- .disconnect_val = 0x6000,
- }
- },
- .batt_info = {
- .voltage_max = 13050, /* mV */
- .voltage_normal = 11400,
- .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 = 0,
- .discharging_max_c = 60,
- },
- },
-};
-BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SIMPLO_SMP_HHP_408;
diff --git a/baseboard/intelrvp/build.mk b/baseboard/intelrvp/build.mk
index cfa92cc0c6..5a77e95af5 100644
--- a/baseboard/intelrvp/build.mk
+++ b/baseboard/intelrvp/build.mk
@@ -9,7 +9,6 @@
#Intel RVP common files
baseboard-y=baseboard.o
baseboard-$(CONFIG_LED_COMMON)+=led.o led_states.o
-baseboard-$(CONFIG_BATTERY_SMART)+=battery.o
ifneq ($(CONFIG_USB_POWER_DELIVERY),)
baseboard-$(CONFIG_USB_POWER_DELIVERY)+=chg_usb_pd.o