Control the +5V USB port power on the XO
Mitch Bradley
wmb at laptop.org
Wed Jan 23 04:19:11 EST 2008
Arjun Sarwal wrote:
> Is there a way to switch Off (and subsequently toggle) the +5V USB
> power supply on the XO in software ?
Yes, but it's complicated, because
a) the way you do it depends on whether or not the USB 2.0 host
controller has claimed the port.
b) the USB port that controls the power switches changes from rev to rev.
Here is an OFW recipe that will work to turn the power off:
ok select usb2
ok 0 54 ehci-reg! 0 58 ehci-reg! 0 5c ehci-reg! 0 60 ehci-reg!
ok 200 fe01a054 l! 200 fe01a058 l! 200 fe01a05c l! 200 fe01a060 l!
To turn it back on:
ok select usb2
ok 1000 54 ehci-reg! 1000 58 ehci-reg! 1000 5c ehci-reg! 1000 60
ehci-reg!
ok 100 fe01a054 l! 100 fe01a058 l! 100 fe01a05c l! 100 fe01a060 l!
There are simpler recipes, but that one works on all machines except
A-test, and doesn't depend on whether the USB1 or USB2 host controller
currently owns which ports.
How to do this from Linux? I have no idea, short of using sdkit to
write to the hardware directly. Maybe the USB driver has an ioctl; if
so, finding it is left to the reader as an exercise.
>
>
> thanks
> Arjun
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel
>
More information about the Devel
mailing list