Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to enable USB support for imx8mm device #48

Open
jwzl opened this issue Jun 6, 2022 · 3 comments
Open

How to enable USB support for imx8mm device #48

jwzl opened this issue Jun 6, 2022 · 3 comments

Comments

@jwzl
Copy link

jwzl commented Jun 6, 2022

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

@angolini
Copy link
Member

angolini commented Jun 6, 2022

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).

@jwzl
Copy link
Author

jwzl commented Jun 7, 2022

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

@otavio
Copy link
Member

otavio commented Jun 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants