From: Andrew Jeffery <andrew@aj.id.au>
To: Maxim Sloyko <maxims@google.com>, Joel Stanley <joel@jms.id.au>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH 2/3] aspeed/g5: helper SCU functions for configuring aspeed I2C
Date: Fri, 30 Sep 2016 11:19:07 +0930 [thread overview]
Message-ID: <1475200147.24463.36.camel@aj.id.au> (raw)
In-Reply-To: <CAFR_W8rc=2XkpUwPokx2_00wMnZfxq9VTHTOVrXgJ8r7DkJ=0w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]
On Thu, 2016-09-29 at 11:23 -0700, Maxim Sloyko wrote:
> > > + /* Enable I2C Controllers */
> > > + clrbits_le32(AST_SCU_BASE + AST_SCU_RESET, SCU_RESET_I2C);
> > > +
> > > + if (num < 3) {
> >
> > How do we enable buses number 1 and 2 when AST_SOC_G5 is not set?
> I don't know. My guess is we don't, as in, the pins are always
> assigned these functions. In datasheet these bits in PIN CTRL8
> register are marked as "new in ast2500" and there is no mention of
> sda{1,2},scl{1,2} in ast2500 datasheet.
> Also, this part is basically taken from aspeed's sdk, this is why I
> assume they are always on.
So to clarify, the AST2400 has (SCL1, SDA1) and (SCL2, SDA2) on fixed
function pins: (K21, K22) and (J19, J18) respectively. I don't have the
datasheets for earlier releases of the AST SoCs, so can't speak for
them. The AST2500 has (SCL1, SDA1) and (SCL2, SDA2) on multi-function
pins: (M18, M19) and (M20, P20) respectively.
As an aside: In AST2500 case I2Cs 1 and 2 are only multiplexed with
GPIO and are at a higher priority, so we don't need to flip any other
bits to enable I2C.
Maybe there should be some comments along these given the code looks
odd at first glance?
Cheers,
Andrew
Separately: This code makes me glad I took a data-driven approach for
the Linux pinmux driver (not to say that result is beautiful either,
but I don't want even begin to imagine the maze of conditionals
protecting corner cases).
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-09-30 1:58 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-19 17:26 [PATCH] aspeed/g5: Device Tree for ast2500 and eval board, I2C driver maxims
2016-09-22 18:40 ` Maxim Sloyko
2016-09-23 1:59 ` Joel Stanley
2016-09-27 17:48 ` Maxim Sloyko
2016-09-27 17:43 ` [PATCH 1/3] aspeed/g5: Device Tree for ast2500, copied from openbmc/linux (include file), plus minimal device tree configuration for ast2500 eval board maxims
2016-09-27 17:43 ` [PATCH 2/3] aspeed/g5: helper SCU functions for configuring aspeed I2C maxims
2016-09-29 1:03 ` Joel Stanley
2016-09-29 18:23 ` Maxim Sloyko
2016-09-30 1:49 ` Andrew Jeffery [this message]
2016-10-03 18:57 ` Maxim Sloyko
2016-09-29 21:27 ` [PATCH 1/3] aspeed: Fix regs-scu.h and ast_scu.h incompatibility maxims
2016-09-29 21:27 ` [PATCH 2/3] aspeed: Fixed FUC -> FUN typo in SCU maxims
2016-10-05 16:17 ` Maxim Sloyko
2016-10-14 0:07 ` Joel Stanley
2016-10-17 17:57 ` Maxim Sloyko
2016-10-18 6:36 ` Joel Stanley
2016-10-27 18:52 ` Maxim Sloyko
2016-09-29 21:27 ` [PATCH 3/3] aspeed: SCU helper functions for I2C maxims
2016-10-03 18:55 ` [PATCH] " maxims
2016-10-05 16:16 ` Maxim Sloyko
2016-10-14 0:06 ` Joel Stanley
2016-09-27 17:43 ` [PATCH 3/3] aspeed/g5: I2C driver maxims
2016-09-29 1:27 ` Joel Stanley
2016-10-03 20:41 ` Maxim Sloyko
2016-10-10 7:19 ` Joel Stanley
2016-10-10 16:20 ` Maxim Sloyko
2016-10-03 20:42 ` [PATCH] aspeed/g5,g4: " maxims
2016-10-04 20:59 ` Cédric Le Goater
2016-10-05 0:15 ` Maxim Sloyko
2016-10-05 2:33 ` Joel Stanley
2016-10-05 3:10 ` Andrew Jeffery
2016-09-29 1:29 ` [PATCH 1/3] aspeed/g5: Device Tree for ast2500, copied from openbmc/linux (include file), plus minimal device tree configuration for ast2500 eval board Joel Stanley
2016-09-29 17:02 ` Maxim Sloyko
2016-09-29 18:32 ` [PATCH] aspeed/g5: Device Tree for ast2500 maxims
2016-10-05 16:16 ` Maxim Sloyko
2016-10-06 17:16 ` Maxim Sloyko
2016-10-14 0:14 ` Joel Stanley
2016-10-14 16:40 ` Maxim Sloyko
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=1475200147.24463.36.camel@aj.id.au \
--to=andrew@aj.id.au \
--cc=joel@jms.id.au \
--cc=maxims@google.com \
--cc=openbmc@lists.ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.