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]
Message-ID: <20201123090438.GA17112@kozik-lap>
Date:   Mon, 23 Nov 2020 10:04:38 +0100
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Alice Guo <alice.guo@....com>
Cc:     "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        dl-linux-imx <linux-imx@....com>, Peng Fan <peng.fan@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [EXT] Re: [PATCH v4 1/4] dt-bindings: soc: imx8m: add DT Binding
 doc for soc unique ID

On Mon, Nov 23, 2020 at 04:45:13AM +0000, Alice Guo wrote:
> 
> 
> > -----Original Message-----
> > From: Krzysztof Kozlowski <krzk@...nel.org>
> > Sent: 2020年11月20日 18:51
> > To: Alice Guo <alice.guo@....com>
> > Cc: robh+dt@...nel.org; shawnguo@...nel.org; s.hauer@...gutronix.de;
> > dl-linux-imx <linux-imx@....com>; Peng Fan <peng.fan@....com>;
> > devicetree@...r.kernel.org; linux-kernel@...r.kernel.org;
> > linux-arm-kernel@...ts.infradead.org
> > Subject: [EXT] Re: [PATCH v4 1/4] dt-bindings: soc: imx8m: add DT Binding doc
> > for soc unique ID
> > 
> > Caution: EXT Email
> > 
> > On Fri, Nov 20, 2020 at 06:11:09PM +0800, Alice Guo wrote:
> > > Add DT Binding doc for the Unique ID of i.MX 8M series.
> > >
> > > v2: remove the subject prefix "LF-2571-1"
> > > v3: put it into Documentation/devicetree/bindings/arm/fsl.yaml
> > >     modify the description of nvmem-cells
> > >     use "make ARCH=arm64 dtbs_check" to test it and fix errors
> > > v4: use allOf to limit new version DTS files for i.MX8M to include
> > >     "fsl,imx8mm/n/p/q-soc", nvmem-cells and nvmem-cells-names
> > >
> > > Signed-off-by: Alice Guo <alice.guo@....com>
> > > ---
> > >  .../devicetree/bindings/arm/fsl.yaml          | 51
> > +++++++++++++++++++
> > >  1 file changed, 51 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > index 67980dcef66d..d8048323a290 100644
> > > --- a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > @@ -918,6 +918,57 @@ properties:
> > >                - fsl,s32v234-evb           # S32V234-EVB2 Customer
> > Evaluation Board
> > >            - const: fsl,s32v234
> > >
> > > +  soc:
> > > +    type: object
> > > +    properties:
> > > +      compatible:
> > > +        oneOf:
> > > +          - description: new version compatible for i.MX8M SoCs
> > > +            items:
> > > +              - enum:
> > > +                  - fsl,imx8mm-soc
> > > +                  - fsl,imx8mn-soc
> > > +                  - fsl,imx8mp-soc
> > > +                  - fsl,imx8mq-soc
> > > +              - const: simple-bus
> > > +
> > > +          - description: old version compatible for i.MX8M SoCs
> > > +            items:
> > > +              - const: simple-bus
> > > +
> > > +      nvmem-cells:
> > > +        maxItems: 1
> > > +        description: Phandle to the SOC Unique ID provided by a nvmem
> > > + node
> > > +
> > > +      nvmem-cells-names:
> > > +        const: soc_unique_id
> > > +
> > > +    allOf:
> > 
> > Nothing changed here comparing to previous version. Still does not work.
> > 
> > The allOf should not be part of soc node because the "if" below won't match.
> > Instead, it should be against root node.
> > 
> > Best regards,
> > Krzysztof
> 
> I'm sorry to disturb you. I don't very clear about the grammar rules of yaml, so don't know how to make allOf be part of root node.
> If allof is part of root node, how does it specify the soc node? The following is my change which is definitely wrong.
>   soc:
>     properties:
>       compatible:
>         - description: new version compatible for i.MX8M SoCs
>           items:
>             - enum:
>                 - fsl,imx8mm-soc
>                 - fsl,imx8mn-soc
>                 - fsl,imx8mp-soc
>                 - fsl,imx8mq-soc
>             - const: simple-bus
> 
>       nvmem-cells:
>         maxItems: 1
>         description: Phandle to the SOC Unique ID provided by a nvmem node
> 
>       nvmem-cells-names:
>         const: soc_unique_id
> 
> allOf:
>   - if:
>       properties:
>         compatible:
>           contains:
>             enum:
>               - fsl,imx8mm
>               - fsl,imx8mn
>               - fsl,imx8mp
>               - fsl,imx8mq
> 
>       then:
>         required:
>           - soc
> 
> Please give me suggestion. Thank you.

This should work:

940 allOf:
941   - if:
942       properties:
943         compatible:
944           contains:
945             enum:
946               - fsl,imx8mm
947               - fsl,imx8mn
948               - fsl,imx8mp
949               - fsl,imx8mq
950 
951     then:
952       patternProperties:
953         "^soc@[0-9a-f]+$":
954           properties:
955             compatible:
956               items:
957                 - enum:
958                     - fsl,imx8mm-soc
959                     - fsl,imx8mn-soc
960                     - fsl,imx8mp-soc
961                     - fsl,imx8mq-soc
962                 - const: simple-bus
963 
964           required:
965             - nvmem-cells
966             - nvmem-cells-names

And probablt "soc" should also be added to required, just below the
"then:".

You need to test it and find the proper solution.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