Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Oct 2013 10:12:30 +0000
From:      fabiodive <fabiodive@gmail.com>
To:        Luiz Otavio O Souza <lists.br@gmail.com>
Cc:        "freebsd-arm@FreeBSD.org" <freebsd-arm@freebsd.org>
Subject:   Re: SPI device on Raspberry PI
Message-ID:  <E527CB90-2206-41B8-B9F4-3FA0FB17A24D@gmail.com>
In-Reply-To: <CAB=2f8x=T7u_mgAUDbDx2z3t%2BoW6w2oyKLutaFUBrxVT6NQQ3g@mail.gmail.com>
References:  <935B7003-F750-42E7-9100-C27028B6A111@gmail.com> <CAB=2f8x=T7u_mgAUDbDx2z3t%2BoW6w2oyKLutaFUBrxVT6NQQ3g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@gmail.com> =
wrote:

> On 17 September 2013 19:00, fabiodive <fabiodive@gmail.com> wrote:
> Hello Luiz,
>=20
> I was able to use your patches on Raspberry PI,
> I builded an image with crochet and this is my dmesg output:
>=20
>=20
> [...]
>=20
> 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?
>=20
>=20
> 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.
>=20
> I've plans to write an userland tool similar to i2c(8) for SPI =
together with some other pending work i've for SPI.
>=20
> But until it happens you need a kernel driver for the SPI device you =
want to use:
>=20
> 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
>=20
> And the bindings also need to be described in the rpi dts file, i.e. =
in my case:
>=20
>                 spi0 {
>                         flash0 {
>                                 compatible =3D "flash,mx25l";
>                                 spi-chipselect =3D <0>;
>                         };
>=20
>                         enc28j600 {
>                                 compatible =3D "ethernet,enc28j60";
>                                 spi-chipselect =3D <1>;
>                         };
>                 };
>=20
> Thanks for your feedback.=20
>=20
> Luiz




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E527CB90-2206-41B8-B9F4-3FA0FB17A24D>