This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPS65950 USB OTG and ID_PIN

Hi there.

I have spent several days in troubles...

I have USB OTG working perfectly as host when the ID pin is grounded.

I want to use the Id pin to detect the device type.

I want to charge(power) my device from external charger, identified by the resistance of the id pin and to operate in host mode.

The peripheral device is powered by the charger.

And if there is any resistance (not grounded or open) on the id pin the USB OTG never works as host even if forced by modifying the driver, echoing "host" to the HDRC/mode in devices.

STS_HW_CONDITIONS.STS_VBUS is  up as expected, but

STS_HW_CONDITIONS.STS_USB is down, and doesn't goes up.

On the other hand, if the ID pin is grounded - no problem - host interface is working properly.

Any ideas ?

Thanks,

Angel

  • Hi,

    Host mode needs ID pin connected to ground. So, this is fine and your platform is happy.

    I dont know how you are powering your platform, is it through USB, is USB the main supply for the board? 

    I dont think you can use both the options for ID pin to satisfy the platform requirement. ID connection is different in both the use cases you point - charging/power and host mode. Are you trying to modify the drivers and use the internal ID pull-up and ID ground settings? If you set the ID to GND by internal register settings then host mode should be happy. I dont understand the error/echo you described above.

    STS.VBUS responds to 5V VBUS. STS.USB responds to ID. The USB interrupt is sent when either of these bits toggle. You can try to use the inetrnal pull-up and pull-down for ID the way you want to implement in software. However, ID connected to ground will not work in the power/charger detection case. In case you have not referred to section 15.4.8.1 then please have a look at it.

  • Hi,

    thank you for the reply. I was trying to force the usb controller in host mode by writing "host" in the /dev/hdrd something file... No success (however, if the ID PIN is grounded everything works fine). And the last thing I have tried was to enforce the ID pin to ground by setting IDGNDDRV to 1. Particular success, but ... If the pin is grounded in the moment when the VBUS is applied and then unground it (IDGNDDRV = 0) and read the ID_STATUS I am able to detect my resistor. But here comes the "partucular success". It seems that the state machine is changing the state only once - after the VBUS and ID are debounced, and no more. Here comes interrupt and STS.VBUS is updated to 1, STS.USB also (if the ID pin is grounded). Then I set IDGNDDRV = 0 and enable the ID pullup, then read the ID_STATUS. This doesn't causes any interrupts (I have checked - the interrupts are enabled). Interrupt is generated only if changing the ID_PIN from or to  floating. If the resistance is changed (even id pin is grounded from some resistance) no interrupt received. So everything works almost fine if I leave the IDGNDDRV set to 1, so the next time cable is plugged the ID to be grounded at the time when VBUS appear, then repeat the procedure to unground, read, ground ID pin. But this affects the device mode operation of my device, because actually it always acts as host, even there is no cable connected.

    I have almost gave up, but ... if you have any idea...

     

    BR Angel Shtilianov

  • Hi Angel,

    I discussed this with Alexis. He told that this is specific to OMAP side and you can find details from OMAP support team. I think you are already communicating with OMAP support.