How to enable the S32G OTG function (Both Host Mode and Device Mode)

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

How to enable the S32G OTG function (Both Host Mode and Device Mode)

ソリューションへジャンプ
5,079件の閲覧回数
StanleyShen
Contributor IV

Hi

We want to use the OTG function in S32G,

Firstly, we use the default dts configuration(host mode only), it seems that the  device was detected successfully.

 

StanleyShen_2-1681098949966.png

StanleyShen_1-1681099067371.png

 

StanleyShen_0-1681099048350.png

 

QA1:OTG-Host Mode
But we  tried to change it to OTG mode, the OTG cable(BUS) was detecded and the device was not
 
StanleyShen_2-1681099284151.png

 

StanleyShen_3-1681099296696.png

 

StanleyShen_0-1681125406371.pngStanleyShen_1-1681125438767.png

 

QA2: OTG-Device Mode

When we use the normal microUSB -> TypeA cable(not OTG Cable) and connect to computer,

from debug sysfs, it seems that the mod was changed to gedget mode,

but nothing message output to dmesg and the computer(windows 11) no any response.

StanleyShen_2-1681125879295.png

 

So could you tell us if we make mistake somewhere and how to fix it?

thank you.

Env.

CPU S32G274A

Soft  BSP33.0 ( yocto fsl-auto make ARCH=arm64 s32gen1_defconfig )

 

 

 

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
4,880件の閲覧回数
MayanksPatel
NXP Employee
NXP Employee

Hi @StanleyShen,

I discussed with the internal team and knew that the OTG feature is not supported currently in BSP and there is no plan to develop it.

 

Thanks,

Mayank s Patel

元の投稿で解決策を見る

0 件の賞賛
返信
14 返答(返信)
4,931件の閲覧回数
StanleyShen
Contributor IV

It seems that “bsp36.0-5.10.158-rt” was not working properly either

0 件の賞賛
返信
4,910件の閲覧回数
MayanksPatel
NXP Employee
NXP Employee

Hi @StanleyShen,

Hope you are doing well.

Have you checked the same functionality in previous BSP Versions?

Previous and current BSP versions are behaving the same?

 

Thanks,

Mayank s Patel

0 件の賞賛
返信
4,889件の閲覧回数
StanleyShen
Contributor IV

Hi @MayanksPatel 

Have you checked the same functionality in previous BSP Versions

No, I  haven't do it before. But I can try BSP30.0 today.

0 件の賞賛
返信
4,881件の閲覧回数
MayanksPatel
NXP Employee
NXP Employee

Hi @StanleyShen,

I discussed with the internal team and knew that the OTG feature is not supported currently in BSP and there is no plan to develop it.

 

Thanks,

Mayank s Patel

0 件の賞賛
返信
4,868件の閲覧回数
StanleyShen
Contributor IV

Hi @MayanksPatel 

That's too bad, but thank you for your confirmation.

BTW, 

can you provide some suggestions on how to investigate this issue?

 

0 件の賞賛
返信
4,863件の閲覧回数
MayanksPatel
NXP Employee
NXP Employee

Hi @StanleyShen,

I am sorry, to inform you but I can't really help you with this as the feature is not developed. 

you can contact the sales team to point out the feature and its developement.

 

Thanks,

Mayank s Patel

0 件の賞賛
返信
4,858件の閲覧回数
StanleyShen
Contributor IV

@MayanksPatel 

OK I see, thank you all the same.

 

0 件の賞賛
返信
4,883件の閲覧回数
StanleyShen
Contributor IV

Hi @MayanksPatel 

No, I haven't do it before. But I can try BSP30.0 today.

I am sorry, since we are unable to download the code for BSP30.0 normally,

I am unable to confirm the behavior of BSP30.0,

https://community.nxp.com/t5/S32G/How-to-download-BSP30-0-yocto-repo-after-the-migrate-codeaurora/m-...

 

BTW:

Have you received any response from your internal team about this issue.

0 件の賞賛
返信
4,995件の閲覧回数
StanleyShen
Contributor IV

When I changed the dr_mode to peripheral as blow:

StanleyShen_0-1681452119992.png

replace the s32g274a-rdb2.dtb and restart the S32G-VNP-RDB2, after plug USB-A to Micro-B cable and connect it to PC,

flowing message ware output to dmesg

StanleyShen_3-1681452338838.png

and in the PC side, unkown device was  detected

StanleyShen_5-1681452666102.png

 

 

0 件の賞賛
返信
4,988件の閲覧回数
MayanksPatel
NXP Employee
NXP Employee

Hi @StanleyShen,

 

I have created a ticket with the internal team to discuss the case.

I will let you know once I received a response from the team.

 

 

Thanks,

Mayank s Patel

0 件の賞賛
返信
4,974件の閲覧回数
StanleyShen
Contributor IV

Hi Mayanks

I am really appreciate.

Also, I will continue to investigate the USB driver.

0 件の賞賛
返信
5,067件の閲覧回数
StanleyShen
Contributor IV

> But we tried to change it to OTG mode, the OTG cable(BUS) was detecded and the device was not

For OTG Host mode, I did some research on the driver code.

when OTG cable was plugged, the

hub_irq->hub_event would be executed and a new hub was detected as a new device,

but after it, when the USB device was plugged, the hub_irq not called.

0 件の賞賛
返信
5,031件の閲覧回数
MayanksPatel
NXP Employee
NXP Employee

Hi @StanleyShen,

Hope you are doing well.

I have seen the device-tree image attached by you and found that in USB dr_mode=host needs to be defined for OTG Support as the board would be the host for the pen drive you are going to access.

Change it in the device-tree and check if it is detecting or not. 

 

Thanks,

Mayank s Patel

0 件の賞賛
返信
5,019件の閲覧回数
StanleyShen
Contributor IV

Hi Mayank

As you see in my thread, I have already changed dr_ The mode  to OTG, but it still does not work properly.

both Host role and device role are failed(Pls refer to the description of QA1 and QA2)

thinks

 

0 件の賞賛
返信