public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH RFC] dt-bindings: pinctrl: support specifying pins
Date: Fri, 12 Nov 2021 14:16:35 +0200	[thread overview]
Message-ID: <YY5bI+QzDA0zs/mN@atomide.com> (raw)
In-Reply-To: <CAHp75VeO4yr9fAx_-MHDnRGQn1paWF=59+o-9ZyP5PGSCPU8og@mail.gmail.com>

* Andy Shevchenko <andy.shevchenko@gmail.com> [211112 11:22]:
> > We only need the SoC specific data for the booted SoC, so devicetree
> > and loadable modules makes more sense there compared to the current
> > built-in setup.
> 
> I'm against putting that into DT and here is why.
> 
> DT is the thing that describes the _platform_. While it's fine to put
> GPIO expander thingy (and we actually do this with labeling schema for
> GPIOs, right?), the SoC level of things is a _hardware_ and with all
> flexibility the DT gives us we will definitely have a deviations on
> _different_ platforms with _the same_ SoC! To work around this we must
> have a validation of the pin names and their functions in many places.

I think you are misunderstanding what I mean here. Certainly the driver
needs to know how to deal with the SoC specific hardware. And that we
can easily do that in quite easily already. The device tree data I'm
describing would be similar to the interrupts with instance offset and
generic mux flags.

See for example the driver for drivers/pinctrl/ti/pinctrl-ti-iodelay.c.
For that driver we have the instance and picosecond iodelay values in
the devicetree, and with #nr-pinctrl cells there could be some generic
pinctrl mux flags. We are missing the generic pinctrl flags part AFAIK.

> And last but not least the copying it in tons of DT feels like a
> duplication effort.,

Hmm I don't think we have any of that for what I'm describing. But
please take a look at the iodelay example above, maybe I'm not
following.

> AFAIU the topic, the pin control lacks labeling schema that will
> provide the view from the platform perspective, while driver provides
> from HW perspective.

Agreed we need a generic labeling schema.

Regards,

Tony

  reply	other threads:[~2021-11-12 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 23:14 [PATCH RFC] dt-bindings: pinctrl: support specifying pins Rafał Miłecki
2021-11-11 15:31 ` Linus Walleij
2021-11-11 19:53   ` Rob Herring
2021-11-12 10:16   ` Tony Lindgren
2021-11-12 11:21     ` Andy Shevchenko
2021-11-12 12:16       ` Tony Lindgren [this message]
2021-11-12 12:20         ` Andy Shevchenko
2021-11-11 20:06 ` Rob Herring

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=YY5bI+QzDA0zs/mN@atomide.com \
    --to=tony@atomide.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafal@milecki.pl \
    --cc=robh+dt@kernel.org \
    --cc=zajec5@gmail.com \
    /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