summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2014-12-24 23:15:33 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-01 01:08:28 +0000
commit54cbe6ec829ebda964fde3c345ebfbc9a4a446e3 (patch)
treeaa8b195e468c276b04b54a6b87a789f8861193b7
parenta9099ee3fcd922e3e8ee5f1e417403c9bfee970d (diff)
downloadchrome-ec-54cbe6ec829ebda964fde3c345ebfbc9a4a446e3.tar.gz
plankton: Reset USB hub when switch from DP mode to USB mode
If we are switching from DP mode to USB mode, reset the USB hub to make sure the hub recognizes USB connection properly. Note that we only reset the hub when making the switch by pressing the button on the board. This is to prevent disrupting BFT test flow, during which we don't want to reset the hub so as to maintain the USB link between the test host and Plankton MCU. BRANCH=None BUG=chrome-os-partner:34296 TEST=Press the button to toggle between DP and USB mode. Measure USB hub reset signal with a scope. Change-Id: I69bdee292fe414abbe0a4778b8f5e8041e4534c1 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/237606 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org>
-rw-r--r--board/plankton/board.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/plankton/board.c b/board/plankton/board.c
index e5afef21ad..487b165a67 100644
--- a/board/plankton/board.c
+++ b/board/plankton/board.c
@@ -221,6 +221,8 @@ static void button_deferred(void)
break;
case GPIO_DBG_USB_TOGGLE_L:
set_usbc_action(USBC_ACT_USBDP_TOGGLE);
+ if (gpio_get_level(GPIO_USBC_SS_USB_MODE))
+ board_maybe_reset_usb_hub();
break;
case GPIO_DBG_MUX_FLIP_L:
set_usbc_action(USBC_ACT_MUX_FLIP);