mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
To: <broonie@kernel.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>
Cc: <vaishnav.a@ti.com>, <linux-spi@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<git@amd.com>, <amitrkcian2002@gmail.com>,
	Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Subject: [PATCH v4] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
Date: Thu, 3 Dec 2026 11:03:15 +0530	[thread overview]
Message-ID: <20261203053315.1473235-1-amit.kumar-mahapatra@amd.com> (raw)

The Cadence Octal SPI (OSPI) controller on AMD Versal SoCs has a single
reset, but the binding requires at least two "resets" and "reset-names"
entries for every compatible, so a Versal DT that describes its reset
fails dtbs_check.

Lower the top-level minItems of "resets" and "reset-names" to 1 so that
the top level covers all variants, then constrain each variant: Versal
takes at most one reset, named "qspi", and all other controllers keep the
existing minimum of two.

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
---
BRANCH: for-next

Changes in v4:
 - Restore the top-level minItems of 1 for 'resets' and 'reset-names'
   and keep the minimum of two for non-Versal controllers.
 - List the Versal reset name as an item instead of an enum.
 - Updated patch description.

Changes in v3:
 - Updates to 'resets' and 'reset-names' removed for non-Versal platforms.
 - Updated patch description.
 - Added Mark's Acked-by tag.

Changes in v2:
 - Removed "resets" & "reset-names" from required properties.
 - To address review comments, removed "maxItems" from "reset-names".
---
 .../bindings/spi/cdns,qspi-nor.yaml           | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
index 891f578b5ac4..8087503f391b 100644
--- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
@@ -17,8 +17,23 @@ allOf:
           contains:
             const: xlnx,versal-ospi-1.0
     then:
+      properties:
+        resets:
+          maxItems: 1
+
+        reset-names:
+          items:
+            - const: qspi
+
       required:
         - power-domains
+    else:
+      properties:
+        resets:
+          minItems: 2
+
+        reset-names:
+          minItems: 2
   - if:
       properties:
         compatible:
@@ -154,11 +169,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 ]
-- 
2.44.4


             reply	other threads:[~2026-12-03  5:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  5:33 Amit Kumar Mahapatra [this message]
2026-12-03 14:57 ` Krzysztof Kozlowski

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=20261203053315.1473235-1-amit.kumar-mahapatra@amd.com \
    --to=amit.kumar-mahapatra@amd.com \
    --cc=amitrkcian2002@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=git@amd.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=vaishnav.a@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®