This is a note to let you know that I've just added the patch titled usb: dwc2: fix STM ID/VBUS detection startup delay in dwc2_driver_probe to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-dwc2-fix-stm-id-vbus-detection-startup-delay-in-dwc2_driver_probe.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From fac6bf87c55f7f0733efb0375565fb6a50cf2caf Mon Sep 17 00:00:00 2001 From: Amelie Delaunay <amelie.delaunay@xxxxxxxxxxx> Date: Tue, 7 Dec 2021 13:45:10 +0100 Subject: usb: dwc2: fix STM ID/VBUS detection startup delay in dwc2_driver_probe From: Amelie Delaunay <amelie.delaunay@xxxxxxxxxxx> commit fac6bf87c55f7f0733efb0375565fb6a50cf2caf upstream. When activate_stm_id_vb_detection is enabled, ID and Vbus detection relies on sensing comparators. This detection needs time to stabilize. A delay was already applied in dwc2_resume() when reactivating the detection, but it wasn't done in dwc2_probe(). This patch adds delay after enabling STM ID/VBUS detection. Then, ID state is good when initializing gadget and host, and avoid to get a wrong Connector ID Status Change interrupt. Fixes: a415083a11cc ("usb: dwc2: add support for STM32MP15 SoCs USB OTG HS and FS") Cc: stable <stable@xxxxxxxxxxxxxxx> Acked-by: Minas Harutyunyan <Minas.Harutyunyan@xxxxxxxxxxxx> Signed-off-by: Amelie Delaunay <amelie.delaunay@xxxxxxxxxxx> Link: https://lore.kernel.org/r/20211207124510.268841-1-amelie.delaunay@xxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/dwc2/platform.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -542,6 +542,9 @@ static int dwc2_driver_probe(struct plat ggpio |= GGPIO_STM32_OTG_GCCFG_IDEN; ggpio |= GGPIO_STM32_OTG_GCCFG_VBDEN; dwc2_writel(hsotg, ggpio, GGPIO); + + /* ID/VBUS detection startup time */ + usleep_range(5000, 7000); } retval = dwc2_drd_init(hsotg); Patches currently in stable-queue which might be from amelie.delaunay@xxxxxxxxxxx are queue-5.10/usb-dwc2-fix-stm-id-vbus-detection-startup-delay-in-dwc2_driver_probe.patch