diff options
author | Denis Brockus <dbrockus@chromium.org> | 2020-02-19 09:39:17 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-20 01:51:09 +0000 |
commit | 3b2b7b26d3c033d4a75d67b081dbd4d6a3d3c74e (patch) | |
tree | c0c8edc5de75a459093e33a47710bd755ecb3326 /common/usbc | |
parent | 3651aea50eed4c24e8cdedcee54f3822c2f0b229 (diff) | |
download | chrome-ec-3b2b7b26d3c033d4a75d67b081dbd4d6a3d3c74e.tar.gz |
nct3807: potential connection cleanup
I changed TCPMv2 to call tcpm_set_new_connection
instead of tcpm_set_cc when connecting at the
parent state for a new connection type. This
allows the NCT3807 to clear out DRP and set the
correct connection instead of clobbering what
the hardware determined to be correct and setting
it to an open listen.
BUG=b:149593609
BRANCH=none
TEST=verify USB-C
Change-Id: I7402d3417a14fdc4158636e4716ef7fbdf4fa4a3
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2064184
Commit-Queue: Edward Hill <ecgh@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'common/usbc')
-rw-r--r-- | common/usbc/usb_tc_drp_acc_trysrc_sm.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c index f21568fb39..2ad9bfa881 100644 --- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c +++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c @@ -2804,23 +2804,9 @@ static void tc_drp_auto_toggle_run(const int port) set_state_tc(port, PD_DEFAULT_STATE(port)); break; case DRP_TC_UNATTACHED_SNK: - /* - * Some TCPCI compliant TCPCs come out of auto toggle with - * a prospective connection. They are expecting us to set - * the CC lines to what it is thinking is best or it goes - * directly back to unattached. - */ - tcpm_drp_toggle_connection(port, cc1, cc2); set_state_tc(port, TC_ATTACH_WAIT_SNK); break; case DRP_TC_UNATTACHED_SRC: - /* - * Some TCPCI compliant TCPCs come out of auto toggle with - * a prospective connection. They are expecting us to set - * the CC lines to what it is thinking is best or it goes - * directly back to unattached. - */ - tcpm_drp_toggle_connection(port, cc1, cc2); set_state_tc(port, TC_ATTACH_WAIT_SRC); break; case DRP_TC_DRP_AUTO_TOGGLE: @@ -3148,7 +3134,7 @@ static void tc_cc_rd_entry(const int port) * Both CC1 and CC2 pins shall be independently terminated to * ground through Rd. */ - tcpm_set_cc(port, TYPEC_CC_RD); + tcpm_set_new_connection(port, TYPEC_CC_RD); } @@ -3170,7 +3156,7 @@ static void tc_cc_rp_entry(const int port) * up through Rp. */ tcpm_select_rp_value(port, CONFIG_USB_PD_PULLUP); - tcpm_set_cc(port, TYPEC_CC_RP); + tcpm_set_new_connection(port, TYPEC_CC_RP); } /** |