From owner-freebsd-arm@FreeBSD.ORG Mon Oct 29 13:29:15 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8AC550D; Mon, 29 Oct 2012 13:29:15 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id 2608B8FC08; Mon, 29 Oct 2012 13:29:14 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 340370802; Mon, 29 Oct 2012 14:24:05 +0100 From: Hans Petter Selasky To: freebsd-arm@freebsd.org Subject: Re: Raspberry PI gets USB support [FreeBSD 10 current] Date: Mon, 29 Oct 2012 14:25:45 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <201209101654.00891.hselasky@c2i.net> <50890B5C.2080406@freebsd.org> <20121025201251.7F5E3B827@mail.bitblocks.com> In-Reply-To: <20121025201251.7F5E3B827@mail.bitblocks.com> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210291425.45120.hselasky@c2i.net> Cc: Bakul Shah , Alexander Yerenkow 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: Mon, 29 Oct 2012 13:29:15 -0000 On Thursday 25 October 2012 22:12:51 Bakul Shah wrote: > On Thu, 25 Oct 2012 11:50:20 +0200 Stefan Esser wrote: > > There is the link to a message by Greg Kroah-Hartman, where he > > declares the Broadcom USB hardware "broken", at least in the sense > > that no information exists for free software writers to let them > > make USB work well. There also is mention of a Plan9 driver for > > the USB on RPI, we might want to check whether it offers any insight. > > Since all nearly all peripherals including Ethernet are connected to > > USB on the RPI, good USB support is very important to use the RPI > > as more than a toy. > > The Plan9 USB driver is far simpler than the Linux driver (but > not as functional. The only publicly available "documentation" > is the Linux driver). More work remains but I can already > connect usb keyboard, mouse, access ethernet etc. I haven't > tried accessing a usb disk since the emmc driver works so well > (example: the plan9 kernel compiles in a minute). Credit for > this work to Richard Miller. > > Raspi related code is here: > > http://plan9.bell-labs.com/sources/contrib/miller/9/rpi/ > > You will need files in other directories to make sense of this. > > The entire plan9 src tree (minus the dir above) is @ > http://plan9.bell-labs.com/sources/extra/plan9.src.bz2 > > You can browse @ > http://plan9.bell-labs.com/sources/plan9/sys/src/9/ > http://plan9.bell-labs.com/sources/plan9/sys/src/cmd/usb > etc. > > If you are looking at just the low level usb code, you won't > need much plan9 knowledge. Hi, The DWC OTG is used in multiple chipsets and documentation is available indirectly through various datasheets describing SOCs where this core is used. Also at the synopsys.com site it is possible to register to get more documentation. http://www.synopsys.com/dw/ipdir.php?ds=dwc_usb_2_0_digital_controllers If you register at Synopsys.com you can get more info: Google "synopsys programmers guide DWC OTG" The PIO HOST mode support which is supported by the FreeBSD's DWC OTG driver has been created without the help of the data sheet. I've used the register descriptions to figure out the workings. There are not so many valid combinations and most of the programming can be guessed for those familiar to low level USB signalling. --HPS