diff options
author | Scott Collyer <scollyer@google.com> | 2017-08-15 13:08:48 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2017-09-06 23:23:19 +0000 |
commit | 29015d46fcde1ef98c0a8d816ec01e026b4e8454 (patch) | |
tree | 8d40e2af47575cb35b7b246a1f08e7fa3cd654c9 | |
parent | a04e0a2908bd271280a82974435554112fc60b53 (diff) | |
download | chrome-ec-29015d46fcde1ef98c0a8d816ec01e026b4e8454.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>
(cherry picked from commit 8df230291a7dea06bc4b391caa8cb46a889893fe)
Reviewed-on: https://chromium-review.googlesource.com/617440
Commit-Queue: Scott Collyer <scollyer@chromium.org>
-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 019b35f763..a4e057ef6c 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); } |