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: <20230124011648.52334-1-blarson@amd.com>
Date:   Mon, 23 Jan 2023 17:16:48 -0800
From:   Brad Larson <blarson@....com>
To:     <krzysztof.kozlowski@...aro.org>
CC:     <adrian.hunter@...el.com>, <alcooperx@...il.com>,
        <andy.shevchenko@...il.com>, <arnd@...db.de>, <blarson@....com>,
        <brad@...sando.io>, <brendan.higgins@...ux.dev>,
        <briannorris@...omium.org>, <brijeshkumar.singh@....com>,
        <broonie@...nel.org>, <catalin.marinas@....com>,
        <davidgow@...gle.com>, <devicetree@...r.kernel.org>,
        <fancer.lancer@...il.com>, <gerg@...ux-m68k.org>,
        <gsomlo@...il.com>, <krzk@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <lee.jones@...aro.org>,
        <lee@...nel.org>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-mmc@...r.kernel.org>,
        <linux-spi@...r.kernel.org>, <p.yadav@...com>,
        <p.zabel@...gutronix.de>, <piotrs@...ence.com>,
        <rdunlap@...radead.org>, <robh+dt@...nel.org>,
        <samuel@...lland.org>, <skhan@...uxfoundation.org>,
        <suravee.suthikulpanit@....com>, <thomas.lendacky@....com>,
        <tonyhuang.sunplus@...il.com>, <ulf.hansson@...aro.org>,
        <vaishnav.a@...com>, <will@...nel.org>,
        <yamada.masahiro@...ionext.com>
Subject: Re: [PATCH v9 03/15] dt-bindings: spi: cdns: Add compatible for AMD Pensando Elba SoC

On 19/01/2023 7:53 UTC, Krzysztof Kozlowski wrote:
>On 19/01/2023 04:51, Brad Larson wrote:
>> Document the cadence qspi controller compatible for AMD Pensando
>> Elba SoC boards.  The Elba qspi fifo size is 1024.
>> 
...
>> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
>> index 4707294d8f59..a6556854234f 100644
>> --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
>> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
>> @@ -20,11 +20,23 @@ allOf:
>>        required:
>>          - power-domains
>>  
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amd,pensando-elba-qspi
>> +    then:
>> +      properties:
>> +        cdns,fifo-depth:
>> +          enum: [ 128, 256, 1024 ]
>> +          default: 1024
>
>This won't work either... did you test it? Is 1024 really allowed?

Removing enum/default from the cdns,fifo-depth property definition
and using if/then/else in the allOf block fixed the problem.

Yes the Cadence IP 1024 fifo-size is supported and is in production.
The below passes the dtbs_check/dt_binding_check and leaves all
other implemenations with max 256 fifo-depth.

Do you want to move the allOf block to the bottom as was requested
for cdns,sdhci.yaml?  This is the updated diff:

--- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
@@ -20,11 +20,28 @@ allOf:
       required:
         - power-domains
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: amd,pensando-elba-qspi
+    then:
+      properties:
+        cdns,fifo-depth:
+          enum: [ 128, 256, 1024 ]
+          default: 1024
+    else:
+      properties:
+        cdns,fifo-depth:
+          enum: [ 128, 256 ]
+          default: 128
+
 properties:
   compatible:
     oneOf:
       - items:
           - enum:
+              - amd,pensando-elba-qspi
               - ti,k2g-qspi
               - ti,am654-ospi
               - intel,lgm-qspi
@@ -48,8 +65,6 @@ properties:
     description:
       Size of the data FIFO in words.
     $ref: "/schemas/types.yaml#/definitions/uint32"
-    enum: [ 128, 256 ]
-    default: 128
 
   cdns,fifo-width:
     $ref: /schemas/types.yaml#/definitions/uint32

Regards,
Brad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