SPI on Android


#1

Hello,

I’m looking for some help on setting up SPI low-speed connector, I’m running Android build #95 that was installed from an SD card. I did go through many posts about SPI, but still pretty much confused about how to enable it on Android. And yes, I have read - https://www.96boards.org/forums/topic/how-to-enable-spi-and-access-it-in-debian-os/ and https://developer.qualcomm.com/qfile/28819/lm80-p0436-5_peripherals_programming_guide.pdf

So, my questions are:

  1. Is it really required to compile the kernel just to enable SPI communication? I was able to find “spi0” under “spi_master”.
    adb shell
    cd /sys/class/spi_master
    /sys/class/spi_master # ls
    spi0

Shouldn’t that be enough for initiating communication? Does it mean that the SPI master is already registered?

  1. According to the docs I’m also required to register a slave device, however, I cannot find where are the below files located in the android file system that is mounted.

“kernel/arch/arm/boot/dts/msm8916-cdp.dts
kernel/Documentation/devicetree/bindings/spi/spi_qsd.txt
kernel/Documentation/devicetree/bindings/spi/spi-bus.txt”

  1. I read somewhere that when the device tree changes there is no need to recompile the kernel, is that the case here when only SPI salve need to be registered?

Thanks
Mike


#2

Hi @mike123,

We are aware of the SPI not working out of the box is painful.

We are currently working on the next release as soon as possible with SPI turned on
from starting Debian build.

I appreciate it for waiting a little longer.


#3

Hello Sir
I have written a slave device driver for spi-master.i added device node in the device tree.but when i load slave module its probe method is not invoked.i refered the document https://developer.qualcomm.com/qfile/28819/lm80-p0436-5_peripherals_programming_guide.pdf. i am not getting why my probe method of slave is not getting called