diff options
author | Scott Collyer <scollyer@google.com> | 2019-08-07 14:41:44 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-09 00:16:45 +0000 |
commit | 672d90748a075c59125358f5c21384f552b6abb1 (patch) | |
tree | d13d6256e30bf422375229556bd5cc9d9b4660ff /baseboard | |
parent | 21ef952c1234d12894a3980c700f934850b434e9 (diff) | |
download | chrome-ec-672d90748a075c59125358f5c21384f552b6abb1.tar.gz |
hatch: Allow data role swaps when EC is in RO
Data role swap requests were being rejected when the EC was running
RO. This can result in our type C ports attaching in the wrong data
role in cases such as dead battery. The rationale for this PD policy
is no longer valid as data/power roles are perserved during RO to RW
sysjumps. This CL removes the check for RO such that data role swaps
are allowed.
BUG=b:138618816
BRANCH=none
TEST=Tested by issuing battery cutoff command, then connected a
powered charger though hub. Verfied that data role swap request is no
longer reejected and the USB device attached to the hub enumerates as
expected.
Change-Id: Ic63ecde3336ba4c64492d9f727035c8fea936e8f
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1742870
Tested-by: Scott Collyer <scollyer@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r-- | baseboard/hatch/usb_pd_policy.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/baseboard/hatch/usb_pd_policy.c b/baseboard/hatch/usb_pd_policy.c index 5e39e50a58..aaf1b21418 100644 --- a/baseboard/hatch/usb_pd_policy.c +++ b/baseboard/hatch/usb_pd_policy.c @@ -48,15 +48,8 @@ int pd_board_checks(void) int pd_check_data_swap(int port, int data_role) { - /* - * Allow data swap if we are a UFP, otherwise don't allow. - * - * When we are still in the Read-Only firmware, avoid swapping roles - * so we don't jump in RW as a SNK/DFP and potentially confuse the - * power supply by sending a soft-reset with wrong data role. - */ - return (data_role == PD_ROLE_UFP) && - (system_get_image_copy() != SYSTEM_IMAGE_RO) ? 1 : 0; + /* Allow data swap if we are a UFP, otherwise don't allow. */ + return (data_role == PD_ROLE_UFP); } void pd_check_dr_role(int port, int dr_role, int flags) |