diff mbox series

[v5,1/6] ASoC: dt-bindings: tegra: Add graph bindings

Message ID 1605119676-32273-2-git-send-email-spujar@nvidia.com
State Changes Requested, archived
Headers show
Series Tegra210 audio graph card | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema fail build log

Commit Message

Sameer Pujar Nov. 11, 2020, 6:34 p.m. UTC
Add device tree binding properties of generic graph to ASoC component
devices. This allows to define audio ports out of these components or
DAIs and audio graph based sound card can be realised with this.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
---
 .../devicetree/bindings/sound/nvidia,tegra186-dspk.yaml     |  6 ++++++
 .../devicetree/bindings/sound/nvidia,tegra210-admaif.yaml   |  6 ++++++
 .../devicetree/bindings/sound/nvidia,tegra210-ahub.yaml     | 13 +++++++++++--
 .../devicetree/bindings/sound/nvidia,tegra210-dmic.yaml     |  6 ++++++
 .../devicetree/bindings/sound/nvidia,tegra210-i2s.yaml      |  6 ++++++
 5 files changed, 35 insertions(+), 2 deletions(-)

Comments

Rob Herring (Arm) Nov. 12, 2020, 2:38 p.m. UTC | #1
On Thu, Nov 12, 2020 at 12:04:31AM +0530, Sameer Pujar wrote:
> Add device tree binding properties of generic graph to ASoC component
> devices. This allows to define audio ports out of these components or
> DAIs and audio graph based sound card can be realised with this.

This is all dependent on graph.yaml being applied which hasn't happened 
yet. I guess I'll need to provide a branch as there's multiple 
subsystems needing it.

> 
> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> ---
>  .../devicetree/bindings/sound/nvidia,tegra186-dspk.yaml     |  6 ++++++
>  .../devicetree/bindings/sound/nvidia,tegra210-admaif.yaml   |  6 ++++++
>  .../devicetree/bindings/sound/nvidia,tegra210-ahub.yaml     | 13 +++++++++++--
>  .../devicetree/bindings/sound/nvidia,tegra210-dmic.yaml     |  6 ++++++
>  .../devicetree/bindings/sound/nvidia,tegra210-i2s.yaml      |  6 ++++++
>  5 files changed, 35 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
> index ed2fb32..3c9364d 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
> @@ -55,6 +55,12 @@ properties:
>        The name can be "DSPK1" or "DSPKx", where x depends on the maximum
>        available instances on a Tegra SoC.
>  
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports

If you have 'ports', then that means you have multiple ports and you 
have to enumerate what each port is.

> +
> +  port:
> +    $ref: /schemas/sound/audio-graph.yaml#/properties/port

If you only have 1 port then, you can use 'port'.


So listing both is an error.

> +
>  required:
>    - compatible
>    - reg
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
> index c028b25..162823d 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
> @@ -37,6 +37,12 @@ properties:
>  
>    dma-names: true
>  
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +
> +  port:
> +    $ref: /schemas/sound/audio-graph.yaml#/properties/port
> +
>  if:
>    properties:
>      compatible:
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
> index d772197..59cd1f1 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
> @@ -56,6 +56,16 @@ properties:
>  
>    ranges: true
>  
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +
> +  port:
> +    $ref: /schemas/sound/audio-graph.yaml#/properties/port
> +
> +patternProperties:
> +  "@[0-9a-f]+$":
> +    type: object
> +
>  required:
>    - compatible
>    - reg
> @@ -67,8 +77,7 @@ required:
>    - "#size-cells"
>    - ranges
>  
> -additionalProperties:
> -  type: object
> +additionalProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml
> index 2a3207b..b16bf5e 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml
> @@ -56,6 +56,12 @@ properties:
>        The name can be "DMIC1" or "DMIC2" ... "DMICx", where x depends
>        on the maximum available instances on a Tegra SoC.
>  
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +
> +  port:
> +    $ref: /schemas/sound/audio-graph.yaml#/properties/port
> +
>  required:
>    - compatible
>    - reg
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml
> index dfc1bf7..598f763 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml
> @@ -74,6 +74,12 @@ properties:
>        The name can be "I2S1" or "I2S2" ... "I2Sx", where x depends
>        on the maximum available instances on a Tegra SoC.
>  
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +
> +  port:
> +    $ref: /schemas/sound/audio-graph.yaml#/properties/port
> +
>  required:
>    - compatible
>    - reg
> -- 
> 2.7.4
>
Sameer Pujar Nov. 19, 2020, 9:10 a.m. UTC | #2
Hi Rob,

