diff options
author | Scott Collyer <scollyer@google.com> | 2017-08-15 13:08:48 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-15 20:21:05 -0700 |
commit | 8df230291a7dea06bc4b391caa8cb46a889893fe (patch) | |
tree | 575de16a9324dbceda0eee6b6d89a4ac3aba0bd3 /board/servo_v4 | |
parent | abd446b806d4f4367d4649db0a84df56a47ed0b5 (diff) | |
download | chrome-ec-8df230291a7dea06bc4b391caa8cb46a889893fe.tar.gz |
servo_v4: Tie data role preference to DTS mode setting
When servo_v4 acts as a debug test system (DTS) its expected use
case is for triggering CCD mode and Faft testing. To that end, its
desired default data role is to be a UFP so that the enet and USB
port are accessible by the DUT. However, when servo is acting a
regular SRC port, it makes more sense for the data role pairing to
be consistent with a normal SRC port device which is SRC/DFP.
BUG=b:64720447
BRANCH=servo
TEST=Tested with Eve using twinkie USB PD analyzer. Verified that when
DTS mode is enabled a data role swap request is sent to the DUT and
when DTS mode is disabled that servo_v4 does not send a data role swap
request.
Change-Id: I071f85fc99f1c877d86ef48ec7fa38d6850d5679
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/615813
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Diffstat (limited to 'board/servo_v4')
-rw-r--r-- | board/servo_v4/usb_pd_policy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/board/servo_v4/usb_pd_policy.c b/board/servo_v4/usb_pd_policy.c index 011994a2c9..224ca7396a 100644 --- a/board/servo_v4/usb_pd_policy.c +++ b/board/servo_v4/usb_pd_policy.c @@ -499,7 +499,8 @@ void pd_check_dr_role(int port, int dr_role, int flags) return; /* If DFP, try to switch to UFP */ - if ((flags & PD_FLAGS_PARTNER_DR_DATA) && dr_role == PD_ROLE_DFP) + if ((flags & PD_FLAGS_PARTNER_DR_DATA) && dr_role == PD_ROLE_DFP && + !disable_dts_mode) pd_request_data_swap(port); } |