summaryrefslogtreecommitdiff
path: root/board/flapjack
diff options
context:
space:
mode:
authorJessy Jiang <jiangchao5@huaqin.corp-partner.google.com>2019-04-11 19:46:44 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-04-13 18:37:58 -0700
commitf8a8113a014b76590cb789013dcc541b74199f2d (patch)
tree1d47a5058ec107a725c0d977b100d84e8435fe1d /board/flapjack
parent04bdc8063b120b668ca098151812ef9cb5baa1f2 (diff)
downloadchrome-ec-f8a8113a014b76590cb789013dcc541b74199f2d.tar.gz
flapjack: Update virtual usb mux info.stabilize-12088.B
Copy from kukui, update the mux info which would be used by AP. TEST=1. Modify dts, and enable extcon-usbc-cros-ec kernel module 2. cat /sys/devices/platform/*/extcon/extcon0/state, and see when DP plugged: USB=0 USB-HOST=1 DP=1 when DP unplugged: USB=0 USB-HOST=1 DP=0 BUG=b:130338464 BRANCH=None Change-Id: I3ac00e47426d56bf926943d04b91f40391d98deb Reviewed-on: https://chromium-review.googlesource.com/1564492 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Jessy Jiang <jiangchao5@huaqin.corp-partner.google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'board/flapjack')
-rw-r--r--board/flapjack/usb_pd_policy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/board/flapjack/usb_pd_policy.c b/board/flapjack/usb_pd_policy.c
index 249237734b..02919e56b6 100644
--- a/board/flapjack/usb_pd_policy.c
+++ b/board/flapjack/usb_pd_policy.c
@@ -315,6 +315,11 @@ static int svdm_dp_attention(int port, uint32_t *payload)
return 1;
}
+ usb_mux_set(port, lvl ? TYPEC_MUX_DP : TYPEC_MUX_NONE,
+ USB_SWITCH_CONNECT, pd_get_polarity(port));
+
+ mux->hpd_update(port, lvl, irq);
+
if (irq & cur_lvl) {
uint64_t now = get_time().val;
/* wait for the minimum spacing between IRQ_HPD if needed */
@@ -342,7 +347,6 @@ static int svdm_dp_attention(int port, uint32_t *payload)
hpd_deadline[port] = get_time().val + HPD_USTREAM_DEBOUNCE_LVL;
}
- mux->hpd_update(port, lvl, irq);
/* ack */
return 1;
}