* [PATCH 0/1] add support remote wakeup of mt8189
@ 2025-12-03 1:34 Mingjin Ge
2025-12-03 1:34 ` [PATCH 1/1] usb: mtk-xhci: " Mingjin Ge
0 siblings, 1 reply; 3+ messages in thread
From: Mingjin Ge @ 2025-12-03 1:34 UTC (permalink / raw)
To: Mathias Nyman, Chunfeng Yun, Greg Kroah-Hartman, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: linux-usb, linux-arm-kernel, linux-mediatek, linux-kernel,
sirius.wang, vince-wl.liu, jh.hsu,
Project_Global_Chrome_Upstream_Group, Mingjin Ge
> This series is based on linux-next, tag: next-20251201.
>
> Changes in v1:
> There are five USB controllers on mt8189,
> each controller's wakeup control is the same.
> Add a new specific version for them.
Mingjin Ge (1):
usb: mtk-xhci: add support remote wakeup of mt8189
drivers/usb/host/xhci-mtk.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--
2.45.2
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/1] usb: mtk-xhci: add support remote wakeup of mt8189 2025-12-03 1:34 [PATCH 0/1] add support remote wakeup of mt8189 Mingjin Ge @ 2025-12-03 1:34 ` Mingjin Ge 2025-12-03 5:59 ` AngeloGioacchino Del Regno 0 siblings, 1 reply; 3+ messages in thread From: Mingjin Ge @ 2025-12-03 1:34 UTC (permalink / raw) To: Mathias Nyman, Chunfeng Yun, Greg Kroah-Hartman, Matthias Brugger, AngeloGioacchino Del Regno Cc: linux-usb, linux-arm-kernel, linux-mediatek, linux-kernel, sirius.wang, vince-wl.liu, jh.hsu, Project_Global_Chrome_Upstream_Group, Mingjin Ge Add remote wakeup configuration for the mt8189 in xhci-mtk driver. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Mingjin Ge <mingjin.ge@mediatek.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 8da05e9dfa28..134a46907db5 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) @@ -140,6 +144,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 IP all */ }; /* @@ -407,6 +412,11 @@ static void usb_wakeup_ip_sleep_set(struct xhci_hcd_mtk *mtk, bool enable) msk = WC1_IS_EN_P2_96; val = enable ? msk : 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.45.2 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] usb: mtk-xhci: add support remote wakeup of mt8189 2025-12-03 1:34 ` [PATCH 1/1] usb: mtk-xhci: " Mingjin Ge @ 2025-12-03 5:59 ` AngeloGioacchino Del Regno 0 siblings, 0 replies; 3+ messages in thread From: AngeloGioacchino Del Regno @ 2025-12-03 5:59 UTC (permalink / raw) To: Mingjin Ge, Mathias Nyman, Chunfeng Yun, Greg Kroah-Hartman, Matthias Brugger Cc: linux-usb, linux-arm-kernel, linux-mediatek, linux-kernel, sirius.wang, vince-wl.liu, jh.hsu, Project_Global_Chrome_Upstream_Group Il 03/12/25 02:34, Mingjin Ge ha scritto: > Add remote wakeup configuration for the mt8189 in xhci-mtk driver. > > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> > Signed-off-by: Mingjin Ge <mingjin.ge@mediatek.com> This is not the first time that I say this - and probably not the last one. Please, stop hiding hardware - the MT8189 SoC has their XHCI controllers behind MTU3 controllers. Please add the wakeup configuration controls to MTU3. I didn't check the datasheet and going by memory here, so here's what to do: - If there is no standalone XHCI controller (all of them have a MTU3 parent) *do not* add the UWK here in XHCI-MTK, but add it in MTU3 only; - If there is at least one standalone XHCI controller (which has no MTU3 parent) add UWK *both* in XHCI-MTK *and* in MTU3. Regards, Angelo > --- > 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 8da05e9dfa28..134a46907db5 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) > @@ -140,6 +144,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 IP all */ > }; > > /* > @@ -407,6 +412,11 @@ static void usb_wakeup_ip_sleep_set(struct xhci_hcd_mtk *mtk, bool enable) > msk = WC1_IS_EN_P2_96; > val = enable ? msk : 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; ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-03 5:59 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-03 1:34 [PATCH 0/1] add support remote wakeup of mt8189 Mingjin Ge 2025-12-03 1:34 ` [PATCH 1/1] usb: mtk-xhci: " Mingjin Ge 2025-12-03 5:59 ` AngeloGioacchino Del Regno
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox