Skip to contentSkip to conversation

ASoC: dt-bindings: tegra: Document iommus and interconnects for ADMAIF

PATCH In review Thierry Reding 2 participants 4 messages Jan 18, 2024 – Jan 30, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ASoC: dt-bindings: tegra: Document iommus and interconnects for ADMAIF

From: Thierry Reding <[email protected]>

The ADMAIF is responsible for accessing system memory on behalf of other components of the APE, so make sure it can be hooked up to an IOMMU and memory controller.

---
 .../bindings/sound/nvidia,tegra210-admaif.yaml       | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml +12 -0
index 15ab40aeab1e..59304f02d063 100644
@@ -39,6 +39,18 @@ properties:
 
   dma-names: true
 
+  iommus:
+    maxItems: 1
+
+  interconnects:
+    description: Description of the interconnect paths for the ADMA interface; see
+      ../interconnect/interconnect.txt for details.
+
+  interconnect-names:
+    items:
+      - const: dma-mem # read
+      - const: write
+
   ports:
     $ref: /schemas/graph.yaml#/properties/ports
     description: |
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 dt-bindings: sound: tegra: Correct clocks and resets for HDA

From: Thierry Reding <[email protected]>

The HDA controller on Tegra194 and Tegra234 uses a slightly different set of clocks and resets, so describe those accurately in the bindings.

---
 .../bindings/sound/nvidia,tegra30-hda.yaml    | 95 +++++++++++++++++--
 1 file changed, 85 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml +85 -10
index 12c31b4b99e1..e64c99b6b20b 100644
@@ -23,8 +23,6 @@ properties:
       - const: nvidia,tegra30-hda
       - items:
           - enum:
-              - nvidia,tegra234-hda
-              - nvidia,tegra194-hda
               - nvidia,tegra186-hda
               - nvidia,tegra210-hda
               - nvidia,tegra124-hda
@@ -33,6 +31,8 @@ properties:
           - const: nvidia,tegra132-hda
           - const: nvidia,tegra124-hda
           - const: nvidia,tegra30-hda
+      - const: nvidia,tegra194-hda
+      - const: nvidia,tegra234-hda
 
   reg:
     maxItems: 1
@@ -47,10 +47,7 @@ properties:
 
   clock-names:
     minItems: 2
-    items:
-      - const: hda
-      - const: hda2hdmi
-      - const: hda2codec_2x
+    maxItems: 3
 
   resets:
     minItems: 2
@@ -58,10 +55,7 @@ properties:
 
   reset-names:
     minItems: 2
-    items:
-      - const: hda
-      - const: hda2hdmi
-      - const: hda2codec_2x
+    maxItems: 3
 
   power-domains:
     maxItems: 1
@@ -83,6 +77,87 @@ properties:
       The user-visible name of this sound complex. If this property is
       not specified then boards can use default name provided in hda driver.
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - nvidia,tegra30-hda
+              - nvidia,tegra114-hda
+              - nvidia,tegra124-hda
+              - nvidia,tegra132-hda
+              - nvidia,tegra210-hda
+              - nvidia,tegra186-hda
+    then:
+      properties:
+        clocks:
+          minItems: 3
+          maxItems: 3
+
+        clock-names:
+          items:
+            - const: hda
+            - const: hda2hdmi
+            - const: hda2codec_2x
+
+        resets:
+          minItems: 3
+          maxItems: 3
+
+        reset-names:
+          items:
+            - const: hda
+            - const: hda2hdmi
+            - const: hda2codec_2x
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: nvidia,tegra194-hda
+    then:
+      properties:
+        clocks:
+          minItems: 3
+
+        clock-names:
+          items:
+            - const: hda
+            - const: hda2hdmi
+            - const: hda2codec_2x
+
+        resets:
+          maxItems: 2
+
+        reset-names:
+          items:
+            - const: hda
+            - const: hda2hdmi
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: nvidia,tegra234-hda
+    then:
+      properties:
+        clocks:
+          maxItems: 2
+
+        clock-names:
+          items:
+            - const: hda
+            - const: hda2codec_2x
+
+        resets:
+          maxItems: 2
+
+        reset-names:
+          items:
+            - const: hda
+            - const: hda2codec_2x
+
 required:
   - compatible
   - reg
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] dt-bindings: sound: tegra: Correct clocks and resets for HDA

Quoted 1 line · Thierry Reding

From: Thierry Reding <[email protected]>

Subject prefix is wrong. See patch 1 for correct prefix.

Quoted 8 lines

The HDA controller on Tegra194 and Tegra234 uses a slightly different set of clocks and resets, so describe those accurately in the bindings.

---
 .../bindings/sound/nvidia,tegra30-hda.yaml    | 95 +++++++++++++++++--
 1 file changed, 85 insertions(+), 10 deletions(-)

Otherwise,

maintainer
#3 lore raw
In reply to Thierry Reding
Quoted 16 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The ADMAIF is responsible for accessing system memory on behalf of other components of the APE, so make sure it can be hooked up to an IOMMU and memory controller.

---
 .../bindings/sound/nvidia,tegra210-admaif.yaml       | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml +0 -0
index 15ab40aeab1e..59304f02d063 100644

Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml properties: · line 47

Quoted 9 lines
Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml +6 -0
@@ -39,6 +39,18 @@ properties:
 
   dma-names: true
 
+  iommus:
+    maxItems: 1
+
+  interconnects:
+    description: Description of the interconnect paths for the ADMA interface; see
+      ../interconnect/interconnect.txt for details.

Don't need generic descriptions of common properties. What you need is defining how many entries and a description for each entry.

Rob