diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-06-13 16:57:20 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-06-19 21:03:29 -0700 |
commit | 627f3a8ac28751f549fbdb5266f8ccee417d339d (patch) | |
tree | 61a294f140f22ff079be4a278b9127b410d2cc1a /include | |
parent | 1a09831d0fdc6515e5d516074ee563a3e6e8ca12 (diff) | |
download | chrome-ec-627f3a8ac28751f549fbdb5266f8ccee417d339d.tar.gz |
KBL/SKL: Add wait between DSW_PWROK and PWRBTN
This patch adds wait between DSW_PWROK and PWRBTN assert. It is
required to be 95 msec or longer for Kaby Lake and Sky Lake.
Refer to the timing diagram for G3 to S0 on Sky Lake or Kaby Lake
platform design guide for details.
BUG=b:62584658
BRANCH=none
TEST=On Fizz, measured time between DSW_PWROK high and PWRBTN assert
for 1:AC plug-in, 2:recovery+power press, 3: reboot ec command.
Change-Id: I89a14ac9a49e20a332bd662d90be62f8ea23b003
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/534901
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 14 | ||||
-rw-r--r-- | include/power_button.h | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index 6c95fb34e3..5be7eca5df 100644 --- a/include/config.h +++ b/include/config.h @@ -1848,6 +1848,20 @@ /* Set power button state idle at init */ #undef CONFIG_POWER_BUTTON_INIT_IDLE +/* + * Enable delay between DSW_PWROK and PWRBTN assertion. + * If enabled, DSW_PWROK_TO_PWRBTN_US and get_time_dsw_pwrok must be defined + * as well. + */ +#undef CONFIG_DELAY_DSW_PWROK_TO_PWRBTN + +/* + * The time in usec required for PMC to be ready to detect power button press. + * Refer to the timing diagram for G3 to S0 on PDG for details. + */ +#define CONFIG_DSW_PWROK_TO_PWRBTN_US (95 * MSEC) + + /* Compile common code for AP power state machine */ #undef CONFIG_POWER_COMMON diff --git a/include/power_button.h b/include/power_button.h index 3297c411eb..cfa234c8be 100644 --- a/include/power_button.h +++ b/include/power_button.h @@ -54,4 +54,12 @@ void power_button_pch_release(void); */ void power_button_pch_pulse(void); +/** + * Returns the time when DSW_PWROK was asserted. It should be customized + * by each board. See CONFIG_DELAY_DSW_PWROK_TO_PWRBTN for details. + * + * @return time in usec when DSW_PWROK was asserted. + */ +int64_t get_time_dsw_pwrok(void); + #endif /* __CROS_EC_POWER_BUTTON_H */ |