>> Add device tree binding properties of generic graph to ASoC component
>> devices. This allows to define audio ports out of these components or
>> DAIs and audio graph based sound card can be realised with this.
> This is all dependent on graph.yaml being applied which hasn't happened
> yet. I guess I'll need to provide a branch as there's multiple
> subsystems needing it.
>
>> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
>> ---
>>   .../devicetree/bindings/sound/nvidia,tegra186-dspk.yaml     |  6 ++++++
>>   .../devicetree/bindings/sound/nvidia,tegra210-admaif.yaml   |  6 ++++++
>>   .../devicetree/bindings/sound/nvidia,tegra210-ahub.yaml     | 13 +++++++++++--
>>   .../devicetree/bindings/sound/nvidia,tegra210-dmic.yaml     |  6 ++++++
>>   .../devicetree/bindings/sound/nvidia,tegra210-i2s.yaml      |  6 ++++++
>>   5 files changed, 35 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
>> index ed2fb32..3c9364d 100644
>> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
>> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
>> @@ -55,6 +55,12 @@ properties:
>>         The name can be "DSPK1" or "DSPKx", where x depends on the maximum
>>         available instances on a Tegra SoC.

>>
>> +  ports:
>> +    $ref: /schemas/graph.yaml#/properties/ports
> If you have 'ports', then that means you have multiple ports and you
> have to enumerate what each port is.
>
>> +
>> +  port:
>> +    $ref: /schemas/sound/audio-graph.yaml#/properties/port
> If you only have 1 port then, you can use 'port'.
>
>
> So listing both is an error.

Since "ASoC: graph card schema rework" series is merged now, referencing 
"audio-graph-port.yaml" should be sufficient here?

...
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
index ed2fb32..3c9364d 100644
--- a/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
@@ -55,6 +55,12 @@  properties:
       The name can be "DSPK1" or "DSPKx", where x depends on the maximum
       available instances on a Tegra SoC.
 
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+  port:
+    $ref: /schemas/sound/audio-graph.yaml#/properties/port
+
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
index c028b25..162823d 100644
--- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
@@ -37,6 +37,12 @@  properties:
 
   dma-names: true
 
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+  port:
+    $ref: /schemas/sound/audio-graph.yaml#/properties/port
+
 if:
   properties:
     compatible:
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
index d772197..59cd1f1 100644
--- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
@@ -56,6 +56,16 @@  properties:
 
   ranges: true
 
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+  port:
+    $ref: /schemas/sound/audio-graph.yaml#/properties/port
+
+patternProperties:
+  "@[0-9a-f]+$":
+    type: object
+
 required:
   - compatible
   - reg
@@ -67,8 +77,7 @@  required:
   - "#size-cells"
   - ranges
 
-additionalProperties:
-  type: object
+additionalProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml
index 2a3207b..b16bf5e 100644
--- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml
@@ -56,6 +56,12 @@  properties:
       The name can be "DMIC1" or "DMIC2" ... "DMICx", where x depends
       on the maximum available instances on a Tegra SoC.
 
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+  port:
+    $ref: /schemas/sound/audio-graph.yaml#/properties/port
+
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml
index dfc1bf7..598f763 100644
--- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml
@@ -74,6 +74,12 @@  properties:
       The name can be "I2S1" or "I2S2" ... "I2Sx", where x depends
       on the maximum available instances on a Tegra SoC.
 
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+  port:
+    $ref: /schemas/sound/audio-graph.yaml#/properties/port
+
 required:
   - compatible
   - reg