TQM5200 I2C Second bus

Jani.Sarkijarvi at elektrobit.com Jani.Sarkijarvi at elektrobit.com
Fri Sep 19 20:25:52 EST 2008


Hi,

I'm using TQM5200 (MPC5200) chip with linux-2.6-denx. Problem is to get second I2c bus to work (/dev/i2c-0) . /dev/i2c-1 seems to be internal bus and I can read ex. lm75 temperature sensor, also I can see traffic in oscilloscope (only error is "I2C: No RXAK", but it seems to be working). My .dts setup is:


 i2c at 3d00 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "fsl,mpc5200-i2c","fsl-i2c";
                        reg = <0x3d00 0x40>; // mapped to /dev/i2c-0
                        cell-index = <0>;
                        interrupts = <2 16 0>; //neather <2 15 0> is not working says: I2C: MAL
                        interrupt-parent = <&mpc5200_pic>;
                        fsl5200-clocking;

                };

                i2c at 3d40 {
                        #address-cells = <1>;
                        #size-cells = <0>; // mapped to /dev/i2c-1
                        compatible = "fsl,mpc5200-i2c","fsl-i2c";
                        reg = <0x3d40 0x40>;
                        cell-index = <1>;
                        interrupts = <2 16 0>;
                        interrupt-parent = <&mpc5200_pic>;
                        fsl5200-clocking;
                        rtc at 68 {
                                device_type = "rtc";
                                compatible = "dallas,ds1307";
                                reg = <0x68>;
                        };

                };

And kernel says in boot:
[    1.270973] i2c /dev entries driver
[    1.275664] i2c-core: driver [dev_driver] registered
[    1.276395] i2c-adapter i2c-0: adapter [MPC adapter] registered
[    1.277066] i2c-dev: adapter [MPC adapter] registered as minor 0
[    1.277802] i2c-adapter i2c-1: adapter [MPC adapter] registered
[    1.277975] i2c 1-0068: uevent
[    1.278415] i2c-adapter i2c-1: client [ds1307] registered with bus id 1-0068
[    1.279042] i2c-dev: adapter [MPC adapter] registered as minor 1


And:
# ls -la /dev/i2c-*
crwxrwxrwx  1 root root 89, 0 Aug 13  2008 /dev/i2c-0
crwxrwxrwx  1 root root 89, 1 Aug 14  2008 /dev/i2c-1
#

If I try read something from /dev/i2c-0, it says:
# dmesg
[ 2628.107343] i2c-adapter i2c-0: ioctl, cmd=0x703, arg=0x01
[ 2628.107880] i2c-dev: i2c-0 reading 2 bytes.
[ 2628.107934] i2c-adapter i2c-0: master_xfer[0] R, addr=0x01, len=2
[ 2628.107956] Doing read 2 bytes to 0x01 - 1 of 1 messages
[ 2629.105411] I2C: wait timeout

Any ideas?

Best Regards, 
Jani Särkijärvi




----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20080919/80351749/attachment-0001.htm>


More information about the Linuxppc-embedded mailing list