At the moment our design connects a UART between the Beaglebone and an STM32F4. I'd like to add support to receive data from the STM32F4 using SPI. It will require receiving frames of at least 64 kB each second so a 1 MHz clock should be adequate. I'm using the 3.8.13 kernel.
Some questions:
Some search results suggested that the SPI driver was a kernel extension but I was unable to find a corresponding spidev.ko in my filesystem or see it listed with lsmod. Does this mean that the device driver has been compiled in to the kernel?
If it has been compiled within the kernel am I correct in thinking that I'll need to rebuild the kernel and adjust the buffer size. I think the default is 4096 and I would like it to be able to hold an entire transaction.
Finally, I'm in the process of verifying the use of SPI0. I've compiled a device tree file (I'm using the one from ADA Fruit) and it seems to load properly:
$ echo ADA-SPI0-01 > /sys/devices/bone_capemgr.9/slots$ ls /dev/spi*
/dev/spidev1.0 /dev/spidev1.1
I downloaded the kernel source and compiled Documentation/spi/spidev_test.c for 3.8.13.
I've jumpered pins 18 and 21 but I'm only seeing zeros:
$ ./spidev_test /dev/spidev1.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00
I am not see the SPI pins listed in the pingroups as some posts have suggested:
cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups
Is editing uEnv.txt and a reboot required to properly configure things? When I tried adding the overlay to the kernel parameters the device nodes were not created. I modified in the following way:
optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN capemgr.enable_partno=BB-UART5,ADA-SPI0-01 omap_wdt.nowayout=0