SPI device on Raspberry PI
fabiodive
fabiodive at gmail.com
Wed Oct 30 10:12:36 UTC 2013
Hello Luiz,
how are you? Hope you great..
is there any news about SPI user space device
on FreebSD and RASPBERRY PI?
thank you for all your effort..
with your patches I was able to use I2C,
best regards,
Fabio Balzano
On Sep 19, 2013, at 2:00 PM, Luiz Otavio O Souza <lists.br at gmail.com> wrote:
> On 17 September 2013 19:00, fabiodive <fabiodive at gmail.com> wrote:
> Hello Luiz,
>
> I was able to use your patches on Raspberry PI,
> I builded an image with crochet and this is my dmesg output:
>
>
> [...]
>
> Now.. I see the GPIO device and iic as well but what about SPI?
> Should I create the device or just use GPIO?
> Any ideas?
>
>
> The devices you see for gpio and iic are used to control (or read and write data) from userland and actually there is no such support for SPI.
>
> I've plans to write an userland tool similar to i2c(8) for SPI together with some other pending work i've for SPI.
>
> But until it happens you need a kernel driver for the SPI device you want to use:
>
> spi0: <BCM2708/2835 SPI controller> mem 0x20204000-0x2020401f irq 62 on simplebus0
> spibus0: <OFW SPI bus> on spi0
> mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
> enc28j600: <enc28j60 Microchip SPI Ethernet controller> at cs 1 on spibus0
>
> And the bindings also need to be described in the rpi dts file, i.e. in my case:
>
> spi0 {
> flash0 {
> compatible = "flash,mx25l";
> spi-chipselect = <0>;
> };
>
> enc28j600 {
> compatible = "ethernet,enc28j60";
> spi-chipselect = <1>;
> };
> };
>
> Thanks for your feedback.
>
> Luiz
More information about the freebsd-arm
mailing list