summaryrefslogtreecommitdiff
path: root/baseboard/octopus/baseboard.c
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 /baseboard/octopus/baseboard.c
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>
Diffstat (limited to 'baseboard/octopus/baseboard.c')
-rw-r--r--baseboard/octopus/baseboard.c7
1 files changed, 7 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 &&