[PATCH] clk: ti: omap4: Initialize DPLL_USB_M2 during the boot
Thomas Richard <[email protected]> Wed, 01 Jul 2026 17:06:28 +0200
| Newsgroups | org.kernel.vger.linux-omap,org.kernel.vger.linux-clk,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Initialize and lock DPLL_USB_M2 at boot to make USB devices work. Signed-off-by: Thomas Richard <[email protected]> --- Recently a series [1] adding back OMAP4 support in U-Boot has been merged in next branch. While testing it, I noticed USB is not working on omap4_var_som. usb 1-1: new full-speed USB device number 8 using ohci-platform usb 1-1: device descriptor read/64, error -62 usb 1-1: device descriptor read/64, error -62 usb 1-1: new full-speed USB device number 9 using ohci-platform usb 1-1: device descriptor read/64, error -62 usb 1-1: device descriptor read/64, error -62 usb usb1-port1: attempt power cycle The USB_M2 DPLL was previously initialized by U-Boot, but [1] lacks USB support for OMAP4. This patch initializes the DPLL in the kernel to avoid relying on the bootloader. If you want to test, as U-Boot does not handle pbias regulators, you also have to apply the patch series "[PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4" [2]. [1] https://lore.kernel.org/all/[email protected]/ [2] https://lore.kernel.org/all/[email protected]/ --- drivers/clk/ti/clk-44xx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/clk/ti/clk-44xx.c b/drivers/clk/ti/clk-44xx.c index 9b2824ed785b..3944c50b7cd0 100644 --- a/drivers/clk/ti/clk-44xx.c +++ b/drivers/clk/ti/clk-44xx.c @@ -811,6 +811,11 @@ int __init omap4xxx_dt_clk_init(void) if (rc) pr_err("%s: failed to configure USB DPLL!\n", __func__); + usb_dpll = clk_get_sys(NULL, "dpll_usb_m2_ck"); + rc = clk_set_rate(usb_dpll, OMAP4_DPLL_USB_DEFFREQ / 2); + if (rc) + pr_err("%s: failed to configure DPLL_USB_M2!\n", __func__); + /* * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power * state when turning the ABE clock domain. Workaround this by --- base-commit: d247142d038d06514de633de44db8faf17227752 change-id: 20260617-clk-ti-omap4-dpll-usb-m2-c7ed057eb8c8 Best regards, -- Thomas Richard <[email protected]>