From: Linus Walleij <linus.walleij@linaro.org>
To: Sven Peter <sven@svenpeter.dev>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
Joey Gouly <joey.gouly@arm.com>,
Andy Shevchenko <andriy.shevchenko@intel.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Hector Martin <marcan@marcan.st>, Marc Zyngier <maz@kernel.org>,
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
nd <nd@arm.com>, Stan Skowronek <stan@corellium.com>
Subject: Re: [PATCH v1 1/1] pinctrl: add pinctrl/GPIO driver for Apple SoCs
Date: Sun, 26 Sep 2021 15:10:34 +0200 [thread overview]
Message-ID: <CACRpkdb-TZfjyonddfHjOFqZXuLSGi7ER3_onnom-5VYm5GsgQ@mail.gmail.com> (raw)
In-Reply-To: <50d6a8f0-c515-43dc-af06-b31bf8f863df@www.fastmail.com>
On Sun, Sep 26, 2021 at 2:56 PM Sven Peter <sven@svenpeter.dev> wrote:
> On Sun, Sep 26, 2021, at 14:48, Linus Walleij wrote:
> > I think npins should be known from the compatible (we know that
> > this version of the SoC has so and so many pins) and the base
> > should always be 0? It's not like we have several pin controllers
> > of this type in the SoC is it?
>
> I've just checked: Looks like there are four different pin controllers of
> this type with a different number of pins each in Apple's device tree for
> the M1.
So we need to understand this hardware: is this something like
south/north/east/west, so the pins are oriented around the chip?
I would suspect they should then be compatibles:
apple,t8103-pinctrl-north, apple,t8103-pinctrl
apple,t8103-pinctrl-south, apple,t8103-pinctrl
apple,t8103-pinctrl-west, apple,t8103-pinctrl
apple,t8103-pinctrl-east, apple,t8103-pinctrl
going from specific to general signifying that we know which one
we are dealing with and then we know the npins etc.
This also gives a normal grouping of functions associated with
pins and the portion of the SoC, see for
example drivers/pinctrl/intel/pinctrl-broxton.c.
This shows that it might have been a bad idea to define the
pins as opaque, because now that is hiding the fact that
these pins are grouped in four distinct sets.
APPLE_PINMUX(pin, func)
Should rather have been APPLE_PINMUX(cardinal, pin, func)
where cardinal would be 0..3 for north, south, west, east.
This is a bit of guessing actually, but we should definitely
try to make the driver reflect the reality and not over-generalize.
If these four blocks in the SoC are different, they should have
different compatible strings, because they are not, by
definition, compatible.
Yours,
Linus Walleij
next prev parent reply other threads:[~2021-09-26 13:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 22:29 [PATCH v1 0/1] pinctrl/GPIO driver for Apple SoCs Joey Gouly
2021-09-21 22:29 ` [PATCH v1 1/1] pinctrl: add " Joey Gouly
2021-09-22 7:20 ` Andy Shevchenko
2021-09-25 13:44 ` Joey Gouly
2021-09-26 5:08 ` Andy Shevchenko
2021-09-26 12:48 ` Linus Walleij
2021-09-26 12:56 ` Sven Peter
2021-09-26 13:10 ` Linus Walleij [this message]
2021-09-26 14:35 ` Sven Peter
2021-09-26 16:28 ` Andy Shevchenko
2021-09-27 5:45 ` Sven Peter
2021-09-27 9:00 ` Andy Shevchenko
2021-09-27 9:27 ` Hans de Goede
2021-09-27 9:43 ` Andy Shevchenko
2021-09-27 8:46 ` Alyssa Rosenzweig
2021-09-27 8:55 ` Andy Shevchenko
2021-09-27 23:34 ` Linus Walleij
2021-09-28 21:20 ` Joey Gouly
2021-09-28 18:21 ` Joey Gouly
2021-09-28 21:50 ` Linus Walleij
2021-09-22 13:09 ` Marc Zyngier
2021-09-22 23:58 ` Linus Walleij
2021-09-22 6:59 ` [PATCH v1 0/1] " Andy Shevchenko
2021-09-23 0:10 ` 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=CACRpkdb-TZfjyonddfHjOFqZXuLSGi7ER3_onnom-5VYm5GsgQ@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=alyssa.rosenzweig@collabora.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=joey.gouly@arm.com \
--cc=linux-gpio@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=maz@kernel.org \
--cc=nd@arm.com \
--cc=stan@corellium.com \
--cc=sven@svenpeter.dev \
/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).