[PATCH 06/13] usb: xhci-mtk: support ip-sleep wakeup for MT8183
Chunfeng Yun
chunfeng.yun at mediatek.com
Tue Mar 23 02:39:07 GMT 2021
On Mon, 2021-03-22 at 11:54 +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 22.03.2021 6:13, Chunfeng Yun wrote:
>
> > Add support ip-sleep wakeup for MT8183, it's similar to MT8173,
> ^ for
>
> > and it's also a specific one, but not follow IPM rule.
>
> Following?
Ack
>
> > Due to the index 2 already used by many DTS, it's better to keep
> > it unchanged for backward compatible, treat specific ones without
>
> Compatibility.
Ack
>
> > following IPM rule as revision 1.x, meanwhile reserve 3~10 for
> > later revision that follows the IPM rule.
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun at mediatek.com>
> > ---
> > drivers/usb/host/xhci-mtk.c | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
> > index 09f2ddbfe8b9..8ba1f914cb75 100644
> > --- a/drivers/usb/host/xhci-mtk.c
> > +++ b/drivers/usb/host/xhci-mtk.c
> > @@ -57,12 +57,19 @@
> > #define CTRL_U2_FORCE_PLL_STB BIT(28)
> >
> > /* usb remote wakeup registers in syscon */
> > +
> > /* mt8173 etc */
> > #define PERI_WK_CTRL1 0x4
> > #define WC1_IS_C(x) (((x) & 0xf) << 26) /* cycle debounce */
> > #define WC1_IS_EN BIT(25)
> > #define WC1_IS_P BIT(6) /* polarity for ip sleep */
> >
> > +/* mt8183 */
> > +#define PERI_WK_CTRL0 0x0
> > +#define WC0_IS_C(x) (((x) & 0xf) << 28) /* cycle debounce */
> > +#define WC0_IS_P BIT(12) /* polarity */
> > +#define WC0_IS_EN BIT(6)
> > +
> > /* mt2712 etc */
> > #define PERI_SSUSB_SPM_CTRL 0x0
> > #define SSC_IP_SLEEP_EN BIT(4)
> > @@ -71,6 +78,7 @@
> > enum ssusb_uwk_vers {
> > SSUSB_UWK_V1 = 1,
> > SSUSB_UWK_V2,
> > + SSUSB_UWK_V11 = 11, /* specific revision 1.1 */
>
> SSUSB_UWK_V1_1, maybe?
Good point, will modify it.
Thanks a lot
>
> [...]
>
> MBR, Sergei
More information about the Linux-mediatek
mailing list