Q: define i2c nodes in device tree?
Albrecht Dreß
albrecht.dress at arcor.de
Fri Mar 27 05:44:26 EST 2009
Hi all,
I have some probably dumb questions regarding the definition of i2c
slaves in the of device tree file...
My test system is a lite5200b board to which I attached two pca8575 io
expander chips at i2c addresses 0x20 and 0x21. Using the stock kernel
2.6.29, I added the driver from the GPIO section, but I couldn't figure
out how to add them to the dts file. I tried e.g.
<snip>
i2c at 3d40 {
[...]
compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
[...]
gpio at 20 {
compatible = "pcf857x";
device_type = "gpio";
reg = <0x20 1>;
};
};
</snip>
and some other like "gpio-controller" instead of "gpio" but (surprise)
it doesn't work - dmesg says that the driver is registered, but nothing
else shows up. Unfortunately, I couldn't find documentation about the
naming conventions of the i2c child nodes.
As I actually want to use the chips as parallel io (not separate
gpio's) and thus would need to write my own driver I wonder if I really
have to declare it in the device tree? Would the simple way -just load
the kernel module as with arm/intel- also work? Would it be possible
to use additional resources like an interrupt pin on the '5200 without
the device tree?
Any information about a proper approach would be really helpful!
Thanks in advance, Albrecht.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090326/88a27f5e/attachment.pgp>
More information about the Linuxppc-dev
mailing list