From owner-freebsd-arm@FreeBSD.ORG Fri Aug 15 15:29:54 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2D54D19 for ; Fri, 15 Aug 2014 15:29:54 +0000 (UTC) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 280842DE7 for ; Fri, 15 Aug 2014 15:29:53 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id s7FFTdjS081643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 15 Aug 2014 17:29:40 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id s7FFTY6V047651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Aug 2014 17:29:34 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id s7FFTY68065990; Fri, 15 Aug 2014 17:29:34 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id s7FFTYkn065989; Fri, 15 Aug 2014 17:29:34 +0200 (CEST) (envelope-from ticso) Date: Fri, 15 Aug 2014 17:29:34 +0200 From: Bernd Walter To: "Sulev-Madis Silber (ketas)" Subject: Re: Driving WS2801 and similar LED controllers with BBB Message-ID: <20140815152933.GG60808@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <53ECEFBE.6020500@hot.ee> <20140814183004.GP83475@funkthat.com> <53EE007D.2080702@hot.ee> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53EE007D.2080702@hot.ee> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 15:29:54 -0000 On Fri, Aug 15, 2014 at 03:43:41PM +0300, Sulev-Madis Silber (ketas) wrote: > On 2014-08-14 21:30, John-Mark Gurney wrote: > > Sulev-Madis Silber (ketas) wrote this message on Thu, Aug 14, 2014 at 20:19 +0300: > >> Hello. > >> > >> Maybe someone else works on things like this? I basically know how those > >> are controlled, however I'm unsure what should I choose. Maybe SPI, > >> maybe I should bitbang GPIO for clock / data? Last should work with that > >> specific model (WS2801). Others use weird protocols (or "protocols"). I > >> guess I should just try something. I just let people know that I'm > >> working on that. I won't be surprised if I'm the first one to get it > >> working. > > > > I'd look at using SPI... From what I've read on the WS2801, SPI > > will do exactly what you need to do, and be the most straight forward > > solution... > > > > Only problem is, I seem to be only one who wants to use SPI from > userland... No documentation, no code. I hope that it even works in BBB. > Maybe I'll try bitbanging GPIO from Perl first. That I understand fully, > at least. And that controller seems to allow one to be sloppy or slow. Interesting - I thought there is a userland spi driver as there is for iic. But you can take a look into sys/dev/flash, which holds a few kernel drivers for different SPI flash chips. Those may help you starting with a kernel driver for your LED. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.