From: Peng Fan <peng.fan@nxp.com>
To: Peng Fan <peng.fan@nxp.com>, Rob Herring <robh@kernel.org>,
"Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Cristian Marussi <cristian.marussi@arm.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 2/3] dt-bindings: firmware: arm,scmi: support i.MX95 SCMI Pinctrl
Date: Tue, 16 Apr 2024 06:41:25 +0000 [thread overview]
Message-ID: <DU0PR04MB941794994D2D0A2CE5D0C33B88082@DU0PR04MB9417.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <DU0PR04MB941714AFCDC74997BFF34DFD88082@DU0PR04MB9417.eurprd04.prod.outlook.com>
> Subject: RE: [PATCH 2/3] dt-bindings: firmware: arm,scmi: support i.MX95
> SCMI Pinctrl
>
> Hi Rob,
>
> > Subject: Re: [PATCH 2/3] dt-bindings: firmware: arm,scmi: support
> > i.MX95 SCMI Pinctrl
> >
> > On Fri, Apr 12, 2024 at 08:29:26AM +0800, Peng Fan (OSS) wrote:
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > i.MX95 SCMI Pinctrl uses OEM specific units, so add '$ref' to
> > > '/schemas/pinctrl/nxp,imx95-pinctrl.yaml' and an example.
> > >
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > > Documentation/devicetree/bindings/firmware/arm,scmi.yaml | 8
> > > +++++---
> > > 1 file changed, 5 insertions(+), 3 deletions(-)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > > b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > > index e9d3f043c4ed..ebc6c083b538 100644
> > > --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > > +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > > @@ -249,9 +249,11 @@ properties:
> > >
> > > protocol@19:
> > > type: object
> > > - allOf:
> > > - - $ref: '#/$defs/protocol-node'
> > > - - $ref: /schemas/pinctrl/pinctrl.yaml
> >
> > I don't think anything from here was actually used...
>
After some check, I work out the following:
diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
index e9d3f043c4ed..26b7395c4326 100644
--- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
+++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
@@ -262,9 +262,12 @@ properties:
patternProperties:
'-pins$':
type: object
- allOf:
- - $ref: /schemas/pinctrl/pincfg-node.yaml#
- - $ref: /schemas/pinctrl/pinmux-node.yaml#
+ anyOf:
+ - $ref: /schemas/pinctrl/nxp,imx95-pinctrl.yaml
+ - allOf:
+ - $ref: /schemas/pinctrl/pincfg-node.yaml#
+ - $ref: /schemas/pinctrl/pinmux-node.yaml#
+
unevaluatedProperties: false
description:
The nxp,imx95-pinctrl.yaml:
+patternProperties:
+ '[a-f0-9]+$':
+ type: object
+ unevaluatedProperties: false
+
+ properties:
+ pins:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: name of the pin
+
+ nxp,func-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Indicates the PAD connections which function module
+
+ nxp,pin-conf:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: The PAD configuration
+
+ nxp,daisy-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: The select input register ID
+
+ nxp,daisy-conf:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: The select input register value
+
+additionalProperties: true
The node will as below:
scmi_pinctrl: protocol@19 {
reg = <0x19>;
sd-pins {
sd1cmd {
pins = "sd1cmd";
nxp,func-id = <0>;
nxp,pin-conf = <0x138e>;
};
sd1data0 {
pins = "sd1data0";
nxp,func-id = <0>;
nxp,pin-conf = <0x138e>;
};
};
I will use the upper in v2.
Thanks,
Peng.
> You mean this not used?
> allOf:
> - $ref: '#/$defs/protocol-node'
> - $ref: /schemas/pinctrl/pinctrl.yaml
>
> Or below?
> >
> >
> > > + anyOf:
> > > + - $ref: /schemas/pinctrl/nxp,imx95-pinctrl.yaml
> > > + - allOf:
> > > + - $ref: '#/$defs/protocol-node'
> >
> > This must always apply and should not be under the anyOf.
>
> I just try in arm,scmi.yaml:
> protocol@19:
> type: object
> allOf:
> - $ref: '#/$defs/protocol-node'
> - anyOf:
> - $ref: /schemas/pinctrl/nxp,imx95-pinctrl.yaml
> - $ref: /schemas/pinctrl/pinctrl.yaml
>
> unevaluatedProperties: false
>
> And in nxp,imx95-pinctrl.yaml:
> patternProperties:
> 'grp$':
> type: object
> additionalProperties: false
>
> patternProperties:
> '[a-f0-9]+$':
> type: object
> unevaluatedProperties: false
>
> But the following example always reports:
> pinctrl_usdhc1: usdhc1grp {
> sd1-pin0 {
> pins = "sd1cmd";
> nxp,func-id = <0>;
> nxp,pin-conf = <0x138e>;
> };
> };
>
> arm,scmi.example.dtb: scmi: protocol@19: Unevaluated properties are not
> allowed ('usdhc1grp' was unexpected)
>
> Do you have any suggestions on how to write the yaml correct?
>
> Thanks,
> Peng.
>
> >
> > > + - $ref: /schemas/pinctrl/pinctrl.yaml
> > >
> > > unevaluatedProperties: false
> > >
> > >
> > > --
> > > 2.37.1
> > >
next prev parent reply other threads:[~2024-04-16 6:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 0:29 [PATCH 0/3] pinctrl: scmi: support i.MX95 OEM extensions Peng Fan (OSS)
2024-04-12 0:29 ` [PATCH 1/3] dt-bindings: pinctrl: support i.MX95 SCMI pinctrl Peng Fan (OSS)
2024-04-12 15:10 ` Frank Li
2024-04-13 5:56 ` Peng Fan
2024-04-15 22:50 ` Rob Herring
2024-04-15 23:17 ` Peng Fan
2024-04-12 0:29 ` [PATCH 2/3] dt-bindings: firmware: arm,scmi: support i.MX95 SCMI Pinctrl Peng Fan (OSS)
2024-04-12 15:11 ` Frank Li
2024-04-13 6:01 ` Peng Fan
2024-04-15 22:56 ` Rob Herring
2024-04-16 3:07 ` Peng Fan
2024-04-16 6:41 ` Peng Fan [this message]
2024-04-12 0:29 ` [PATCH 3/3] pinctrl: scmi: support i.MX OEM pin configuration type Peng Fan (OSS)
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=DU0PR04MB941794994D2D0A2CE5D0C33B88082@DU0PR04MB9417.eurprd04.prod.outlook.com \
--to=peng.fan@nxp.com \
--cc=conor+dt@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.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=peng.fan@oss.nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=sudeep.holla@arm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).