summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@chromium.org>2018-11-27 11:22:20 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-12-05 01:13:29 -0800
commit6851e82deeedd89bee94560a75a2c7347836bc48 (patch)
tree50a4bb88e242a01d2d34e7f944684c2ce4b6e3f4
parentb91e34ca6bc7f3c5dae282eec5c2845ff5ec5b52 (diff)
downloadchrome-ec-6851e82deeedd89bee94560a75a2c7347836bc48.tar.gz
baseboard/octopus: Enable CONFIG_BOARD_HAS_RTC_RESET
Add a helper function to reset the RTC using EC_PCH_RTCRST GPIO. Enable the config to use the hardware support to reset the RTC. BUG=b:119678692 BRANCH=octopus TEST=make -j buildall && Boot to ChromeOS. Create a forced scenario to trigger an RTC reset and ensure that EC does not get reset while the SoC boots to ChromeOS. Execute warm reboot from AP, cold reboot from EC and wake from ec hibernate (10 iterations each) and suspend_stress_test for 50 iterations successfully. Change-Id: I5eb1025cdaa62098de0250640788921621829cd1 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1354494 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--baseboard/octopus/baseboard.c7
-rw-r--r--baseboard/octopus/baseboard.h1
-rw-r--r--power/apollolake.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/baseboard/octopus/baseboard.c b/baseboard/octopus/baseboard.c
index 30a450e991..4903314ac1 100644
--- a/baseboard/octopus/baseboard.c
+++ b/baseboard/octopus/baseboard.c
@@ -215,6 +215,13 @@ void baseboard_tcpc_init(void)
/* Called after the cbi_init (via +2) */
DECLARE_HOOK(HOOK_INIT, baseboard_tcpc_init, HOOK_PRIO_INIT_I2C + 2);
+void board_rtc_reset(void)
+{
+ gpio_set_level(GPIO_PCH_RTCRST, 1);
+ udelay(100);
+ gpio_set_level(GPIO_PCH_RTCRST, 0);
+}
+
int board_set_active_charge_port(int port)
{
int is_valid_port = (port >= 0 &&
diff --git a/baseboard/octopus/baseboard.h b/baseboard/octopus/baseboard.h
index d47ca38e99..2ff9d48c5f 100644
--- a/baseboard/octopus/baseboard.h
+++ b/baseboard/octopus/baseboard.h
@@ -90,6 +90,7 @@
#define CONFIG_LOW_POWER_IDLE
#define CONFIG_PWM
#define CONFIG_DPTF
+#define CONFIG_BOARD_HAS_RTC_RESET
/* Port80 -- allow larger buffer for port80 messages */
#undef CONFIG_PORT80_HISTORY_LEN
diff --git a/power/apollolake.h b/power/apollolake.h
index 78aad94b5a..da5e86121f 100644
--- a/power/apollolake.h
+++ b/power/apollolake.h
@@ -16,6 +16,7 @@
#define IN_ALL_SYS_PG POWER_SIGNAL_MASK(X86_ALL_SYS_PG)
#define IN_SLP_S3_N POWER_SIGNAL_MASK(X86_SLP_S3_N)
#define IN_SLP_S4_N POWER_SIGNAL_MASK(X86_SLP_S4_N)
+#define IN_PCH_SLP_S4_DEASSERTED IN_SLP_S4_N
#define IN_SUSPWRDNACK POWER_SIGNAL_MASK(X86_SUSPWRDNACK)
#define IN_SUS_STAT_N POWER_SIGNAL_MASK(X86_SUS_STAT_N)