[PATCH 5/6] dt-bindings: spi: Document DWC SSI XIP properties
From: Prakriti Sharma
Date: Thu Nov 19 2026 - 05:07:06 EST
Document the optional XIP memory region and the properties that select
execute-in-place, continuous mode, and prefetch.
Signed-off-by: Prakriti Sharma <prakriti@xxxxxxxxxxxx>
Signed-off-by: Siddhant Kumar <sidkumar@xxxxxxxxxxxx>
---
.../bindings/spi/snps,dwc-ssi-2.02a.yaml | 59 ++++++++++++++++++-
1 file changed, 57 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/snps,dwc-ssi-2.02a.yaml b/Documentation/devicetree/bindings/spi/snps,dwc-ssi-2.02a.yaml
index 7cccd627f809..efbeb59313fa 100644
--- a/Documentation/devicetree/bindings/spi/snps,dwc-ssi-2.02a.yaml
+++ b/Documentation/devicetree/bindings/spi/snps,dwc-ssi-2.02a.yaml
@@ -23,7 +23,18 @@ properties:
const: snps,dwc-ssi-2.02a
reg:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
+ description: |
+ Controller register base and optional XIP memory region.
+ - First entry: SSI controller register space
+ - Second entry (optional): XIP memory-mapped region for direct flash access
+
+ reg-names:
+ minItems: 1
+ items:
+ - const: ssi_base
+ - const: xip_mem
interrupts:
description: |
@@ -93,6 +104,48 @@ properties:
of the designware controller, and the upper limit is also subject to
controller configuration.
+ snps,xip-enabled:
+ type: boolean
+ description: |
+ Enable XIP (eXecute-In-Place) mode for direct memory-mapped access to
+ SPI flash. When enabled, the controller's XIP region is mapped into
+ CPU address space for zero-copy reads and writes. It requires the
+ xip_mem entry in reg.
+
+ XIP is used only when this property is present and the module
+ parameter spi_dw_g2_mmio.xip_mode=1 is set. The default xip_mode=0
+ disables XIP. Runtime control is available through sysfs.
+
+ snps,xip-continuous-mode:
+ type: boolean
+ description: |
+ Enable XIP continuous transfer mode. When enabled, the controller omits
+ the command byte on subsequent sequential reads from the same chip select,
+ saving 8 SPI clock cycles per access. This improves throughput for code
+ execution from XIP flash.
+
+ Requirements:
+ - Flash device must support continuous read mode (e.g., Fast Read Quad
+ I/O with mode bits)
+ - Must use consistent command across all accesses
+ - Not compatible with mixed command types
+
+ The controller automatically re-sends the command when CS is de-asserted
+ or transfer type changes.
+
+ snps,xip-prefetch-mode:
+ type: boolean
+ description: |
+ Enable XIP hardware prefetch mode. The controller speculatively fetches
+ the next cache line when the current access completes, anticipating
+ sequential reads. This reduces latency for instruction fetches during
+ XIP code execution.
+
+ Best for: Sequential code execution, linear data reads
+ Not ideal for: Random access patterns, small sporadic reads
+
+ Prefetch is only active when XIP direct mapping is enabled.
+
patternProperties:
"^.*@[0-9a-f]+$":
type: object
@@ -121,7 +174,8 @@ examples:
- |
spi@20100000 {
compatible = "snps,dwc-ssi-2.02a";
- reg = <0x20100000 0x1000>;
+ reg = <0x20100000 0x1000>, <0x60000000 0x10000000>;
+ reg-names = "ssi_base", "xip_mem";
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0 42 4>;
@@ -131,6 +185,7 @@ examples:
dmas = <&dma0 10>, <&dma0 11>;
dma-names = "tx", "rx";
rx-sample-delay-ns = <3>;
+ snps,xip-enabled;
flash@0 {
compatible = "jedec,spi-nor";
--
2.34.1