TL-WR1043: switch

Stefan Bethke stb at lassitu.de
Tue Nov 29 22:59:10 UTC 2011


Am 28.11.2011 um 23:29 schrieb Stefan Bethke:

> Am 28.11.2011 um 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.
> 
> 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

-- 
Stefan Bethke <stb at lassitu.de>   Fon +49 151 14070811





More information about the freebsd-embedded mailing list