From owner-freebsd-arm@FreeBSD.ORG Wed Oct 30 10:24:25 2013 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 ESMTP id 136628AA for ; Wed, 30 Oct 2013 10:24:25 +0000 (UTC) (envelope-from fabiodive@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A05DF2478 for ; Wed, 30 Oct 2013 10:24:24 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id ex4so4148125wid.15 for ; Wed, 30 Oct 2013 03:24:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jb5c1XOO26z4T75bWpRTRcN/rbt76tY1XoqvnKcxKjQ=; b=mKNIMRbkDVOnR8F7Vjxa5bM6UKX6rQKJqxR8pkjLIXsjy89CJ3Qh883S3ElAO6F2Mr xzKixipNdZFGAjAVikyp7eAlCUQxlkBxTufZVixy/6LiqgVpR5hJELmbTUq6hkwyaLDr AsFC08Nj/0yKiYKDlzYIFGs1rJOIudR5c7aPt9YcYmju2POoDuDTdfWjsET+2DD40avY wn5QOWjqB2P7Cp7UwGaZrKi9OfGLiHzAMop4k2bMVIOV6hgThPtV6tSYPrFUUs8UbGP5 in8Ag+WVtqamD/8OxXfCWrzPncfjbsFQLlsO4lBTpPYekI5UKhi9Q6dSZn26NM4V3/J1 90LA== X-Received: by 10.180.89.7 with SMTP id bk7mr2058622wib.32.1383128662962; Wed, 30 Oct 2013 03:24:22 -0700 (PDT) Received: from [192.168.113.40] (43.Red-2-139-192.staticIP.rima-tde.net. [2.139.192.43]) by mx.google.com with ESMTPSA id ma3sm14059735wic.1.2013.10.30.03.24.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 03:24:21 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: SPI device on Raspberry PI From: fabiodive In-Reply-To: Date: Wed, 30 Oct 2013 10:24:20 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <065FC25B-2C70-4CF9-AAA0-7B74D81231B8@gmail.com> References: <935B7003-F750-42E7-9100-C27028B6A111@gmail.com> To: Alie Tan X-Mailer: Apple Mail (2.1510) Cc: "freebsd-arm@FreeBSD.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Oct 2013 10:24:25 -0000 OK!=20 I will check it and report thank you again f. On Oct 30, 2013, at 10:22 AM, Alie Tan wrote: > Its already commited to the HEAD > http://svnweb.freebsd.org/base?view=3Drevision&revision=3D257062 >=20 >=20 > On Wed, Oct 30, 2013 at 5:12 PM, fabiodive = wrote: > Hello Luiz, >=20 > how are you? Hope you great.. >=20 > is there any news about SPI user space device > on FreebSD and RASPBERRY PI? >=20 > thank you for all your effort.. > with your patches I was able to use I2C, >=20 > best regards, > Fabio Balzano >=20 >=20 >=20 > On Sep 19, 2013, at 2:00 PM, Luiz Otavio O Souza = wrote: >=20 > > On 17 September 2013 19:00, fabiodive wrote: > > Hello Luiz, > > > > I was able to use your patches on Raspberry PI, > > I builded an image with crochet and this is my dmesg output: > > > > > > [...] > > > > 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? > > > > > > 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. > > > > I've plans to write an userland tool similar to i2c(8) for SPI = together with some other pending work i've for SPI. > > > > But until it happens you need a kernel driver for the SPI device you = want to use: > > > > spi0: mem 0x20204000-0x2020401f irq 62 = on simplebus0 > > spibus0: on spi0 > > mx25l0: at cs 0 on spibus0 > > enc28j600: at cs 1 on = spibus0 > > > > And the bindings also need to be described in the rpi dts file, i.e. = in my case: > > > > spi0 { > > flash0 { > > compatible =3D "flash,mx25l"; > > spi-chipselect =3D <0>; > > }; > > > > enc28j600 { > > compatible =3D "ethernet,enc28j60"; > > spi-chipselect =3D <1>; > > }; > > }; > > > > Thanks for your feedback. > > > > Luiz >=20 > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >=20