mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Early access I2C and/or clock for iMX6?
@ 2016-06-20 19:34 Michael D. Burkey
  2016-06-21  6:32 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Michael D. Burkey @ 2016-06-20 19:34 UTC (permalink / raw)
  To: barebox

In a quest to support the new Variscite SOM's EEPROM based DDR
configuration, I am continuing to try to get all the pieces together.

Now that I have the SOM actually booting from IRAM, I am actually
trying to get the "real" DDR configuration values out of the EEPROM on
the SOM.

Which brings me to the next hurdle -- getting early I2C access up and running.

Thanks to some pointers from Sascha, I have been working with the
fsl_i2c.c code that had already been used for this task on the mpc85xx
PPC platform, and while the I2C controller is essentially the same,
the clock tree  setup, etc. for the iMX6 is quite different.

I also have the fsl_i2c.c implementation that Variscite has used in
their custom U-Boot and have been looking at it as well -- but it has
been changed pretty heavily since U-Boot and barebox diverged.
Additionally, I'm not certain that their modified version is actually
configuring the I2C clock timing correctly anyway.

Finally, I have also been looking at the code in i2c-imx.c to see
what, if any, of it could be used, but, unless I am mistaken, it
appears that almost everything it depends upon would not yet be
available this early in the boot process.

So, before I go to a lot more effort, has anyone else created an early
access I2C driver for the iMX6, or simple early access clock functions
for it (e.g. get_ticks(), get_timebase_clock(), etc.)?

I figured it would be worth asking to see if anyone else had ever
already dealt with this (before I spent a lot of time potentially
recreating something).

Thanks in advance,
Michael Burkey

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Early access I2C and/or clock for iMX6?
@ 2016-06-20 21:02 Michael D. Burkey
  0 siblings, 0 replies; 3+ messages in thread
From: Michael D. Burkey @ 2016-06-20 21:02 UTC (permalink / raw)
  To: barebox

The more I look into the I2C drivers, the less convinced I am that
fsl_i2c is where I need to be looking.

Additionally, although Variscite had included the fsl_i2c.h header and
had actually referenced fsl_i2c in some documentation and comments,
the more I dig through their code, it is looking like the only I2C
routines that are even getting compiled in their U-Boot implementation
are those in mxc_i2c.c -- which actually look to be a fairly clean
implementation for the i.MX series of parts that doesn't appear to
require much additional support code along with it (other than, once
again, some of the clock configuration routine). It appears to be much
more simplistic and bare metal than the i2c-imx.c that is currently
used in barebox.

Since the mxc_i2c.c driver in U-Boot was written also written by
Sascha Hauer, I'm sort of throwing this one out as a question to
Sascha or anyone else familiar with this code:

For an early access I2C driver on the i.MX6, do you think it would
make more sense to try starting from the fsl_i2c.c code under barebox
or from the original U-Boot mxc_i2c.c code?

I'm beginning to suspect the latter may actually be easier to start
from (and it would already match the function calls that Variscite is
using in the code I am transplanting from their U-Boot tree).

Thanks again!
Michael Burkey

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-21  6:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20 19:34 Early access I2C and/or clock for iMX6? Michael D. Burkey
2016-06-21  6:32 ` Sascha Hauer
2016-06-20 21:02 Michael D. Burkey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox