Other Parts Discussed in Thread: AM3894
Hello,
We've been trying to access the SPI interface on our board with Sitara SoC. We are using the Android Gingerbread port built for this platform (and it's working). According to kernel/arch/arm/mach-omap2/board-ti8168evm.c, our interface is configured as bus 1 chip select 0. We compiled kernel/Documentation/spi/spidev_test.c as staticly linked ARM executable and tried to use it via console on our board by executing
./spidev_test -D /sys/devices/platform/omap2_mcspi.1/spi1.0/modalias
It manages to open the device, but fails to set the mode via ioctl function, giving us the "can't set spi mode: Inappropriate ioctl for device" message, for any combination of modes.
The program offers the following options:
Usage: ./spidev_test [-DsbdlHOLC3]
-D --device device to use (default /dev/spidev1.1)
-s --speed max speed (Hz)
-d --delay delay (usec)
-b --bpw bits per word
-l --loop loopback
-H --cpha clock phase
-O --cpol clock polarity
-L --lsb least significant bit first
-C --cs-high chip select active high
-3 --3wire SI/SO signals shared
Is it possible that ioctl is actually not supported for SPI on Sitara? Kernel documentation states that basic open/read/write/close mechanism offers only half duplex, but to use full duplex, we need ioctl which passes send and recieve arrays in a structure to driver.
So any help related to working with SPI on these chips will be much appreciated!