Question: best practice to read out USBx_VBUS state inYocto

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question: best practice to read out USBx_VBUS state inYocto

560 Views
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 Kudos
Reply
2 Replies

514 Views
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 Kudos
Reply

537 Views
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 Kudos
Reply