From owner-freebsd-net@FreeBSD.ORG Fri Oct 7 09:58:33 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AF741065670 for ; Fri, 7 Oct 2011 09:58:33 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id E77BC8FC13 for ; Fri, 7 Oct 2011 09:58:32 +0000 (UTC) Received: by wwe3 with SMTP id 3so5293627wwe.31 for ; Fri, 07 Oct 2011 02:58:31 -0700 (PDT) Received: by 10.227.129.5 with SMTP id m5mr2261172wbs.67.1317980088065; Fri, 07 Oct 2011 02:34:48 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.227.199.140 with HTTP; Fri, 7 Oct 2011 02:34:28 -0700 (PDT) In-Reply-To: References: From: Juli Mallett Date: Fri, 7 Oct 2011 02:34:28 -0700 X-Google-Sender-Auth: _wW4PfxXChyd3KAmZEpI5AqHMIE Message-ID: To: dave jones Content-Type: text/plain; charset=UTF-8 Cc: freebsd-net@freebsd.org Subject: Re: Question about GPIO bitbang MII X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2011 09:58:33 -0000 On Thu, Oct 6, 2011 at 19:34, dave jones wrote: > Hi, > > Does FreeBSD have gpio bitbang api for MII? If not, any driver in tree using > gpio-bitbang mii that I can refer to? Thanks. > It seems like OpenBSD, NetBSD and Linux have added support to gpio bitbang mii, > and it's useful for porting embedded devices. FreeBSD has a GPIO API and MACs can use whatever mechanism they like to attach MII (or similar, as in the case of devices like switches that sort of use MDIO but aren't exactly like Ethernet PHYs on an MII bus.) Or do you not want to do this within a driver for a particular MAC, but just make the MII bus available for poking and prodding to userland, backed by GPIO? Can you give an example of an OpenBSD driver that uses the API you're talking about? I've worked with some drivers for FreeBSD which have used GPIO bit-banging to expose an MII bus, but adding the abstraction of the GPIO layer hasn't typically been worthwhile for those as they're an SoC with dedicated GPIO for networking devices or similar. Thanks, Juli.