From owner-freebsd-arm@FreeBSD.ORG Wed Oct 30 10:22:33 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B095782A for ; Wed, 30 Oct 2013 10:22:33 +0000 (UTC) (envelope-from alie@afflemedialab.com) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 88FFA2462 for ; Wed, 30 Oct 2013 10:22:33 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id q10so760509pdj.41 for ; Wed, 30 Oct 2013 03:22:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=3mNj646iwNCOk/fHIZdVDt3WsHncjBOozGoE6Fo300I=; b=ijG/RZnwXFI6VK4pcjAwY0RMZt06z9IRyBX1l8Ff3UShRqbvD9lPHb5VD4a1EBlKbv PRxwmUBk9HsRMDNqtWmhbFdstx6DfmrTBlfgpdeIu72K+RX4/ds7ZP3ax1SbGRZhGOkC BhXePLTzCV6V/JqZJ9aP4Cir66mWR3SThVvslzZpBMllsueTnHIJSe/KQQdDGqPHo9gv /AOdZbToryvlAdlQH9qKmQNw5wDUKwbRh3eK0p3fAhi/XmRhO/UrsaA7UdfG2c1OfT/M MBz2ZWbNHI8va4NnW0cUZu4pAGFoc7p8LD2IvMsxOCKi8stfBwOZLZoQjaGKoeiOvqFc EtiQ== X-Gm-Message-State: ALoCoQnm7jGj9uE+XoREGu/vbUGXFp4HL7cNxxml6jzRzkhcUoezII2eX4q6FKzP0GrYE+wIO6AZ MIME-Version: 1.0 X-Received: by 10.68.180.162 with SMTP id dp2mr4353897pbc.5.1383128546677; Wed, 30 Oct 2013 03:22:26 -0700 (PDT) Received: by 10.68.221.226 with HTTP; Wed, 30 Oct 2013 03:22:26 -0700 (PDT) In-Reply-To: References: <935B7003-F750-42E7-9100-C27028B6A111@gmail.com> Date: Wed, 30 Oct 2013 17:22:26 +0700 Message-ID: Subject: Re: SPI device on Raspberry PI From: Alie Tan To: fabiodive Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:22:33 -0000 Its already commited to the HEAD http://svnweb.freebsd.org/base?view=revision&revision=257062 On Wed, Oct 30, 2013 at 5:12 PM, fabiodive wrote: > 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, > > > > 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 = "flash,mx25l"; > > spi-chipselect = <0>; > > }; > > > > enc28j600 { > > compatible = "ethernet,enc28j60"; > > spi-chipselect = <1>; > > }; > > }; > > > > Thanks for your feedback. > > > > Luiz > > _______________________________________________ > 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" >