summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-08-25 13:50:04 -0700
committerCommit Bot <commit-bot@chromium.org>2021-08-26 19:46:23 +0000
commitb4e7e05b7e36c53ea1ee9f0732a1c7d37a776c07 (patch)
tree485a4a1a403bbe5d93dcf1be4cf0ae896284d7fc /include
parent08b2deaf500d6be287839567b1887ad601885ffe (diff)
downloadchrome-ec-b4e7e05b7e36c53ea1ee9f0732a1c7d37a776c07.tar.gz
usb_mux: Add function to enable USB3.1 mode for UFP
This CL adds a new overridable function to allow boards more control over the USB mux. For type-c only connections, the mux may only be set one time based only on data role. The default function returns false, so only boards which override this function will be affected. BUG=b:195042155 BRANCH=quiche TEST=Verfied that when I connect USBC only source on gingerbread that the TUSB1064 usb mux gets configured to enable USB3.1 mode. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I5cc7466d2d13c46b1ff6cfc48af577559591f6e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3119224 Tested-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usb_common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/usb_common.h b/include/usb_common.h
index f33ad870f7..5fc215798f 100644
--- a/include/usb_common.h
+++ b/include/usb_common.h
@@ -176,6 +176,16 @@ void notify_sysjump_ready(void);
void set_usb_mux_with_current_data_role(int port);
/**
+ * Check if the mux should be set to enable USB3.1 mode based only on being in a
+ * UFP data role. This is mode is required when attached to a port partner that
+ * is type-c only, but still needs to enable USB3.1 mode.
+ *
+ * @param port USB-C port number
+ * @return true if USB3 mode should be enabled, false otherwise
+ */
+__override_proto bool usb_ufp_check_usb3_enable(int port);
+
+/**
* Configure the USB MUX in safe mode.
* Before entering into alternate mode, state of the USB-C MUX needs to be in
* safe mode.