Hi,
We are using i.MX8M custom board with linux4.9.5_ga release.
We are facing with issue with usb otg dual mode operation. If we force otg to host mode it is working, also forcing it to device (peripheral) mode also working, but not able to get it worked with "otg" mode(both host and device at same time).
Please see the below table.
menuconfig | dts file dr_mode | OTG as device | OTG as host |
---|---|---|---|
CONFIG_USB_DWC3_DUAL_ROLE=y | dr_mode = "peripheral" | PASS | FAIL |
" | dr_mode = "host" | FAIL | PASS |
" | dr_mode = "otg" | FAIL | FAIL |
the below is the dts file implementation,
&usb_dwc3_0 {
status = "okay";
dr_mode = "otg";
};
Kindly let me know how to test both otg as hos and device in single binary? I am using 'insmod' to install otg as device modules.
In OTG mode if i connect a usb pendrive no any print appears and when install module for device below error appears.
----------------------------------------------------------------------------------------------------------------------------------------------------------
root@imx8mqevk:~# insmod configfs.ko
root@imx8mqevk:~# insmod libcomposite.ko
root@imx8mqevk:~# insmod usb_f_mass_storage.ko
root@imx8mqevk:~# insmod g_mass_storage.ko file=/dev/mmcblk1p1 removable=1
[ 57.085718] udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers
root@imx8mqevk:~#
----------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks in advance,
Regards,
Yashavantha
Hi yashvanatha,
Did you got any solution. As I am also having same issue.
Hi Sandeep,
USB OTG dual mode is not supported in present i.MX8 BSPs.
The current ax8mq Android9_2.3.0 bsp adb function is invalid. The previous bsp function of Android9_1.0.0 is normal. What is the reason?
Hi yashavantha,
USB OTG means the USB can work on Host or device mode, these 2 modes can't work at the same time. User can only select one mode simultaneously.
Have a nice day!
NXP TIC weidong sun
hi,
Yes, I meant the same.
I know that by default USB host mode will be enabled, only after inserting modules as mentioned above device mode gets enabled.
The problem for me is if I keep in OTG mode dts and 'CONFIG_USB_DWC3_DUAL_ROLE=y', for me neither host nor device is working.
Regards,
Yashavantha
hi,
According to i.MX8M reference manual, section 11.1.1.2
11.1.1.2 Modes of Operation
The USB 3.0 module operates in following modes.
• Host Mode: SS/HS/FS/LS
• Device Mode: SS/HS/FS
• OTG: HS/FS/LS
so according to above i.MX8M supports 2.0 OTG mode and as per our understanding OTG mode supports both host and device capability. We can check host capability by connecting usb storage device (pendrive) and can check device capability by connecting usb otg cable(by insmod).
Kindly let me know OTG mode is tested in i.MX8M evk? Both host and device works without changing binary?
Thanks and Regrads,
Yashavantha
Hi,
Waiting for your reply.
Regards,
Yashavnatha
Hi,
Waiting for your answer.
Regards,
Yashavnatha