[PATCH 1/5] spi: cadence: Add new bindings documentation for Cadence XSPI

From: Witold Sadowski
Date: Fri Mar 29 2024 - 15:49:46 EST


Add new bindings:
- mrvl,xspi-nor compatible string
Compatible string to enable Marvell XSPI modification
- Multiple PHY configuration registers
- base for xfer register set

Signed-off-by: Witold Sadowski <wsadowski@xxxxxxxxxxx>
---
.../devicetree/bindings/spi/cdns,xspi.yaml | 84 ++++++++++++++++++-
1 file changed, 83 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/spi/cdns,xspi.yaml b/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
index eb0f92468185..d1fde8d4e9b8 100644
--- a/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
+++ b/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
@@ -20,23 +20,74 @@ allOf:

properties:
compatible:
- const: cdns,xspi-nor
+ - const: cdns,xspi-nor
+ - const: mrvl,xspi-nor

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

reg-names:
items:
- const: io
- const: sdma
- const: aux
+ - const: xferbase

interrupts:
maxItems: 1

+ cdns,dll-phy-control:
+ description: |
+ PHY config register. Valid only for cdns,mrvl-xspi-nor
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x707
+
+ cdns,rfile-phy-control:
+ description: |
+ PHY config register. Valid only for cdns,mrvl-xspi-nor
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x40000
+
+ cdns,rfile-phy-tsel:
+ description: |
+ PHY config register. Valid only for cdns,mrvl-xspi-nor
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0
+
+ cdns,phy-dq-timing:
+ description: |
+ PHY config register. Valid only for cdns,mrvl-xspi-nor
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x101
+
+ cdns,phy-dqs-timing:
+ description: |
+ PHY config register. Valid only for cdns,mrvl-xspi-nor
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x700404
+
+ cdns,phy-gate-lpbk-ctrl:
+ description: |
+ PHY config register. Valid only for cdns,mrvl-xspi-nor
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x200030
+
+ cdns,phy-dll-master-ctrl:
+ description: |
+ PHY config register. Valid only for cdns,mrvl-xspi-nor
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x00800000
+
+ cdns,phy-dll-slave-ctrl:
+ description: |
+ PHY config register. Valid only for cdns,mrvl-xspi-nor
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x0000ff01
+
required:
- compatible
- reg
@@ -68,6 +119,37 @@ examples:
reg = <0>;
};

+ flash@1 {
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <75000000>;
+ reg = <1>;
+ };
+ };
+ };
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ bus {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ xspi: spi@a0010000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "mrvl,xspi-nor";
+ reg = <0x0 0xa0010000 0x0 0x1040>,
+ <0x0 0xb0000000 0x0 0x1000>,
+ <0x0 0xa0020000 0x0 0x100>;
+ <0x0 0xa0090000 0x0 0x100>;
+ reg-names = "io", "sdma", "aux", "xferbase";
+ interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&gic>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <75000000>;
+ reg = <0>;
+ };
+
flash@1 {
compatible = "jedec,spi-nor";
spi-max-frequency = <75000000>;
--
2.17.1