I bought a a SPI controlled display 4DPi-32 [1] and compiled a kernel patched with the driver source [2] provided by the vendor (because the provided deb does not work with RPi2). I had to adapt the Kconfig file in the patch to work with the kernel 3.18.9-v7+ on a RPi2. Here is my 'patched kernel patch' for your convenience [3].

So I believe a now have a kernel running with the 4dpi driver. The only hint in /var/log/messages is:

[    1.544568] Console: switching to colour frame buffer device 82x26

I have a device /dev/fb0

Now, the display is attached, but it is either:

a) completly off b) only the backlight off c) defect

Question 1: can I check the driver works?

Question 2: can I check if the display is working at all?

Question 3: how is the backlight of the display controlled?

[1] https://www.sparkfun.com/products/13051

[2] http://www.4dsystems.com.au/downloads/4DPi/4DPi.tar.gz

[3] https://dl.dropboxusercontent.com/u/226980/4DPi.tar.gz


The SPI driver (spi-bcm2708_dma.c) appears to be written for the earlier model Pis. The Pi2 model uses a different base address for the peripherals.

I didn't look at how the driver is using DMA but there have also been changes in this area. I'm not sure if the DMA changes affect kernel modules.

I haven't looked through the rest of the code.

You'll at least need to find a version of spi-bcm2708_dma.c tailored for the Pi2.

The peripherals base physical address has moved from 0x20000000 to 0x3F000000 on the Pi2. This will affect all software which directly accesses the Broadcom peripherals.

The bus address of DRAM has changed from 0x40000000 to 0xC0000000 on the Pi2. This may affect any software which directly accesses the Broadcom DMA peripherals. Such software will need to use the correct memory address when referencing DRAM in constructed DMA control blocks.

  • Is there documentation on the DMA SPI base address? Mar 11 '15 at 12:20
  • @user1217949 I've edited details of the new addresses into my post.
    – joan
    Mar 11 '15 at 12:42
  • thanks for the info, I'll try if I can change the adresses. I also found the repository where spi-bcm2708.c is maintained (the '_dma' suffix must be removed, or the module is not compiled) Mar 11 '15 at 13:08
  • The address movement concerns physical adresses. For example I think in the RPi1, DMA_SPI_BASE 0x7E204000 is a bus address mapped to physical address 0x20204000. How is the mapping affected by change? Mar 11 '15 at 17:21
  • Don't change any addresses in the code which are using 0x7Exxxxxx. They are already bus addresses and are unchanged. Change any addresses in the code which are 0x20xxxxxx to 0x3Fxxxxxx, e.g. 0x20204000 changes to 0x3F204000 (for the Pi2).
    – joan
    Mar 11 '15 at 17:27

Pi2 version is now on the vendors website. It now supports both Pi1's and Pi2's.

  • 3
    A link would improve this question -especially since vendor's website can be ambiguous. May 6 '15 at 1:43
  • Yes. Please provide a link to complete your answer.
    – recantha
    Sep 2 '15 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.