[U-Boot-Users] I2C scanning

Yasothabalan Ramaswamy-TLS,Chennai yasothabalanr at hcl.in
Tue Oct 23 14:02:30 CEST 2007


Thanks Ben.

Can you please help how to proceed with fsl_i2c.c driver file?
I have defined CFG_I2C_OFFSET 3D00 &
		   CFG_I2C2_OFFSET 3D40
When I give command i2c dev 0 I am getting the response as
=> i2c dev 0
Setting bus to 0

But when I give command as follows, I get nothing

=> i2c probe

Can you please help me?

Regards,
Yasotha Balan R

 

-----Original Message-----
From: Ben Warren [mailto:bwarren at qstreams.com] 
Sent: Monday, October 22, 2007 8:27 PM
To: Yasothabalan Ramaswamy-TLS,Chennai
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] I2C scanning

Yasothabalan,

Yasothabalan Ramaswamy-TLS,Chennai wrote:
>
> Hi all,
>
>  
>
> I am using MPC5200B CPU.
>
>  
>
> I am using both the I2C buses present as defined below,
>
>  
>
> #define MPC5XXX_I2C1              (CFG_MBAR + 0x3D00)
>
> #define MPC5XXX_I2C2              (CFG_MBAR + 0x3D40)
>
>  
>
> Is it possible to scan both the buses in the run time and do 
> read/write operation?
>
>  
>
> I am here able to scan only one bus.
>
>  
>
> How can I fix this issue?
>
>  
>
I don't know anything about this CPU, but the following code in 
cpu/mpc5xxx/i2c.c makes me think you can't use both I2C buses on this
chip:

#if (CFG_I2C_MODULE == 2)
#define I2C_BASE    MPC5XXX_I2C2
#elif (CFG_I2C_MODULE == 1)
#define I2C_BASE    MPC5XXX_I2C1
#else
#error CFG_I2C_MODULE is not properly configured
#endif

If, however, this chip shares the same I2C controller  as the MPC8xxx 
chips (I have no idea if it does or doesn't), with a little Makefile 
magic you could use the fsl_i2c.c driver, which supports multiple buses.

regards,
Ben




DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------




More information about the U-Boot mailing list