diff options
author | Rong Chang <rongchang@chromium.org> | 2016-05-31 14:04:38 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-06-13 03:43:54 -0700 |
commit | 066bb6149d1440efe688d548dbc6bec539a39222 (patch) | |
tree | b2c9f326dba777971e1f24ca6978915361839b4a | |
parent | a8473bf87d47dc6d00a881328ccda73514c6696f (diff) | |
download | chrome-ec-066bb6149d1440efe688d548dbc6bec539a39222.tar.gz |
tcpci: anx7688: enable message passing after hard reset sent
In TCPCI specifiction R1.0 4.7.2, the last step of transmitting
hard reset message is enable PD message passing by writing to
RECEIVE_MESSAGE register.
BRANCH=none
BUG=chrome-os-partner:52815
TEST=manual
build and load on reference board with anx7688 port controller.
connect zinger to port 0, and use ec uart console to send hard
reset message:
pd 0 hard
check PD communication
Signed-off-by: Rong Chang <rongchang@chromium.org>
Change-Id: I52968b603f0227d7d9a112b0216cd5fd6362a0b2
Reviewed-on: https://chromium-review.googlesource.com/348142
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Koro Chen <koro.chen@mediatek.com>
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | common/usb_pd_protocol.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 84186ed754..75c38b1d08 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -2135,6 +2135,16 @@ void pd_task(void) } if (pd_is_vbus_present(port) && snk_hard_reset_vbus_off) { +#ifdef CONFIG_USB_PD_TCPM_TCPCI + /* + * After transmitting hard reset, TCPM writes + * to RECEIVE_MESSAGE register to enable + * PD message passing. + */ + if (pd_comm_enabled) + tcpm_set_rx_enable(port, 1); +#endif /* CONFIG_USB_PD_TCPM_TCPCI */ + /* VBUS went high again */ set_state(port, PD_STATE_SNK_DISCOVERY); timeout = 10*MSEC; |