Question: best practice to read out USBx_VBUS state inYocto

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Question: best practice to read out USBx_VBUS state inYocto

561 次查看
Ralf_Rademacher
Contributor III

Hello,

i'm interested in writing an application, (maybe an device driver) to detect when USB Connection to a charger, host PC or any other power delivering source ist established, without polling.

So whats the best way to do this? I thought about read out state of USBx_VBUS somehow or bridge this signal to an GPIO and read its state.

 

Is something like this possible, or are there any other recommendations.

 

Regards

Ralf

0 项奖励
回复
2 回复数

515 次查看
Ralf_Rademacher
Contributor III

Hello Chavira,

thx for fast response. Which part in the RefManual would you advise to me, to solve my task?

I saw 4.9.11 USB Charger Detection. Is it using the VBUS-detection? How i have to enable this, because i can't find it in our Yocto.

/sys/class/power_supply is empty right now

all of the ones listed below are activated

1. CONFIG_USB-Build Support for Host-side USB
2. CONFIG_USB_EHCI_HCD EHCI HCD (USB 2.0) support
3. CONFIG_USB_CHIPIDEA- ChipIdea high-speed Dual Role Controller
4. CONFIG_USB_CHIPIDEA_UDC - ChipIdea device controller
5. CONFIG_USB_CHIPIDEA_HOST - ChipIdea host controller
6. CONFIG_USB_GADGET - USB Gadget Support
7. CONFIG_USB_MXS_PHY - Freescale MXS USB PHY support

i'm a little bit confused

 

Best regards

Ralf

0 项奖励
回复

538 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @Ralf_Rademacher!

Thank you for contacting NXP Support!

You can check our Linux reference manual, in that document you can see all our USB driver possibilities.

https://www.nxp.com/docs/en/reference-manual/IMX_REFERENCE_MANUAL.pdf

Best Regards!

Chavira

0 项奖励
回复