* [PATCH 1/3] dt-bindings: usb: mtu3: Add support for MT8189 SoC
2026-12-02 12:55 [PATCH 0/3] Add USB support for Mediatek MT8189 SoC Louis-Alexis Eyraud
@ 2026-12-02 12:55 ` Louis-Alexis Eyraud
2026-12-02 13:08 ` sashiko-bot
2026-12-02 12:55 ` [PATCH 2/3] usb: mtu3: add MT8189 remote wakeup support Louis-Alexis Eyraud
2026-12-02 12:55 ` [PATCH 3/3] usb: xhci-mtk: " Louis-Alexis Eyraud
2 siblings, 1 reply; 5+ messages in thread
From: Louis-Alexis Eyraud @ 2026-12-02 12:55 UTC (permalink / raw)
To: Chunfeng Yun, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Mathias Nyman
Cc: kernel, linux-usb, linux-arm-kernel, linux-mediatek, devicetree,
linux-kernel, Louis-Alexis Eyraud
Of the five USB controllers present on the MediaTek MT8189 SoC, only
one (0) is behind the Mediatek USB3 DRD Controller (MTU3).
Add compatible and wakeup control for it on MT8189 SoC.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
index bfcf13acede0..69c060566e7f 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
@@ -27,6 +27,7 @@ properties:
- mediatek,mt8183-mtu3
- mediatek,mt8186-mtu3
- mediatek,mt8188-mtu3
+ - mediatek,mt8189-mtu3
- mediatek,mt8192-mtu3
- mediatek,mt8195-mtu3
- mediatek,mt8196-mtu3
@@ -206,7 +207,8 @@ properties:
107 - used by mt8196, IP0, specific 1.07;
108 - used by mt8196, IP1, specific 1.08;
109 - used by mt8196, IP2, specific 1.09;
- enum: [1, 2, 101, 102, 103, 105, 106, 107, 108, 109]
+ 110 - used by mt8189, IP4, specific 1.10;
+ enum: [1, 2, 101, 102, 103, 105, 106, 107, 108, 109, 110]
mediatek,u3p-dis-msk:
$ref: /schemas/types.yaml#/definitions/uint32
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/3] dt-bindings: usb: mtu3: Add support for MT8189 SoC
2026-12-02 12:55 ` [PATCH 1/3] dt-bindings: usb: mtu3: Add support for " Louis-Alexis Eyraud
@ 2026-12-02 13:08 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-12-02 13:08 UTC (permalink / raw)
To: Louis-Alexis Eyraud; +Cc: linux-usb, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] dt-bindings: usb: mtu3: enum indented inside description block
scalar
- [Low] dt-bindings: usb: mtu3: wakeup version 110 description refers to
IP4 not IP0
--
commit 3a71b356bd3e7dcfca5dcbdb628d6ee96815a1c6
Author: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
dt-bindings: usb: mtu3: Add support for MT8189 SoC
This commit adds the MT8189 SoC compatible string and wakeup glue version
110 to the MediaTek MTU3 device tree binding.
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
> index bfcf13acede06..69c060566e7fc 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
[ ... ]
> @@ -206,7 +207,8 @@ properties:
> 107 - used by mt8196, IP0, specific 1.07;
> 108 - used by mt8196, IP1, specific 1.08;
> 109 - used by mt8196, IP2, specific 1.09;
> - enum: [1, 2, 101, 102, 103, 105, 106, 107, 108, 109]
> + 110 - used by mt8189, IP4, specific 1.10;
[Severity: Low]
Should this description refer to IP0 (or all IPs) rather than IP4? As
noted in the commit message, only controller 0 is behind MTU3 on MT8189.
> + enum: [1, 2, 101, 102, 103, 105, 106, 107, 108, 109, 110]
[Severity: Low]
Is this enum indented two spaces too far?
At 12 spaces of indentation, YAML parses the enum line as part of the
preceding "description: |" literal block scalar rather than as a sibling
schema keyword at 10 spaces (as shifted in 0cde051e5465 ("dt-bindings:
usb: mtu3: add support mt8196")), so dtschema does not validate the third
cell of mediatek,syscon-wakeup against the allowed values.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-mt8189-add-usb-support-v1-0-5749ab20ec84@collabora.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] usb: mtu3: add MT8189 remote wakeup support
2026-12-02 12:55 [PATCH 0/3] Add USB support for Mediatek MT8189 SoC Louis-Alexis Eyraud
2026-12-02 12:55 ` [PATCH 1/3] dt-bindings: usb: mtu3: Add support for " Louis-Alexis Eyraud
@ 2026-12-02 12:55 ` Louis-Alexis Eyraud
2026-12-02 12:55 ` [PATCH 3/3] usb: xhci-mtk: " Louis-Alexis Eyraud
2 siblings, 0 replies; 5+ messages in thread
From: Louis-Alexis Eyraud @ 2026-12-02 12:55 UTC (permalink / raw)
To: Chunfeng Yun, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Mathias Nyman
Cc: kernel, linux-usb, linux-arm-kernel, linux-mediatek, devicetree,
linux-kernel, Louis-Alexis Eyraud
Add specific register definitions and handling to support
remote wakeup for the MT8189 SoC.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
drivers/usb/mtu3/mtu3_host.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
index 8138b3f3096a..e7ab0fe81b73 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
@@ -30,6 +30,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)
@@ -70,6 +74,7 @@ enum ssusb_uwk_vers {
SSUSB_UWK_V1_7, /* mt8196 IP0 */
SSUSB_UWK_V1_8, /* mt8196 IP1 */
SSUSB_UWK_V1_9, /* mt8196 IP2 */
+ SSUSB_UWK_V1_10, /* mt8189 all */
};
/*
@@ -126,6 +131,11 @@ static void ssusb_wakeup_ip_sleep_set(struct ssusb_mtk *ssusb, bool enable)
msk = WC1_IS_EN_P2_96;
val = enable ? msk : 0;
break;
+ case SSUSB_UWK_V1_10:
+ reg = ssusb->uwk_reg_base + PERI_WK_CTRL0_8189;
+ msk = WC0_IS_EN_P_89;
+ val = enable ? msk : 0;
+ break;
case SSUSB_UWK_V2:
reg = ssusb->uwk_reg_base + PERI_SSUSB_SPM_CTRL;
msk = SSC_IP_SLEEP_EN | SSC_SPM_INT_EN;
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] usb: xhci-mtk: add MT8189 remote wakeup support
2026-12-02 12:55 [PATCH 0/3] Add USB support for Mediatek MT8189 SoC Louis-Alexis Eyraud
2026-12-02 12:55 ` [PATCH 1/3] dt-bindings: usb: mtu3: Add support for " Louis-Alexis Eyraud
2026-12-02 12:55 ` [PATCH 2/3] usb: mtu3: add MT8189 remote wakeup support Louis-Alexis Eyraud
@ 2026-12-02 12:55 ` Louis-Alexis Eyraud
2 siblings, 0 replies; 5+ messages in thread
From: Louis-Alexis Eyraud @ 2026-12-02 12:55 UTC (permalink / raw)
To: Chunfeng Yun, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Mathias Nyman
Cc: kernel, linux-usb, linux-arm-kernel, linux-mediatek, devicetree,
linux-kernel, Louis-Alexis Eyraud, Mingjin Ge
From: Mingjin Ge <mingjin.ge@mediatek.com>
Add specific register definitions and handling to support
remote wakeup for the MT8189 SoC.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Mingjin Ge <mingjin.ge@mediatek.com>
[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@collabora.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread