[i.MX6UL] USB OTG device mode not working

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

[i.MX6UL] USB OTG device mode not working

1,653件の閲覧回数
john2207
Contributor I

Hi Support,

We are checking USB OTG (host and device mode ) functionality in i.MX6Ul EVK board J1102 MICRO USB connector. We noticed that host mode works fine (able to connect usb pendrive using converter).

But when try to check device mode(connected imx6ul evk board to another pc and check using #lsusb) , it didn't work. We understood that in otg mode , auto switching should happen based on the USB_OTG_ID GPIO line. Is it correct?

 

Please find the USB OTG dts details as below,

&usbotg1 {

dr_mode = "otg";

pinctrl-names = "default";

pinctrl-0 = <&pinctrl_usb_otg1>;

status = "okay";

};

&usbotg2 {

dr_mode = "host";

disable-over-current;

status = "okay";

};

&usbphy1 {

fsl,tx-d-cal = <106>;

};

&usbphy2 {

fsl,tx-d-cal = <106>;

};

Please advise your inputs for OTG mode issue.

0 件の賞賛
返信
2 返答(返信)

1,647件の閲覧回数
igorpadykov
NXP Employee
NXP Employee
0 件の賞賛
返信

1,637件の閲覧回数
john2207
Contributor I

Hi @ igorpadykov,

We have flashed the i.MX6 UL demo images and tried to run the USB unit test (autorun-usb-host.sh and autorun-usb-gadget.sh). But both test got failed because of below drivers not available in demo image.

1. ehci-hcd.ko   -> required for usb Host test

2. arcotg_udc.ko  -> required for usb Gadget test

Is it required to run these unit tests for our requirement, since the test script is based on USB-Ethernet test ?

Our requirement is we need to check USB Host and device mode through OTG.

Please find the error output log of usb unit tests as below,

======================================================================

root@imx6ul7d:/unit_tests/USB# ./autorun-usb-host.sh

---- Running < autorun-usb-host.sh > test ----
USB Ethernet Host test
Attempting insmod /lib/modules/5.10.9-1.0.0+g32513c25d8c7/kernel/drivers/usb/host/ehci-hcd.ko
insmod: ERROR: could not load module /lib/modules/5.10.9-1.0.0+g32513c25d8c7/kernel/drivers/usb/host/ehci-hcd.ko: No such file or directory
autorun-usb-host.sh: FAIL: insmod returned error
Checking lsmod for the module ehci-hcd
FAIL: module does not appear in lsmod
Module Size Used by
caam_jr 143360 0
caamkeyblob_desc 16384 1 caam_jr
caamhash_desc 16384 1 caam_jr
caamalg_desc 57344 1 caam_jr
crypto_engine 16384 1 caam_jr
rng_core 20480 1 caam_jr
authenc 16384 1 caam_jr
libdes 28672 1 caam_jr
caam 20480 1 caam_jr
secvio 16384 0
error 20480 6 caamkeyblob_desc,caamalg_desc,caamhash_desc,caam_jr,caam,secvio

autorun-usb-host.sh: Exiting FAIL

root@imx6ul7d:/unit_tests/USB#

=====================================================================

root@imx6ul7d:/unit_tests/USB# ./autorun-usb-gadget.sh 192.168.2.228

---- Running < autorun-usb-gadget.sh > test ----
USB Ethernet Gadget test
Attempting insmod /lib/modules/5.10.9-1.0.0+g32513c25d8c7/kernel/drivers/usb/gadget/arcotg_udc.ko
insmod: ERROR: could not load module /lib/modules/5.10.9-1.0.0+g32513c25d8c7/kernel/drivers/usb/gadget/arcotg_udc.ko: No such file or directory
autorun-usb-gadget.sh: FAIL: insmod returned error
Checking lsmod for the module arcotg_udc
FAIL: module does not appear in lsmod
Module Size Used by
caam_jr 143360 0
caamkeyblob_desc 16384 1 caam_jr
caamhash_desc 16384 1 caam_jr
caamalg_desc 57344 1 caam_jr
crypto_engine 16384 1 caam_jr
rng_core 20480 1 caam_jr
authenc 16384 1 caam_jr
libdes 28672 1 caam_jr
caam 20480 1 caam_jr
secvio 16384 0
error 20480 6 caamkeyblob_desc,caamalg_desc,caamhash_desc,caam_jr,caam,secvio

autorun-usb-gadget.sh: Exiting FAIL

root@imx6ul7d:/unit_tests/USB#

=========================================================

 

 

 

 

 

0 件の賞賛
返信