From owner-freebsd-arm@FreeBSD.ORG Wed Oct 30 10:12:36 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 C655043A for ; Wed, 30 Oct 2013 10:12:36 +0000 (UTC) (envelope-from fabiodive@gmail.com) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F8C323AD for ; Wed, 30 Oct 2013 10:12:36 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id z12so1068286wgg.0 for ; Wed, 30 Oct 2013 03:12:34 -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=/uu5Xf6bKxHPZCnyaJO648AQGOzdBUF5rqbXoQjEvss=; b=sExYZnzpPatpgmaRr4/6GZqZpPVC8D5Z2kXLM0ndy04A1w7DGPvtQw6ozda7LXwx1w 9glLy6W660v3loeimEYlMrkrkzQLc55OyX6auePo9yGwDue8E4DP51yePh+jwb5RIAn8 IJfWzBSVATQfsnOg7OfzIL+y1QVACIvxF6bD8Aiuf6jIxvkJnBJOt6WoTkXjpxx5nQUj Z7JcclcZfM4CKzfWP+pGJz6sprukgvdWn61ZPLLpG/EahuyQ7oRAdvNtulSo5qO40H18 mNwjvUjbPs4+K+jr/K/DLD5LZZ8PfjpWQ9eBNlat7qpTxXlGEF+6cuFfriTUxblJjvd0 nkrw== X-Received: by 10.194.21.104 with SMTP id u8mr1102641wje.63.1383127954786; Wed, 30 Oct 2013 03:12:34 -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 b7sm14007031wiz.8.2013.10.30.03.12.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 03:12:33 -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:12:30 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <935B7003-F750-42E7-9100-C27028B6A111@gmail.com> To: Luiz Otavio O Souza 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:12:36 -0000 Hello Luiz, how are you? Hope you great.. is there any news about SPI user space device on FreebSD and RASPBERRY PI? thank you for all your effort.. with your patches I was able to use I2C, best regards, Fabio Balzano On Sep 19, 2013, at 2:00 PM, Luiz Otavio O Souza = wrote: > On 17 September 2013 19:00, fabiodive wrote: > Hello Luiz, >=20 > I was able to use your patches on Raspberry PI, > I builded an image with crochet and this is my dmesg output: >=20 >=20 > [...] >=20 > 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? >=20 >=20 > 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. >=20 > I've plans to write an userland tool similar to i2c(8) for SPI = together with some other pending work i've for SPI. >=20 > But until it happens you need a kernel driver for the SPI device you = want to use: >=20 > spi0: mem 0x20204000-0x2020401f irq 62 = on simplebus0 > spibus0: on spi0 > mx25l0: at cs 0 on spibus0 > enc28j600: at cs 1 on = spibus0 >=20 > And the bindings also need to be described in the rpi dts file, i.e. = in my case: >=20 > spi0 { > flash0 { > compatible =3D "flash,mx25l"; > spi-chipselect =3D <0>; > }; >=20 > enc28j600 { > compatible =3D "ethernet,enc28j60"; > spi-chipselect =3D <1>; > }; > }; >=20 > Thanks for your feedback.=20 >=20 > Luiz