[PATCH] usb: dwc3: add am62 support
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Feb 17 06:34:16 PST 2025
Hello Sascha,
On 08.01.25 16:32, Sascha Hauer wrote:
> This adds the glue code necessary for the DWC3 controller on TI AM62x
> SoCs. The code is based on the corresponding Linux driver as of
> Linux-6.13-rc1.
>
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
Sorry for the late review, but I have a question.
> + /* Calculate the rate code */
> + rate = clk_get_rate(am62->usb2_refclk);
> + rate /= 1000; // To KHz
Nitpick: We have HZ_PER_KHZ, which would save you a comment.
> + ret = of_platform_populate(node, NULL, dev);
> + if (ret) {
> + dev_err_probe(dev, ret, "failed to create dwc3 core\n");
> + goto err_pm_disable;
> + }
> +
> + /* Set mode valid bit to indicate role is valid */
> + reg = dwc3_ti_readl(am62, USBSS_MODE_CONTROL);
> + reg |= USBSS_MODE_VALID;
> + dwc3_ti_writel(am62, USBSS_MODE_CONTROL, reg);
It's odd to do this after of_platform_populate. A deep probe
system would always try to initialize DWC3 without this
set, wouldn't it?
Cheers,
Ahmad
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list