mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
pd: Set pd mux to USB 3.0 (superspeed) initially.
BRANCH=manual BUG=chrome-os-partner:28585 TEST=manual, Plug USB 3.0 capable device in both ports and both polarites on samus and see device enumerate as superspeed. For example, usb 2-3: new SuperSpeed USB device number 6 using xhci_hcd In order you must first connected device (hoho) prior to configuring mux via 'ectool --dev=1 --interface=lpc usbpd <port> dp' Change-Id: Ia6b8a714ce9ae1539769399e51ff245d00202171 Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/214579 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
7bea5174a1
commit
2f4de76850
@@ -253,6 +253,12 @@ static inline void set_state(int port, enum pd_states next_state)
|
||||
set_state_timeout(port, 0, 0);
|
||||
pd[port].task_state = next_state;
|
||||
|
||||
#ifdef CONFIG_USBC_SS_MUX
|
||||
if (next_state == PD_STATE_SRC_DISCONNECTED)
|
||||
board_set_usb_mux(port, TYPEC_MUX_NONE,
|
||||
pd[port].polarity);
|
||||
#endif
|
||||
|
||||
/* Log state transition, except for toggling between sink and source */
|
||||
if (last_state == next_state)
|
||||
return;
|
||||
@@ -1191,6 +1197,11 @@ void pd_task(void)
|
||||
(cc2_volt < PD_SRC_VNC)) {
|
||||
pd[port].polarity = !(cc1_volt < PD_SRC_VNC);
|
||||
pd_select_polarity(port, pd[port].polarity);
|
||||
/* Set to USB SS initially */
|
||||
#ifdef CONFIG_USBC_SS_MUX
|
||||
board_set_usb_mux(port, TYPEC_MUX_USB,
|
||||
pd[port].polarity);
|
||||
#endif
|
||||
/* Enable VBUS */
|
||||
pd_set_power_supply_ready(port);
|
||||
set_state(port, PD_STATE_SRC_DISCOVERY);
|
||||
|
||||
Reference in New Issue
Block a user