Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anze <aanzdev@gmail.com>
Date: Sun, 19 Jul 2026 00:30:00 +0200
Subject: [PATCH] usb: typec: ucsi: clear USB role when partner lacks USB
data

Commit 0c8ee850572 ("usb: typec: ucsi: Add UCSI_USB4_IMPLIES_USB quirk
for X1E80100") gated the "partner advertises no USB data ->
USB_ROLE_NONE" decision behind the UCSI_USB4_IMPLIES_USB quirk. On
ports without that quirk (e.g. SM8750 / AYN Odin 3, pmic_glink UCSI)
the USB data role is then never cleared for a charger-only partner, so
it stays attached across system suspend. That keeps the USB power
island up, and the deep-suspend firmware power-collapse hard-hangs the
SoC when the cable is unplugged while suspended: dead screen, the SoC
runs hot, only a forced reset recovers (7.0.x is fine, 7.1.x hangs).

Restore the pre-0c8ee850572 behaviour: clear the USB role whenever the
partner advertises no USB data.

Signed-off-by: Anze <aanzdev@gmail.com>
---
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1196,10 +1196,8 @@
typec_partner_set_usb_mode(con->partner, USB_MODE_USB4);
}

- if ((!UCSI_CONSTAT(con, PARTNER_FLAG_USB)) &&
- ((con->ucsi->quirks & UCSI_USB4_IMPLIES_USB) &&
- (!(UCSI_CONSTAT(con, PARTNER_FLAG_USB4_GEN3) ||
- UCSI_CONSTAT(con, PARTNER_FLAG_USB4_GEN4)))))
+ /* Only notify USB controller if partner supports USB data */
+ if (!(UCSI_CONSTAT(con, PARTNER_FLAG_USB)))
u_role = USB_ROLE_NONE;

ret = usb_role_switch_set_role(con->usb_role_sw, u_role);