Message ID | 1616382832-28450-1-git-send-email-chunfeng.yun@mediatek.com |
---|---|
State | Superseded, archived |
Headers | show |
Series | [01/13] dt-bindings: usb: mtk-xhci: support property usb2-lpm-disable | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success | |
robh/dt-meta-schema | success | |
robh/dtbs-check | fail | build log |
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? > 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. > 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@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? [...] MBR, Sergei
Same comments as to the patch #6. MBR, Sergei
On 22.03.2021 6:13, Chunfeng Yun wrote: > Add support ip-sleep wakeup for mT8192, it's a specific revision, ^ for > and not follow IPM rule. Following? > Signed-off-by: Chunfeng Yun <chunfeng.yun@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 8ba1f914cb75..1bfa28c9b5a2 100644 > --- a/drivers/usb/host/xhci-mtk.c > +++ b/drivers/usb/host/xhci-mtk.c > @@ -70,6 +70,10 @@ > #define WC0_IS_P BIT(12) /* polarity */ > #define WC0_IS_EN BIT(6) > > +/* mt8192 */ > +#define WC0_SSUSB0_CDEN BIT(6) > +#define WC0_IS_SPM_EN BIT(1) > + > /* mt2712 etc */ > #define PERI_SSUSB_SPM_CTRL 0x0 > #define SSC_IP_SLEEP_EN BIT(4) > @@ -79,6 +83,7 @@ enum ssusb_uwk_vers { > SSUSB_UWK_V1 = 1, > SSUSB_UWK_V2, > SSUSB_UWK_V11 = 11, /* specific revision 1.1 */ > + SSUSB_UWK_V12, /* specific revision 1.2 */ SSUSB_UWK_V1_2, maybe? [...] MBR, Sergei
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@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
On Mon, 2021-03-22 at 11:58 +0300, Sergei Shtylyov wrote: > On 22.03.2021 6:13, Chunfeng Yun wrote: > > > Add support ip-sleep wakeup for mT8192, it's a specific revision, > ^ for > > > and not follow IPM rule. > > Following? > > > Signed-off-by: Chunfeng Yun <chunfeng.yun@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 8ba1f914cb75..1bfa28c9b5a2 100644 > > --- a/drivers/usb/host/xhci-mtk.c > > +++ b/drivers/usb/host/xhci-mtk.c > > @@ -70,6 +70,10 @@ > > #define WC0_IS_P BIT(12) /* polarity */ > > #define WC0_IS_EN BIT(6) > > > > +/* mt8192 */ > > +#define WC0_SSUSB0_CDEN BIT(6) > > +#define WC0_IS_SPM_EN BIT(1) > > + > > /* mt2712 etc */ > > #define PERI_SSUSB_SPM_CTRL 0x0 > > #define SSC_IP_SLEEP_EN BIT(4) > > @@ -79,6 +83,7 @@ enum ssusb_uwk_vers { > > SSUSB_UWK_V1 = 1, > > SSUSB_UWK_V2, > > SSUSB_UWK_V11 = 11, /* specific revision 1.1 */ > > + SSUSB_UWK_V12, /* specific revision 1.2 */ > > SSUSB_UWK_V1_2, maybe? Ok, will do it, thanks a lot > > [...] > > MBR, Sergei
On Mon, 2021-03-22 at 11:57 +0300, Sergei Shtylyov wrote: > Same comments as to the patch #6. Ok, will check others, thanks a lot > > MBR, Sergei
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml index 14f40efb3b22..2246d29a5e4e 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml @@ -103,6 +103,10 @@ properties: description: supports USB3.0 LPM type: boolean + usb2-lpm-disable: + description: disable USB2 HW LPM + type: boolean + imod-interval-ns: description: Interrupt moderation interval value, it is 8 times as much as that
Add support common property usb2-lpm-disable Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 4 ++++ 1 file changed, 4 insertions(+)