TL-WR1043: switch
Stefan Bethke
stb at lassitu.de
Sat Dec 3 13:48:35 UTC 2011
Am 03.12.2011 um 01:36 schrieb Adrian Chadd:
> On 3 December 2011 08:02, Stefan Bethke <stb at lassitu.de> wrote:
>> I see two ways to make iicbus play with the Realtek "System Management Interface" protocol: either make the patch I suggested optional via a hint, or let a slave device somehow indicate that it wants the relaxed semantics. The hint is likely the option that is easier to implement. Writing a new go-between bus driver is likely too complicated for me to accomplish right now.
>
> I think exposing it via a quirk somehow, so the iicbus code knows that
> for this particular child device, the relaxed semantics are required.
>
> That way an i2c eeprom will be fine using the existing code and
> semantics; the switch PHY child will use your relaxed semantics.
> As there's a few more realtek switch PHYs to write code for, I can
> only see this as being needed. :)
>
> Think you could code that up for review?
Attached, as well as at http://www.lassitu.de/freebsd/iicbus-for-realtek.patch
The relevant hints are:
# GPIO
hint.gpio.0.at="apb0"
hint.gpio.0.maddr=0x18040000
hint.gpio.0.msize=0x10000
hint.gpio.0.irq=2
hint.gpio.0.pins="1=o:usb,2=o:sys,3=i:reset,5=o:qss,7=i:qss,9=o:wlan,18=i:sda,19=i:scl"
hint.iicbus.0.strict=0
and you need this in your kernel config:
device gpio
device gpioiic
device iicbb
device iicbus
device iic
Stefan
--
Stefan Bethke <stb at lassitu.de> Fon +49 151 14070811
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iicbus-for-realtek.patch
Type: application/octet-stream
Size: 8128 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-embedded/attachments/20111203/2be18e4f/iicbus-for-realtek.obj
More information about the freebsd-embedded
mailing list