summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreno.wang <reno.wang@lcfc.corp-partner.google.com>2021-03-04 11:15:09 +0800
committerCommit Bot <commit-bot@chromium.org>2021-03-06 15:36:37 +0000
commita9bed6083027bcc08376c911f2398f5704d358e1 (patch)
tree080cdffeed35a65f588da271b5c8e3e298ae393c
parent6a14e44ead3bd3e6aab949b8db0abdbfd0d65421 (diff)
downloadchrome-ec-stabilize-rust-13836.B-main.tar.gz
Boten: Reroute EC_ENTERING_RW to GPC7stabilize-rust-13836.B-mainstabilize-13836.B-main
Refer CL-2719104, adds a new gpio, EC_ENTERING_RW2 for boten. BUG=b:181801177 BRANCH=dedede TEST=make buildall Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I1330525eae0e39ae84689b6e487b63bb34f80e18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2734058 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Henry Sun <henrysun@google.com>
-rw-r--r--board/boten/board.c15
-rw-r--r--board/boten/gpio.inc2
2 files changed, 16 insertions, 1 deletions
diff --git a/board/boten/board.c b/board/boten/board.c
index 6679b4bd7d..76b4a25771 100644
--- a/board/boten/board.c
+++ b/board/boten/board.c
@@ -108,6 +108,21 @@ void board_hibernate(void)
raa489000_hibernate(0, true);
}
+__override void board_pulse_entering_rw(void)
+{
+ /*
+ * On the ITE variants, the EC_ENTERING_RW signal was connected to a pin
+ * which is active high by default. This causes Cr50 to think that the
+ * EC has jumped to its RW image even though this may not be the case.
+ * The pin is changed to GPIO_EC_ENTERING_RW2.
+ */
+ gpio_set_level(GPIO_EC_ENTERING_RW, 1);
+ gpio_set_level(GPIO_EC_ENTERING_RW2, 1);
+ usleep(MSEC);
+ gpio_set_level(GPIO_EC_ENTERING_RW, 0);
+ gpio_set_level(GPIO_EC_ENTERING_RW2, 0);
+}
+
/* Must come after other header files and interrupt handler declarations */
#include "gpio_list.h"
diff --git a/board/boten/gpio.inc b/board/boten/gpio.inc
index 2e5c76aed5..072c5b08dc 100644
--- a/board/boten/gpio.inc
+++ b/board/boten/gpio.inc
@@ -97,6 +97,7 @@ GPIO(EC_SUB_IO_1_2, PIN(F, 0), GPIO_INPUT)
/* Misc */
GPIO(EN_BL_OD, PIN(K, 4), GPIO_ODR_LOW)
GPIO(EC_ENTERING_RW, PIN(G, 0), GPIO_OUT_LOW)
+GPIO(EC_ENTERING_RW2, PIN(C, 7), GPIO_OUT_LOW)
GPIO(CCD_MODE_ODL, PIN(H, 5), GPIO_INPUT)
GPIO(EC_BATTERY_PRES_ODL, PIN(I, 4), GPIO_INPUT)
GPIO_INT(PEN_DET_ODL, PIN(J, 1), GPIO_INT_BOTH | GPIO_PULL_UP, pen_detect_interrupt)
@@ -108,7 +109,6 @@ GPIO(ECH1_PACKET_MODE, PIN(H, 1), GPIO_OUT_LOW)
GPIO(GPIOC0_NC, PIN(C, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOC3_NC, PIN(C, 3), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOC4_NC, PIN(C, 4), GPIO_INPUT | GPIO_PULL_DOWN)
-GPIO(GPIOC7_NC, PIN(C, 7), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOF1_NC, PIN(F, 1), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOF4_NC, PIN(F, 4), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOF5_NC, PIN(F, 5), GPIO_INPUT | GPIO_PULL_DOWN)