public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/2] i2c:soft:multi: Support for multiple soft I2C buses at Samsung boards
Date: Thu, 06 Sep 2012 10:12:34 +0200	[thread overview]
Message-ID: <20120906101234.7f7f5d91@amdc308.digital.local> (raw)
In-Reply-To: <50481D3A.7070001@denx.de>

Hi Heiko,

Thanks for comments.

> Hello Lukasz,
> 
> On 05.09.2012 11:15, Lukasz Majewski wrote:
> > Support for multiple soft I2C buses.
> >
> > Multibus I2C support is achieved by defining get_multi_{sda|scl}_pin
> > functions to switch between multiple "soft" I2C buses.
> >
> > Common definition of I2C_X I2C buses is provided at<i2c.h>.
> >
> > TEST HW:
> >       Samsung's Exynos4210 evt.0.1 - Trats development board
> >
> > Signed-off-by: Lukasz Majewski<l.majewski@samsung.com>
> > Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
> > Cc: Heiko Schocher<hs@denx.de>
> > Cc: Minkyu Kang<mk7.kang@samsung.com>
> >
> > ---
> > Changes for v2:
> > - Common Samsung code has been put to
> > board/samsung/common/multi_i2c.c file
> > - I2C_{4|5} have been renamed to I2C_{0|1}
> > - *soft_i2c_name[] table has been removed
> > Changes for v3:
> > - None
> > Changes for v4:
> > - Common definitions of available I2C buses are now defined
> > at<i2c.h>
> > - Compatibility layer (I2C_0) has been added temporarily to not
> > break the Trats I2C communication with PMIC. It will be removed
> > when redesigned PMIC will be posted
> > ---
> >   board/samsung/common/Makefile    |   43 +++++++++++++++++++++++++
> >   board/samsung/common/multi_i2c.c |   65
> > ++++++++++++++++++++++++++++++++++++++
> > include/i2c.h                    |   12 +++++++ 3 files changed,
> > 120 insertions(+), 0 deletions(-) create mode 100644
> > board/samsung/common/Makefile create mode 100644
> > board/samsung/common/multi_i2c.c
> >
> [...]
> > +#########################################################################
> > diff --git a/board/samsung/common/multi_i2c.c
> > b/board/samsung/common/multi_i2c.c new file mode 100644
> > index 0000000..d6c3d37
> > --- /dev/null
> > +++ b/board/samsung/common/multi_i2c.c
> > @@ -0,0 +1,65 @@
> [...]
> > +/* Handle multiple I2C buses instances */
> > +int get_multi_scl_pin(void)
> > +{
> > +	unsigned int bus = I2C_GET_BUS();
> > +
> > +	switch (bus) {
> > +	case I2C_0: /* I2C_0 definition - compatibility layer */
> > +	case I2C_5:
> 
> Is this correct, that you want to use 2 i2c busses on the same pin?

Yes, this is correct.

Let me share with you the "master" plan for this.
The I2C_0 is needed to keep the TRATS working with current PMIC
implementation. 

I'm working on redesign of current PMIC implementation to support other
devices responsible for power management (e.g. fuel gauge, charger,
PMIC), which in case of TRATS are connected via multiple I2C buses
(I2C_5 and I2C_9).

The I2C_0 case is for preserving correct operation of TRATS board until
PMIC 2.0 wont be introduced to u-boot mailing list. 

It will be removed just after PMIC 2.0 acceptance.

I hope, that I've expressed my intentions clearly.

> 
> Beside of that, you get my:
> 
> Acked-by: Heiko Schocher <hs@denx.de>
> 
> bye,
> Heiko

-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center | Linux Platform Group

  reply	other threads:[~2012-09-06  8:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28  8:33 [U-Boot] [PATCH 0/2] i2c:soft:multi: Support for multiple soft I2C buses at TRATS Lukasz Majewski
2012-08-28  8:33 ` [U-Boot] [PATCH 1/2] i2c:soft:multi: Support for multiple soft I2C buses Lukasz Majewski
2012-08-28  9:00   ` Heiko Schocher
2012-08-28 10:40     ` Lukasz Majewski
2012-08-28 11:29       ` Heiko Schocher
2012-08-28 12:12         ` Lukasz Majewski
2012-08-28 12:25           ` Heiko Schocher
2012-08-28 13:56             ` Lukasz Majewski
2012-08-28  8:33 ` [U-Boot] [PATCH 2/2] i2c:soft:multi: Enable soft I2C multibus at Trats development board Lukasz Majewski
2012-08-29  9:58 ` [U-Boot] [PATCH v2 0/2] i2c:soft:multi: Support for multiple soft I2C buses at TRATS Lukasz Majewski
2012-08-29  9:58   ` [U-Boot] [PATCH v2 1/2] i2c:soft:multi: Support for multiple soft I2C buses at Samsung boards Lukasz Majewski
2012-08-29  9:58   ` [U-Boot] [PATCH v2 2/2] i2c:soft:multi: Enable soft I2C multibus at Trats development board Lukasz Majewski
2012-09-03 15:58 ` [U-Boot] [PATCH v3 0/2] i2c:soft:multi: Support for multiple soft I2C buses at TRATS Lukasz Majewski
2012-09-03 15:58   ` [U-Boot] [PATCH v3 1/2] i2c:soft:multi: Support for multiple soft I2C buses at Samsung boards Lukasz Majewski
2012-09-04  8:23     ` Lukasz Majewski
2012-09-03 15:58   ` [U-Boot] [PATCH v3 2/2] i2c:soft:multi: Enable soft I2C multibus at Trats development board Lukasz Majewski
2012-09-05  9:15 ` [U-Boot] [PATCH v4 0/2] i2c:soft:multi: Support for multiple soft I2C buses at TRATS Lukasz Majewski
2012-09-05  9:15   ` [U-Boot] [PATCH v4 1/2] i2c:soft:multi: Support for multiple soft I2C buses at Samsung boards Lukasz Majewski
2012-09-06  3:49     ` Heiko Schocher
2012-09-06  8:12       ` Lukasz Majewski [this message]
2012-09-12  7:06     ` Lukasz Majewski
2012-09-12  7:43       ` Minkyu Kang
2012-09-05  9:15   ` [U-Boot] [PATCH v4 2/2] i2c:soft:multi: Enable soft I2C multibus at Trats development board Lukasz Majewski
2012-09-06  3:50     ` Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120906101234.7f7f5d91@amdc308.digital.local \
    --to=l.majewski@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox