From 1524c164f52acc8cdab918b782c21e2120dcc5f6 Mon Sep 17 00:00:00 2001 From: Ting Shen Date: Mon, 29 Jul 2019 16:36:41 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1723892 Reviewed-by: Ting Shen Commit-Queue: Ting Shen Tested-by: Ting Shen --- board/jacuzzi/board.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'board/jacuzzi') 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] = { -- cgit v1.2.1