public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH RFC] dt-bindings: pinctrl: support specifying pins
Date: Thu, 11 Nov 2021 14:06:04 -0600	[thread overview]
Message-ID: <YY13rKxQpzcB4f0b@robh.at.kernel.org> (raw)
In-Reply-To: <20211110231436.8866-1-zajec5@gmail.com>

On Thu, Nov 11, 2021 at 12:14:36AM +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Add support for "pins" node with pin@ subnodes. This allows specifying
> all pins (and their names) at DT level.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> While working with pinctrl in Linux I started wondering if we could
> start specifying pins in DT instead of Linux drivers. When working with
> DT we usually avoid hardcoding hardware description in drivers so it
> isn't clear to me why it doesn't apply to pins.
> 
> Please let me know if this makes sense. If by some chance I'm correct I
> think that specifying groups and functions could follow too.
> 
> FWIW: I didn't start working on Linux reading pins from DT yet.
> ---
>  .../bindings/pinctrl/brcm,ns-pinmux.yaml      | 12 +++++++++-
>  .../devicetree/bindings/pinctrl/pinctrl.yaml  | 23 +++++++++++++++++++
>  2 files changed, 34 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml b/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml
> index 8d1e5b1cdd5f..92a86b0822d6 100644
> --- a/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml
> @@ -74,7 +74,7 @@ required:
>    - reg
>    - reg-names
>  
> -additionalProperties: false
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> @@ -83,6 +83,16 @@ examples:
>          reg = <0x1800c1c0 0x24>;
>          reg-names = "cru_gpio_control";
>  
> +        pins {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            pin@0 {
> +                reg = <0>;

Where does 'reg' value come from?

> +                label = "spi_clk";
> +            };

If you just want a list of pins names, then why not just a list of 
names?

Rob

      parent reply	other threads:[~2021-11-11 20:06 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
2021-11-12 12:20         ` Andy Shevchenko
2021-11-11 20:06 ` Rob Herring [this message]

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=YY13rKxQpzcB4f0b@robh.at.kernel.org \
    --to=robh@kernel.org \
    --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=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