[U-Boot-Users] soft_i2c and ds1307 with tqm823l

Seb James seb at peak.uklinux.net
Mon Jun 30 14:23:38 CEST 2003


I'm working on getting a ds1307 realtime clock working with a tqm823l as
a new user to u-boot (I've never compiled u-boot or ppcboot before).

I'd like to make some improvements to the README which is already
excellent but seems to have a couple of omissions, particularly
regarding the configuration of u-boot to work with i2c.

Firstly, the ds1307 code compiles fine, but of course it needs the i2c
code to be compiled alongside it. Although this is obvious, the newcomer
to u-boot doesn't (i.e. I didn't) know that calling for ds1307.c to be
compiled doesn't in itself cause the i2c code to be compiled, so a note
to this effect in the realtime clock section of the README would be a
helpful addition.

Now, in trying to get I2C properly compiled, I find quite a lot of
information about I2C setup in the README.

Here's a line from the README (starting at line 907):

"If this is selected, either CONFIG_HARD_I2C or CONFIG_SOFT_I2C must
be defined	to include the appropriate I2C driver."

No mention is made of what values the 'appropriate driver' might have or
where to look for them. I assume you might define something like this:

#define CONFIG_HARD_I2C mpc8xx

But I can't see what you'd write for CONFIG_SOFT_I2C. A bit more
clarification here would be useful.

There are a number of extra defines related to CONFIG_SOFT_I2C, such as
I2C_INIT, I2C_PORT, etc. It's not too clear what these should be set to.
The diff between my TQM823L.h and the original TQM823L.h is (also
attached as changes.diff):

Some investigation has shown that I need to set I2C_SDA and I2C_SCL to
the name of the correct functions.  What are the possibilities for
these? The same seems to be true of I2C_READ.

What are the units for I2C_DELAY? I'm assuming seconds. Why is there
both I2C_DELAY and CFG_I2C_SPEED to configure? These seem to configure
the same thing  - the speed of the I2C clock line.

Ok, I think that should be enough for now,

best regards,

Seb James.

More information about the U-Boot mailing list