Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [thorpej-i2c-spi-conf] src/sys/arch/macppc/dev
Module Name: src
Committed By: thorpej
Date: Sat May 8 21:58:12 UTC 2021
Modified Files:
src/sys/arch/macppc/dev [thorpej-i2c-spi-conf]: ki2c.c ki2cvar.h
Log Message:
Adapt the Keywest i2c controller driver to the new i2c device enumeration
mechanism. We need to provide our own enumeration callback because these
controllers do not use the standard OpenFirmware bindings.
The Keywest controller supports 2 physical i2c busses on a single controller,
so we logically split it up that way now, rather than encoding the channel in
in the i2c address as was done previously.
Different systems have different I2C device tree topologies.
Some systems use a scheme like this:
/u3@0,f8000000/i2c@f8001000/temp-monitor@98
/u3@0,f8000000/i2c@f8001000/fan@15e
Here, we see the channel encoded in bit #8 of the address.
Other systems use a scheme like this:
/ht@0,f2000000/pci@4000,0,0/mac-io@7/i2c@18000/i2c-bus@0
/ht@0,f2000000/pci@4000,0,0/mac-io@7/i2c@18000/i2c-bus@0/codec@8c
/u4@0,f8000000/i2c@f8001000/i2c-bus@1
/u4@0,f8000000/i2c@f8001000/i2c-bus@1/temp-monitor@94
Here, a separate device tree node represents the channel.
Note that in BOTH cases, the I2C address of the devices are
shifted left by 1 (as it would be on the wire to leave room
for the read/write bit).
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.2.1 src/sys/arch/macppc/dev/ki2c.c
cvs rdiff -u -r1.5 -r1.5.20.1 src/sys/arch/macppc/dev/ki2cvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index