* [PATCH v3 1/3] dt-bindings: arm-smmu: Document nvidia, memory-controller property
2022-04-29 8:22 [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU Thierry Reding
@ 2022-04-29 8:22 ` Thierry Reding
2022-04-29 8:22 ` [PATCH v3 2/3] dt-bindings: arm-smmu: Add compatible for Tegra234 SOC Thierry Reding
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2022-04-29 8:22 UTC (permalink / raw)
To: Joerg Roedel
Cc: Will Deacon, Robin Murphy, iommu, linux-tegra, linux-arm-kernel,
Rob Herring
From: Thierry Reding <treding@nvidia.com>
On NVIDIA SoC's the ARM SMMU needs to interact with the memory
controller in order to map memory clients to the corresponding stream
IDs. Document how the nvidia,memory-controller property can be used to
achieve this.
Note that this is a backwards-incompatible change that is, however,
necessary to ensure correctness. Without the new property, most of the
devices would still work but it is not guaranteed that all will.
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- clarify why the new nvidia,memory-controller property is required
.../devicetree/bindings/iommu/arm,smmu.yaml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
index da5381c8ee11..44606ad5aa39 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
@@ -157,6 +157,17 @@ properties:
power-domains:
maxItems: 1
+ nvidia,memory-controller:
+ description: |
+ A phandle to the memory controller on NVIDIA Tegra186 and later SoCs.
+ The memory controller needs to be programmed with a mapping of memory
+ client IDs to ARM SMMU stream IDs.
+
+ If this property is absent, the mapping programmed by early firmware
+ will be used and it is not guaranteed that IOMMU translations will be
+ enabled for any given device.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
required:
- compatible
- reg
@@ -179,6 +190,12 @@ allOf:
reg:
minItems: 1
maxItems: 2
+
+ # The reference to the memory controller is required to ensure that the
+ # memory client to stream ID mapping can be done synchronously with the
+ # IOMMU attachment.
+ required:
+ - nvidia,memory-controller
else:
properties:
reg:
--
2.35.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v3 2/3] dt-bindings: arm-smmu: Add compatible for Tegra234 SOC
2022-04-29 8:22 [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU Thierry Reding
2022-04-29 8:22 ` [PATCH v3 1/3] dt-bindings: arm-smmu: Document nvidia, memory-controller property Thierry Reding
@ 2022-04-29 8:22 ` Thierry Reding
2022-04-29 8:22 ` [PATCH v3 3/3] iommu/arm-smmu: Support Tegra234 SMMU Thierry Reding
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2022-04-29 8:22 UTC (permalink / raw)
To: Joerg Roedel
Cc: Will Deacon, Robin Murphy, iommu, linux-tegra, linux-arm-kernel,
Rob Herring
From: Thierry Reding <treding@nvidia.com>
The NVIDIA Tegra234 SoC comes with one single-instance ARM SMMU used by
isochronous memory clients and two dual-instance ARM SMMUs used by non-
isochronous memory clients.
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
index 44606ad5aa39..590cc8dc8323 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
@@ -62,8 +62,9 @@ properties:
for improved performance.
items:
- enum:
- - nvidia,tegra194-smmu
- nvidia,tegra186-smmu
+ - nvidia,tegra194-smmu
+ - nvidia,tegra234-smmu
- const: nvidia,smmu-500
- items:
- const: arm,mmu-500
@@ -183,8 +184,9 @@ allOf:
compatible:
contains:
enum:
- - nvidia,tegra194-smmu
- nvidia,tegra186-smmu
+ - nvidia,tegra194-smmu
+ - nvidia,tegra234-smmu
then:
properties:
reg:
--
2.35.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v3 3/3] iommu/arm-smmu: Support Tegra234 SMMU
2022-04-29 8:22 [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU Thierry Reding
2022-04-29 8:22 ` [PATCH v3 1/3] dt-bindings: arm-smmu: Document nvidia, memory-controller property Thierry Reding
2022-04-29 8:22 ` [PATCH v3 2/3] dt-bindings: arm-smmu: Add compatible for Tegra234 SOC Thierry Reding
@ 2022-04-29 8:22 ` Thierry Reding
2022-05-05 14:15 ` [PATCH v3 0/3] " Thierry Reding
2022-05-06 16:07 ` Will Deacon
4 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2022-04-29 8:22 UTC (permalink / raw)
To: Joerg Roedel
Cc: Will Deacon, Robin Murphy, iommu, linux-tegra, linux-arm-kernel
From: Thierry Reding <treding@nvidia.com>
Allow the NVIDIA-specific ARM SMMU implementation to bind to the SMMU
instances found on Tegra234.
Acked-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
index 2c25cce38060..658f3cc83278 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
@@ -211,7 +211,8 @@ struct arm_smmu_device *arm_smmu_impl_init(struct arm_smmu_device *smmu)
if (of_property_read_bool(np, "calxeda,smmu-secure-config-access"))
smmu->impl = &calxeda_impl;
- if (of_device_is_compatible(np, "nvidia,tegra194-smmu") ||
+ if (of_device_is_compatible(np, "nvidia,tegra234-smmu") ||
+ of_device_is_compatible(np, "nvidia,tegra194-smmu") ||
of_device_is_compatible(np, "nvidia,tegra186-smmu"))
return nvidia_smmu_impl_init(smmu);
--
2.35.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU
2022-04-29 8:22 [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU Thierry Reding
` (2 preceding siblings ...)
2022-04-29 8:22 ` [PATCH v3 3/3] iommu/arm-smmu: Support Tegra234 SMMU Thierry Reding
@ 2022-05-05 14:15 ` Thierry Reding
2022-05-05 14:53 ` Will Deacon
2022-05-06 16:07 ` Will Deacon
4 siblings, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2022-05-05 14:15 UTC (permalink / raw)
To: Joerg Roedel
Cc: Will Deacon, Robin Murphy, iommu, linux-tegra, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1062 bytes --]
On Fri, Apr 29, 2022 at 10:22:40AM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Hi Joerg,
>
> this is essentially a resend of v2 with a Acked-by:s from Robin and Will
> added. These have been on the list for quite a while now, but apparently
> there was a misunderstanding, so neither you nor Will picked this up.
>
> Since Will acked these, I think it's probably best for you to pick these
> up directly. If not, let me know and I'll work with Will to merge via
> the ARM SMMU tree.
>
> Thanks,
> Thierry
>
> Thierry Reding (3):
> dt-bindings: arm-smmu: Document nvidia,memory-controller property
> dt-bindings: arm-smmu: Add compatible for Tegra234 SOC
> iommu/arm-smmu: Support Tegra234 SMMU
>
> .../devicetree/bindings/iommu/arm,smmu.yaml | 23 +++++++++++++++++--
> drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 ++-
> 2 files changed, 23 insertions(+), 3 deletions(-)
Joerg,
anything left to do on this from your perspective, or can this go into
v5.19?
Thanks,
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU
2022-05-05 14:15 ` [PATCH v3 0/3] " Thierry Reding
@ 2022-05-05 14:53 ` Will Deacon
2022-05-05 15:27 ` Thierry Reding
0 siblings, 1 reply; 8+ messages in thread
From: Will Deacon @ 2022-05-05 14:53 UTC (permalink / raw)
To: Thierry Reding
Cc: Joerg Roedel, Robin Murphy, iommu, linux-tegra, linux-arm-kernel
On Thu, May 05, 2022 at 04:15:29PM +0200, Thierry Reding wrote:
> On Fri, Apr 29, 2022 at 10:22:40AM +0200, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > Hi Joerg,
> >
> > this is essentially a resend of v2 with a Acked-by:s from Robin and Will
> > added. These have been on the list for quite a while now, but apparently
> > there was a misunderstanding, so neither you nor Will picked this up.
> >
> > Since Will acked these, I think it's probably best for you to pick these
> > up directly. If not, let me know and I'll work with Will to merge via
> > the ARM SMMU tree.
> >
> > Thanks,
> > Thierry
> >
> > Thierry Reding (3):
> > dt-bindings: arm-smmu: Document nvidia,memory-controller property
> > dt-bindings: arm-smmu: Add compatible for Tegra234 SOC
> > iommu/arm-smmu: Support Tegra234 SMMU
> >
> > .../devicetree/bindings/iommu/arm,smmu.yaml | 23 +++++++++++++++++--
> > drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 ++-
> > 2 files changed, 23 insertions(+), 3 deletions(-)
>
> Joerg,
>
> anything left to do on this from your perspective, or can this go into
> v5.19?
I'll pick them up in the Arm SMMU queue, as there are some other SMMU
patches kicking around and we may as well keep them all together.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU
2022-05-05 14:53 ` Will Deacon
@ 2022-05-05 15:27 ` Thierry Reding
0 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2022-05-05 15:27 UTC (permalink / raw)
To: Will Deacon
Cc: Joerg Roedel, Robin Murphy, iommu, linux-tegra, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1468 bytes --]
On Thu, May 05, 2022 at 03:53:08PM +0100, Will Deacon wrote:
> On Thu, May 05, 2022 at 04:15:29PM +0200, Thierry Reding wrote:
> > On Fri, Apr 29, 2022 at 10:22:40AM +0200, Thierry Reding wrote:
> > > From: Thierry Reding <treding@nvidia.com>
> > >
> > > Hi Joerg,
> > >
> > > this is essentially a resend of v2 with a Acked-by:s from Robin and Will
> > > added. These have been on the list for quite a while now, but apparently
> > > there was a misunderstanding, so neither you nor Will picked this up.
> > >
> > > Since Will acked these, I think it's probably best for you to pick these
> > > up directly. If not, let me know and I'll work with Will to merge via
> > > the ARM SMMU tree.
> > >
> > > Thanks,
> > > Thierry
> > >
> > > Thierry Reding (3):
> > > dt-bindings: arm-smmu: Document nvidia,memory-controller property
> > > dt-bindings: arm-smmu: Add compatible for Tegra234 SOC
> > > iommu/arm-smmu: Support Tegra234 SMMU
> > >
> > > .../devicetree/bindings/iommu/arm,smmu.yaml | 23 +++++++++++++++++--
> > > drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 ++-
> > > 2 files changed, 23 insertions(+), 3 deletions(-)
> >
> > Joerg,
> >
> > anything left to do on this from your perspective, or can this go into
> > v5.19?
>
> I'll pick them up in the Arm SMMU queue, as there are some other SMMU
> patches kicking around and we may as well keep them all together.
Sounds good, thanks!
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU
2022-04-29 8:22 [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU Thierry Reding
` (3 preceding siblings ...)
2022-05-05 14:15 ` [PATCH v3 0/3] " Thierry Reding
@ 2022-05-06 16:07 ` Will Deacon
4 siblings, 0 replies; 8+ messages in thread
From: Will Deacon @ 2022-05-06 16:07 UTC (permalink / raw)
To: Thierry Reding, Joerg Roedel
Cc: catalin.marinas, kernel-team, Will Deacon, iommu, Robin Murphy,
linux-tegra, linux-arm-kernel
On Fri, 29 Apr 2022 10:22:40 +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Hi Joerg,
>
> this is essentially a resend of v2 with a Acked-by:s from Robin and Will
> added. These have been on the list for quite a while now, but apparently
> there was a misunderstanding, so neither you nor Will picked this up.
>
> [...]
Applied to will (for-joerg/arm-smmu/updates), thanks!
[1/3] dt-bindings: arm-smmu: Document nvidia,memory-controller property
https://git.kernel.org/will/c/c02bda09f91a
[2/3] dt-bindings: arm-smmu: Add compatible for Tegra234 SOC
https://git.kernel.org/will/c/95d5aeabda00
[3/3] iommu/arm-smmu: Support Tegra234 SMMU
https://git.kernel.org/will/c/5ca216155b5e
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread