Re: [PATCH RFC DNM 13/15] thunderbolt: Introduce Qualcomm USB4 router driver
From: Troels Vognbjerg
Date: Sat Nov 28 2026 - 08:54:19 EST
On Tue, Nov 24, 2026 at 21:01:42 +0100, Konrad Dybcio wrote:
[..]
> +static int qcom_usb4_mux_set(struct typec_mux_dev *mux, struct typec_mux_state *state)
> +{
> + struct qcom_usb4 *qcusb4 = typec_mux_get_drvdata(mux);
> + struct qcusb4_link_req req = { .usb4 = true };
> + struct typec_thunderbolt_data *tbt_data;
> + struct enter_usb_data *usb4_data;
> +
> + guard(mutex)(&qcusb4->typec_lock);
> +
> + if (state->alt && state->alt->svid == USB_TYPEC_TBT_SID) {
> + req.phy_submode = PHY_SUBMODE_TBT3;
> +
> + tbt_data = state->data;
> +
> + req.cable_max_gen = TBT_CABLE_SPEED(tbt_data->cable_mode);
> +
> + if (FIELD_GET(TBT_CABLE_ACTIVE_PASSIVE, tbt_data->cable_mode)) {
> + req.active_cable = true;
> + req.cable_legacy_tbt3 = true;
> + }
> + } else if (state->mode == TYPEC_MODE_USB4) {
While testing this series on an ASUS Zenbook A16 (UX3607OA), I ran
into an issue with a USB type-c display using DP Alt Mode.
TYPEC_MODE_USB4 and TYPEC_DP_STATE_C share the same integer value,
causing a DP Alt Mode request to be interpreted as a USB4 request.
Changing the above condition to
} else if (!state->alt && state->mode == TYPEC_MODE_USB4) {
fixes the issue. The display works again with both USB-C ports.
> + } else {
> + /* Do nothing for e.g. DP altmode */
> + return 0;
> + }
Regards,
Troels