From owner-freebsd-embedded@FreeBSD.ORG Wed Apr 29 19:01:18 2015 Return-Path: Delivered-To: freebsd-embedded@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 E7741EFC; Wed, 29 Apr 2015 19:01:18 +0000 (UTC) Received: from relay.mailchannels.net (aso-006-i440.relay.mailchannels.net [23.91.64.121]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1CF18EA; Wed, 29 Apr 2015 19:01:17 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (ip-10-213-14-133.us-west-2.compute.internal [10.213.14.133]) by relay.mailchannels.net (Postfix) with ESMTPA id 44C80A11CB; Wed, 29 Apr 2015 18:42:48 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (smtp2.ore.mailhop.org [10.45.8.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Wed, 29 Apr 2015 18:42:48 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1430332968396:2823298307 X-MC-Ingress-Time: 1430332968396 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YnWwY-0005Fs-Rl; Wed, 29 Apr 2015 18:42:46 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t3TIgf8l049809; Wed, 29 Apr 2015 12:42:41 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1/Y7DgKmMAE5ZuSq6IYmBXt Message-ID: <1430332961.1157.88.camel@freebsd.org> Subject: Re: SPI User Space Interface From: Ian Lepore To: Adrian Chadd Cc: Tom Jones , "freebsd-embedded@freebsd.org" Date: Wed, 29 Apr 2015 12:42:41 -0600 In-Reply-To: References: <20150426203344.GA27490@gmail.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 19:01:19 -0000 On Sun, 2015-04-26 at 20:06 -0700, Adrian Chadd wrote: > Hey, this is cool! > > What can we do to spibus to make it better? > It's been a while since I've worked with SPI on freebsd, but I remember that it needs support for bus speed and SPI mode (clock polarity and phase) on a per-chipsel basis. They need to be in the request struct sent down to the controller driver, because it's the device(-on-the-bus) driver that knows the max speed for the device and the mode it expects (although in my experience everything seems to use mode 3). -- Ian