public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 0/3] i2c: sunxi: Support every i2c controller on each supported platform
Date: Sun, 05 Apr 2015 22:59:40 +0200	[thread overview]
Message-ID: <1428267580.2501.22.camel@collins> (raw)
In-Reply-To: <5520F5E0.80406@redhat.com>

Hi Hans,

Le dimanche 05 avril 2015 ? 10:44 +0200, Hans de Goede a ?crit :
> Hi,
> 
> On 05-04-15 09:51, Paul Kocialkowski wrote:
> > Changes since v2:
> > * I2C/TWI busses enable for Cubietruck as well
> >
> > Changes since v1:
> > * Kconfig option to enable I2C/TWI controllers 1-4 (when applicable)
> > * Following patch to enable exposed busses on a few community-supported
> >    single-board-computers
> >
> > This series adds support for every i2c controller found on
> > sun4i/sun5i/sun6i/sun7i/sun8i platforms and shouldn't break support for Marvell
> > platforms (orion5x, kirkwood, armada xp) the driver was originally written for.
> >
> > Regarding sunxi, I double-checked that this doesn't conflict with
> > VIDEO_LCD_PANEL_I2C.
> >
> > I would be interested in having this tested on sun8i (A23), since I changed TWI0
> > muxing (to PH2-PH3 instead of PB0-PB1), according to the user manual and what
> > is being done on the upstream Linux kernel. I2C was either not working before,
> > or it was being muxed correctly by the bootrom, probably to communicate with the
> > AXP, which luckily made it work in U-Boot too, since the I/O base address was
> > already correct.
> >
> > My use case here is that I'm writing a slave-side bitbang i2c implementation
> > (with an Arduino) for a school project, using a Cubieboard2 as master and
> > U-Boot as POC. However, only TWI1 was available through the expansion pins,
> > hence the need for this series.
> >
> 
> Thanks for your work on this, may I request one more change ? For sunxi I would
> like to also see a CONFIG_I2C0_ENABLE, the reason for this is that on sun6i / sun8i
> we do not really use i2c0 as we use p2wi resp. rsb to talk to the axp pmic there.
> 
> This way we will not end up messing with the muxing of the PH14/15 (sun6i) resp.
> PH2/3 (sun8i) which may be used in some other fashion.
> 
> This also means making a small change to the first patch to also make registering
> of twsi0 #ifdef CONFIG_I2C_MVTWSI_BASE0 .
> 
> Can you please make the default for CONFIG_I2C0_ENABLE y on sun4i / sun5i / sun7i and n
> on others?

Ack that, it makes sense to me.

> Also I'm not entirely convinced that patch 3/3 is a good idea, on the olimex boards
> which have a i2c eeprom enabling the attached i2c controller makes sense, but on the
> other boards the i2c pins are really just gpio pins, any daughter board can be connected
> including one which uses them differently. I believe that in the defconfig the i2c
> controllers should thus be left off. It is after all a default config, users with
> a daughter board which they want to use in u-boot can easily change the config after
> running make foo_defconfig.

I think the right bargain here would be to enable i2c lines that already
have something useful for U-Boot attached (e.g. not an accelerometer
sensor). I concur to your point otherwise.

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150405/dd539239/attachment.sig>

  reply	other threads:[~2015-04-05 20:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-05  7:51 [U-Boot] [PATCH v3 0/3] i2c: sunxi: Support every i2c controller on each supported platform Paul Kocialkowski
2015-04-05  7:51 ` [U-Boot] [PATCH v3 1/3] i2c: mvtwsi: Support for up to 4 different controllers Paul Kocialkowski
2015-04-07  5:24   ` Heiko Schocher
2015-04-07  6:29     ` Hans de Goede
2015-04-07  6:35       ` Paul Kocialkowski
2015-04-05  7:51 ` [U-Boot] [PATCH v3 2/3] sunxi: Complete i2c support for each supported platform Paul Kocialkowski
2015-04-05  7:51 ` [U-Boot] [PATCH v3 3/3] sunxi: I2C/TWI configs for a few single-board-computers Paul Kocialkowski
2015-04-05  8:44 ` [U-Boot] [PATCH v3 0/3] i2c: sunxi: Support every i2c controller on each supported platform Hans de Goede
2015-04-05 20:59   ` Paul Kocialkowski [this message]
2015-04-07  7:51     ` Paul Kocialkowski
2015-04-07  9:09       ` Hans de Goede

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=1428267580.2501.22.camel@collins \
    --to=contact@paulk.fr \
    --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