From 3e6addd3243049d6c4d68caceea60ca67da43260 Mon Sep 17 00:00:00 2001 From: madhusudanarao amara Date: Mon, 11 May 2020 17:16:29 +0530 Subject: VCONN: Request Vconn swap if power state transitions above G3 To communicate with cable plug VCONN is required and the VCONN is typically provided by 5V rail. When the DUT is below S5, 5V rail is down & VCONN sourcing is disabled. Hence need to re-enable the VCONN sourcing when the power state transition happens from G3 to higher state. BUG=b:156174498 BRANCH=none TEST=Connect TBT device in G3 behind DP port connected to external monitor. Observed TBT alt mode after wakeup Signed-off-by: madhusudanarao amara Change-Id: I011b33f2f7cd56669f84781c5d1ad014e00387ef Signed-off-by: madhusudanarao amara Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2194157 Reviewed-by: Vijay P Hiremath Reviewed-by: Keith Short Commit-Queue: Keith Short --- common/usb_pd_protocol.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 996a0d07db..d01299339c 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -2353,6 +2353,12 @@ static void handle_new_power_state(int port) */ exit_supported_alt_mode(port); } +#ifdef CONFIG_USBC_VCONN_SWAP + else { + /* Request for Vconn Swap */ + pd_try_vconn_src(port); + } +#endif /* Ensure mux is set properly after chipset transition */ set_usb_mux_with_current_data_role(port); } -- cgit v1.2.1