summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2021-07-08 17:09:24 -0600
committerCommit Bot <commit-bot@chromium.org>2021-07-09 04:20:07 +0000
commitfc00c6d10baf11dc23e013d5b542f5d167b93094 (patch)
tree5982253a1f776a5615e6085e272f2c262c8ebb3e
parentea8e0c634bc9af5dad950f3b30d01330a096268e (diff)
downloadchrome-ec-fc00c6d10baf11dc23e013d5b542f5d167b93094.tar.gz
careena: Deassert PROCHOT on sysjump
The GPIO was an input in old RO images. On sysjump to new RW, the direction is changed to output but the level is not set, which results in the output driving low, which asserts PROCHOT incorrectly. BUG=chromium:1226694 b:185082703 BRANCH=grunt TEST=check PROCHOT is high after sysjump from old RO Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I81e6237d2643c58fa15672987b6ac815cbcd8211 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3016409 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit e53eff67bebfdddcfd6ebb8d6ab468509fa340fc) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3017595
-rw-r--r--board/careena/board.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/careena/board.c b/board/careena/board.c
index c8236ea12b..ba019a9c81 100644
--- a/board/careena/board.c
+++ b/board/careena/board.c
@@ -8,6 +8,7 @@
#include "button.h"
#include "driver/tcpm/ps8xxx.h"
#include "extpower.h"
+#include "hooks.h"
#include "i2c.h"
#include "lid_switch.h"
#include "power.h"
@@ -63,6 +64,19 @@ struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT] = {
};
BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT);
+static void board_init(void)
+{
+ /*
+ * Ensure PROCHOT is deasserted after sysjump.
+ * The GPIO was an input in old RO images. On sysjump to new RW, the
+ * direction is changed to output but the level is not set, which
+ * results in the output driving low, which asserts PROCHOT incorrectly.
+ * (crbug.com/1226694)
+ */
+ gpio_set_level(GPIO_CPU_PROCHOT, 1);
+}
+DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
+
#ifdef CONFIG_KEYBOARD_FACTORY_TEST
/*
* We have total 24 pins for keyboard connecter, {-1, -1} mean