I am using ti-sd-am335x-evm-05.04.01.00 as the starting point for our hardware.
I have enabled SPI in the kernel, and I think I believe I have setup the board-am335xevm.c file correctly. I am now using spidev in user space and need to communicate with a device that only supports LSB first. Unfortunately I cannot set the SPI_LSB_FIRST mode. This problem exists for the spidev_test.c program, found at board-support/linux-3.2-psp04.06.00.07.sdk/Documentation/spidev_test.c. After cross-compiling this program and attempting to run it (either on my hardware or on the EVM), I get the following output:
./spitest -D /dev/spidev2.0 -L
[17501.325562] spidev spi2.0: setup: unsupported mode bits 8
can't set spi mode: Invalid argument
Aborted
Note that mode bit 8 is defined as SPI_LSB_FIRST. Other mode bits can be toggled without any problem, and spidev appears to be otherwise working, since if I run it without the -L option I get the expected result. Also, I did try using the explicit ioctl call,
ioctl(retVal, SPI_IOC_WR_LSB_FIRST, isLsbFirst)
rather than including this flag in the mode (which is what spidev_test.c does), but I get the identical failure.
Is it true that LSB first is not supported, or if not can anyone offer any advice on what I may have set up incorrectly?