I need to:
to be able to hardware-reset a device that is connected to US
Thanks to my friend Cleiton Bueno http://cleitonbueno.wordpress.com/ that found this solution for me:
prerequisites:
Code that solved the problem:
devmem2 0x47401c60 b 0x00
sleep 1
echo "usb1" > /sys/bus/usb/drivers/usb/unbind
sleep 20
echo "usb1" > /sys/bus/usb/drivers/usb/bind
sleep 1
devmem2 0x47401c60 b 0x01
The "devmem2" command is responsible to direct access GPIO3_13 of the beaglebone, that controls the IC that powers on/off the USB port.
The "unbind/bind" commands are responsible to tell the usb driver to "rescan" the port after the power.