Skip to content

Commit 8a59954

Browse files
ashishmhetre8thierryreding
authored andcommitted
dt-bindings: iommu: Add NVIDIA Tegra CMDQV support
The Command Queue Virtualization (CMDQV) hardware is part of the SMMUv3 implementation on NVIDIA Tegra SoCs. It assists in virtualizing the command queue for the SMMU. Add a new device tree binding document for nvidia,tegra264-cmdqv. Also update the arm,smmu-v3 binding to include an optional nvidia,cmdqv property. This property is a phandle to the CMDQV device node, allowing the SMMU driver to associate with its corresponding CMDQV instance. Restrict this property usage to Nvidia Tegra264 only. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Ashish Mhetre <amhetre@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
1 parent d3b9e6d commit 8a59954

2 files changed

Lines changed: 68 additions & 1 deletion

File tree

Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ properties:
2020
$nodename:
2121
pattern: "^iommu@[0-9a-f]*"
2222
compatible:
23-
const: arm,smmu-v3
23+
oneOf:
24+
- const: arm,smmu-v3
25+
- items:
26+
- enum:
27+
- nvidia,tegra264-smmu
28+
- const: arm,smmu-v3
2429

2530
reg:
2631
maxItems: 1
@@ -58,6 +63,15 @@ properties:
5863
5964
msi-parent: true
6065

66+
nvidia,cmdqv:
67+
description: |
68+
A phandle to its pairing CMDQV extension for an implementation on NVIDIA
69+
Tegra SoC.
70+
71+
If this property is absent, CMDQ-Virtualization won't be used and SMMU
72+
will only use its own CMDQ.
73+
$ref: /schemas/types.yaml#/definitions/phandle
74+
6175
hisilicon,broken-prefetch-cmd:
6276
type: boolean
6377
description: Avoid sending CMD_PREFETCH_* commands to the SMMU.
@@ -69,6 +83,17 @@ properties:
6983
register access with page 0 offsets. Set for Cavium ThunderX2 silicon that
7084
doesn't support SMMU page1 register space.
7185

86+
allOf:
87+
- if:
88+
not:
89+
properties:
90+
compatible:
91+
contains:
92+
const: nvidia,tegra264-smmu
93+
then:
94+
properties:
95+
nvidia,cmdqv: false
96+
7297
required:
7398
- compatible
7499
- reg
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/iommu/nvidia,tegra264-cmdqv.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: NVIDIA Tegra264 CMDQV
8+
9+
description:
10+
The CMDQ-Virtualization hardware block is part of the SMMUv3 implementation
11+
on Tegra264 SoCs. It assists in virtualizing the command queue for the SMMU.
12+
13+
maintainers:
14+
- Nicolin Chen <nicolinc@nvidia.com>
15+
16+
properties:
17+
compatible:
18+
const: nvidia,tegra264-cmdqv
19+
20+
reg:
21+
maxItems: 1
22+
23+
interrupts:
24+
maxItems: 1
25+
26+
required:
27+
- compatible
28+
- reg
29+
- interrupts
30+
31+
additionalProperties: false
32+
33+
examples:
34+
- |
35+
#include <dt-bindings/interrupt-controller/arm-gic.h>
36+
#include <dt-bindings/interrupt-controller/irq.h>
37+
38+
cmdqv@5200000 {
39+
compatible = "nvidia,tegra264-cmdqv";
40+
reg = <0x5200000 0x830000>;
41+
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
42+
};

0 commit comments

Comments
 (0)