diff mbox series

[v5,2/5] spi: dt-bindings: cadence: Add Marvell overlay bindings documentation for Cadence XSPI

Message ID 20240527084216.667380-4-wsadowski@marvell.com
State Superseded
Headers show
Series None | expand

Commit Message

Witold Sadowski May 27, 2024, 8:42 a.m. UTC
Add new bindings for the v2 Marvell xSPI overlay: marvell,cn10-xspi-nor
compatible string. This new compatible string distinguishes between the
original and modified xSPI block.

Also add an optional base for the xfer register set with an additional
reg field to allocate the xSPI Marvell overlay XFER block.

Signed-off-by: Witold Sadowski <wsadowski@marvell.com>
---
 .../devicetree/bindings/spi/cdns,xspi.yaml    | 38 +++++++++++++++----
 1 file changed, 31 insertions(+), 7 deletions(-)

Comments

Krzysztof Kozlowski May 28, 2024, 6:56 a.m. UTC | #1
On 27/05/2024 10:42, Witold Sadowski wrote:
> Add new bindings for the v2 Marvell xSPI overlay: marvell,cn10-xspi-nor
> compatible string. This new compatible string distinguishes between the
> original and modified xSPI block.
> 
> Also add an optional base for the xfer register set with an additional
> reg field to allocate the xSPI Marvell overlay XFER block.
> 
> Signed-off-by: Witold Sadowski <wsadowski@marvell.com>
> ---
>  .../devicetree/bindings/spi/cdns,xspi.yaml    | 38 +++++++++++++++----
>  1 file changed, 31 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/spi/cdns,xspi.yaml b/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
> index eb0f92468185..d6b8b2a2ecf5 100644
> --- a/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
> +++ b/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
> @@ -15,33 +15,57 @@ description: |
>    single, dual, quad or octal wire transmission modes for
>    read/write access to slaves such as SPI-NOR flash.
>  
> -allOf:
> -  - $ref: spi-controller.yaml#
> -
>  properties:
>    compatible:
> -    const: cdns,xspi-nor
> +    enum:
> +      - cdns,xspi-nor
> +      - marvell,cn10-xspi-nor
> +
> +  interrupts:
> +    maxItems: 1

Items got re-ordered. Keep previous order which matches expected style
(see also DTS coding style).

>  
>    reg:
>      items:
>        - description: address and length of the controller register set
>        - description: address and length of the Slave DMA data port
>        - description: address and length of the auxiliary registers
> +      - description: address and length of the xfer registers
> +    minItems: 3
>  
>    reg-names:
>      items:
>        - const: io
>        - const: sdma
>        - const: aux
> -
> -  interrupts:
> -    maxItems: 1
> +      - const: xferbase
> +    minItems: 3
>  


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/cdns,xspi.yaml b/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
index eb0f92468185..d6b8b2a2ecf5 100644
--- a/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
+++ b/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
@@ -15,33 +15,57 @@  description: |
   single, dual, quad or octal wire transmission modes for
   read/write access to slaves such as SPI-NOR flash.
 
-allOf:
-  - $ref: spi-controller.yaml#
-
 properties:
   compatible:
-    const: cdns,xspi-nor
+    enum:
+      - cdns,xspi-nor
+      - marvell,cn10-xspi-nor
+
+  interrupts:
+    maxItems: 1
 
   reg:
     items:
       - description: address and length of the controller register set
       - description: address and length of the Slave DMA data port
       - description: address and length of the auxiliary registers
+      - description: address and length of the xfer registers
+    minItems: 3
 
   reg-names:
     items:
       - const: io
       - const: sdma
       - const: aux
-
-  interrupts:
-    maxItems: 1
+      - const: xferbase
+    minItems: 3
 
 required:
   - compatible
   - reg
   - interrupts
 
+allOf:
+  - $ref: spi-controller.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - marvell,cn10-xspi-nor
+    then:
+      properties:
+        reg:
+          minItems: 4
+        reg-names:
+          minItems: 4
+    else:
+      properties:
+        reg:
+          maxItems: 3
+        reg-names:
+          maxItems: 3
+
 unevaluatedProperties: false
 
 examples: