Controlling power to USB connections

uname -a
Linux beaglebone 3.8.13 #1 SMP Thu Sep 12 10:27:06 CEST 2013 armv7l GNU/Linux

Is it possible to control the power to the USB port on the board or a HUB from the CLI?

My scenario is that I’d like to be able to turn something on\off that is powered from the USB connection.


Someone with greater knowledge may know different, but I suspect you will be breaking the USB spec if you do this. Power is part of what is expected on those connectors. However, if all you are using the USB connector for is power (like a phone charger) there is probably no real downside.

I have not checked the schematic (you should), but I don’t think there is any way to do this unless you put your own control circuitry between the USB out and your device.

I may have spoken hastily. See section 6.11.1 in the SRM.

Do you happen to know if this accessible from the CLI?
I tried looking at :/sys/bus/usb/devices/1-0:1.0/port1/power and thought maybe I could edit the control file, but that didn’t seem to work.

6.11 USB Host The board is equipped with a single USB host interface accessible from a single USB Type A female connector. Figure 48 is the design of the USB Host circuitry.
6.11.1 Power Switch U8 is a switch that allows the power to the connector to be turned on or off by the processor. It also has an over current detection that can alert the processor if the current gets too high via the USB1_OC signal. The power is controlled by the USB1_DRVBUS signal from the processor

Pity you didn’t search this group to see if someone has already done it before.

Author: AndrewTaneGlen

And thanks to Andrew for his helpful contribution.

Regards …!searchin/beagleboard/USB1_OC!searchin/beagleboard/USB1_OC!searchin/beagleboard/turn$20off$20USB$20power!searchin/beagleboard/USB$20power$20control