I2C on mpc8248 / device tree

Alan Bennett embedded at akb.net
Wed Nov 14 10:39:05 EST 2007


I've got four devices on i2c that I need to read.  Simple thermal and
voltage monitors.  I2c works fine in uboot, and now I'm trying to get things
to work in linux.

In the kernel .config I enable
  I2C
and
  I2C_MPC

During the platform boot code:
I init the IO ports for i2c, (same as ep8248e code)
    {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
    {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY},

__Do I need to configure a brg for the i2c along with the other devices ?
i.e. cpm2_clk_setup ?


Next, I'm sure my device tree needs work, but my first stab adds i2c onto
the SOC @ 11860  (immr+11860= I2c mode register) and interrupt 1.
       soc at e0000000 {
               ...
               cpm at 119c0 {
               ...
               i2c at 11860 {
                   device_type = "i2c";
                   compatible = "fsl-i2c";
                   reg = <11860 18>;
                   interrupts = <1 3>;
                   interrupt-parent = <&PIC>;
               };

After Cleaning up these routines and descriptions, would I be expected to
continue using the /dev/i2c- entries?

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20071113/71780b70/attachment.htm>


More information about the Linuxppc-dev mailing list