[PATCH 2/4] dt-bindings: sound: Update ADMAIF bindings for tegra264

Sheetal . posted 4 patches 1 week, 6 days ago
There is a newer version of this series
[PATCH 2/4] dt-bindings: sound: Update ADMAIF bindings for tegra264
Posted by Sheetal . 1 week, 6 days ago
From: sheetal <sheetal@nvidia.com>

Update the ADMAIF bindings as tegra264 supports 64 channels, which includes
32 RX and 32 TX channels.

Signed-off-by: sheetal <sheetal@nvidia.com>
---
 .../sound/nvidia,tegra210-admaif.yaml         | 49 +++++++++++++------
 1 file changed, 35 insertions(+), 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
index b32f33214ba6..f53ecef379b3 100644
--- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
@@ -93,20 +93,41 @@ then:
     iommus: false
 
 else:
-  properties:
-    dmas:
-      description:
-        DMA channel specifiers, equally divided for Tx and Rx.
-      minItems: 1
-      maxItems: 40
-    dma-names:
-      items:
-        pattern: "^[rt]x(1[0-9]|[1-9]|20)$"
-      description:
-        Should be "rx1", "rx2" ... "rx20" for DMA Rx channel
-        Should be "tx1", "tx2" ... "tx20" for DMA Tx channel
-      minItems: 1
-      maxItems: 40
+  if:
+    properties:
+      compatible:
+        contains:
+          const: nvidia,tegra264-admaif
+  then:
+    properties:
+      dmas:
+        description:
+          DMA channel specifiers, equally divided for Tx and Rx.
+        minItems: 1
+        maxItems: 64
+      dma-names:
+        items:
+          pattern: "^[rt]x(3[0-2]|[1-2][0-9]|[1-9])$"
+        description:
+          Should be "rx1", "rx2" ... "rx32" for DMA Rx channel
+          Should be "tx1", "tx2" ... "tx32" for DMA Tx channel
+        minItems: 1
+        maxItems: 64
+  else:
+    properties:
+      dmas:
+        description:
+          DMA channel specifiers, equally divided for Tx and Rx.
+        minItems: 1
+        maxItems: 40
+      dma-names:
+        items:
+          pattern: "^[rt]x(1[0-9]|[1-9]|20)$"
+        description:
+          Should be "rx1", "rx2" ... "rx20" for DMA Rx channel
+          Should be "tx1", "tx2" ... "tx20" for DMA Tx channel
+        minItems: 1
+        maxItems: 40
 
 required:
   - compatible
-- 
2.34.1
Re: [PATCH 2/4] dt-bindings: sound: Update ADMAIF bindings for tegra264
Posted by Rob Herring 1 week, 2 days ago
On Thu, Sep 18, 2025 at 03:50:07PM +0530, Sheetal . wrote:
> From: sheetal <sheetal@nvidia.com>
> 
> Update the ADMAIF bindings as tegra264 supports 64 channels, which includes
> 32 RX and 32 TX channels.
> 
> Signed-off-by: sheetal <sheetal@nvidia.com>
> ---
>  .../sound/nvidia,tegra210-admaif.yaml         | 49 +++++++++++++------
>  1 file changed, 35 insertions(+), 14 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
> index b32f33214ba6..f53ecef379b3 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
> @@ -93,20 +93,41 @@ then:
>      iommus: false
>  
>  else:
> -  properties:
> -    dmas:
> -      description:
> -        DMA channel specifiers, equally divided for Tx and Rx.
> -      minItems: 1
> -      maxItems: 40
> -    dma-names:
> -      items:
> -        pattern: "^[rt]x(1[0-9]|[1-9]|20)$"
> -      description:
> -        Should be "rx1", "rx2" ... "rx20" for DMA Rx channel
> -        Should be "tx1", "tx2" ... "tx20" for DMA Tx channel
> -      minItems: 1
> -      maxItems: 40
> +  if:

Try to avoid nested if/then/else if possible and put independent if/then 
schemas under 'allOf'.

> +    properties:
> +      compatible:
> +        contains:
> +          const: nvidia,tegra264-admaif
> +  then:
> +    properties:
> +      dmas:
> +        description:
> +          DMA channel specifiers, equally divided for Tx and Rx.
> +        minItems: 1
> +        maxItems: 64
> +      dma-names:
> +        items:
> +          pattern: "^[rt]x(3[0-2]|[1-2][0-9]|[1-9])$"
> +        description:
> +          Should be "rx1", "rx2" ... "rx32" for DMA Rx channel
> +          Should be "tx1", "tx2" ... "tx32" for DMA Tx channel
> +        minItems: 1
> +        maxItems: 64
> +  else:
> +    properties:
> +      dmas:
> +        description:
> +          DMA channel specifiers, equally divided for Tx and Rx.
> +        minItems: 1
> +        maxItems: 40
> +      dma-names:
> +        items:
> +          pattern: "^[rt]x(1[0-9]|[1-9]|20)$"
> +        description:
> +          Should be "rx1", "rx2" ... "rx20" for DMA Rx channel
> +          Should be "tx1", "tx2" ... "tx20" for DMA Tx channel
> +        minItems: 1
> +        maxItems: 40
>  
>  required:
>    - compatible
> -- 
> 2.34.1
>