Martin L Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/67168 )
(
3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ec/google/chromeec: Modify ufp from type-c role ......................................................................
ec/google/chromeec: Modify ufp from type-c role
In order to fix the USB port of type-C dongle has no function after reboot/shutdown, modify ufp which is in google_chromeec_usb_pd_get_info from the bit1 of type-c role (PD_CTRL_RESP_ROLE_DATA).
BUG=b:239138412 TEST=Built coreboot image and verified that using this patch can detect usb drive after reboot.
Signed-off-by: Dtrain Hsu dtrain_hsu@compal.corp-partner.google.com Change-Id: I73a4a6ec37129388783599125f067068d155d93f Reviewed-on: https://review.coreboot.org/c/coreboot/+/67168 Reviewed-by: Tim Wawrzynczak twawrzynczak@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/ec/google/chromeec/ec.c 1 file changed, 22 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 6604abd..7ee2300 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -1462,7 +1462,7 @@ if (google_chromeec_command(&cmd) < 0) return -1;
- *ufp = (resp.cc_state == PD_CC_DFP_ATTACHED); + *ufp = !(resp.role & PD_CTRL_RESP_ROLE_DATA); *dbg_acc = (resp.cc_state == PD_CC_DFP_DEBUG_ACC); *active_cable = !!(resp.control_flags & USB_PD_CTRL_ACTIVE_CABLE); *dp_mode = resp.dp_mode;