[PATCH v2 3/3] usb: xhci-mtk: add MT8189 remote wakeup support
From: Louis-Alexis Eyraud
Date: Thu Dec 03 2026 - 08:38:02 EST
From: Mingjin Ge <mingjin.ge@xxxxxxxxxxxx>
Add specific register definitions and handling to support
remote wakeup for the MT8189 SoC.
Signed-off-by: Chunfeng Yun <chunfeng.yun@xxxxxxxxxxxx>
Signed-off-by: Mingjin Ge <mingjin.ge@xxxxxxxxxxxx>
[Louis-Alexis Eyraud: reworded title and description, modified
SSUSB_UWK_V1_10 value to match MT8189 mediatek,syscon-wakeup
parameter value from bindings]
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@xxxxxxxxxxxxx>
---
drivers/usb/host/xhci-mtk.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 122104eea048..45ec1e98c287 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -96,6 +96,10 @@
#define WC0_IS_P BIT(12) /* polarity */
#define WC0_IS_EN BIT(6)
+/* mt8189*/
+#define PERI_WK_CTRL0_8189 0x0
+#define WC0_IS_EN_P_89 BIT(18)
+
/* mt8192 */
#define WC0_SSUSB0_CDEN BIT(6)
#define WC0_IS_SPM_EN BIT(1)
@@ -129,6 +133,7 @@ enum ssusb_uwk_vers {
SSUSB_UWK_V1_4, /* mt8195 IP1 */
SSUSB_UWK_V1_5, /* mt8195 IP2 */
SSUSB_UWK_V1_6, /* mt8195 IP3 */
+ SSUSB_UWK_V1_10 = 110, /* mt8189 IP all */
};
/*
@@ -381,6 +386,11 @@ static void usb_wakeup_ip_sleep_set(struct xhci_hcd_mtk *mtk, bool enable)
msk = WC0_IS_EN_P3_95 | WC0_IS_C_95(0x7) | WC0_IS_P_95;
val = enable ? (WC0_IS_EN_P3_95 | WC0_IS_C_95(0x1)) : 0;
break;
+ case SSUSB_UWK_V1_10:
+ reg = mtk->uwk_reg_base + PERI_WK_CTRL0_8189;
+ msk = WC0_IS_EN_P_89;
+ val = enable ? msk : 0;
+ break;
case SSUSB_UWK_V2:
reg = mtk->uwk_reg_base + PERI_SSUSB_SPM_CTRL;
msk = SSC_IP_SLEEP_EN | SSC_SPM_INT_EN;
--
2.56.1