linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: joravec@drewtech.com (Joey Oravec)
To: linux-arm-kernel@lists.infradead.org
Subject: plat-orion multi purpose pins problem for mv78200
Date: Tue, 05 Jul 2011 11:37:57 -0400	[thread overview]
Message-ID: <4E132FD5.1090409@drewtech.com> (raw)
In-Reply-To: <CAMAG_eexDoKrPsrd7+3bpsN3y0pptqwhFRP2NKqd_Nny+M+NGg@mail.gmail.com>

On 7/3/2011 8:46 AM, saeed bishara wrote:
>> It doesn't seems the code was behaving differently before 3.0-rc. I mean
>> before the MPP and GPIO consolidation work. It was ?
> that's right, this issue was before the consolidation work.
Agreed. I only meant to say that the MPP code is broken for mv78200 in 
3.0-rc5, so the maintainers should consider a short-term fix of 
disabling the checks in orion_gpio_is_valid().

>> Does hardware allows a configuration like MPP0_GE0_COL and MPP32_GPIO
>> simultaneously ?
> yes, this is possible.
Agreed. MPP is the pin that can be mux'ed to 7 resources. GPIO is just 
one of those resources. Yes the hardware supports your example. Most 
resources can be routed to several different pins to allow flexibility 
in board design.

Since MPP is just a pin-mux, it's possible for Marvell to build an SoC 
in the future that can route a few different GPIOs onto a given MPP pin. 
It seems like any solution should account for this.

>> If not (and only if not), the problem is simply mapping a MPP number on
>> the correct GPIO number. Isn't it ?
>>
>> In that case, what about using the MPPxx_GPIO definitions (found in
>> mach-mv78xx0/mpp.h) to map the right GPIO number ?
>>
>> For example:
>>
>> #define MPP32_GPIO        MPP(32, 0x1, 1, 1, 1)
>>
>> could be replaced by:
>>
>> #define MPP32_GPIO        MPP(0, 0x1, 1, 1, 1)
> that won't work because the num (first number) is used as the mpp
> index. see orion_mpp_conf() implementation.
> I think the solution is to extend the MPP define to include the
> explicit gpio number, so it will look like:
> #define MPP(_num, _gpio _sel, _in, _out, _78100_A0)
That could work as long as a value is reserved to mean "not gpio" like:

#define MPP0_GPIO        MPP(0, 0, 0x0, 1, 1, 1)
#define MPP0_GE0_COL        MPP(0, -1, 0x1, 1, 0, 1)

Note that orion_gpio_set_valid() and orion_gpio_is_valid() would both 
need rework. The functions need to handle that a GPIO can be mux'ed onto 
any MPP pin. I described this problem in another email on the thread.

There has been some discussion of a pinmux API. Does this API offer any 
simpler solution?

-joey

  parent reply	other threads:[~2011-07-05 15:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01 19:14 plat-orion multi purpose pins problem for mv78200 Joey Oravec
2011-07-01 21:56 ` Joey Oravec
2011-07-02 12:23 ` Simon Guinot
2011-07-03 12:46   ` saeed bishara
2011-07-04 14:33     ` [PATCH v2] genirq: replace irq_gc_ack() with {set,clr}_bit variants Simon Guinot
2011-07-04 14:48       ` [PATCH v2] genirq: replace irq_gc_ack() with {set, clr}_bit variants Nicolas Pitre
2011-07-16  3:39         ` Kukjin Kim
2011-07-06 15:31       ` [PATCH v2] genirq: replace irq_gc_ack() with {set,clr}_bit variants Simon Guinot
2011-07-05 15:37     ` Joey Oravec [this message]
2011-07-06 16:18       ` plat-orion multi purpose pins problem for mv78200 Simon Guinot
2011-07-06 16:32         ` saeed bishara
2011-07-06 18:49         ` Joey Oravec
2011-07-07  6:40           ` saeed bishara
2011-07-07 13:49             ` Joey Oravec
2011-07-10 13:21               ` saeed bishara
2011-07-12 13:36                 ` Joey Oravec

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=4E132FD5.1090409@drewtech.com \
    --to=joravec@drewtech.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).