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.

AM3358: How do I invert the polarity USBx_DRVVBUS output?

Part Number: AM3358
Other Parts Discussed in Thread: TPS2051, TPS2041B, TPS2051B

Hi,

AM3358, TPS2051BDGN and TPS2041BDGN.

Kernel 5.11.10

I have a custom board based upon the BBB. USB0 is in HOST mode and will supply +5vdc using the TPS2051BDGN power switch. During kernel boot, USB0_DRVVBUS changes from low to high and the +5 output of the TPS2051 changes from 0 to +5vdc. All has been working well until the TPS2051 ran out of stock and no one has inventory probably due to the chip shortage. There is plenty of TPS2041BDGN in stock so I ordered and installed one for testing. After installing, I found that the polarity of the pin-4 ENABLE input is inverted.

TPS2041B enable input: logic low turns on the power switch.

TPS2051B enable input: logic high turns on the power switch.

I have seen other solutions to add an inverter or tie to a GPIO line, but those would require a re-spin of my design.

What I want to do is control the polarity of the USB0_DRVVBUS output via a setting in the kernel's device tree.

Is there already a setting in the device-tree, kernel command line or user space to control the polarity of the USB0_DRVVBUS signal?

If not then where in the kernel code can the polarity be changed?

I also tried the ROHM BD82031FVJ but pin-4 EN input is also logic low turns on the power switch.

Thank you,

  • Hi Jack,

    The polarity of USBx_DRVVBUS pin cannot be changed in AM335x, there is no software control for its polarity.

    If you don't want to re-spin your board, and USB0 will always be in host mode, never use for device mode, you can try to directly tie the TPS2041B enable pin to ground, so that VBUS power is always on. leave USB0_DRVVBUS pin float/unconnected. Please ensure you use the latest SDK to ensure this configuration works in host mode.

  • Also set 'dr_mode = "host"' in usb0 node in kernel device tree.