summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt_wang <matt_wang@compal.corp-partner.google.com>2022-11-29 14:57:19 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-12-01 11:50:09 +0000
commit1b7905dc01c52a2873b076bacccd50a456024f68 (patch)
tree051027bb5afaa18e0c5c404b481503502a211d9e
parent446aa246d2f70e51dc77930441165cf8d8d28bf7 (diff)
downloadchrome-ec-1b7905dc01c52a2873b076bacccd50a456024f68.tar.gz
charger: add charger prochot threshold config
To set the PROCHOT# assertion threshold for adapter overcurrent and battery over discharging current conditions. BUG=b:260378925 BRANCH=none TEST=Winterhold verified PROCHOT function as expected behavior. Signed-off-by: matt_wang <matt_wang@compal.corp-partner.google.com> Change-Id: If3c63d277dbfe5aea065e7f5ca156082f9993243 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4063629 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r--zephyr/Kconfig.charger14
-rw-r--r--zephyr/shim/include/config_chip.h10
2 files changed, 24 insertions, 0 deletions
diff --git a/zephyr/Kconfig.charger b/zephyr/Kconfig.charger
index c2c6eeb3f4..1505cc0948 100644
--- a/zephyr/Kconfig.charger
+++ b/zephyr/Kconfig.charger
@@ -766,4 +766,18 @@ config PLATFORM_EC_ISL9238C_DISABLE_CMOUT_LATCH
help
Disable the CMOUT latch function for ISL9238C.
+config PLATFORM_EC_AC_PROCHOT_CURRENT_MA
+ int "Value of the prochot threshold current in mA"
+ default 3328
+ help
+ To set the PROCHOT# assertion threshold for adapter overcurrent
+ conditions.
+
+config PLATFORM_EC_DC_PROCHOT_CURRENT_MA
+ int "Value of the prochot threshold current in mA"
+ default 6570
+ help
+ To set the PROCHOT# signal assertion threshold for battery over
+ discharging current conditions.
+
endif # PLATFORM_EC_CHARGER
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 28a93739c5..96af6aef3e 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -360,6 +360,16 @@
#define CONFIG_ISL9238C_DISABLE_CMOUT_LATCH
#endif
+#undef CONFIG_AC_PROCHOT_CURRENT_MA
+#ifdef CONFIG_PLATFORM_EC_AC_PROCHOT_CURRENT_MA
+#define CONFIG_AC_PROCHOT_CURRENT_MA CONFIG_PLATFORM_EC_AC_PROCHOT_CURRENT_MA
+#endif
+
+#undef CONFIG_DC_PROCHOT_CURRENT_MA
+#ifdef CONFIG_PLATFORM_EC_DC_PROCHOT_CURRENT_MA
+#define CONFIG_DC_PROCHOT_CURRENT_MA CONFIG_PLATFORM_EC_DC_PROCHOT_CURRENT_MA
+#endif
+
#undef CONFIG_CHARGER_RAA489000
#ifdef CONFIG_PLATFORM_EC_CHARGER_RAA489000
#define CONFIG_CHARGER_RAA489000