From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 22:23:27 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 889BA106564A for ; Mon, 28 Nov 2011 22:23:27 +0000 (UTC) (envelope-from mbalmer@NetBSD.org) Received: from sleipnir.msys.ch (unknown [IPv6:2001:4060:c0de:f000::3]) by mx1.freebsd.org (Postfix) with ESMTP id 213308FC17 for ; Mon, 28 Nov 2011 22:23:26 +0000 (UTC) Received: from mail.msys.ch (smtp.msys.ch [157.161.101.10]) by sleipnir.msys.ch (8.14.3/8.14.3) with ESMTP id pASMNOEN006753 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 28 Nov 2011 23:23:25 +0100 (CET) Received: from macbook.vnode.ch (macbook.vnode.ch [62.12.170.149] (may be forged)) (authenticated bits=0) by mail.msys.ch (8.14.3/8.14.1) with ESMTP id pASMNNO9011438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 28 Nov 2011 23:23:24 +0100 (CET) Message-ID: <4ED409DB.3000401@NetBSD.org> Date: Mon, 28 Nov 2011 23:23:23 +0100 From: Marc Balmer Organization: The NetBSD Foundation User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-embedded@freebsd.org References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> In-Reply-To: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: AWL,RCVD_IN_DNSWL_LOW Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 22:23:27 -0000 Am 28.11.11 23:18, schrieb Stefan Bethke: > So with the GPIOs working, the next step would be to attach a bit-banging I2C device to GPIO 18 and 19. My kernel foo is probably not up to creating the appropriate newbus attachment myself. Anybody want to give me a hint? I'd start by copying lpbb, replacing the parallel port code with appropirate gpio calls. > > I haven't taken a detailed look at the OpenWrt code, but the datasheet for the RTL8366 can be googled, including a full register map and a description of the VLAN configuration (which I'm most interested in). With a working I2C bus, that shouldn't be too hard, I'd think. Maybe take a look at NetBSD -current. It has all that you want. It is a pity FreeBSD did not take theNetBSD GPIO framework, but shoehorned its own (although they cleary took code and concepts from them).