USB gadget drivers hangs when the USB connector is unplugged: i.MX53 Quick Start Board

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB gadget drivers hangs when the USB connector is unplugged: i.MX53 Quick Start Board

ソリューションへジャンプ
5,367件の閲覧回数
FernandoGinezd1
Contributor II

Hi!

 

I'm facing an serious issue. I'm using my i.MX53 QSB connected to a host PC via USB, using g_serial driver (gadget serial).

 

Everything works fine until I simply unplug the USB connector without unload g_serial driver. When I've done this, system hangs and I need to press reset button.

 

Does anyone has already dealt with this same problem? How can I debug this situation to find where system is hanging?

 

Thanks in advance!

ラベル(1)
1 解決策
2,921件の閲覧回数
compmas2
Contributor V

I had this same issue.  I built my 2.6.35.3 Linux kernel with all the Freescale 201112 patches (Linux 2.6.35 Source Code Files and documentation 11.09. Supports MCIMX53-START and MCIMX53-START-R&l...) applied to LTIB from the 11.09 BSP (Patch based on L2.6.35_11_09_ER_SOURCE, to provide: GPU driver update, Uboot update for plugin mode ...) and used the default kernel config.  This resulted in the following kernel message during boot on my i.MX53 QSB:

Freescale USB OTG Driver loaded, $Revision: 1.55 $

****************************** NOTICE *****************************

You have seen this notice as you have enabled OTG driver for mx53 LOCO board

For mx53 loco board, the OTG function is unavailable due to hardware limitation

So, Only one usb function (device or host) can be available for certain image

Please config your kernel to disable OTG and the usb function you don't want to use

And remain the other usb function you would like to use

Below OTG configs should be removed:

CONFIG_MXC_OTG, CONFIG_USB_OTG

Choose one of below configs for host or device function

But DO NOT choose them together

OTG host config

CONFIG_USB_EHCI_ARC_OTG

OTG device config

CONFIG_USB_GADGET

I followed the suggestion by selecting "Configure the kernel" and saving the config.  Then the kernel configuration menu comes up and go under Device Drivers->USB Support.  Under the USB Support menu make sure under "EHCI HCD (USB 2.0) support->Support for Freescale controller" that the "Support for DR host port on Freescale controller" option is not enabled.  Then at the bottom of the USB Support page make sure the "USB OTG pin detect support" is not enabled.  Next make sure "USB Gadget Support" is enabled and then under that menu select the gadgets you want.  At this point exit out of LTIB and it should build you a Linux kernel the correctly supports Linux Gadgets.

I have tested the g_serial, g_ether, and g_cdc and they all work after modifying the kernel config as suggested above.  It looks to be the issue is only with the QSB since it shares one chipset for the USB OTG and the bottom USB Host port.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,922件の閲覧回数
compmas2
Contributor V

I had this same issue.  I built my 2.6.35.3 Linux kernel with all the Freescale 201112 patches (Linux 2.6.35 Source Code Files and documentation 11.09. Supports MCIMX53-START and MCIMX53-START-R&l...) applied to LTIB from the 11.09 BSP (Patch based on L2.6.35_11_09_ER_SOURCE, to provide: GPU driver update, Uboot update for plugin mode ...) and used the default kernel config.  This resulted in the following kernel message during boot on my i.MX53 QSB:

Freescale USB OTG Driver loaded, $Revision: 1.55 $

****************************** NOTICE *****************************

You have seen this notice as you have enabled OTG driver for mx53 LOCO board

For mx53 loco board, the OTG function is unavailable due to hardware limitation

So, Only one usb function (device or host) can be available for certain image

Please config your kernel to disable OTG and the usb function you don't want to use

And remain the other usb function you would like to use

Below OTG configs should be removed:

CONFIG_MXC_OTG, CONFIG_USB_OTG

Choose one of below configs for host or device function

But DO NOT choose them together

OTG host config

CONFIG_USB_EHCI_ARC_OTG

OTG device config

CONFIG_USB_GADGET

I followed the suggestion by selecting "Configure the kernel" and saving the config.  Then the kernel configuration menu comes up and go under Device Drivers->USB Support.  Under the USB Support menu make sure under "EHCI HCD (USB 2.0) support->Support for Freescale controller" that the "Support for DR host port on Freescale controller" option is not enabled.  Then at the bottom of the USB Support page make sure the "USB OTG pin detect support" is not enabled.  Next make sure "USB Gadget Support" is enabled and then under that menu select the gadgets you want.  At this point exit out of LTIB and it should build you a Linux kernel the correctly supports Linux Gadgets.

I have tested the g_serial, g_ether, and g_cdc and they all work after modifying the kernel config as suggested above.  It looks to be the issue is only with the QSB since it shares one chipset for the USB OTG and the bottom USB Host port.

0 件の賞賛
返信
2,921件の閲覧回数
Stefan1z
Contributor II

Hi,

I have the same issue. Has anybody a solution for this problem already?

0 件の賞賛
返信
2,922件の閲覧回数
PeterChen
NXP Employee
NXP Employee

Try to un-gate the usb clock (arch/arm/mach-mx5/usb_dr.c) all the time to see if the problem

still exists

0 件の賞賛
返信
2,921件の閲覧回数
rlorriaux
Contributor I
From the tests that I have done, the CDC Composite Device (Ethernet and ACM) worked better on the i.MX5x.
0 件の賞賛
返信
2,922件の閲覧回数
daiane_angolini
NXP Employee
NXP Employee
0 件の賞賛
返信