From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Wolfram Sang <wsa@the-dreams.de>,
Linus Walleij <linus.walleij@linaro.org>,
SH-Linux <linux-sh@vger.kernel.org>,
"Simon Horman [Horms]" <horms@verge.net.au>
Subject: Re: [PATCH 04/05 v2] pinctrl: sh-pfc: r7s72100 SCIF support
Date: Tue, 31 Dec 2013 17:29:29 +0000 [thread overview]
Message-ID: <3543969.B4d78GADQA@avalon> (raw)
In-Reply-To: <CANqRtoSJAik-QV9WFfgsVGPAVBCRasuQz9kOHOueDM562PwJMg@mail.gmail.com>
Hi Magnus,
On Wednesday 18 December 2013 07:26:15 Magnus Damm wrote:
> On Wed, Dec 18, 2013 at 1:08 AM, Laurent Pinchart wrote:
> > On Tuesday 17 December 2013 11:38:23 Magnus Damm wrote:
> >> From: Magnus Damm <damm@opensource.se>
> >>
> >> Add support for SCIF functions SCK, TXD, RXD, CTS and RTS to the
> >> r7s72100 PINCTRL code. There are two possible pins that can be used
> >> for TXD (Port 3 Pin 0 Function 6 and Port 3 Pin 1 Function 4) and
> >> because of that are pins broken out into separate functions.
> >>
> >> Signed-off-by: Magnus Damm <damm@opensource.se>
> >> ---
> >>
> >> drivers/pinctrl/sh-pfc/pfc-r7s72100.c | 158 +++++++++++++++++++++++++++
> >> 1 file changed, 158 insertions(+)
> >>
> >> --- 0006/drivers/pinctrl/sh-pfc/pfc-r7s72100.c
> >> +++ work/drivers/pinctrl/sh-pfc/pfc-r7s72100.c 2013-12-17
> >
> > 01:09:20.000000000
> >
> >> +0900 @@ -117,12 +117,170 @@ static const unsigned int __RZ_STR(pfx,
> >>
> >> #define RZ_GROUPS(pfx, hw, bank, pin, fn) \
> >> __RZ_GROUPS(pfx##_##hw##_p##bank##_##pin),
> >>
> >> +#define SCIF0(fn) \
> >> + fn(scif0, clk, 2, 13, 6) \
> >> + fn(scif0, txd, 2, 14, 6) \
> >> + fn(scif0, rxd, 2, 15, 6) \
> >> + fn(scif0, clk, 4, 8, 7) \
> >> + fn(scif0, txd, 4, 9, 7) \
> >> + fn(scif0, rxd, 4, 10, 7) \
> >> + fn(scif0, clk, 6, 8, 5) \
> >> + fn(scif0, txd, 6, 9, 5) \
> >> + fn(scif0, rxd, 6, 10, 5)
> >
> > The SCIF0 SCK, TXD and RXD pins are grouped together with three options to
> > choose from. Unlike the PFC devices we support so far, the driver allows
> > picking pins individually. This allows greater flexibility, at the cost of
> > a more verbose PFC DT node.
>
> You need more detailed PFC data, yes, but I'm not sure if "Unlike the
> PFC devices we support so far" is a correct statement. =)
>
> > I assume that this is correct, but could you please confirm that the SoC
> > really allows picking pins individually (for instance using P2.14 as SCIF0
> > TXD together with P6.10 as SCIF0 RXD) ?
>
> Your example would work just fine, yes. I don't have any hardware to
> test that though. I suspect the same would be fine on all of our SoCs
> actually, unless
>
> > I also wonder whether other currently supported SoCs wouldn't happen to
> > also support picking pins from different groups, even though they name
> > the groups differently.
>
> It seems to me that in general the hardware has much more flexibility
> than what the PINCTRL groups actually expose today. In the end it
> depends on the actual hardware, so its a case by case thing:
>
> A) RZ series: Individual per-pin settings always available
>
> B) R-Mobile series (PORTnCR + MSELnCR): Individual per-pin settings
> usually available
>
> C) R-Car series (IPSRnn + MOD_SEL): Shared to some degree, but often
> still allows individual control.
>
> So with the current PINCTRL interface it looks like we have introduced
> some artificial limitation based on software grouping even though the
> actual hardware often can handle per-pin settings.
That's probably true for some devices, yes. We've started by limiting the
possibilities on R-Car either rightfully (when IPSR would allow individidual
control but MODSEL would forbid it) or incorrectly, and have probably carried
that on to new SoCs. We should carefully review the pin groups in the future.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-12-31 17:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 2:37 [PATCH 00/05 v2] pinctrl: sh-pfc: r7s72100 support V2 Magnus Damm
2013-12-17 2:37 ` [PATCH 01/05 v2] pinctrl: sh-pfc: Rework _GP_GPIO, introduce _GP_GPIO32 Magnus Damm
2013-12-17 2:38 ` [PATCH 02/05 v2] pinctrl: sh-pfc: r7s72100 base support Magnus Damm
2013-12-17 16:17 ` Laurent Pinchart
2013-12-17 21:04 ` Wolfram Sang
2013-12-17 22:29 ` Magnus Damm
2013-12-18 10:05 ` Wolfram Sang
2013-12-18 10:35 ` Magnus Damm
2013-12-17 2:38 ` [PATCH 03/05 v2] pinctrl: sh-pfc: r7s72100 single pin macros Magnus Damm
2013-12-17 16:01 ` Laurent Pinchart
2013-12-17 22:34 ` Magnus Damm
2013-12-17 2:38 ` [PATCH 04/05 v2] pinctrl: sh-pfc: r7s72100 SCIF support Magnus Damm
2013-12-17 16:08 ` Laurent Pinchart
2013-12-17 22:26 ` Magnus Damm
2013-12-31 17:29 ` Laurent Pinchart [this message]
2013-12-17 2:38 ` [PATCH 05/05 v2] pinctrl: sh-pfc: r8a7791 and r7s72100 binding docs Magnus Damm
2013-12-29 23:35 ` [PATCH 00/05 v2] pinctrl: sh-pfc: r7s72100 support V2 Laurent Pinchart
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=3543969.B4d78GADQA@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=horms@verge.net.au \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=wsa@the-dreams.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;
as well as URLs for NNTP newsgroup(s).