* [PATCH v4] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
@ 2026-12-03 5:33 Amit Kumar Mahapatra
2026-12-03 14:57 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Amit Kumar Mahapatra @ 2026-12-03 5:33 UTC (permalink / raw)
To: broonie, robh, krzk+dt, conor+dt
Cc: vaishnav.a, linux-spi, devicetree, linux-kernel, git,
amitrkcian2002, Amit Kumar Mahapatra
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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v4] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
2026-12-03 5:33 [PATCH v4] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller Amit Kumar Mahapatra
@ 2026-12-03 14:57 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-12-03 14:57 UTC (permalink / raw)
To: Amit Kumar Mahapatra
Cc: broonie, robh, krzk+dt, conor+dt, vaishnav.a, linux-spi,
devicetree, linux-kernel, git, amitrkcian2002,
Krzysztof Kozlowski
On 2026-12-03 11:03 +0530, Amit Kumar Mahapatra wrote:
> then:
> + properties:
> + resets:
> + maxItems: 1
> +
> + reset-names:
> + items:
> + - const: qspi
> +
> required:
> - power-domains
> + else:
> + properties:
> + resets:
> + minItems: 2
> +
> + reset-names:
> + minItems: 2
There is already other if:then: setting this to minItems: 1, so this is
all quite messy. You should not have multiple "if:then:else" each
setting the same property constraints. Which one applies?
Nesting if:then: is discouraged as well, so I suggest to list all device
compatibles in multiple if:then: cases to set the constraint for resets.
Best regards,
Krzysztof
--
Krzysztof Kozlowski <krzk@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-03 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-03 5:33 [PATCH v4] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller Amit Kumar Mahapatra
2026-12-03 14:57 ` Krzysztof Kozlowski
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®