diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-06-15 15:38:10 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-16 04:25:58 +0000 |
commit | 1a78faf24707a790351cfa02a589af67373d3586 (patch) | |
tree | 9f5ef6da8aec0c056ab2b17e27ff87dfba6ee8c4 /common/usb_pd_tcpc.c | |
parent | b46faa6af781a4b71a2f1f77d9daebc24a3e27f3 (diff) | |
download | chrome-ec-1a78faf24707a790351cfa02a589af67373d3586.tar.gz |
tcpc: initialize CC termination based on default PD role
Initialize CC termination variable based on the default PD role.
BUG=chrome-os-partner:40920
BRANCH=none
TEST=load on glados. test by rebooting PD from PD console with
nothing plugged into the type-C ports. Without this change, the
EC gets stuck in SNK_DISCONNECTED_DEBOUNCE, because the PD defaults
to using the wrong termination and so the PD thinks the CC ADC
readings represent Ra. At this point you have to reboot EC to get
back to normal functionality. With this change, rebooting PD does
not wedge the PD protocol state machine.
Change-Id: I4eb6d881d8fc995be4d6a99ffa69e484141343f2
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/277666
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/usb_pd_tcpc.c')
-rw-r--r-- | common/usb_pd_tcpc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/usb_pd_tcpc.c b/common/usb_pd_tcpc.c index 09eeddae25..0a5d60d95c 100644 --- a/common/usb_pd_tcpc.c +++ b/common/usb_pd_tcpc.c @@ -703,6 +703,8 @@ void tcpc_init(int port) { /* Initialize physical layer */ pd_hw_init(port, PD_ROLE_DEFAULT); + pd[port].cc_pull = PD_ROLE_DEFAULT == PD_ROLE_SOURCE ? TYPEC_CC_RP : + TYPEC_CC_RD; /* make sure PD monitoring is disabled initially */ pd[port].rx_enabled = 0; |