summaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec/ec.h
diff options
context:
space:
mode:
authorDerek Huang <derek.huang@intel.corp-partner.google.com>2021-08-25 17:19:39 +0800
committerTim Wawrzynczak <twawrzynczak@chromium.org>2021-10-06 22:19:00 +0000
commitc0bd123408680d3d7b0bb2c64acd103e2f13ec17 (patch)
tree54eb07cf005a10de6b8e2bf8cbe8575fe5e039d7 /src/ec/google/chromeec/ec.h
parentc0f005a5d6e26c29bd1379163b890331ba8b38d0 (diff)
ec/google/chromeec: Add APIs for USB-C DP ALT mode
Add API to allow AP to send the command to EC to enter DP ALT mode and API to wait for DP HPD event. BUG=b:192947843 TEST=select ENABLE_TCSS_DISPLAY_DETECTION in Kconfig.name. Build coreboot and update your system. Boot the system you will find below message in the coreboot log with or without USB-C display connected: 'HPD ready after %lu ms' or 'HPD not ready after %ldms. Abort.'. Signed-off-by: Derek Huang <derek.huang@intel.corp-partner.google.com> Change-Id: Id11510c1ff58579ae2cddfe5a4d69646fd84f5c3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/57138 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/ec/google/chromeec/ec.h')
-rw-r--r--src/ec/google/chromeec/ec.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index 6fa58a9a1e..a06dfa19c0 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -40,6 +40,14 @@ int google_chromeec_usb_pd_get_info(int port, bool *ufp, bool *dbg_acc,
* >=1: Bitmask of the ports that DP device is connected
*/
int google_chromeec_wait_for_displayport(long timeout_ms);
+/* Poll (up to `timeout_ms` ms) for a Hot-Plug Detect (HPD)
+ * event on the specified port.
+ * Return: 0 on HPD ready, -1 on timeout */
+int google_chromeec_wait_for_dp_hpd(int port, long timeout_ms);
+/* Send command to EC to request to enter DisplayPort ALT mode on the
+ * specified port.
+ * Return: 0 on success, -1 on error */
+int google_chromeec_typec_control_enter_dp_mode(int port);
/* Device events */
uint64_t google_chromeec_get_device_enabled_events(void);