From: Thierry Reding <thierry.reding@gmail.com>
To: Aaron Kling <webgeek1234@gmail.com>
Cc: Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] arm64: tegra: Add iommu and dma properties for Tegra194 QSPI
Date: Thu, 21 May 2026 09:49:06 +0200 [thread overview]
Message-ID: <ag64LbbFmu1c0U7W@orome> (raw)
In-Reply-To: <CALHNRZ9+X-QMmse-+KOAgt4psobecQvizqXMPufx-BnEd2wujA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2849 bytes --]
On Wed, May 20, 2026 at 12:29:49PM -0500, Aaron Kling wrote:
> On Wed, May 20, 2026 at 6:49 AM Thierry Reding <thierry.reding@gmail.com> wrote:
> >
> > On Fri, May 15, 2026 at 03:35:29PM -0500, Aaron Kling via B4 Relay wrote:
> > > From: Aaron Kling <webgeek1234@gmail.com>
> > >
> > > Without iommu and dma enabled, flash storage such as the spi-nor on the
> > > p3668 module times out and cannot complete any transfers.
> > >
> > > Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> > > ---
> > > arch/arm64/boot/dts/nvidia/tegra194.dtsi | 8 ++++++++
> > > 1 file changed, 8 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> > > index 1d659454a6f9fe..0e0a20befe9e68 100644
> > > --- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> > > +++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> > > @@ -923,6 +923,10 @@ spi@3270000 {
> > > <&bpmp TEGRA194_CLK_QSPI0_PM>;
> > > clock-names = "qspi", "qspi_out";
> > > resets = <&bpmp TEGRA194_RESET_QSPI0>;
> > > + iommus = <&smmu TEGRA194_SID_GPCDMA_0>;
> > > + dma-coherent;
> > > + dmas = <&gpcdma 5>, <&gpcdma 5>;
> > > + dma-names = "rx", "tx";
> >
> > dmas and dma-names are the only properties that you should need here.
>
> This is where I started and it didn't work. Without the iommu
> properties, I get endless mmu faults upon accessing the qspi flash
> device:
>
> [ 62.313833] tegra-mc 2c00000.memory-controller: axisw: secure write
> @0x00000003ffffff00: VPR violation ((null))
> [ 62.324542] arm-smmu 12000000.iommu: Unhandled context fault:
> fsr=0x402, iova=0xcd21d000, fsynr=0x80012, cbfrsynra=0x820, cb=1
>
> I know downstream kernels aren't always (normally...) the arbiter of
> sanity, but I did pull these from the Nvidia downstream 5.10 kernel,
> which is where Nvidia was starting to try to align with mainline
> paradigms. All of these properties are set there.
>
> If the qspi node isn't supposed to set iommu directly, then there's a
> larger problem here that I don't even know where to begin to look
> into. All I can say is that dma fails with faults if they are not set
> and works when they are.
I think this is a problem similar to what we experienced with I2C a
little while ago, which we fixed like so:
cdbf26251d3b ("i2c: tegra: Allocate DMA memory for DMA engine")
There's another patch currently under review that tries to simplify this
further using new support from the dmaengine subsystem:
https://patchwork.ozlabs.org/project/linux-tegra/patch/20260518114013.62065-2-akhilrajeev@nvidia.com/
Doing something analogous for QSPI should fix this.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-05-21 7:49 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 20:35 [PATCH 0/3] arm64: tegra: Add iommu and dma properties for Tegra194 QSPI Aaron Kling via B4 Relay
2026-05-15 20:35 ` Aaron Kling
2026-05-15 20:35 ` [PATCH 1/3] spi: dt-bindings: tegra: Support IOMMU property " Aaron Kling via B4 Relay
2026-05-15 20:35 ` Aaron Kling
2026-05-15 20:43 ` sashiko-bot
2026-05-16 10:13 ` Krzysztof Kozlowski
2026-05-20 11:34 ` Thierry Reding
2026-05-15 20:35 ` [PATCH 2/3] spi: dt-bindings: tegra: Support dma-coherent property for QSPI Aaron Kling via B4 Relay
2026-05-15 20:35 ` Aaron Kling
2026-05-15 20:51 ` sashiko-bot
2026-05-16 10:13 ` Krzysztof Kozlowski
2026-05-20 11:46 ` Thierry Reding
2026-05-15 20:35 ` [PATCH 3/3] arm64: tegra: Add iommu and dma properties for Tegra194 QSPI Aaron Kling via B4 Relay
2026-05-15 20:35 ` Aaron Kling
2026-05-15 21:17 ` sashiko-bot
2026-05-20 11:49 ` Thierry Reding
2026-05-20 17:29 ` Aaron Kling
2026-05-21 7:49 ` Thierry Reding [this message]
2026-05-19 14:43 ` [PATCH 0/3] " Jon Hunter
2026-05-19 15:50 ` Jon Hunter
2026-05-19 16:48 ` Aaron Kling
2026-05-19 18:36 ` Jon Hunter
2026-05-19 19:34 ` Jon Hunter
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=ag64LbbFmu1c0U7W@orome \
--to=thierry.reding@gmail.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh@kernel.org \
--cc=thierry.reding@kernel.org \
--cc=webgeek1234@gmail.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.