How to accesss IMX8M-MINI USB2 on port2 in device mode?

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

How to accesss IMX8M-MINI USB2 on port2 in device mode?

ソリューションへジャンプ
4,378件の閲覧回数
vivek338
Contributor IV

Hi,

I am using imx8m-mini evk-board and I want to use USB2 in device mode on port2 which is for power supply. In schematic it is connected to processor. So is it possible if yes then how?

 

Please help!!!!!!

ラベル(1)
0 件の賞賛
返信
1 解決策
3,996件の閲覧回数
vivek338
Contributor IV

Hi @Sanket_Parekh ,

Issue has been resolved, both USB is working now thanks for your help.

元の投稿で解決策を見る

0 件の賞賛
返信
16 返答(返信)
3,997件の閲覧回数
vivek338
Contributor IV

Hi @Sanket_Parekh ,

Issue has been resolved, both USB is working now thanks for your help.

0 件の賞賛
返信
4,356件の閲覧回数
_angelo_
Contributor III

please grep for similar imx8mm devicetree using usb2, in arch/arm64/boot/dts/freescale
and do the same

0 件の賞賛
返信
4,343件の閲覧回数
vivek338
Contributor IV
Thanks for reply !!

I grep in device tree but only found usbotg1 in imx8mm-evk.dts.
0 件の賞賛
返信
4,332件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @vivek338,

I hope you are doing well.
Please accept my apology for the delayed response.

One can use the USB1 for data transfer and still use it for the power supply, NOT the USB2.

Please refer to the below link for the same.
https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Mini-EVK-using-USB2-for-power-supply-amp-data/m-...

For reference, one can also refer to the link.
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MP-USB-PD-realized/ta-p/1531209

I hope this will help!

Thanks & Regards,
Sanket Parekh

0 件の賞賛
返信
4,317件の閲覧回数
vivek338
Contributor IV
Hi Sanket_Parekh,

Thanks for your response!!!
I think I gave less information about the issue.

I am using both USB as :-
USB1 as UVC camera video input.
USB2 UVC video/data out for PC.

So I am thinking to use USB2 as IMXboard power supply from host PC as well as data transfer to PC in device mode.

USB1 is working fine in UVC and I am able to stream video from camera. But don't know how to configure USB2 in device mode for data and video transfer to PC.

Also I have successfully tested UVC video and data out on USB1. I just want to do same on USB2.

Using kernel version 5.4.
0 件の賞賛
返信
4,307件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @vivek338,

I hope you are doing well.

Thanks for the detailed information.
Please share the device tree files you are using for the same.

Thanks & Regards,
Sanket Parekh

0 件の賞賛
返信
4,302件の閲覧回数
vivek338
Contributor IV

Hi @Sanket_Parekh ,

I am new to yocto-project so i don't know where to find the device tree files which is used. But after some research I came to know the location of dts files. So I am sharing screenshot of all the files in that folder.

Folder path :-    /tmp/work-shared/imx8mmevk/kernel-source/arch/arm64/boot/dts/freescale

 

 

 

 

 

0 件の賞賛
返信
4,271件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @vivek338,

I hope you are doing well.

One has to modify the changes related to usb2 in device mode specifically in board-related dts/dtsi files.
So based on that please share those imx8mm related dts and dtsi files.

Thanks & Regards,
Sanket Parekh

0 件の賞賛
返信
4,268件の閲覧回数
vivek338
Contributor IV
Hi Sanket_Parekh,

Please guide me to find those files, I am unable to find the folder you asking.
0 件の賞賛
返信
4,274件の閲覧回数
vivek338
Contributor IV
Hi Sanket_Parekh,

Any update ?
I think imx8mm-evk.dts is the device tree file for the imx8m-mini board. Is it true then I didn't see usbotg2 node in that file only usbotg1 is available.
Please help!
0 件の賞賛
返信
4,188件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @vivek338,

I hope you are doing well.

->It appears like you've found the correct directory. Device Tree files for a specific board are often named after the board itself or the SoC it uses. Look for files like imx8mm-evk.dts or similar.
->Please look for USB-related entries, especially those related to USB2, and check if there's any mention of its mode (host or device). Device Tree entries related to USB often include properties like dr_mode (data role mode) or usb-phy settings.
->For USB2 device mode, the dr_mode property should be set to "peripheral" or "udc-core". Also, ensure that the USB controller and PHY configurations are appropriate for the device mode.

I hope this helps!

Thanks & Regards,
Sanket Parekh

