Skip to contentSkip to conversation

usb: typec: mux: fsa4480: Keep the USB 2.0 switch on in DP-only modes

PATCH In review Joonhoe Kim 4 participants 4 messages Oct 22 – Oct 26

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: typec: mux: fsa4480: Keep the USB 2.0 switch on in DP-only modes

DisplayPort pin assignments C and E give all four SuperSpeed lanes to DisplayPort, but the USB 2.0 D+/D- pair is not part of the pin assignment and stays available. The FSA4480 sits on that pair, and in these modes the driver turns its USB switch off, so a USB 2.0 hub or device behind a DisplayPort sink is disconnected as soon as the DisplayPort mode is set.

Configure the USB switch the same way in all DisplayPort modes.

Fixes c7054c31c1c9 ("usb: typec: fsa4480: rework mux & switch setup to handle more states")

---
Tested on a Lenovo Y700 Gen 5 (TB323FU, Kaanapali; out-of-tree board support) with a USB-C monitor in pin assignment C: its USB 2.0 hub was disconnected when the mux was set; with this change the hub and the keyboard behind it stay connected.

 drivers/usb/typec/mux/fsa4480.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/usb/typec/mux/fsa4480.c +1 -8
index bea0c1deec94..e05ab3c10c81 100644
@@ -93,16 +93,9 @@ static int fsa4480_set(struct fsa4480 *fsa)
 		sel = FSA4480_SEL_USB;
 	} else if (fsa->svid) {
 		switch (fsa->mode) {
-		/* DP Only */
 		case TYPEC_DP_STATE_C:
-		case TYPEC_DP_STATE_E:
-			enable |= FSA4480_ENABLE_SBU;
-			if (reverse)
-				sel = FSA4480_SEL_SBU_REVERSE;
-			break;
-
-		/* DP + USB */
 		case TYPEC_DP_STATE_D:
+		case TYPEC_DP_STATE_E:
 		case TYPEC_DP_STATE_F:
 			enable |= FSA4480_ENABLE_USB | FSA4480_ENABLE_SBU;
 			sel = FSA4480_SEL_USB;

base-commit: 2efb7a11f1aa4d2dc285fe2680cca22cb9f72f64

Signature · 1 line
2.43.0
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 11 lines

DisplayPort pin assignments C and E give all four SuperSpeed lanes to DisplayPort, but the USB 2.0 D+/D- pair is not part of the pin assignment and stays available. The FSA4480 sits on that pair, and in these modes the driver turns its USB switch off, so a USB 2.0 hub or device behind a DisplayPort sink is disconnected as soon as the DisplayPort mode is set.

Configure the USB switch the same way in all DisplayPort modes.

Fixes c7054c31c1c9 ("usb: typec: fsa4480: rework mux & switch setup to handle more states")

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Joonhoe Kim
Quoted 7 lines · Joonhoe Kim

DisplayPort pin assignments C and E give all four SuperSpeed lanes to DisplayPort, but the USB 2.0 D+/D- pair is not part of the pin assignment and stays available. The FSA4480 sits on that pair, and in these modes the driver turns its USB switch off, so a USB 2.0 hub or device behind a DisplayPort sink is disconnected as soon as the DisplayPort mode is set.

Quoted 5 lines

Configure the USB switch the same way in all DisplayPort modes.

Fixes c7054c31c1c9 ("usb: typec: fsa4480: rework mux & switch setup to handle more states")

---

Konrad

maintainer Acked-by on v1 1/1
#3 lore raw
In reply to Joonhoe Kim
Quoted 11 lines · Joonhoe Kim

DisplayPort pin assignments C and E give all four SuperSpeed lanes to DisplayPort, but the USB 2.0 D+/D- pair is not part of the pin assignment and stays available. The FSA4480 sits on that pair, and in these modes the driver turns its USB switch off, so a USB 2.0 hub or device behind a DisplayPort sink is disconnected as soon as the DisplayPort mode is set.

Configure the USB switch the same way in all DisplayPort modes.

Fixes c7054c31c1c9 ("usb: typec: fsa4480: rework mux & switch setup to handle more states")
Quoted 35 lines

---
Tested on a Lenovo Y700 Gen 5 (TB323FU, Kaanapali; out-of-tree board support) with a USB-C monitor in pin assignment C: its USB 2.0 hub was disconnected when the mux was set; with this change the hub and the keyboard behind it stay connected.

 drivers/usb/typec/mux/fsa4480.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/usb/typec/mux/fsa4480.c +1 -8
index bea0c1deec94..e05ab3c10c81 100644
@@ -93,16 +93,9 @@ static int fsa4480_set(struct fsa4480 *fsa)
 		sel = FSA4480_SEL_USB;
 	} else if (fsa->svid) {
 		switch (fsa->mode) {
-		/* DP Only */
 		case TYPEC_DP_STATE_C:
-		case TYPEC_DP_STATE_E:
-			enable |= FSA4480_ENABLE_SBU;
-			if (reverse)
-				sel = FSA4480_SEL_SBU_REVERSE;
-			break;
-
-		/* DP + USB */
 		case TYPEC_DP_STATE_D:
+		case TYPEC_DP_STATE_E:
 		case TYPEC_DP_STATE_F:
 			enable |= FSA4480_ENABLE_USB | FSA4480_ENABLE_SBU;
 			sel = FSA4480_SEL_USB;

base-commit: 2efb7a11f1aa4d2dc285fe2680cca22cb9f72f64

Signature · 1 line
2.43.0
Signature · 1 line
heikki