From: Rob Herring <robh@kernel.org>
To: Jonas Gorski <jonas.gorski@gmail.com>
Cc: "Rafał Miłecki" <rafal@milecki.pl>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Fernández Rojas" <noltari@gmail.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] dt-bindings: pinctrl: brcm: Ensure all child node properties are documented
Date: Thu, 25 Aug 2022 13:53:01 -0500 [thread overview]
Message-ID: <CAL_JsqJHoOU3M7ZUrpi8OH+0_5u0LOoYZeXEk08tFjf6fByncA@mail.gmail.com> (raw)
In-Reply-To: <CAOiHx=k1=GG7JNBJ-mqySSqv3d2OeLzWP+Vf1fXKtf0t-O+Kpg@mail.gmail.com>
On Thu, Aug 25, 2022 at 10:23 AM Jonas Gorski <jonas.gorski@gmail.com> wrote:
>
> On Tue, 16 Aug 2022 at 20:39, Rob Herring <robh@kernel.org> wrote:
> >
> > The Broadcom pinctrl bindings are incomplete for child nodes as they are
> > missing 'unevaluatedProperties: false' to prevent unknown properties.
> > Fixing this reveals many warnings including having grandchild nodes in some
> > cases.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> > This recursive schema requires a fix not yet committed in dtschema.
> >
> > I'm looking for feedback on whether group->pins or group->groups is the
> > right fix here. There's more warnings with this change in the gpio-sysctl
> > bindings.
>
> The answer is "yes", though pins is probably the closest for most.
>
> bcm6318 has multiple field-per-pin registers, where each pin is
> controlled separately, with more fields than available GPIOs, and the
> pins outside the GPIO range controlling other functions, like
> switching the second USB port between host and client mode.
>
> bcm6328/6362/6368/63268 have two registers. The first one enables an
> alternative function for the first 32 GPIOs, with a 1:1 mapping of
> bits to GPIO. The second one enables a function for whole, arbitrary
> groups. These groups can overlap, and may also target pins outside the
> first 32 GPIOs. The actual pins in use are not documented, and can
> sometimes be guessed/inferred by the function names (e.g. "GPIO35"),
> sometimes not ("NAND", "UTOPIA").
>
> bcm6358 has only the groups register, which also includes non GPIO
> related functions, like inversing the MII clocks for the integrated
> macs.
>
> Not supported is bcm6348, which would be the only one where groups
> would definitely make more sense: there are 5 groups of 8 GPIOs, where
> each group can be set to a certain function (but not all functions are
> valid for all groups). E.g. for PCI support, you would need to set the
> fields to PCI for groups 0, 1 and 3 (and 2 and 5 could be set to a
> different function). You can ignore this though, as bcm6348 is ancient
> (doesn't even support ADSL2+).
>
> Hope that helps a bit.
Only in determining that someone else needs to fix this. Please send me patches.
Rob
prev parent reply other threads:[~2022-08-25 18:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 18:39 [RFC] dt-bindings: pinctrl: brcm: Ensure all child node properties are documented Rob Herring
2022-08-25 15:22 ` Jonas Gorski
2022-08-25 18:53 ` 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=CAL_JsqJHoOU3M7ZUrpi8OH+0_5u0LOoYZeXEk08tFjf6fByncA@mail.gmail.com \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonas.gorski@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noltari@gmail.com \
--cc=rafal@milecki.pl \
/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).