From owner-freebsd-arm@FreeBSD.ORG Mon Oct 13 21:50:44 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C97886AE for ; Mon, 13 Oct 2014 21:50:44 +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 58BBB3DE for ; Mon, 13 Oct 2014 21:50:43 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id s9DLoIi1082389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 13 Oct 2014 23:50:19 +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 s9DLoCEn068053 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Oct 2014 23:50:12 +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 s9DLoCxc054694; Mon, 13 Oct 2014 23:50:12 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id s9DLoCwP054693; Mon, 13 Oct 2014 23:50:12 +0200 (CEST) (envelope-from ticso) Date: Mon, 13 Oct 2014 23:50:12 +0200 From: Bernd Walter To: Alie Tan Subject: Re: SPI device on Raspberry PI Message-ID: <20141013215012.GH38905@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <935B7003-F750-42E7-9100-C27028B6A111@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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@FreeBSD.org" 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: Mon, 13 Oct 2014 21:50:44 -0000 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. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.