diff options
author | Eric Herrmann <eherrmann@chromium.org> | 2020-06-26 16:57:57 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-02 08:11:42 +0000 |
commit | fcb63768f52a938cfebd713a92160c64393c3295 (patch) | |
tree | 6d6a53b8ae005ec4b7cc009f96b8f4d60c561912 /common | |
parent | 36ef3cde9552fc78dd500df7dc8f39b85ccae950 (diff) | |
download | chrome-ec-fcb63768f52a938cfebd713a92160c64393c3295.tar.gz |
TCPMv2: Disable Rd check on a PRS or FRS
On an FRS or PRS, Rd will be applied by both sides for a time. The
initial source should apply Rd before sending PS_RDY, and the initial
sink can apply its Rp once it sees that message.
Currently we check if the Rd is present after receiving the PS_RDY. This
isn't required by the spec, and is causing issues with the TUSB422 since
it won't update its CC_STATUS registers unless VBUS falls to 0V.
BUG=b:148144711
TEST=make buildall
TEST=check that an FRS is successful with a TUSB422
BRANCH=none
Signed-off-by: Eric Herrmann <eherrmann@chromium.org>
Change-Id: Ia7d71b41e65a5eb3ebccb1caf757f882961c511e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2277211
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/usbc/usb_tc_drp_acc_trysrc_sm.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c index 54c1cd1fa3..c61a5a7f19 100644 --- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c +++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c @@ -2133,28 +2133,14 @@ static void tc_attached_snk_run(const int port) * Power Role Swap */ if (TC_CHK_FLAG(port, TC_FLAGS_REQUEST_PR_SWAP)) { - enum tcpc_cc_voltage_status cc1, cc2; - /* - * Verify partner is applying Rd before we swap. - * - * If the partner sends PS_RDY before applying Rd and - * we change CC termination from Rd to Rp immediately - * after seeing PS_RDY (before waiting to for the - * Initial Source to put Rd on the CC lines), we - * might get into a situation when both sides apply - * Rp. In this case if the Initial Sink will try to - * enable Vbus using the TCPC VBSRC_EN pin it will - * not work since the TCPC HW sees Rp on both ends - * and will consider this as a disconnect and - * therefore will not assert the VBSRC_EN pin. + * We may want to verify partner is applying Rd before + * we swap. However, some TCPCs (such as TUSB422) will + * not report the correct CC status before VBUS falls to + * vSafe0V, so this will be problematic in the FRS case. */ - tcpm_get_cc(port, &cc1, &cc2); - if (cc_is_open(cc1, cc2)) { - /* Clear PR_SWAP flag in exit */ - set_state_tc(port, TC_ATTACHED_SRC); - return; - } + set_state_tc(port, TC_ATTACHED_SRC); + return; } /* |