mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 00:51:29 +00:00
Snappy: Fix multi-func mode for USB PD
Without this change the Alternate mode adapter with multi-function capablity would only be configured as DP instead of (DP + USB). BUG=None BRANCH=master TEST=make buildall Change-Id: I44d2b0ff56a8851b8104c4305b8f5826dcbe2107 Signed-off-by: Bruce.Wan <Bruce.Wan@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/401266 Commit-Ready: Bruce Wan <Bruce.Wan@quantatw.com> Tested-by: Bruce Wan <Bruce.Wan@quantatw.com> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
@@ -273,13 +273,18 @@ static int svdm_dp_status(int port, uint32_t *payload)
|
||||
static int svdm_dp_config(int port, uint32_t *payload)
|
||||
{
|
||||
int opos = pd_alt_mode(port, USB_SID_DISPLAYPORT);
|
||||
int mf_pref = PD_VDO_DPSTS_MF_PREF(dp_status[port]);
|
||||
int pin_mode = pd_dfp_dp_get_pin_mode(port, dp_status[port]);
|
||||
|
||||
usb_mux_set(port, TYPEC_MUX_DP,
|
||||
if (!pin_mode)
|
||||
return 0;
|
||||
|
||||
usb_mux_set(port, mf_pref ? TYPEC_MUX_DOCK : TYPEC_MUX_DP,
|
||||
USB_SWITCH_CONNECT, pd_get_polarity(port));
|
||||
|
||||
payload[0] = VDO(USB_SID_DISPLAYPORT, 1,
|
||||
CMD_DP_CONFIG | VDO_OPOS(opos));
|
||||
payload[1] = VDO_DP_CFG(MODE_DP_PIN_E, /* pin mode */
|
||||
payload[1] = VDO_DP_CFG(pin_mode, /* pin mode */
|
||||
1, /* DPv1.3 signaling */
|
||||
2); /* UFP connected */
|
||||
return 2;
|
||||
|
||||
Reference in New Issue
Block a user