Hi all,
Our user case :
1. Connect i.MX28 and PC by using usb cable.
2. Use " modprobe g_file_storage file=/dev/mtdblock5 removable=y ro=y" to mount file storage and get data from peripherial storage(Nor flash) of i.MX28.
3. Use "rmmod g_file_storage" and remove usb cable
Before entering suspend mode, we can mount file storage normally.
After resuming from suspend mode, we can not mount file storage.
We check USBCTRL(HW_USBCTRL_USBCMD, HW_USBCTRL_OTGSC, HW_USBCTRL_USBSTS, ...) registers, and all USBCTRL registers are 0 after resuming.
We refer to usb_phy_enable (liux/arch/arm/plat-mxs/usb_common.c), dr_controller_setup, dr_controller_run (linux/drivers/usb/gadget/arcotg_udc.c), and try to reset USB function after resuming, but it does not work.
We don't have idea to figure out the situation.
Could you provide us some suggestions? How to enable USBCTRL function? Or how to re-init USBCTRL function after suspend?
Thank you.
Hi,
AE team has sent the patch for this issue from L3.0.35_1.1.0 release; you could find it as attachment.
Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Benson,
you are using vendor kernel 2.6.35?
How exactly do you trigger the suspend?
Please provide information about your USB related kernel config ( CONFIG_USB_OTG, ...
)
Btw did you take a look at arch/arm/mach-mx28/pm.c and arch/arm/mach-mx28/usb_dr.c ?
Hi Stefan,
Yes. Based on vendor kernel 2.6.35, we develop our system.
We trigger the suspend / resume by PSWITCH.
Please refer to the attached file about usb config.
At pm.c, we don't configure USB register.
At arch/arm/mach-mx28/usb_dr.c and drivers/usb/gadget/arcotg_udc.c:
1. We don't modify these two files(usb_dr.c, arcotg_udc.c), and please refer to the attached file
2. At fsl_udc_suspend(arcotg_udc.c), we can get USB CTRL registers (Not 0).
At fsl_udc_resume(arcotg_udc.c), all USBCTRL registers are 0.
It's possible that system call "dr_phy_low_power_mode(udc, true)", and enter low power mode.
After resuming, it still be at low power mode.
We try to call "dr_phy_low_power_mode(udc, false)" after resuming, but it does not work.
Do you have any suggestions?
3. We check the register(HW_DIGCTL_STATUS): the value is 0xFF000000.
It is very strange. Could you please provide information about how to configure?
Thank you.
Hi Benson,
Have you tried with the last iMX28 BSP release L2.6.35_1.1.0 SDK, which includes many USB bug fixes?
i.MX28 Linux 2.6.35 Source Code Files and documentation (REV L2.6.35_1.1.0)
Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------