Hello, I am not able to find any way how to control USB power switch from Linux userspace. Testing it on Colibri VF61, Linux 4.4.39 - clean image by Toradex, slightly modified device tree for our board.
The USB Host power enable line is correctly defined in devicetree as a regulator on a proper GPIO. But how to control the regulator, when I want for example to power cycle freezed device on the port? After some googling, I found that sysfs file
/sys/bus/usb/drivers/usb/usb1/power/control could be the point, but it does not accept the “suspend” value, error: Invalid argument.
Of course, if I unbind the regulator from GPIO using
echo regulator-usbh-vbus > /sys/bus/platform/drivers/reg-fixed-voltage/unbind
then I can export the GPIO line and control power switch manually. But I would expect there is some standard way how to control the power switch binded to usb host regulator.
Any experience with this issue?