]> git.ipfire.org Git - thirdparty/u-boot.git/commit
usb: dwc3: qcom: Add delays in UTMI clock selection for Qscratch
authorBalaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Fri, 27 Jun 2025 04:52:44 +0000 (10:22 +0530)
committerCasey Connolly <casey.connolly@linaro.org>
Wed, 14 Jan 2026 15:17:48 +0000 (16:17 +0100)
commitfba8fc4a9620c2e4600f609d6c70076885d5184e
tree4c53d975fb2eefa901a2b4ffd018b1dac1bb4a4c
parentb2446a2314310971563c0279345bbd3293614e33
usb: dwc3: qcom: Add delays in UTMI clock selection for Qscratch

Added delays before and after setting the PIPE_UTMI_CLK_SEL and
PIPE3_PHYSTATUS_SW bits in the Qscratch GENERAL_CFG register
during UTMI clock selection for DWC3 on Qualcomm platforms.

These delays help ensure proper timing and stability of the UTMI
clock switching sequence, potentially avoiding race conditions or
unstable PHY behavior during initialization.

Tested on platforms using Qscratch-based DWC3 PHY configuration.

This change is taken from this Linux kernel implementation:
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/dwc3/dwc3-qcom.c?id=a4333c3a6ba9ca9cff50a3c1d1bf193dc5489e1c

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://patch.msgid.link/20250627045244.2225303-1-balaji.selvanathan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
drivers/usb/dwc3/dwc3-generic.c