Reading all zero's from SPI using BBB Linux 3.14

Hi,

I recently upgraded from the 3.8 kernel to 3.14 and have been experiencing difficulty with reading from the SPI. I seem to always read back zero’s with a test program that was previously working on 3.8. I have tried switching the pin mux sclk from an input to an output. Doesn’t seem to have helped. The dtsi file is attached for the pinmux config.

Has anyone been able to successfully use SPI devices on the 3.14 kernel? Neither SPI0 nor SPI1 seem to be able to read anything but zeros.

Thanks,

Dallas

am335x-bone-common-pinmux.dtsi (93 KB)

You do need to leave the SCLK with RX_ENABLE turned on, or the receive section of the SPI will have no SPI clock. RX_ENABLE does not make the pin an input or output: It just enables reading the value out on the IO pin. The use of the pin specified in the 3 MODE bits really defines if it will be used as input, output, or both.

I have not tried running 3.14, but I suggest you use /dev/mem and mmap() so you can look at the SPI control registers under the earlier OS and under 3.14 to see the differences. The register definitions are not very complicated. Probably the difference is just the definition of which of the data pins is output and which is input.