summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2021-06-11 12:38:32 -0700
committerCommit Bot <commit-bot@chromium.org>2021-06-11 21:42:38 +0000
commit5030ac7c16fef646cf767ea7cae7f962a64c909c (patch)
tree2ed9e8814cd6cd6b698febf398e2c87047492be5
parentf9b6ef8def1beefd7048edcc8d842690791abf7d (diff)
downloadchrome-ec-5030ac7c16fef646cf767ea7cae7f962a64c909c.tar.gz
trogdor: Workaround for boards without HIBERNATE_L pull-up
Some hardware doesn't have the external pull-up fix for the bugs, like b/164256614, b/177611071. It requires rework to stuff the resistor. For people who has difficulty to do the rework, this CL is a software workaround, which makes the GPIO push-pull, instead of open-drain. BRANCH=Trogdor BUG=b:190818143 TEST=Booted the Coachz rev-1 board, the I2C bus didn't get wedged. Change-Id: I82116b855db49ec7c93d90727c7837a58cda8d3e Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2956832 Tested-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org>
-rw-r--r--board/coachz/board.c9
-rw-r--r--board/pompom/board.c9
2 files changed, 18 insertions, 0 deletions
diff --git a/board/coachz/board.c b/board/coachz/board.c
index 3c15f33aed..71c45e635c 100644
--- a/board/coachz/board.c
+++ b/board/coachz/board.c
@@ -377,6 +377,15 @@ const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
/* Initialize board. */
static void board_init(void)
{
+ /*
+ * The rev-1 hardware doesn't have the external pull-up fix for the bug
+ * b/177611071. It requires rework to stuff the resistor. For people who
+ * has difficulty to do the rework, this is a workaround, which makes
+ * the GPIO push-pull, instead of open-drain.
+ */
+ if (system_get_board_version() == 1)
+ gpio_set_flags(GPIO_HIBERNATE_L, GPIO_OUTPUT);
+
/* Enable BC1.2 interrupts */
gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_L);
gpio_enable_interrupt(GPIO_USB_C1_BC12_INT_L);
diff --git a/board/pompom/board.c b/board/pompom/board.c
index 6f9d200eda..64a9620ba2 100644
--- a/board/pompom/board.c
+++ b/board/pompom/board.c
@@ -240,6 +240,15 @@ const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = {
/* Initialize board. */
static void board_init(void)
{
+ /*
+ * The rev-2 hardware doesn't have the external pull-up fix for the bug
+ * b/164256614. It requires rework to stuff the resistor. For people who
+ * has difficulty to do the rework, this is a workaround, which makes
+ * the GPIO push-pull, instead of open-drain.
+ */
+ if (system_get_board_version() == 2)
+ gpio_set_flags(GPIO_HIBERNATE_L, GPIO_OUTPUT);
+
/* Enable BC1.2 interrupts */
gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_L);