summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)