0 件の賞賛
返信
4,182件の閲覧回数
vivek338
Contributor IV
Hi Sanket Parekh,

Thanks for reply!

But I don't find any usb2 related entry in imx8mm-evk.dts or similar file.
0 件の賞賛
返信
4,139件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @vivek338,

I hope you are doing well.

Please refer to the below-provided link, It has detailed information about the same.
https://community.nxp.com/t5/i-MX-Processors/IMX8MM-EVK-typeC-to-typeA-B-connector/td-p/1054042

I hope this will help you.

Thanks & Regards,
Sanket Parekh

0 件の賞賛
返信
4,115件の閲覧回数
vivek338
Contributor IV
Hi,

Thanks for reply!!!!

I go through the link you send but in didn't find solution. The link explains solution for USB3 type C connector to type-A or bypass USB3.

My question is about enabling USB on port 2.

Please help!!
0 件の賞賛
返信
4,070件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @vivek338,

Enabling USB on port 2 in the i.MX8M Mini involves configuring the hardware settings and potentially updating the device tree.

Kernel Configuration:
Ensure that the USB driver for the i.MX8M Mini is enabled in the Linux kernel configuration. You can do this using the make menuconfig or make nconfig command in the kernel source directory. The USB configuration should match your hardware setup.

Kernel Module Loading:
Make sure that the USB kernel modules are being loaded correctly during the system boot. Check the system logs (dmesg) for any USB-related messages or errors.

Power Supply:
Ensure that the USB port on your board is getting sufficient power. Some USB peripherals may require more power than others, and inadequate power can lead to connectivity issues.

I hope this will help you!

Thanks & Regards,
Sanket Parekh

0 件の賞賛
返信
4,054件の閲覧回数
vivek338
Contributor IV

Hi @Sanket_Parekh ,

Thanks for reply!

What are the changes I have to do in kernel menu-config and in hardware to enable usb port2. I checked power supply is ok and usb port1 is working without any issue. I didn't find usb2 enable related setting in kernel menu-config.

Meanwhile I am sharing dmesg from kernel related usb:-

[ 0.221807] usbcore: registered new interface driver usbfs
[ 0.221840] usbcore: registered new interface driver hub
[ 0.221889] usbcore: registered new device driver usb
[ 1.585581] usbcore: registered new interface driver usb-storage
[ 1.591649] usbcore: registered new interface driver usbserial_generic
[ 1.598200] usbserial: USB Serial support registered for generic
[ 1.604234] usbcore: registered new interface driver ftdi_sio
[ 1.610006] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 1.617342] usbcore: registered new interface driver usb_serial_simple
[ 1.623888] usbserial: USB Serial support registered for carelink
[ 1.630001] usbserial: USB Serial support registered for zio
[ 1.635683] usbserial: USB Serial support registered for funsoft
[ 1.641713] usbserial: USB Serial support registered for flashloader
[ 1.648083] usbserial: USB Serial support registered for google
[ 1.654023] usbserial: USB Serial support registered for libtransistor
[ 1.660570] usbserial: USB Serial support registered for vivopay
[ 1.666602] usbserial: USB Serial support registered for moto_modem
[ 1.672899] usbserial: USB Serial support registered for motorola_tetra
[ 1.679534] usbserial: USB Serial support registered for novatel_gps
[ 1.685906] usbserial: USB Serial support registered for hp4x
[ 1.691675] usbserial: USB Serial support registered for suunto
[ 1.697614] usbserial: USB Serial support registered for siemens_mpi
[ 1.705557] imx_usb 32e40000.usb: No over current polarity defined
[ 1.711915] imx_usb 32e50000.usb: No over current polarity defined
[ 1.994183] usbcore: registered new interface driver usbhid
[ 1.999765] usbhid: USB HID core driver
[ 2.393344] usb_phy_generic usbphynop1: usbphynop1 supply vcc not found, using dummy regulator
[ 2.402153] usb_phy_generic usbphynop2: usbphynop2 supply vcc not found, using dummy regulator
[ 2.691156] imx_usb 32e40000.usb: No over current polarity defined
[ 2.697406] imx_usb 32e40000.usb: 32e40000.usb supply vbus not found, using dummy regulator
[ 2.710536] imx_usb 32e50000.usb: No over current polarity defined
[ 2.716784] imx_usb 32e50000.usb: 32e50000.usb supply vbus not found, using dummy regulator

 

 

Please help

0 件の賞賛
返信