Skip to contentSkip to conversation

spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller

PATCH Superseded Amit Kumar Mahapatra 4 participants 7 messages May 22, 2025 – May 27, 2025

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller

The Cadence Octal SPI (OSPI) controller on AMD Versal SoCs requires only one reset entry. To reflect this, the maxItems for "resets" and "reset-names" has been set to 1 for AMD Versal SoCs, and the minItems for these properties has also been updated to 1.

---
BRANCH: mtd/next

Changes in v2:
- Removed "resets" & "reset-names" from required properties.
- To address review comments, removed "maxItems" from "reset-names".

---
 .../devicetree/bindings/spi/cdns,qspi-nor.yaml        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +9 -2
index d48ecd6cd5ad..648b8452877c 100644
@@ -17,6 +17,13 @@ allOf:
           contains:
             const: xlnx,versal-ospi-1.0
     then:
+      properties:
+        resets:
+          maxItems: 1
+
+        reset-names:
+          items:
+            enum: [ qspi ]
       required:
         - power-domains
   - if:
@@ -132,11 +139,11 @@ properties:
     maxItems: 1
 
   resets:
-    minItems: 2
+    minItems: 1
     maxItems: 3
 
   reset-names:
-    minItems: 2
+    minItems: 1
     maxItems: 3
     items:
       enum: [ qspi, qspi-ocp, rstc_ref ]
Signature · 1 line
2.34.1
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 4 lines · Amit Kumar Mahapatra

The Cadence Octal SPI (OSPI) controller on AMD Versal SoCs requires only one reset entry. To reflect this, the maxItems for "resets" and "reset-names" has been set to 1 for AMD Versal SoCs, and the minItems for these properties has also been updated to 1.

#2 lore raw
In reply to Amit Kumar Mahapatra
Quoted 35 lines · Amit Kumar Mahapatra

The Cadence Octal SPI (OSPI) controller on AMD Versal SoCs requires only one reset entry. To reflect this, the maxItems for "resets" and "reset-names" has been set to 1 for AMD Versal SoCs, and the minItems for these properties has also been updated to 1.

---
BRANCH: mtd/next

Changes in v2:
- Removed "resets" & "reset-names" from required properties.
- To address review comments, removed "maxItems" from "reset-names".

---
 .../devicetree/bindings/spi/cdns,qspi-nor.yaml        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +7 -0
index d48ecd6cd5ad..648b8452877c 100644
@@ -17,6 +17,13 @@ allOf:
           contains:
             const: xlnx,versal-ospi-1.0
     then:
+      properties:
+        resets:
+          maxItems: 1
+
+        reset-names:
+          items:
+            enum: [ qspi ]
       required:
         - power-domains
   - if:

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml properties: · line 142

Quoted 5 lines
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +1 -1
@@ -132,11 +139,11 @@ properties:
     maxItems: 1
 
   resets:
-    minItems: 2
+    minItems: 1

I think you're still missing one of the things Krzysztof requested on v1, cos you reduce minItems for all platforms without restricting it back to 2 for non-versal platforms.

Quoted 11 lines
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +1 -1
     maxItems: 3
 
   reset-names:
-    minItems: 2
+    minItems: 1
     maxItems: 3
     items:
       enum: [ qspi, qspi-ocp, rstc_ref ]
Signature · 1 line
2.34.1
#3 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 42 lines

Subject: Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller

Quoted 38 lines · Amit Kumar Mahapatra

The Cadence Octal SPI (OSPI) controller on AMD Versal SoCs requires only one reset entry. To reflect this, the maxItems for "resets" and "reset-names" has been set to 1 for AMD Versal SoCs, and the minItems for these properties has also been updated to 1.

---
BRANCH: mtd/next

Changes in v2:
- Removed "resets" & "reset-names" from required properties.
- To address review comments, removed "maxItems" from "reset-names".

---
 .../devicetree/bindings/spi/cdns,qspi-nor.yaml        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +7 -0
index d48ecd6cd5ad..648b8452877c 100644
@@ -17,6 +17,13 @@ allOf:
           contains:
             const: xlnx,versal-ospi-1.0
     then:
