diff options
author | Justin TerAvest <teravest@chromium.org> | 2018-04-16 14:45:17 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-04-17 04:02:24 -0700 |
commit | 6d5cccefa09d28d6b0f9c29799ccd5f8254b7e07 (patch) | |
tree | b1759a8efcc7ccb03b600ccabc4f4c69704c7145 /board/yorp | |
parent | ab94e7ac45d394fefc5cd3221401090a5f225734 (diff) | |
download | chrome-ec-6d5cccefa09d28d6b0f9c29799ccd5f8254b7e07.tar.gz |
yorp: Keep 5V rail high on jump to RW
The BQ24392 driver controls power on the PP5000_A rail so that BC1.2
detection can be performed when the AP is off. However, that rail is
also controlled by the chipset task, so CONFIG_POWER_PP5000_CONTROL
needs to be defined to keep 5V rail up when necessary.
Calls to power_5v_enable() must only be done when the build has a
chipset task (otherwise, that function is not defined).
BRANCH=none
BUG=b:77874283
TEST=Booted Yorp with software sync enabled
Signed-off-by: Justin TerAvest <teravest@chromium.org>
Change-Id: Ib75655944aa05e381da922da8e916dc5d4dd9f85
Reviewed-on: https://chromium-review.googlesource.com/1014397
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/yorp')
-rw-r--r-- | board/yorp/board.c | 8 | ||||
-rw-r--r-- | board/yorp/board.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/board/yorp/board.c b/board/yorp/board.c index 20859d25c1..5ae80986b4 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -134,7 +134,9 @@ const int usb_port_enable[USB_PORT_COUNT] = { static void chipset_pre_init(void) { /* Enable 5.0V and 3.3V rails, and wait for Power Good */ - gpio_set_level(GPIO_EN_PP5000, 1); +#ifdef HAS_TASK_CHIPSET + power_5v_enable(task_get_current(), 1); +#endif gpio_set_level(GPIO_EN_PP3300, 1); while (!gpio_get_level(GPIO_PP5000_PG) || !gpio_get_level(GPIO_PP3300_PG)) @@ -168,7 +170,9 @@ void chipset_do_shutdown(void) gpio_set_level(GPIO_PMIC_EN, 0); /* Disable 5.0V and 3.3V rails, and wait until they power down. */ - gpio_set_level(GPIO_EN_PP5000, 0); +#ifdef HAS_TASK_CHIPSET + power_5v_enable(task_get_current(), 0); +#endif gpio_set_level(GPIO_EN_PP3300, 0); while (gpio_get_level(GPIO_PP5000_PG) || gpio_get_level(GPIO_PP3300_PG)) diff --git a/board/yorp/board.h b/board/yorp/board.h index ba862b49e9..be23cb116e 100644 --- a/board/yorp/board.h +++ b/board/yorp/board.h @@ -146,6 +146,7 @@ #define CONFIG_POWER_TRACK_HOST_SLEEP_STATE #define CONFIG_POWER_BUTTON #define CONFIG_POWER_BUTTON_X86 +#define CONFIG_POWER_PP5000_CONTROL #define CONFIG_EXTPOWER_GPIO #undef CONFIG_EXTPOWER_DEBOUNCE_MS /* |