diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2019-01-23 11:06:39 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-01-24 00:51:35 -0800 |
commit | f5b3924cb146dfa4d22edf25d0efeda9e53422ea (patch) | |
tree | 1819230a9b5ce3fecd1b0df59576dde5eb4c2d3c | |
parent | 5bf596811ea13bced755bf7bc999cb994547d782 (diff) | |
download | chrome-ec-f5b3924cb146dfa4d22edf25d0efeda9e53422ea.tar.gz |
octopus/ampton: disable espi pad when system goes into G3
On Ampton, the EC's power consumption is about 5.5mA on battery
mode in G3 state. This is because EC unable to go into low power
mode properly in idle task when eSPI CS# pin is low.
So we disable eSPI pad when system goes into G3 state to reduce
power number.
BUG=b:121105042
BRANCH=none
TEST=On Ampton, EC power rail drops to about 1.1mA in G3.
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Change-Id: I1c85bd0e909936e7f143b15b5e9b7c1884d5cc62
Reviewed-on: https://chromium-review.googlesource.com/1426304
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r-- | baseboard/octopus/baseboard.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/baseboard/octopus/baseboard.c b/baseboard/octopus/baseboard.c index 4903314ac1..8aeb0a8e0b 100644 --- a/baseboard/octopus/baseboard.c +++ b/baseboard/octopus/baseboard.c @@ -14,6 +14,9 @@ #include "driver/ppc/nx20p348x.h" #include "gpio.h" #include "hooks.h" +#ifdef VARIANT_OCTOPUS_EC_ITE8320 +#include "intc.h" +#endif #include "keyboard_scan.h" #include "power.h" #include "system.h" @@ -95,6 +98,14 @@ const struct max14637_config_t max14637_config[CONFIG_USB_PD_PORT_COUNT] = { /* Called by APL power state machine when transitioning from G3 to S5 */ void chipset_pre_init_callback(void) { +#ifdef IT83XX_ESPI_INHIBIT_CS_BY_PAD_DISABLED + /* + * Since we disable eSPI module for IT8320 part when system goes into G3 + * state, so we need to enable it at system startup. + */ + espi_enable_pad(1); +#endif + /* Enable 5.0V and 3.3V rails, and wait for Power Good */ power_5v_enable(task_get_current(), 1); @@ -168,6 +179,15 @@ void chipset_do_shutdown(void) gpio_set_level(GPIO_EN_PP3300, 0); while (gpio_get_level(GPIO_PP3300_PG)) ; + +#ifdef IT83XX_ESPI_INHIBIT_CS_BY_PAD_DISABLED + /* + * The IT8320 part doesn't go into its lowest power state in idle task + * when the eSPI module is on and CS# is asserted, so we need to + * manually disable it. + */ + espi_enable_pad(0); +#endif } int board_is_i2c_port_powered(int port) |