Date: Tue, 14 Oct 2014 04:06:15 +0200 From: Bernd Walter <ticso@cicely7.cicely.de> To: Luiz Otavio O Souza <lists.br@gmail.com> Cc: "freebsd-arm@FreeBSD.org" <freebsd-arm@freebsd.org>, ticso@cicely.de, Alie Tan <alie@afflemedialab.com> Subject: Re: SPI device on Raspberry PI Message-ID: <20141014020615.GI38905@cicely7.cicely.de> In-Reply-To: <CAB=2f8xHLEQMdAfv57wXV7FuLuO=XQ-vSXKEL%2B_HVFVa%2B4sv_Q@mail.gmail.com> 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> <CAB=2f8xHLEQMdAfv57wXV7FuLuO=XQ-vSXKEL%2B_HVFVa%2B4sv_Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 13, 2014 at 10:22:36PM -0300, Luiz Otavio O Souza wrote: > 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. Oh great. > 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. Ok - no userland, that explains why I failed to find devnode code. So my quick and dirty device test also requires a kernel module. In my special case it's about a device with CS, therefor it can't be shared with others anyway and kernel module, well it's not a big deal. > 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). Sounds like an interesting patch. > I've plans to eventually fix this and the others issues once i get > done with GPIO interrupts (but help is always welcome). I hope to find time to work on FreeBSD again. During the last few years paid work reduced my available time too much. But on my priority list are a bunch of iMX6 systems to run FreeBSD first, also a good oporunity to learn about uboot and and fdt, which are both still pretty new for me. -- B.Walter <bernd@bwct.de> http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141014020615.GI38905>