u-boot-fslc icon indicating copy to clipboard operation
u-boot-fslc copied to clipboard

How to enable USB support for imx8mm device

Open jwzl opened this issue 2 years ago • 3 comments

When I enabled the USB support for imx8mm, and I found the uboot will crashed! finally, I found that it crashed at: writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); can cause imx8mm soc crash

jwzl avatar Jun 06 '22 09:06 jwzl

Hi, @jwzl. It might be more helpfull to ask for help on the u-boot mailing list. And please, make sure to elaborate on which u-boot version you are using, and which USB you are trying to add (I though they were already enabled, you should be targeting to add more devices, would be good to try to detail).

angolini avatar Jun 06 '22 16:06 angolini

Because the issue occured at driver/usb/host/ehci-imx6.c.

Okay, I describe my detailed info, my uboot version is 2021.04, and I want to use imx8mm usbotg2 as host. I have enabled it in device tree and defconfig like imx6.

when I enter the the command in uboot

usb start uboot will crashed at usbotg2.

and I add debug message and find that it crashed in

//driver/usb/host/ehci-imx6.c static int ehci_usb_probe(struct udevice *dev) { ..... if (priv->init_type == USB_INIT_HOST) { setbits_le32(&ehci->usbmode, CM_HOST); //crashed here // I consider that the usb interface clock is not enabled, but I found that // I can read the address.
// So, I don't know what's wrong with this init. writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc);
setbits_le32(&ehci->portsc, USB_EN); } .... }

Thank you very much!

Best Regards Qing

jwzl avatar Jun 07 '22 03:06 jwzl

As @angolini mentioned, this is out of scope here as this is U-Boot specific and not Yocto Project or meta-freescale related. However, it'd be nice if you could use the U-Boot mailing list to discuss this, as there is where people do the development.

otavio avatar Jun 07 '22 11:06 otavio