Hey Adam - 

I just spent a few weeks fighting through this (I'm a linux newbie) so here's the step-by-step I did.  A word of warning - it's probably better to do this with patching, but I had some issues getting that to work with a bitbake recipe, so here's a quick and dirty solution to get you started, and you can worry about patch generation later.  I'd recommend saving copies of the originals before you start making edits, and of the edited files once you generate them.  I've assumed the standard file set-up from the Gumstix.net getting started website, and use of Kernel 2.6.32.  Adjust these instructions according to any changes you've made to that setup.

EDIT: overo-oe/tmp/work/git/arch/arm/mach-omap2/board-overo.c
      REPLACE: the body of 
static struct spi_board_info overo_spi_board_info[] __initdata = { 
                .modalias               = "ads7846", 
                .bus_num                = 1, 
                .chip_select            = 0, 
                .max_speed_hz           = 1500000, 
                .controller_data        = &ads7846_mcspi_config, 
                .irq                    = OMAP_GPIO_IRQ(OVERO_GPIO_PENDOWN), 
                .platform_data          = &ads7846_config, 
                   .modalias = "spidev", 
               .max_speed_hz = <YOUR DEVICE SPEED>,
               .bus_num = 1, 
               .chip_select = <1 or 0>,

[Assuming you don't need the touchscreen, which I did not.  If you do need the touchscreen, make a separate entry directly after the ads7846 entry, and you will have to put your device on chip select 1].

         ENSURE: that static void __init overo_init(void) calls overo_spi_init(), which calls spi_register_board_info(overo_spi_board_info, ARRAY_SIZE(overo_spi_board_info))

[Or some equivalent set of calls that will make register the board info you edited]


COPY: The folder of linux recipes from overo-oe/org.openembedded/recipes/linux
     TO: A user created folder in overo-oe: overo-oe/user.collection/recipes/linux
EDIT: overo-oe/user.collection/recipes/linux/linux-omap3-2.6.32/overo/defconfig 
     ENSURE: CONFIG_SPI_SPIDEV=y is in the defconfig, otherwise add it.  
[You can either do this all manually, or you can type:
bitbake -c menuconfig linux-omap3, and scroll to the device drivers, and SPI devices and make the changes there.  SPIDEV should already appear as an option.]


Once these changes have been made, 
bitbake -c compile linux-omap3
bitbake linux-omap3

Since SPIDEV is already being created and stored, I'm pretty sure you can just change the uImage file on your MicroSD card to the new one you've created. If you don't see spidev, then you might try replacing the rootfs as well.  As I recall though, these instructions created spidev1.0 in the /dev/ file automatically.


Let me know if you run into any trouble, and anyone on this list is welcome to correct my methods here.  I had some trouble getting spidev to do what I wanted, so you might try checking out the simple SPI drivers Scott Ellis created http://github.com/scottellis/ if you end up in the same situation.

Good luck!


On Sat, Apr 10, 2010 at 10:12 PM, Adam Stambler <adasta@gmail.com> wrote:
Hello Folks,

I am about am trying to set up my Overo Fire to talk to an AVR microcontroller expansion board over SPI.  It is a little robot expansion board that I made.  Since the interface is very simple and there is not much data going between them, I would like to use SPIDEV rather than write my own driver from scratch. 

Does anyone have an gumstix image with spidev already enabled?  Would you be willing to share it?  There are a bunch of threads on the mailing list, but the instructions are a bit disperse and hard to follow.  It would be a great help if someone could point me to a prebuilt image or concise instructions.  If not, I will slog through the mailing list threads.

Thank you for the help.

Adam Stambler

Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
gumstix-users mailing list

Kim Turley