Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 2014 22:22:36 -0300
From:      Luiz Otavio O Souza <lists.br@gmail.com>
To:        ticso@cicely.de
Cc:        "freebsd-arm@FreeBSD.org" <freebsd-arm@freebsd.org>, Alie Tan <alie@afflemedialab.com>
Subject:   Re: SPI device on Raspberry PI
Message-ID:  <CAB=2f8xHLEQMdAfv57wXV7FuLuO=XQ-vSXKEL%2B_HVFVa%2B4sv_Q@mail.gmail.com>
In-Reply-To: <20141013215012.GH38905@cicely7.cicely.de>
References:  <935B7003-F750-42E7-9100-C27028B6A111@gmail.com> <CAB=2f8x=T7u_mgAUDbDx2z3t%2BoW6w2oyKLutaFUBrxVT6NQQ3g@mail.gmail.com> <E527CB90-2206-41B8-B9F4-3FA0FB17A24D@gmail.com> <CANuCnH8kWMh40W0NUqMVcuHnJA=-XJ6%2BTSCPn-JjGSndk_yW%2Bg@mail.gmail.com> <20141013215012.GH38905@cicely7.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13 October 2014 18:50, Bernd Walter wrote:
> On Wed, Oct 30, 2013 at 05:22:26PM +0700, Alie Tan wrote:
>> Its already commited to the HEAD
>> http://svnweb.freebsd.org/base?view=revision&revision=257062
>
> I just need SPI for a small test.
> Hoped that the BBB has SPI, but it seems we have no driver yet, so I
> will use a PI (currently building current).
> In the meantime I've read the sourcecode to get an idea on how to use
> it from userland.
> What puzzles me is the clock rate, which is set by SPI globaly.
> Since I never used SPI in FreeBSD I wonder if this is just on the
> PI, if this always done that way, or if I understood something wrong?
> Usually I would expect either globaly atomic with transfer setup, or
> per CS setting, because it is not untypical to mix different speed SPI
> slaves.

I think that the BBB SPI driver development is in progress.

Well, as you have noted, our SPI support is minimum, there is no
userland support, no interface to deal with bus speed from devices,
you need to provide tx and rx buffers even if they won't be used and
the list goes on.

There is a patch to add support to SD/mmc over SPI which adds a
interface to configure the bus speed from the SPI device (the SD card
uses a slow bus speeds during the card identification and then switch
to the supported speed).

I've plans to eventually fix this and the others issues once i get
done with GPIO interrupts (but help is always welcome).

Luiz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAB=2f8xHLEQMdAfv57wXV7FuLuO=XQ-vSXKEL%2B_HVFVa%2B4sv_Q>