summaryrefslogtreecommitdiff
path: root/board/jacuzzi
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2019-07-29 16:36:41 +0800
committerCommit Bot <commit-bot@chromium.org>2019-09-09 06:50:36 +0000
commit1524c164f52acc8cdab918b782c21e2120dcc5f6 (patch)
treeef702f80757cf97f6a1c12bc65d2f6a069b5739a /board/jacuzzi
parent60c0372ba770590333f164c4066ee068c6a4f93d (diff)
downloadchrome-ec-1524c164f52acc8cdab918b782c21e2120dcc5f6.tar.gz
jacuzzi: enable DP
enable dp on jacuzzi, and add back the dp implementation before CL:1660524 for all new devices including jacuzzi. usb_pd_policy now supports two different configs: - kukui/krane, rev <= 4: no mux (CONFIG_USB_MUX_VIRTUAL defined) - all new devices: have a real mux BUG=b:135895590,b:135079572 TEST=attach a usb hub and moniter to the dut, verify that dp/dp+mux mode and both polarities can detected correctly BRANCH=master Change-Id: I3e4757c97d555a4afb48076fc4785305c96b0a7f Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1723892 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/jacuzzi')
-rw-r--r--board/jacuzzi/board.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c
index 6f2450b09d..3d23faea5f 100644
--- a/board/jacuzzi/board.c
+++ b/board/jacuzzi/board.c
@@ -107,15 +107,11 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
static void board_hpd_status(int port, int hpd_lvl, int hpd_irq)
{
- /* Invert HPD level since GPIOs are active low. */
- hpd_lvl = !hpd_lvl;
-
- gpio_set_level(GPIO_USB_C0_HPD_OD, hpd_lvl);
- if (hpd_irq) {
- gpio_set_level(GPIO_USB_C0_HPD_OD, 1);
- msleep(1);
- gpio_set_level(GPIO_USB_C0_HPD_OD, hpd_lvl);
- }
+ /*
+ * svdm_dp_attention() did most of the work, we only need to notify
+ * host here.
+ */
+ host_set_single_event(EC_HOST_EVENT_USB_MUX);
}
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {