summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2017-11-14 09:47:27 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-11-28 10:22:27 -0800
commit26b4617c4311860b15b6761734673c527cbc74ad (patch)
tree253fa8da12eb1cdab65e53f3d9f78142ba45bef2 /include/ec_commands.h
parent675bdc2e2c58cd36161dcec98a5240eb22b43fda (diff)
downloadchrome-ec-26b4617c4311860b15b6761734673c527cbc74ad.tar.gz
charge_manager: Add EC_CMD_OVERRIDE_DEDICATED_CHARGER_LIMIT
Usually, the max current and supply voltage of dedicated chargers are not known to the EC. This patch adds EC_CMD_OVERRIDE_DEDICATED_CHARGER_LIMIT, which allows the host to change the max current and supply voltage of the dedicated charge port. BUG=b:64442692 BRANCH=none TEST=make runtests && buildall. Boot Fizz and let coreboot set the adapter current and voltage. Change-Id: I29b3f5762f8b316ca363c23e230530cdf4ca207a Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/769152
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index b2abacb83a..3a0d960ef1 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -3726,6 +3726,16 @@ struct __ec_align2 ec_params_external_power_limit_v1 {
#define EC_POWER_LIMIT_NONE 0xffff
+/*
+ * Set maximum voltage & current of a dedicated charge port
+ */
+#define EC_CMD_OVERRIDE_DEDICATED_CHARGER_LIMIT 0x00A3
+
+struct __ec_align2 ec_params_dedicated_charger_limit {
+ uint16_t current_lim; /* in mA */
+ uint16_t voltage_lim; /* in mV */
+};
+
/*****************************************************************************/
/* Hibernate/Deep Sleep Commands */