+      properties:
+        resets:
+          maxItems: 1
+
+        reset-names:
+          items:
+            enum: [ qspi ]
       required:
         - power-domains
   - if:
@@ -132,11 +139,11 @@ properties:
     maxItems: 1
 
Quoted 7 lines

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml properties: · line 142

Quoted 3 lines
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +1 -1
   resets:
-    minItems: 2
+    minItems: 1

I think you're still missing one of the things Krzysztof requested on v1, cos you reduce minItems for all platforms without restricting it back to 2 for non-versal platforms.

I believe we can remove the "resets" and corresponding "reset-names" properties from here, as their default minItems/maxItems are already taken care of in the else block [1].

[1] https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L39

Regards,
Amit

Quoted 12 lines
Quoted 12 lines
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +1 -2
     maxItems: 3
 
   reset-names:
-    minItems: 2
+    minItems: 1
     maxItems: 3
     items:
       enum: [ qspi, qspi-ocp, rstc_ref ]
--

2.34.1

#4 lore raw
Quoted 12 lines · Amit Kumar
Quoted 11 lines

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml properties: · line 142

Quoted 7 lines

- if:

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +1 -1
@@ -132,11 +139,11 @@ properties:
     maxItems: 1
 
   resets:
-    minItems: 2
+    minItems: 1

I think you're still missing one of the things Krzysztof requested on v1, cos you reduce minItems for all platforms without restricting it back to 2 for non-versal platforms.

Quoted 5 lines

I believe we can remove the "resets" and corresponding "reset-names" properties from here, as their default minItems/maxItems are already taken care of in the else block [1].

[1] https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L39

I don't see anything fixed there.

Best regards,
Krzysztof

#5 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 20 lines

Subject: Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller

Quoted 16 lines · Amit Kumar
Quoted 11 lines

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml properties: · line 142

Quoted 7 lines

- if:

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +1 -1
@@ -132,11 +139,11 @@ properties:
     maxItems: 1
 
   resets:
-    minItems: 2
+    minItems: 1

I think you're still missing one of the things Krzysztof requested on v1, cos you reduce minItems for all platforms without restricting it back to 2 for non-versal platforms.

I believe we can remove the "resets" and corresponding "reset-names" properties from here, as their default minItems/maxItems are already taken care of in the else block [1].

Quoted 5 lines
Quoted 4 lines

[1]
https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14
ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L 39

I don't see anything fixed there.

The intention was to point out the redundancy related to the 'resets' and 'reset-names' properties. At [1], the default minItems and maxItems values are already defined for all platforms. However, the same constraints are redefined at [2] with different minItems and maxItems values , again applying to all platforms. Based on my understanding, the definitions at
[2] for 'resets' and the corresponding 'reset-names' can be safely removed.

[1] https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L41
[2] https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L139

Regards,
Amit

Quoted 3 lines

Best regards,
Krzysztof

#6 lore raw
Quoted 28 lines · Amit Kumar

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 20 lines

Subject: Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller

Quoted 16 lines · Amit Kumar
Quoted 11 lines

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml properties: · line 142

Quoted 7 lines

- if:

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +1 -1
@@ -132,11 +139,11 @@ properties:
     maxItems: 1
 
   resets:
-    minItems: 2
+    minItems: 1

I think you're still missing one of the things Krzysztof requested on v1, cos you reduce minItems for all platforms without restricting it back to 2 for non-versal platforms.

I believe we can remove the "resets" and corresponding "reset-names" properties from here, as their default minItems/maxItems are already taken care of in the else block [1].

Quoted 5 lines
Quoted 4 lines

[1]
https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14
ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L 39

I don't see anything fixed there.

Quoted 7 lines

The intention was to point out the redundancy related to the 'resets' and 'reset-names' properties. At [1], the default minItems and maxItems values are already defined for all platforms. However, the same constraints are redefined at [2] with different minItems and maxItems values , again applying to all platforms. Based on my understanding, the definitions at
[2] for 'resets' and the corresponding 'reset-names' can be safely removed.

It is not about redefining. You need to constrain your properties. They have to be fixed, not flexible.

Best regards,
Krzysztof