SPI issues: no output on expansion port pins


I am running Angstrom with kernel 2.6.39 and on a Beagleboard C4. I can see spidev3.0 spidev3.1, and spidev4.0 in /dev. I downloaded spidev_test.c from [1] and compiled it natively. But when i run it, there is no change on the associated pins of the expansion port, no matter which device i specify (eg: ./spidev_test -D /dev/spidev3.0). (spidev_test also always returns only 00 when it runs).

For background, I built Angstrom and the kernel using open embedded. I built virtual/kernel, base-image, and then console-image and native-sdk-image as a test (and the console/sdk image runs fine). I then made changes to arch/arm/mach-omap2/board-omap3beagle.c based on [2] and recompiled using the following commands:

$ bitbake -f virtual/kernel -c compile
$ bitbake -f virtual/kernel -c deploy

Compilation completed with no errors, so i copied all the files (MLO, u-boot.bin, uImage.bin, and rootfs with modules) to my SD card. But before i could get spidev to show up, i had to replace /boot/uImage-2.6.39 in the root file system with uImage.bin in the boot partion if the SD card. After this, all the spidev devices showed up in /dev, but i have the problem described above when running the test code.

Also, i erased my NAND a bit ago, so all the files are loaded from the SD card (MLO, u-boot.bin, uImage.bin, and rootfs with modules).

Any help, information, suggestions, etc, would be most greatly appreciated.


[1] http://alinux.tv/Kernel-2.6.34/spi/spidev_test.c
[2] see attached file diffs.txt

diffs.txt (1.85 KB)


Modify your uboot sources and choose the SPI mux modes.

Check this

The linux kernel side muxing is disabled by default. in the config
And it is not used or recommended.

uboot is used to set up the mux modes of the pins.

Thank you! That was exactly the information I needed to get SPI working. Thanks very much!!