public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Support for several I2C interfaces in the same board.
@ 2009-10-29  8:45 javier Martin
  2009-10-29  8:53 ` Heiko Schocher
  0 siblings, 1 reply; 6+ messages in thread
From: javier Martin @ 2009-10-29  8:45 UTC (permalink / raw)
  To: u-boot

I read a discussion about this subject in the past but it didn't
arrive to a conclusion. What would be necessary for supporting two I2C
interfaces? Maybe an i2c command that supports changing active
interface or something similar?


-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com

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

* [U-Boot] Support for several I2C interfaces in the same board.
  2009-10-29  8:45 [U-Boot] Support for several I2C interfaces in the same board javier Martin
@ 2009-10-29  8:53 ` Heiko Schocher
  2009-10-29  9:38   ` javier Martin
  0 siblings, 1 reply; 6+ messages in thread
From: Heiko Schocher @ 2009-10-29  8:53 UTC (permalink / raw)
  To: u-boot

Hello javier,

javier Martin wrote:
> I read a discussion about this subject in the past but it didn't
> arrive to a conclusion. What would be necessary for supporting two I2C
> interfaces? Maybe an i2c command that supports changing active
> interface or something similar?

What do you mean with two I2C interfaces? If you mean 2 with one
hardware interface (for example fsl_i2c.c) this is possible with
actual code. Search for i2c_set_bus_num(), i2c_get_bus_num() ...

If you need two different hardware interfaces, there
is an approach, see:

http://git.denx.de/?p=u-boot/u-boot-i2c.git;a=shortlog;h=refs/heads/multibus_v2

I ported (hopefully all) hardware i2c drivers to this new approach,
but didn;t find the time to test this again from scratch, I just
hold it in sync with mainline, and if I find time for testing it
again and it works, I vote for including it in mainline ...

But testers are welcome :-)

bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] Support for several I2C interfaces in the same board.
  2009-10-29  8:53 ` Heiko Schocher
@ 2009-10-29  9:38   ` javier Martin
  2009-10-29  9:45     ` Heiko Schocher
  0 siblings, 1 reply; 6+ messages in thread
From: javier Martin @ 2009-10-29  9:38 UTC (permalink / raw)
  To: u-boot

> If you need two different hardware interfaces, there
> is an approach, see:
>
> http://git.denx.de/?p=u-boot/u-boot-i2c.git;a=shortlog;h=refs/heads/multibus_v2
>
> I ported (hopefully all) hardware i2c drivers to this new approach,
> but didn;t find the time to test this again from scratch, I just
> hold it in sync with mainline, and if I find time for testing it
> again and it works, I vote for including it in mainline ...

Thank you this is what I meant.

> But testers are welcome :-)

Sure, count on me for that; as soon as I have finished i.mx27 i2c
driver I will integrate it in your tree and test it.

-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com

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

* [U-Boot] Support for several I2C interfaces in the same board.
  2009-10-29  9:38   ` javier Martin
@ 2009-10-29  9:45     ` Heiko Schocher
  2009-10-29  9:48       ` javier Martin
  0 siblings, 1 reply; 6+ messages in thread
From: Heiko Schocher @ 2009-10-29  9:45 UTC (permalink / raw)
  To: u-boot

Hello javier,

javier Martin wrote:
>> If you need two different hardware interfaces, there
>> is an approach, see:
>>
>> http://git.denx.de/?p=u-boot/u-boot-i2c.git;a=shortlog;h=refs/heads/multibus_v2
>>
>> I ported (hopefully all) hardware i2c drivers to this new approach,
>> but didn;t find the time to test this again from scratch, I just
>> hold it in sync with mainline, and if I find time for testing it
>> again and it works, I vote for including it in mainline ...
> 
> Thank you this is what I meant.
> 
>> But testers are welcome :-)
> 
> Sure, count on me for that; as soon as I have finished i.mx27 i2c
> driver I will integrate it in your tree and test it.

Great!

Hmm.. there is a driver/i2c/mxc_i2c.c driver for i.mx31, maybe the
i.mx27 is similiar to this? Can you check this?

bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] Support for several I2C interfaces in the same board.
  2009-10-29  9:45     ` Heiko Schocher
@ 2009-10-29  9:48       ` javier Martin
  2009-10-29  9:56         ` Heiko Schocher
  0 siblings, 1 reply; 6+ messages in thread
From: javier Martin @ 2009-10-29  9:48 UTC (permalink / raw)
  To: u-boot

> Hmm.. there is a driver/i2c/mxc_i2c.c driver for i.mx31, maybe the
> i.mx27 is similiar to this? Can you check this?

Yes, I2C registers are the same in both chips. The only things that I
must change are:
- i2c clock management.
- i2c base addresses.

My current approach is trying to make this driver work for imx27/imx31
using CONFIG_MX27/CONFIG_MX31 defines.
I don't know if you have a better suggestion for this.

Thank you.
-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com

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

* [U-Boot] Support for several I2C interfaces in the same board.
  2009-10-29  9:48       ` javier Martin
@ 2009-10-29  9:56         ` Heiko Schocher
  0 siblings, 0 replies; 6+ messages in thread
From: Heiko Schocher @ 2009-10-29  9:56 UTC (permalink / raw)
  To: u-boot

Hello javier,

javier Martin wrote:
>> Hmm.. there is a driver/i2c/mxc_i2c.c driver for i.mx31, maybe the
>> i.mx27 is similiar to this? Can you check this?
> 
> Yes, I2C registers are the same in both chips. The only things that I
> must change are:
> - i2c clock management.
> - i2c base addresses.

Ok.

> My current approach is trying to make this driver work for imx27/imx31
> using CONFIG_MX27/CONFIG_MX31 defines.
> I don't know if you have a better suggestion for this.

Sounds good to me. Maybe you talk with Sascha Hauer <s.hauer@pengutronix.de>
added to cc, as he is the original writer of this code.

bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

end of thread, other threads:[~2009-10-29  9:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-29  8:45 [U-Boot] Support for several I2C interfaces in the same board javier Martin
2009-10-29  8:53 ` Heiko Schocher
2009-10-29  9:38   ` javier Martin
2009-10-29  9:45     ` Heiko Schocher
2009-10-29  9:48       ` javier Martin
2009-10-29  9:56         ` Heiko Schocher

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