[PATCH 5/6] usb: dwc3: gadget: Add delay after software writes DCTL in dwc3_gadget_run_stop()
Mattijs Korpershoek
mkorpershoek at kernel.org
Mon Sep 29 10:46:55 CEST 2025
Hi Alice,
Thank you for the patch.
On Sun, Jul 20, 2025 at 06:13, "Alice Guo (OSS)" <alice.guo at oss.nxp.com> wrote:
> From: Alice Guo <alice.guo at nxp.com>
>
> When using NXP UUU to download flash.bin to i.MX95 19x19 evk board, it
> will get stuck in a loop at sdp_init() without this change.
>
> Signed-off-by: Alice Guo <alice.guo at nxp.com>
I see that a similar change exist in the Linux kernel:
https://lore.kernel.org/all/20220901193625.8727-4-quic_wcheng@quicinc.com/
Please mention this change in the commit message for v2.
See the following example:
https://lore.kernel.org/all/20250110-dwc2-dev-v4-7-987f4fd6f8b2@pigmoral.tech/
> ---
> drivers/usb/dwc3/gadget.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 2b01113d54c..6b2b25c7aa5 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -1423,6 +1423,7 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
> }
>
> dwc3_writel(dwc->regs, DWC3_DCTL, reg);
> + mdelay(2);
Can you elaborate on why 1ms is not enough?
>
> do {
> reg = dwc3_readl(dwc->regs, DWC3_DSTS);
>
> --
> 2.43.0
More information about the U-Boot
mailing list