From 239eecc52cd69e162c119e078551bb05b73273b8 Mon Sep 17 00:00:00 2001 From: Nick Sanders Date: Tue, 30 Aug 2016 14:44:59 -0700 Subject: [PATCH] servo_v4: allow gpio modification of DUT_HUB_USB_RESET_L DUT_HUB_USB_RESET_L was set to input as part of power sequencing but servod would like to write to it. We'll allow this. BUG=chromium:571476 TEST=dut-control dut_hub_usb_reset:on BRANCH=None Change-Id: I39997e7f7875b833a64f95a1e2ea9434f3523762 Signed-off-by: Nick Sanders Reviewed-on: https://chromium-review.googlesource.com/378395 Reviewed-by: Kevin Cheng --- board/servo_v4/board.c | 2 +- board/servo_v4/gpio.inc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/board/servo_v4/board.c b/board/servo_v4/board.c index df826f7f97..ecfc5fbf64 100644 --- a/board/servo_v4/board.c +++ b/board/servo_v4/board.c @@ -242,7 +242,7 @@ static void board_init(void) /* Delay DUT hub to avoid brownout. */ usleep(1000); - gpio_set_flags(GPIO_DUT_HUB_USB_RESET_L, GPIO_INPUT); + gpio_set_flags(GPIO_DUT_HUB_USB_RESET_L, GPIO_OUT_HIGH); /* Write USB3 Mode Enable to PS8742 USB/DP Mux. */ i2c_write8(1, 0x20, 0x0, 0x20); diff --git a/board/servo_v4/gpio.inc b/board/servo_v4/gpio.inc index 48d251fc1c..30ce225584 100644 --- a/board/servo_v4/gpio.inc +++ b/board/servo_v4/gpio.inc @@ -13,6 +13,9 @@ GPIO(HOST_USB_HUB_RESET_L, PIN(D, 2), GPIO_OUT_HIGH) GPIO(FASTBOOT_DUTHUB_MUX_SEL, PIN(B, 5), GPIO_OUT_HIGH) GPIO(SBU_MUX_EN, PIN(B, 6), GPIO_OUT_LOW) GPIO(FASTBOOT_DUTHUB_MUX_EN_L, PIN(B, 7), GPIO_OUT_LOW) +/* Power on init has reset asserted, we will pull the hub out of reset + * in the board init to help avoid brownout. + */ GPIO(DUT_HUB_USB_RESET_L, PIN(B, 9), GPIO_OUT_LOW) GPIO(ATMEL_HWB_L, PIN(B, 12), GPIO_OUT_HIGH) GPIO(CMUX_EN, PIN(C, 14), GPIO_OUT_HIGH)