diff mbox series

[3/3] usb: chipidea: imx: add missing USB PHY DPDM wakeup setting

Message ID 20230517081907.3410465-3-xu.yang_2@nxp.com (mailing list archive)
State Accepted
Commit 53d061c19dc4cb68409df6dc11c40389c8c42a75
Headers show
Series [1/3] usb: chipidea: imx: remove one duplicated reg define | expand

Commit Message

Xu Yang May 17, 2023, 8:19 a.m. UTC
USB PHY DPDM wakeup bit is enabled by default, when USB wakeup
is not required(/sys/.../wakeup is disabled), this bit should be
disabled, otherwise we will have unexpected wakeup if do USB device
connect/disconnect while system sleep.
This bit can be enabled for both host and device mode.

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 drivers/usb/chipidea/usbmisc_imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Chen June 4, 2023, 11:27 p.m. UTC | #1
On 23-05-17 16:19:07, Xu Yang wrote:
> USB PHY DPDM wakeup bit is enabled by default, when USB wakeup
> is not required(/sys/.../wakeup is disabled), this bit should be
> disabled, otherwise we will have unexpected wakeup if do USB device
> connect/disconnect while system sleep.
> This bit can be enabled for both host and device mode.
> 
> Signed-off-by: Li Jun <jun.li@nxp.com>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> ---
>  drivers/usb/chipidea/usbmisc_imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
> index 9566022a2183..9ee9621e2ccc 100644
> --- a/drivers/usb/chipidea/usbmisc_imx.c
> +++ b/drivers/usb/chipidea/usbmisc_imx.c
> @@ -134,7 +134,7 @@
>  #define TXVREFTUNE0_MASK		(0xf << 20)
>  
>  #define MX6_USB_OTG_WAKEUP_BITS (MX6_BM_WAKEUP_ENABLE | MX6_BM_VBUS_WAKEUP | \
> -				 MX6_BM_ID_WAKEUP)
> +				 MX6_BM_ID_WAKEUP | MX6SX_BM_DPDM_WAKEUP_EN)

Acked-by: Peter Chen <peter.chen@kernel.org>
diff mbox series

Patch

diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index 9566022a2183..9ee9621e2ccc 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -134,7 +134,7 @@ 
 #define TXVREFTUNE0_MASK		(0xf << 20)
 
 #define MX6_USB_OTG_WAKEUP_BITS (MX6_BM_WAKEUP_ENABLE | MX6_BM_VBUS_WAKEUP | \
-				 MX6_BM_ID_WAKEUP)
+				 MX6_BM_ID_WAKEUP | MX6SX_BM_DPDM_WAKEUP_EN)
 
 struct usbmisc_ops {
 	/* It's called once when probe a usb device */