summaryrefslogtreecommitdiff
path: root/baseboard/brya
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2021-03-01 19:19:15 -0800
committerCommit Bot <commit-bot@chromium.org>2021-04-13 04:48:55 +0000
commit5db1d264c15124001bb34e6742e609ea28765d39 (patch)
treecd5530f82b64b5b5aa4daf81f38b9ef00c0aab20 /baseboard/brya
parente61ad5e1d2ae5bf951f0c1e7b6486b23b77079cd (diff)
downloadchrome-ec-5db1d264c15124001bb34e6742e609ea28765d39.tar.gz
brya: Enable EC hibernate using PSL
This adds the wake source pin definitions needed by the NPCX9 chip support code for brya board ID 1. Note that board ID 1 needs a rework on VCC1_RST to prevent it from falsely waking the board. BRANCH=none BUG=b:183246197 TEST=booted same image on old and new rev. of board Used "hibernate" on EC console hibernate the system. It woke up immediately (b/183412004) with cause "hibernate" indicating this was a PSL wake: --- UART initialized after reboot --- [Image: RO, brya_v2.0.8357-19a8f337db 2021-04-08 01:09:30 caveh@caveh] [Reset cause: power-on hibernate wake-pin] LID_OPEN was tested as a PSL wake source by artificially disabling CONFIG_HIBERNATE_PSL_VCC1_RST_WAKEUP to eliminate VCC1 as a false wake source. Change-Id: If4cca6d1e20ddc3c422697e6838c9df0ddd8cb15 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2728679 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'baseboard/brya')
-rw-r--r--baseboard/brya/baseboard.c16
-rw-r--r--baseboard/brya/baseboard.h2
-rw-r--r--baseboard/brya/build.mk1
3 files changed, 19 insertions, 0 deletions
diff --git a/baseboard/brya/baseboard.c b/baseboard/brya/baseboard.c
new file mode 100644
index 0000000000..cca61ccfac
--- /dev/null
+++ b/baseboard/brya/baseboard.c
@@ -0,0 +1,16 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "common.h"
+
+#include "gpio_signal.h"
+
+/* Wake up pins */
+const enum gpio_signal hibernate_wake_pins[] = {
+ GPIO_ACOK_OD,
+ GPIO_GSC_EC_PWR_BTN_ODL,
+ GPIO_LID_OPEN,
+};
+const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
diff --git a/baseboard/brya/baseboard.h b/baseboard/brya/baseboard.h
index 981d33c7a9..4dd67b2976 100644
--- a/baseboard/brya/baseboard.h
+++ b/baseboard/brya/baseboard.h
@@ -35,6 +35,8 @@
#define CONFIG_VSTORE
#define CONFIG_VSTORE_SLOT_COUNT 1
+#define CONFIG_HIBERNATE_PSL
+
/* Work around double CR50 reset by waiting in initial power on. */
#define CONFIG_BOARD_RESET_AFTER_POWER_ON
diff --git a/baseboard/brya/build.mk b/baseboard/brya/build.mk
index 8d98b25315..2200897ee6 100644
--- a/baseboard/brya/build.mk
+++ b/baseboard/brya/build.mk
@@ -7,6 +7,7 @@
#
baseboard-y=
+baseboard-y+=baseboard.o
baseboard-y+=battery_presence.o
baseboard-y+=cbi_ec_fw_config.o
baseboard-y+=cbi.o