Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SPI on RPI? (Brad Spencer) writes:

>I was wondering if anyone is using the built in spibus on a Raspberry PI
>(any version) lately.  It is possible that I have outdated dts files,
>but I do not see the spibus device on my 9.x installs and was curious if
>it shows up for anyone in 9.x or -current and if anyone is currently
>using it.

You need to enable it in the dts file or via overlay.

> It seems like the dts files that are in the tree would
>contain a description for the SPI bus and the driver appears to have
>been modified for FDT support.  Running ofctl appears to show a number
>of /spi@<number> lines but I don't know exactly what they indicate.

% drvctl -p spi0 device-parent

% drvctl -p bcmspi0 fdt-path

This is the main SPI interface connected to GPIO pins. The string
is a name, but by convention the physical address of the controller
registers is following the @. The BCM2835 has two additional SPI

The numbering in the BCM2835 documentation (SPI0,SPI1,SPI2) isn't
necessarily the same as the device units (spi0,spi1,spi2) that
just follow attachment order. Refering to the fdt-path or the base
address avoids confusion.

Home | Main Index | Thread Index | Old Index