lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Apr 2024 03:07:32 +0000
From: Peng Fan <peng.fan@....com>
To: Rob Herring <robh@...nel.org>, "Peng Fan (OSS)" <peng.fan@....nxp.com>
CC: Linus Walleij <linus.walleij@...aro.org>, Krzysztof Kozlowski
	<krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Shawn Guo
	<shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix
 Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>,
	Sudeep Holla <sudeep.holla@....com>, Cristian Marussi
	<cristian.marussi@....com>, "linux-gpio@...r.kernel.org"
	<linux-gpio@...r.kernel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
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@....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@....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...

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
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