From: Conor Dooley <conor@kernel.org>
To: Witold Sadowski <wsadowski@marvell.com>
Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
devicetree@vger.kernel.org, broonie@kernel.org, robh@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
pthombar@cadence.com
Subject: Re: [PATCH v4 2/5] dt-bindings: spi: cadence: Add MRVL overlay bindings documentation for Cadence XSPI
Date: Thu, 9 May 2024 18:22:15 +0100 [thread overview]
Message-ID: <20240509-hurried-canned-3ceac439b93d@spud> (raw)
In-Reply-To: <20240509010523.3152264-3-wsadowski@marvell.com>
[-- Attachment #1: Type: text/plain, Size: 1689 bytes --]
Hey Witold,
On Wed, May 08, 2024 at 06:05:20PM -0700, Witold Sadowski wrote:
> allOf:
> - $ref: spi-controller.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: marvell,cn10-xspi-nor
> + then:
> + properties:
> + reg-names:
> + items:
> + - const: io
> + - const: sdma
> + - const: aux
> + - const: xferbase
> + 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
> + else:
> + properties:
> + reg-names:
> + items:
> + - const: io
> + - const: sdma
> + - const: aux
> + 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
The usual approach here is to define the loosest possible constraints
at the top level, so unconditionally define the xfer register region,
and then constrain things based on compatible. In this case, you can set
minItems to 3 unconditionally and then do (in psuedocode):
if:
marvell
then:
reg:
minitems: 4
else
reg:
maxItems: 3
Additionally, when the allOf: is more then just references to other
documents, it should be moved below the required list.
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-05-09 17:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 1:05 [PATCH v4 0/5] Marvell HW overlay support for Cadence xSPI Witold Sadowski
2024-05-09 1:05 ` [PATCH v4 1/5] spi: cadence: Ensure data lines set to low during dummy-cycle period Witold Sadowski
2024-05-09 1:05 ` [PATCH v4 2/5] dt-bindings: spi: cadence: Add MRVL overlay bindings documentation for Cadence XSPI Witold Sadowski
2024-05-09 17:22 ` Conor Dooley [this message]
2024-05-09 1:05 ` [PATCH v4 3/5] spi: cadence: Add Marvell xSPI IP overlay changes Witold Sadowski
2024-05-09 1:05 ` [PATCH v4 4/5] spi: cadence: Allow to read basic xSPI configuration from ACPI Witold Sadowski
2024-05-09 1:05 ` [PATCH v4 5/5] spi: cadence: Add MRVL overlay xfer operation support Witold Sadowski
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=20240509-hurried-canned-3ceac439b93d@spud \
--to=conor@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=pthombar@cadence.com \
--cc=robh@kernel.org \
--cc=wsadowski@marvell.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).