From owner-freebsd-embedded@FreeBSD.ORG Tue Nov 29 22:59:10 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 0C612106564A for ; Tue, 29 Nov 2011 22:59:10 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id C9F358FC1C for ; Tue, 29 Nov 2011 22:59:09 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id B4E3A10B0BA for ; Tue, 29 Nov 2011 23:59:08 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1251.1) From: Stefan Bethke In-Reply-To: <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> Date: Tue, 29 Nov 2011 23:59:08 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1251.1) 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: Tue, 29 Nov 2011 22:59:10 -0000 Am 28.11.2011 um 23:29 schrieb Stefan Bethke: > Am 28.11.2011 um 23:18 schrieb Stefan Bethke: >=20 >> 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. >>=20 >> 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. >=20 > Further looking around, we already have dev/gpio/gpioiic.c. I'll see = if I can get it to attach. I couldn't get iic to work, so I rolled my own userland bitbanging = utility, based roughly on the OpenWrt code (minus some small bugs) and = the datasheet. I can read and write registers, but to my consternation, most of the = functionality (MIB counters, ST controls, etc.) seems to be somehow = disabled or just plain missing. I'll try to get a basic utility up and running to use the basic VLAN = mode (not the table-based mode) tomorrow. Once that's working = suffiently well, I could make it into a stand-alone driver, or see if it = can be integrated into Aleksandrs work. Stefan --=20 Stefan Bethke Fon +49 151 14070811