summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/Kconfig.battery4
-rw-r--r--zephyr/program/brya/prj.conf2
-rw-r--r--zephyr/program/corsola/program.conf2
-rw-r--r--zephyr/program/herobrine/program.conf2
-rw-r--r--zephyr/program/intelrvp/prj.conf1
-rw-r--r--zephyr/program/nissa/program.conf1
-rw-r--r--zephyr/program/rex/program.conf2
-rw-r--r--zephyr/program/skyrim/program.conf1
-rw-r--r--zephyr/program/skyrim/winterhold/project.conf1
-rw-r--r--zephyr/program/trogdor/lazor/prj.conf2
-rw-r--r--zephyr/test/drivers/prj.conf2
-rw-r--r--zephyr/test/krabby/prj.conf3
-rw-r--r--zephyr/test/vboot_efs2/prj.conf3
13 files changed, 8 insertions, 18 deletions
diff --git a/zephyr/Kconfig.battery b/zephyr/Kconfig.battery
index 69d46b21c5..01d42567ab 100644
--- a/zephyr/Kconfig.battery
+++ b/zephyr/Kconfig.battery
@@ -18,13 +18,14 @@ if PLATFORM_EC_BATTERY
choice PLATFORM_EC_BATTERY_SELECT
prompt "Select the battery to use"
+ default PLATFORM_EC_BATTERY_SMART if DT_HAS_BATTERY_SMART_ENABLED
help
Select the battery used on the board. If you are ensure, select the
smart battery option.
config PLATFORM_EC_BATTERY_SMART
bool "Support a smart battery"
- depends on PLATFORM_EC_I2C
+ select PLATFORM_EC_I2C
help
Many batteries support the Smart Battery Specification and therefore
have common registers which can be accessed to control and monitor
@@ -36,6 +37,7 @@ endchoice # PLATFORM_EC_BATTERY_SELECT
choice PLATFORM_EC_BATTERY_PRESENT_MODE
prompt "Method to use to detect the battery"
+ default PLATFORM_EC_BATTERY_PRESENT_GPIO if $(dt_path_enabled,/named-gpios/ec_batt_pres_odl)
help
This selects the method to use to detect the presence of a battery.
diff --git a/zephyr/program/brya/prj.conf b/zephyr/program/brya/prj.conf
index c50aa7f5f2..7c85394abf 100644
--- a/zephyr/program/brya/prj.conf
+++ b/zephyr/program/brya/prj.conf
@@ -91,7 +91,7 @@ CONFIG_PLATFORM_EC_CMD_BUTTON=n
CONFIG_PLATFORM_EC_WORKAROUND_FLASH_DOWNLOAD_API=y
# Battery
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
+CONFIG_PLATFORM_EC_BATTERY_PRESENT_CUSTOM=y
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y
CONFIG_PLATFORM_EC_BATTERY_HW_PRESENT_CUSTOM=y
diff --git a/zephyr/program/corsola/program.conf b/zephyr/program/corsola/program.conf
index 86bd30aaed..5af4385697 100644
--- a/zephyr/program/corsola/program.conf
+++ b/zephyr/program/corsola/program.conf
@@ -77,8 +77,6 @@ CONFIG_PLATFORM_EC_HOSTCMD=y
# Battery
CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
-CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
CONFIG_PLATFORM_EC_BATT_FULL_CHIPSET_OFF_INPUT_LIMIT_MV=9000
CONFIG_PLATFORM_EC_I2C_PASSTHRU_RESTRICTED=y
CONFIG_PLATFORM_EC_I2C_VIRTUAL_BATTERY=y
diff --git a/zephyr/program/herobrine/program.conf b/zephyr/program/herobrine/program.conf
index d2f2051534..8e4785ee1c 100644
--- a/zephyr/program/herobrine/program.conf
+++ b/zephyr/program/herobrine/program.conf
@@ -51,12 +51,10 @@ CONFIG_PLATFORM_EC_VOLUME_BUTTONS=y
CONFIG_PLATFORM_EC_CMD_BUTTON=y
# Battery
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
CONFIG_PLATFORM_EC_I2C_VIRTUAL_BATTERY=y
CONFIG_PLATFORM_EC_I2C_PASSTHRU_RESTRICTED=y
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y
-CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
CONFIG_PLATFORM_EC_CHARGER_ISL9238C=y
CONFIG_PLATFORM_EC_CHARGE_RAMP_HW=y
CONFIG_PLATFORM_EC_USE_BATTERY_DEVICE_CHEMISTRY=y
diff --git a/zephyr/program/intelrvp/prj.conf b/zephyr/program/intelrvp/prj.conf
index 67d8f172b4..6b90fcebc1 100644
--- a/zephyr/program/intelrvp/prj.conf
+++ b/zephyr/program/intelrvp/prj.conf
@@ -16,7 +16,6 @@ CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT=y
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
CONFIG_PLATFORM_EC_BATTERY_TYPE_NO_AUTO_DETECT=y
CONFIG_PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT=15000
CONFIG_PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON=15001
diff --git a/zephyr/program/nissa/program.conf b/zephyr/program/nissa/program.conf
index daa90eb2fe..b1820f4e43 100644
--- a/zephyr/program/nissa/program.conf
+++ b/zephyr/program/nissa/program.conf
@@ -109,7 +109,6 @@ CONFIG_PLATFORM_EC_USB_PORT_ENABLE_DYNAMIC=y
CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y
CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT=y
# Charger support
diff --git a/zephyr/program/rex/program.conf b/zephyr/program/rex/program.conf
index 19a8c8a17a..a3ce19ab69 100644
--- a/zephyr/program/rex/program.conf
+++ b/zephyr/program/rex/program.conf
@@ -59,10 +59,8 @@ CONFIG_PLATFORM_EC_BOARD_VERSION_CBI=y
CONFIG_PLATFORM_EC_BYPASS_CBI_EEPROM_WP_CHECK=y
# Battery
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y
-CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT=y
# Charger
diff --git a/zephyr/program/skyrim/program.conf b/zephyr/program/skyrim/program.conf
index d26748071b..4f9de351ea 100644
--- a/zephyr/program/skyrim/program.conf
+++ b/zephyr/program/skyrim/program.conf
@@ -63,7 +63,6 @@ CONFIG_PLATFORM_EC_KEYBOARD_REFRESH_ROW3=y
CONFIG_SYSCON=y
# Battery
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y
CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT=y
diff --git a/zephyr/program/skyrim/winterhold/project.conf b/zephyr/program/skyrim/winterhold/project.conf
index 4c0aba19ab..c962d95abe 100644
--- a/zephyr/program/skyrim/winterhold/project.conf
+++ b/zephyr/program/skyrim/winterhold/project.conf
@@ -41,6 +41,7 @@ CONFIG_PLATFORM_EC_TABLET_MODE_SWITCH=n
CONFIG_PLATFORM_EC_GMR_TABLET_MODE=n
# Battery
+CONFIG_PLATFORM_EC_BATTERY_PRESENT_CUSTOM=y
CONFIG_PLATFORM_EC_BATTERY_HW_PRESENT_CUSTOM=y
# Body detection configuration
diff --git a/zephyr/program/trogdor/lazor/prj.conf b/zephyr/program/trogdor/lazor/prj.conf
index 64e7ca48ae..cf86c375d5 100644
--- a/zephyr/program/trogdor/lazor/prj.conf
+++ b/zephyr/program/trogdor/lazor/prj.conf
@@ -55,12 +55,10 @@ CONFIG_PLATFORM_EC_VOLUME_BUTTONS=y
CONFIG_PLATFORM_EC_CMD_BUTTON=y
# Battery
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
CONFIG_PLATFORM_EC_I2C_VIRTUAL_BATTERY=y
CONFIG_PLATFORM_EC_I2C_PASSTHRU_RESTRICTED=y
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y
-CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
CONFIG_PLATFORM_EC_CHARGER_ISL9238=y
CONFIG_PLATFORM_EC_CHARGE_RAMP_HW=y
CONFIG_PLATFORM_EC_USE_BATTERY_DEVICE_CHEMISTRY=y
diff --git a/zephyr/test/drivers/prj.conf b/zephyr/test/drivers/prj.conf
index 799e68c240..ac10d89ead 100644
--- a/zephyr/test/drivers/prj.conf
+++ b/zephyr/test/drivers/prj.conf
@@ -58,7 +58,6 @@ CONFIG_PLATFORM_EC_CHARGESPLASH=y
CONFIG_PLATFORM_EC_POWERSEQ=y
CONFIG_PLATFORM_EC_CMD_PWR_AVG=y
-CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y
CONFIG_PLATFORM_EC_USB_PID=0x5000
@@ -66,7 +65,6 @@ CONFIG_PLATFORM_EC_USBC=y
CONFIG_PLATFORM_EC_USB_CHARGER=y
CONFIG_PLATFORM_EC_USB_POWER_DELIVERY=y
CONFIG_PLATFORM_EC_USB_PD_5V_EN_CUSTOM=y
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
CONFIG_PLATFORM_EC_CHARGER_DISCHARGE_ON_AC=y
CONFIG_PLATFORM_EC_CHARGER_DISCHARGE_ON_AC_CHARGER=y
CONFIG_PLATFORM_EC_I2C_VIRTUAL_BATTERY=y
diff --git a/zephyr/test/krabby/prj.conf b/zephyr/test/krabby/prj.conf
index a6aa5d13cd..dcd83827f4 100644
--- a/zephyr/test/krabby/prj.conf
+++ b/zephyr/test/krabby/prj.conf
@@ -14,7 +14,8 @@ CONFIG_EMUL=y
CONFIG_PLATFORM_EC=y
CONFIG_PLATFORM_EC_BACKLIGHT_LID=n
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
-CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
+CONFIG_PLATFORM_EC_CHARGER=y
+CONFIG_PLATFORM_EC_CHARGER_RT9490=y
CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR=10
CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR_AC=20
CONFIG_PLATFORM_EC_CHARGE_MANAGER=y
diff --git a/zephyr/test/vboot_efs2/prj.conf b/zephyr/test/vboot_efs2/prj.conf
index f1d3223dc3..5dba44e4a2 100644
--- a/zephyr/test/vboot_efs2/prj.conf
+++ b/zephyr/test/vboot_efs2/prj.conf
@@ -7,9 +7,8 @@ CONFIG_FLASH=y
CONFIG_PLATFORM_EC=y
CONFIG_PLATFORM_EC_BACKLIGHT_LID=n
CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE=y
-CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
-CONFIG_PLATFORM_EC_BATTERY_SMART=y
CONFIG_PLATFORM_EC_BC12_SINGLE_DRIVER=y
+CONFIG_PLATFORM_EC_BC12_DETECT_PI3USB9201=y
CONFIG_PLATFORM_EC_CHARGER_ISL9238=y
CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR=10
CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR_AC=10