[beagleboard] BeagleBone, Linux and SPI

Hi all,

got my bone a week ago and I'm quite happy with it. But now I came to a
point, where I am stuck - rather linux related than to the bone but maybe
some one here could help. I have Microchip ENC28J60 MAC/PHY controller that
I would like to attach - but how? There is a kernel driver for it, but I
have no plan how to configure it. Right now I managed to compile my own
debian for this board and got everything running quite well.

Take a look at http://engineersofthecorn.blogspot.com/2012/06/beaglebone-and-adafruit-18-spi-lcd.html

To do it in the kernel, you'll likely need to patch the board file
with platform data. When the device tree stuff for SPI is all done, I
think this will be avoidable, but not today. Unlike I2C, the bus
configuration isn't global/shared, so you'll need to provide the
details in the board.c platform data.

Another reference:
http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=57&Itemid=62

The kernel has support for the device and spi in general, but how do I tell
the driver which SPI port to use? I know there must be settings for the
pinmux and there must be a way to tell the driver which SPI port and mode to
use.

Apart from that, is there any example code for userland SPI?

http://www.kernel.org/doc/Documentation/spi/spidev
First Google result: http://communistcode.co.uk/blog/blogPost.php?blogPostID=1
Pins aren't right, but much of this translates to the Bone:
http://elinux.org/BeagleBoard/SPI

Hi all,

.
.
.

Apart from that, is there any example code for userland SPI?

http://www.kernel.org/doc/Documentation/spi/spidev
First Google result: http://communistcode.co.uk/blog/blogPost.php?blogPostID=1
Pins aren't right, but much of this translates to the Bone:
http://elinux.org/BeagleBoard/SPI

I probably should have also linked you to
http://www.yellowfeather.co.uk/2012/03/userland-spi-on-the-beaglebone-with-ubuntu/

Of course, the current Angstrom demo image has SPIDEV already
configured, so just look at the kernel doc and start programming.