[PATCH] soc: qcom: pmic_glink_altmode: Disable TBT/USB4 negotiation for now
From: Konrad Dybcio
Date: Tue Nov 17 2026 - 05:12:01 EST
Some platforms (like Glymur) accept a versioned flavor of PAN_EN,
allowing to specify a parameter that denotes the OS type, which
influences Type-C capabilities. In particular, there's a setting for an
installer image (which implicitly doesn't ship all the required
drivers) which disables TBT/USB4 negotiation to let the connected
devices fall back to USB3/DP mode cleanly.
Utilize that. Older firmwares ignore the new arguments.
Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
---
Tested on Glymur with SOCCP.FW.2.1-00267
---
drivers/soc/qcom/pmic_glink_altmode.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/pmic_glink_altmode.c b/drivers/soc/qcom/pmic_glink_altmode.c
index 465e5d2316a0485f639da7729066c05069b80fc3..e648653697d5a9bfc7e293e9bf3903656148f026 100644
--- a/drivers/soc/qcom/pmic_glink_altmode.c
+++ b/drivers/soc/qcom/pmic_glink_altmode.c
@@ -32,6 +32,12 @@
#define ALTMODE_PAN_EN 0x10
#define ALTMODE_PAN_ACK 0x11
+/* These fields are ignored on older FWs */
+#define PAN_EN_OS_TYPE GENMASK(6, 3)
+ #define PAN_EN_OS_DEFAULT 1
+ #define PAN_EN_OS_INSTALLER 2
+#define PAN_EN_VERSION GENMASK(2, 0)
+
struct usbc_write_req {
struct pmic_glink_hdr hdr;
__le32 cmd;
@@ -548,7 +554,10 @@ static void pmic_glink_altmode_enable_worker(struct work_struct *work)
struct pmic_glink_altmode *altmode = work_to_altmode(work);
int ret;
- ret = pmic_glink_altmode_request(altmode, ALTMODE_PAN_EN, 0);
+ /* Set OS to installer for now to restrict USB4/TBT negotiation */
+ ret = pmic_glink_altmode_request(altmode, ALTMODE_PAN_EN,
+ FIELD_PREP(PAN_EN_VERSION, 1) |
+ FIELD_PREP(PAN_EN_OS_TYPE, PAN_EN_OS_INSTALLER));
if (ret)
dev_err(altmode->dev, "failed to request altmode notifications: %d\n", ret);
}
---
base-commit: 8b7179210b22f8e48a82c5ceacb9d56a9c4cfec4
change-id: 20261117-topic-pga_nousb4_glymur-ecfb1863b427
Best regards,
--
Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>