I built a timing device using a B+ and PiFaceCAD 2 which has been working for a while but I'm now looking to expanding it and adding additional relays. To provide a development environment I brought a second board and added another PiFaceCAD that I have.
When I installed raspbian and did the updates/upgrades before cloning the code from github it would not work. I then wrote some code, based on the PiFace examples to explore the button operation I found that there was something going on around the interrupts. This lead me to look at the SPI driver that the PiFaceCAD uses. I greped dmesg and found that the old one was on an irq whereas the new one seemed to be on GPIO pins.
(old - 3.18.11+ kernel)
bcm2708_spi 20204000.spi: master is unqueued, this is deprecated
bcm2708_spi 20204000.spi: SPI Controller at 0x20204000 (irq 80)
(new - 4.1.6+ kernel)
spi spi0.0: setting up native-CS0 as GPIO 8
spi spi0.1: setting up native-CS1 as GPIO 7
Grepping /var/log/kern.log I found that the new built was using interrupts until the kernel was updated. I validated this by reinstalling and cloning the module again which worked. This lead to done some googling around the bcm2708 device which lead me to establish that there were device tree changes (see noted below from http://forum.kodi.tv/showthread.php?pid=2016570).
This could be over written and I’ve managed to get this to work by using in dtoverlay=spi-bcm2708 /boot/config.txt.
The install notes for PiFaceCAD make no mention of this and wonder if there is a patch for the drivers that will with the 4.1.x kernels?
With dtparam=spi=on /dev/spidev0.{0,1} show up fine and lsmod/dmesg show that the new driver is used
Code:
OpenELEC:~ # lsmod | grep spi
spi_bcm2835 3659 0
OpenELEC:~ # dmesg | grep -i spi
[ 5.608210] spi spi0.0: setting up native-CS0 as GPIO 8
[ 5.618668] spi spi0.1: setting up native-CS1 as GPIO 7
When also adding dtoverlay=spi-bcm2708 to use the old driver the device nodes show up fine again and lsmod/dmesg output is also as expected
Code:
OpenELEC:~ # lsmod | grep -i spi
spi_bcm2708 4682 0
OpenELEC:~ # dmesg | grep spi
[ 5.563134] bcm2708_spi 3f204000.spi: master is unqueued, this is deprecated
[ 5.605692] bcm2708_spi 3f204000.spi: SPI Controller at 0x3f204000 (irq 80)




