Saturday, May 28, 2011

Shutting down power to USB hosts on BeagleBoard-xM

So one of the things I want to do as a part of an idea one of colleagues suggested is to shut down power to the USB controller on my beagleboard-xM.

There is a single chip in the beagleboard that provides power to the entire board (T
MS65950) which provides power management apart from other things. The beauty of the design is all the supplies to this chip can be controlled over the I2C bus by the main processor.

Architecture:
Processor -> USB PHY -> USB HUB -> USB ports

There are 2 main power sources for 2 chips that are required for USB function.

1. A 1.8v supply coming from directly from the power manager (TMS65950) to power the USB PHY. Why is a PHY required? Because the processor on its own cannot speak USB. It is like an ADC if you will.

2. A 3.3v supply that powers the USB hub (SMSCLAN9514). This comes from an LDO which derives its power directly from the 5v rail (independent of the power manager). The beauty of the design is even though the LDO derives its power directly, it can still be controlled by the power manager which is inturn controllable over I2C bus by processor.

Because the power manager has different power supplies for different uses (like for processor and peripherals), the processor can selectively shutdown power to different components. This is quite awesome. I guess this makes sense for an embedded board which would like to turn off power supplies that are not required.

Infact- if you look at a PC architecture, it is not possible to shut down power to USB from kernel (if I'm right) unless your USB controller supports it. Not all devices support USB suspend mode and even if they did, the USB specification only says that they shouldn't draw more than a little current but technically no one is stopping them from drawing more :) In the case of beagleboard, we are strictly shutting down power supply.

Next thing I have to figure out is how to do all this in software :)

Thanks for reading, more updates coming.

Thursday, May 19, 2011

BeagleBoard-xM

Just got a BeagleBoard-xM to play with and some time now that my exams are over (finally).

It is a pretty nice board I must say, and I had it up and running in 15-20 minutes once I found the right cables in my lab.

I'm a fan of X-windows so I decided to create a new X display just for the beagleboard and made Gnome running on the board connect to it over the wired network. It was fun!
Here's a little demo:

The performance of the board is amazing, considering it is tiny and fanless. Thanks to the low power of the OMAP3 processor, it can be powered completely through a mini USB cable. The processor is at 1GHz and it comes with plenty of RAM allowing you to run a complete desktop environment and a few applications.

There is also a fantastic opensource community and the documentation is fairly well written though its hard for anyone to keep it uptodate as the board evolves.

Storage
The microSD card that came with it has all the images you need to test the board, though I am compiling my own kernel and U-boot to get my hands dirty. :)

It doesn't come with any NAND flash though so it relies on bootloading from a microSD card. If I'm right - the Boot ROM expects the boot partition to be FAT32 (I guess because reading FAT32 takes little code) from where it loads X-loader to kick start the boot loading process.

Ethernet and USB
The -xM comes with an integrated USB hub (SMSC LAN514) chip with support for 4 USB ports. The chip also has integrated Ethernet support with a complete 802.3 MAC and PHY. Isn't that cool!

Obviously there is a lot more to explore. More information: http://www.beagleboard.org/

Extra Notes:
1. How to get an X-windows session with the beagleboard:

On the X-server:
/usr/bin/X :1 -br -v      # X server instance on display 1
DISPLAY=:1 xhost + # Permission for the board to connect
On the Beagle Board:
DISPLAY=joel:1 gnome-session # DISPLAY = X-server's host:display-name

Next:
I'm going to try building my own Xloader, Kernel and U-boot. I will most likely boot from NFS as I don't like ejecting and copying stuff to the microSD card which is quite tiny for my fingers. :)