From: swarren@nvidia.com (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [RFC] pinctrl: add a driver for Energy Micro's efm32 SoCs
Date: Thu, 08 Dec 2011 21:47:24 -0700 [thread overview]
Message-ID: <4EE192DC.3080209@nvidia.com> (raw)
In-Reply-To: <20111209043220.GJ7913@S2100-06.ap.freescale.net>
On 12/08/2011 09:32 PM, Shawn Guo wrote:
> On Thu, Dec 08, 2011 at 08:44:03PM -0700, Stephen Warren wrote:
>> On 12/08/2011 06:01 PM, Shawn Guo wrote:
>>> On Thu, Dec 08, 2011 at 03:14:40PM -0800, Stephen Warren wrote:
>>>> Presumably, the set of pins, groups, and functions is determined by the
>>>> SoC HW. Platform data is usually board-specific rather than SoC specific.
>>>> You have two choices here: You could either parse this data from device
>>>> tree as Arnd suggested (and I think as the TI OMAP pinctrl driver will),
>>>> or do what I've done in the Tegra pinctrl driver, and simply put each
>>>> SoC's data into the driver and select which one to use based on the DT
>>>> compatible flag; I didn't see the point of putting data in to the DT that
>>>> was identical for every board using a given SoC.
>>>>
>>> I'm not sure about tegra, but for imx, it's very difficult to enumerate
>>> all these data and list them in pinctrl driver. Sascha gave a few
>>> examples when we discussed about it in another thread. The TX and RX
>>> pin of UART has 4 options each. SD could possibly have 1, 4, and 8
>>> data lines. Display interface could have 16, 24, 32 data lines, etc.
>>> All these options are chosen by board design for given soc pinmux
>>> design. So putting this data into device tree makes sense for imx too.
>>
>> The pinctrl driver should simply represent the raw options that the HW
>> supports on each individual pin. This table should be readily enumerable
...
> The situation is there might be a few possible pin groups for each
> function of 16/24/32-bit display. Let's think about the UART case
> I put above, to enumerate all the groups, we will have 16 groups for
> one UART instance. And we have 5 UART ports on recent imx SoC.
I'm not familiar with imx. For my education, which of the following is true:
a)
* UART TX signal can muxed onto 1 of 16 pins
* UART RX signal can muxed onto 1 of 16 pins
In this case, you'd just list say "UART A TX" as a legal function for
each of those 16 pins. Yes, that's a lot of places, but still do-able.
(16 possible positions would be a lot, but I suppose it is possible in HW)
b)
* UART TX signal can muxed onto 1 of 4 pins
* UART RX signal can muxed onto 1 of 4 pins
* So, there are 16 (4*4) combinations of these two settings
In this case, you'd just list say "UART A TX" for the 4 pins, and "UART
A RX" for the other 4 pins. The 16 combinations don't come into play at
all; the board-specific mapping table would pick 1 single combination,
and represent this as:
pin X: function = UART A TX
pin Y: function = UART A RX
Either way though, whether you put the data into tables in the driver or
in the SoC .dtsi file (included by each board's .dts file), the pinctrl
driver's table really should list all possible options, and the pinctrl
mapping table should select just one; that's kinda the whole point of
the tables. If you try to put just the used subset into device tree, you
won't be able to put it into the .dtsi file since it'll be
board-specific, and you'll end up forcing board .dts authors to recreate
that driver's complete configuration table every time, which seems like
a lot of wasted work. (and yes, this might bloat the .dtsi file, and
mean a lot of useless device tree parsing, which is why I personally
chose not to put the SoC tables into the device tree).
Thanks.
--
nvpublic
next prev parent reply other threads:[~2011-12-09 4:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 22:40 [PATCH] [RFC] pinctrl: add a driver for Energy Micro's efm32 SoCs Uwe Kleine-König
2011-12-08 22:55 ` Arnd Bergmann
2011-12-09 9:23 ` Uwe Kleine-König
2011-12-09 13:55 ` Arnd Bergmann
2011-12-09 14:15 ` Uwe Kleine-König
2011-12-08 23:14 ` Stephen Warren
2011-12-09 1:01 ` Shawn Guo
2011-12-09 3:44 ` Stephen Warren
2011-12-09 4:32 ` Shawn Guo
2011-12-09 4:47 ` Stephen Warren [this message]
2011-12-09 5:14 ` Shawn Guo
2011-12-09 11:08 ` Sascha Hauer
2011-12-09 13:01 ` Uwe Kleine-König
2011-12-10 0:18 ` Linus Walleij
2011-12-12 14:37 ` Sascha Hauer
2011-12-12 15:29 ` Uwe Kleine-König
2011-12-13 0:41 ` Linus Walleij
2011-12-09 16:53 ` Stephen Warren
2011-12-09 15:03 ` Dong Aisheng
2011-12-09 16:49 ` Stephen Warren
2011-12-09 17:24 ` Tony Lindgren
2011-12-09 17:53 ` Tony Lindgren
2011-12-10 0:14 ` Stephen Warren
2011-12-11 19:34 ` Tony Lindgren
2011-12-09 9:31 ` Uwe Kleine-König
2011-12-10 0:04 ` Linus Walleij
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=4EE192DC.3080209@nvidia.com \
--to=swarren@nvidia.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).