[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250514190106.GA2808529-robh@kernel.org>
Date: Wed, 14 May 2025 14:01:06 -0500
From: Rob Herring <robh@...nel.org>
To: Vishwaroop A <va@...dia.com>
Cc: krzk@...nel.org, broonie@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, thierry.reding@...il.com, jonathanh@...dia.com,
skomatineni@...dia.com, ldewangan@...dia.com,
kyarlagadda@...dia.com, smangipudi@...dia.com,
linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] dt-bindings: spi: nvidia,tegra210-quad: Add IOMMU
property for Tegra234
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@...dia.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
>
Powered by blists - more mailing lists