All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Prakriti Sharma" <Prakriti.Sharma@synopsys.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 5/6] dt-bindings: spi: Document DWC SSI XIP properties
Date: Thu, 19 Nov 2026 10:14:15 +0000	[thread overview]
Message-ID: <sashiko-outbox-222929@kernel.org> (raw)
In-Reply-To: <20261119100513.433044-6-prakriti@synopsys.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] dt-bindings: spi: snps,dwc-ssi-2.02a: XIP properties encode
  OS policy
- [Low] dt-bindings: spi: snps,dwc-ssi-2.02a: missing reg items and XIP
  dependencies
--

commit ea2effa98a511e888bf97a068c9c5ac14822f4eb
Author: Prakriti Sharma <Prakriti.Sharma@synopsys.com>

dt-bindings: spi: Document DWC SSI XIP properties

This commit documents an optional XIP memory region and boolean properties
for execute-in-place, continuous mode, and prefetch in the Synopsys DWC SSI
v2.02a binding.

> 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 7cccd627f8095..efbeb59313fa3 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

[Severity: Low]
Should reg use an items list with individual descriptions for each entry
(like clocks and dmas in this schema) instead of maxItems: 2 with a bulleted
description?

Also, although the snps,xip-enabled description states that it requires the
xip_mem entry in reg, the schema has no dependencies or allOf/if/then
constraint enforcing minItems: 2 on reg and reg-names when the XIP
properties are present, so dt_binding_check and dtbs_check will not catch a
missing xip_mem region.

> @@ -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.

[Severity: Medium]
Do snps,xip-enabled, snps,xip-continuous-mode, and snps,xip-prefetch-mode
encode OS and workload policy rather than hardware description?

Whether an XIP memory-mapped window exists is already described by the
xip_mem reg entry and the controller's capability registers;
snps,xip-enabled acts as a software policy switch and documents Linux-specific
module parameters (spi_dw_g2_mmio.xip_mode=1) and sysfs interfaces in the
binding.  Similarly, snps,xip-continuous-mode depends on the attached flash
device and protocol layer rather than a static controller property, and
snps,xip-prefetch-mode describes workload tuning (sequential versus random
access patterns).

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119100513.433044-1-prakriti@synopsys.com?part=5

  reply	other threads:[~2026-11-19 10:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 10:05 [PATCH 0/6] spi: dw-g2: add Synopsys DWC SSI v2.02a controller support Prakriti Sharma
2026-11-19 10:05 ` [PATCH 1/6] dt-bindings: spi: Add Synopsys DWC SSI v2.02a binding Prakriti Sharma
2026-11-19 10:05 ` [PATCH 2/6] spi: dw-g2: Add Synopsys DWC SSI v2.02a driver Prakriti Sharma
2026-11-19 10:28   ` sashiko-bot
2026-11-19 20:11   ` Mark Brown
2026-11-19 10:05 ` [PATCH 3/6] spi: dw-g2: Add indirect read and write Prakriti Sharma
2026-11-19 10:27   ` sashiko-bot
2026-11-20  0:07   ` kernel test robot
2026-11-19 10:05 ` [PATCH 4/6] spi: dw-g2: Add SPI-NAND support Prakriti Sharma
2026-11-19 10:25   ` sashiko-bot
2026-11-19 10:05 ` [PATCH 5/6] dt-bindings: spi: Document DWC SSI XIP properties Prakriti Sharma
2026-11-19 10:14   ` sashiko-bot [this message]
2026-11-19 12:18   ` Krzysztof Kozlowski
2026-11-19 10:05 ` [PATCH 6/6] spi: dw-g2: Add XIP support Prakriti Sharma
2026-11-19 10:32   ` sashiko-bot
2026-11-19 20:11   ` Mark Brown
2026-11-19 21:29   ` kernel test robot
2026-11-19 20:11 ` [PATCH 0/6] spi: dw-g2: add Synopsys DWC SSI v2.02a controller support Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-222929@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Prakriti.Sharma@synopsys.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.