linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] dt-bingings: pinctrl: Convert UniPhier pin controller to json-schema
Date: Sat, 29 Feb 2020 13:12:27 +0900	[thread overview]
Message-ID: <CAK7LNASMn_xMtBa8sCj0AW2LTpSEMpv=haDhWrfkZrrKbwSeug@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdbrowXC-Awy_N1gq+LxuEMhgLNf81cCZ=bwZwFdJXLWDA@mail.gmail.com>

Hi Linus,

On Sat, Feb 29, 2020 at 7:13 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Fri, Feb 21, 2020 at 3:10 AM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>
> > Convert the UniPhier pin controller binding to DT schema format.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> Nice!
>
> > In the original .txt file, there is a description:
> > The UniPhier pinctrl should be a subnode of a "syscon" compatible node
> >
> > I did not figure out how to represent (or check) it in dt-schema.
> > I just moved it to a comment line in 'examples'.
> > If there is a better way, please let me know.
>
> There is no way to do that AFAICT, we are checking nodes from
> one node and downwards, never upwards. The syscon needs to
> have its own binding file: if it has another specific compatible
> such as compatible = "foo", "syscon"; then for the DT bindings
> for foo, make sure to add this subnode as optional/compulsory
> if you want to tie up the whole thing.


Thanks for your advice.


Documentation/devicetree/bindings/mfd/syscon.yaml

already contains sunxi-specific compatibles, but
I hesitate to add more and more platform-specific stuff
in this file.

Maybe, I can add

Documentation/devicetree/bindings/mfd/socionext,uniphier-soc-glue.yaml

and then, check 'reg' and compulsory sub-nodes.



> > -Required properties:
> > -- compatible: should be one of the following:
> > -    "socionext,uniphier-ld4-pinctrl"  - for LD4 SoC
> > -    "socionext,uniphier-pro4-pinctrl" - for Pro4 SoC
> > -    "socionext,uniphier-sld8-pinctrl" - for sLD8 SoC
> > -    "socionext,uniphier-pro5-pinctrl" - for Pro5 SoC
> > -    "socionext,uniphier-pxs2-pinctrl" - for PXs2 SoC
> > -    "socionext,uniphier-ld6b-pinctrl" - for LD6b SoC
> > -    "socionext,uniphier-ld11-pinctrl" - for LD11 SoC
> > -    "socionext,uniphier-ld20-pinctrl" - for LD20 SoC
> > -    "socionext,uniphier-pxs3-pinctrl" - for PXs3 SoC
>
> But:
>
> > +    soc-glue@5f800000 {
> > +        compatible = "socionext,uniphier-pro4-soc-glue", "simple-mfd", "syscon";
> > +        reg = <0x5f800000 0x2000>;
> > +
> > +        pinctrl: pinctrl {
> > +            compatible = "socionext,uniphier-pro4-pinctrl";
> > +        };
> > +    };
>
> It looks like you want to check also for "simple-mfd" and "syscon"
> following after the enum (two consts)
>
> It seems you want to check that reg is there.


Documentation/devicetree/bindings/mfd/syscon.yaml

already checks the 'reg' by the 'contains syscon' pattern,
but I can repeat it in my yaml file.

Thanks.


> It seems the subnode pinctrl is also compulsory.
>
> All of this have examples in example-schema.yaml IIRC.
>
> Yours,
> Linus Walleij



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2020-02-29  4:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  2:10 [PATCH 1/3] dt-bindings: arm: Convert UniPhier board/SoC bindings to json-schema Masahiro Yamada
2020-02-21  2:10 ` [PATCH 2/3] dt-bindings: gpio: Convert UniPhier GPIO " Masahiro Yamada
2020-02-21 15:32   ` Rob Herring
2020-02-22  5:32     ` Masahiro Yamada
2020-02-24 14:51       ` Rob Herring
2020-02-24 15:59         ` Masahiro Yamada
2020-02-24 21:18           ` Rob Herring
2020-02-21  2:10 ` [PATCH 3/3] dt-bingings: pinctrl: Convert UniPhier pin controller " Masahiro Yamada
2020-02-28 22:13   ` Linus Walleij
2020-02-29  4:12     ` Masahiro Yamada [this message]
2020-02-21 15:25 ` [PATCH 1/3] dt-bindings: arm: Convert UniPhier board/SoC bindings " Rob Herring
2020-02-22  5:20   ` Masahiro Yamada

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='CAK7LNASMn_xMtBa8sCj0AW2LTpSEMpv=haDhWrfkZrrKbwSeug@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=robh+dt@kernel.org \
    /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).