All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mitch Bradley <wmb-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: devicetree-discuss
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: GPIO and Pinmux device tree support for Exynos.
Date: Thu, 11 Aug 2011 10:28:00 -1000	[thread overview]
Message-ID: <4E443B50.1020500@firmworks.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF04AEA24CD9-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>

On 8/11/2011 10:06 AM, Stephen Warren wrote:
> Thomas Abraham wrote at Thursday, August 11, 2011 12:09 PM:
>> I did some work on the gpio and pinmux device tree support for exynos.
>> I thought to discuss with you about what was done before proceeding
>> further.
>>
>> In the dts file, the interrupt controller node is listed as
>>
>> GPA: gpio-controller@11400000 {
>> 		compatible = "samsung,exynos4-gpio-gpa0", "samsung,exynos4-gpio";
>> 		#gpio-cells =<4>;
>> 		gpio-controller;
>> };
>>
>> The meaning of the 4 cells are as below. The values of all the cells
>> are set as per the exynos chip specification.
>>
>> <  [GPIO Pin Number]  [Pin-Mux Function Number] [Pull Up/Down Setting]
>> [Driver Strength Setting]>
>>
>>
>> Device nodes would include the gpio's that it would use (as in below example)
>>
>> serial@13800000 {
>> 		compatible = "samsung,s5pv310-uart";
>> 		reg =<0x13800000 0x100>;
>> 		interrupts =<116>;
>> 		gpios =<&GPA  0  2  0  2   /* Tx */
>> 				&GPA  1  2  0  2>;  /* Rx */
>> };
>
> The one problem with this approach is that presumably every single driver
> (e.g. for the serial port above) must look for and handle the gpios
> property, whereas presumably a serial port would otherwise have no need
> to deal with GPIOs.
>
> That's probably quite a bit of work. Also, what if some pins need to be
> configured for which there is no driver to parse that property?
>
> I just recently started working on this for Tegra, and in
> http://www.spinics.net/lists/arm-kernel/msg136138.html
> I proposed listing all the GPIO/pinmux settings directly within the GPIO
> and pinmux nodes, thus making only the GPIO and pinmux drivers responsible
> for parsing them. What do you think of that idea?


I'm in favor of handling pin-muxing separately from the individual 
devices connected through the pinmux.  The same device programming model 
can be used for different platforms or SoCs with widely differing pin 
muxing strategies and pinmux programming models.

Pin-muxing is a platform configuration issue, not an attribute of 
individual drivers.

>
> Thanks.
>

  parent reply	other threads:[~2011-08-11 20:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11 18:08 GPIO and Pinmux device tree support for Exynos Thomas Abraham
     [not found] ` <CAJuYYwRJ5UJ8OeTEDEh1Mk9yhJGVA7he1EzG8yM+pJYQVo6BXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-11 20:06   ` Stephen Warren
     [not found]     ` <74CDBE0F657A3D45AFBB94109FB122FF04AEA24CD9-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-08-11 20:28       ` Mitch Bradley [this message]
2011-08-12  7:05       ` Thomas Abraham
     [not found]         ` <CAJuYYwSeq4Sjj4LLR49hwfvSGTyTDYLXCTp0ZB2yQt2F4rfHcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-12 20:07           ` Stephen Warren
     [not found]             ` <74CDBE0F657A3D45AFBB94109FB122FF04AEA24F1D-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-08-13 15:30               ` Shawn Guo
2011-08-13 14:00       ` Shawn Guo
     [not found]         ` <20110813140046.GD7244-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-08-15 15:54           ` Stephen Warren
2011-08-13 15:36   ` Shawn Guo

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=4E443B50.1020500@firmworks.com \
    --to=wmb-d5eqfidgl7eakbo8gow8eq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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.