We're using your SC587 in a custom design which has a TI TPS25833 for USB-C power delivery.
The LD_DETn pin of the TPS25833 is connected to the USB0 ID pin on the CPU.
The USB0_VBC is connected to the enable pin of the TPS25833, but this doesn't seem to work correctly:
The VBC pin stays high for 100ms and low for 50ms. The 100ms is too short for the TPS25833 to generate 5V on the USB connector. I've been looking a way to patch the kernel to increase this 100ms but have been unable to. Can you point me in the right direction?
However, I'm not entirely sure this is the way to go. It seems the 100ms is defined in the USB specification: TA_WAIT_VRISE should be max 100ms..
A better solution might be to disconnect the VBC signal entirely and keep the TPS25833 enabled by default. This seems to work fine.
I only need to patch the kernel to stop showing the 'VBUS error recovery' when the TPS25833 isn't generating 5V because no device is detected..
What do you suggest?
Keeping the TPS25833 enabled works fine if I set CONFIG_USB_MUSB_HOST=y. If I set CONFIG_USB_MUSB_DUAL_ROLE=y instead, and do 'modprobe g_serial' to get the port working as host, the USB0_VBC pin always seems to stay low, so I definitely need to disconnect it..
After disconnecting VBC and after loading the g_serial module, the usb stick shows up fine. But If I then disconnect it, I get a 'vbus error recovery' (didn't do the patch suggested above to remove these messages yet) and the usb stick won't be detected again until a reboot. Only if I unload the module before disconnecting, and modprobe g_serial again, the USB stick will be discovered.
modprobe g_mass_storage to test the USB0 port as a device seems to work fine all of the time.
This all seems a bit strange to me.. I got this all from the old linux add in user guide.. I'm using Yocto to build our distro. Maybe there's some updated documentation?