From: Rob Herring <robh@kernel.org>
To: Vishwaroop A <va@nvidia.com>
Cc: krzk@kernel.org, broonie@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, thierry.reding@gmail.com,
jonathanh@nvidia.com, skomatineni@nvidia.com,
ldewangan@nvidia.com, kyarlagadda@nvidia.com,
smangipudi@nvidia.com, linux-spi@vger.kernel.org,
devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: spi: nvidia,tegra210-quad: Add IOMMU property for Tegra234
Date: Wed, 14 May 2025 14:01:06 -0500 [thread overview]
Message-ID: <20250514190106.GA2808529-robh@kernel.org> (raw)
In-Reply-To: <20250506180848.3430191-1-va@nvidia.com>
On Tue, May 06, 2025 at 06:08:48PM +0000, Vishwaroop A wrote:
> The Tegra210 Quad SPI controller uses internal DMA engines to efficiently
> transfer data between system memory and the SPI bus. On Tegra234 platform,
> DMA transactions must be properly mapped and protected through IOMMU to
> ensure system security and functional correctness. Tegra241 uses external
> DMA and doesn't require IOMMU.
>
> Add the iommus property to the device tree binding, making it required
> only for Tegra234 platform while explicitly disallowing it for other
> platforms including Tegra241.
>
> Signed-off-by: Vishwaroop A <va@nvidia.com>
> ---
> .../bindings/spi/nvidia,tegra210-quad.yaml | 22 +++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml b/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml
> index 48e97e240265..ac79cb19c81a 100644
> --- a/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml
> +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml
> @@ -12,6 +12,25 @@ maintainers:
>
> allOf:
> - $ref: spi-controller.yaml#
> + - if:
> + properties:
> + compatible:
Use 'contains' here so if this is ever a fallback, it works for that
case.
> + enum:
> + - nvidia,tegra234-qspi
> + then:
> + required:
> + - iommus
> + - if:
> + properties:
> + compatible:
> + enum:
> + - nvidia,tegra210-qspi
> + - nvidia,tegra186-qspi
> + - nvidia,tegra194-qspi
> + - nvidia,tegra241-qspi
Shouldn't this just be an 'else'? I suppose sometimes an IOMMU might not
be enabled, but that's policy. Either the h/w has an IOMMU or it
doesn't.
> + then:
> + properties:
> + iommus: false
>
> properties:
> compatible:
> @@ -47,6 +66,9 @@ properties:
> - const: rx
> - const: tx
>
> + iommus:
> + maxItems: 1
> +
> patternProperties:
> "@[0-9a-f]+$":
> type: object
> --
> 2.17.1
>
next prev parent reply other threads:[~2025-05-14 19:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 18:08 [PATCH v2] dt-bindings: spi: nvidia,tegra210-quad: Add IOMMU property for Tegra234 Vishwaroop A
2025-05-06 18:14 ` Krzysztof Kozlowski
2025-05-14 19:01 ` Rob Herring [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-05-06 17:58 Vishwaroop A
2025-05-06 18:12 ` 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=20250514190106.GA2808529-robh@kernel.org \
--to=robh@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=kyarlagadda@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=skomatineni@nvidia.com \
--cc=smangipudi@nvidia.com \
--cc=thierry.reding@gmail.com \
--cc=va@nvidia.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 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.