[PATCH 04/13] ASoC: dt-bindings: tegra: Few more Tegra210 AHUB modules

Rob Herring robh at kernel.org
Tue Aug 31 13:21:33 PDT 2021


On Fri, Aug 27, 2021 at 03:03:50PM +0530, Sameer Pujar wrote:
> This patch adds YAML schema for DT bindings of few AHUB modules.
> These devices will be registered as ASoC components and bindings
> will be used on Tegra210 and later chips. The bindings for below
> mentioned modules are added:
> 
>  * SFC (Sampling Frequency Converter)
>  * MVC (Master Volume Control)
>  * AMX (Audio Multiplexer)
>  * ADX (Audio Demultiplexer)
>  * Mixer
> 
> Signed-off-by: Sameer Pujar <spujar at nvidia.com>
> Cc: Rob Herring <robh+dt at kernel.org> 
> ---
>  .../bindings/sound/nvidia,tegra210-adx.yaml        | 74 ++++++++++++++++++++
>  .../bindings/sound/nvidia,tegra210-ahub.yaml       | 20 ++++++
>  .../bindings/sound/nvidia,tegra210-amx.yaml        | 72 ++++++++++++++++++++
>  .../bindings/sound/nvidia,tegra210-mixer.yaml      | 67 ++++++++++++++++++
>  .../bindings/sound/nvidia,tegra210-mvc.yaml        | 79 ++++++++++++++++++++++
>  .../bindings/sound/nvidia,tegra210-sfc.yaml        | 76 +++++++++++++++++++++
>  6 files changed, 388 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-adx.yaml
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-amx.yaml
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-mixer.yaml
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-mvc.yaml
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-sfc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-adx.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-adx.yaml
> new file mode 100644
> index 0000000..9950585
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-adx.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/nvidia,tegra210-adx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Tegra210 ADX Device Tree Bindings
> +
> +description: |
> +  The Audio Demultiplexer (ADX) block takes an input stream with   up to

extra spaces.

> +  16 channels and demultiplexes it into four output streams of up to 16
> +  channels each. A byte RAM helps to form output frames by any combination
> +  of bytes from the input frame. Its design is identical to that of byte
> +  RAM in the AMX except that the data flow direction is reversed.
> +
> +maintainers:
> +  - Jon Hunter <jonathanh at nvidia.com>
> +  - Mohan Kumar <mkumard at nvidia.com>
> +  - Sameer Pujar <spujar at nvidia.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "^adx@[0-9a-f]*$"
> +
> +  compatible:
> +    oneOf:
> +      - const: nvidia,tegra210-adx
> +      - items:
> +          - enum:
> +              - nvidia,tegra194-adx
> +              - nvidia,tegra186-adx
> +          - const: nvidia,tegra210-adx
> +
> +  reg:
> +    maxItems: 1
> +
> +  sound-name-prefix:

nvidia,sound-name-prefix

> +    pattern: "^ADX[1-9]$"
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description:
> +      used as prefix for sink/source names of the component. Must be a
> +      unique string among multiple instances of the same component.
> +      The name can be "ADX1" or "ADX2" ... "ADXx", where x depends on
> +      the maximum available instances on a Tegra SoC.
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    description: |
> +      ADX has one input and four output. Accordingly ACIF (Audio Client

You need to define the port numbers for the input and each output.

> +      Interface) RX and TX port nodes are defined to represent ADX inputs
> +      and output respectively. These are connected to corresponding ports
> +      on AHUB.
> +
> +    patternProperties:
> +      '^port@[0-9]':

Per above, this will need to be split at least into input and output 
ports.

Same issues in the other schemas.

> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +
> +    adx at 702d3800 {
> +        compatible = "nvidia,tegra210-adx";
> +        reg = <0x702d3800 0x100>;
> +        sound-name-prefix = "ADX1";
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
> index 1118a94..4087eeb 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
> @@ -85,6 +85,26 @@ patternProperties:
>      type: object
>      $ref: nvidia,tegra186-dspk.yaml#
>  
> +  '^mvc@[0-9a-f]+$':
> +    type: object
> +    $ref: nvidia,tegra210-mvc.yaml#
> +
> +  '^sfc@[0-9a-f]+$':
> +    type: object
> +    $ref: nvidia,tegra210-sfc.yaml#
> +
> +  '^amx@[0-9a-f]+$':
> +    type: object
> +    $ref: nvidia,tegra210-amx.yaml#
> +
> +  '^adx@[0-9a-f]+$':
> +    type: object
> +    $ref: nvidia,tegra210-adx.yaml#
> +
> +  '^mixer@[0-9a-f]+$':
> +    type: object
> +    $ref: nvidia,tegra210-mixer.yaml#
> +
>  required:
>    - compatible
>    - reg
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-amx.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-amx.yaml
> new file mode 100644
> index 0000000..e6b365b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-amx.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/nvidia,tegra210-amx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Tegra210 AMX Device Tree Bindings
> +
> +description: |
> +  The Audio Multiplexer (AMX) block can multiplex up to four input streams
> +  each of which can have maximum 16 channels and generate an output stream
> +  with maximum 16 channels. A byte RAM helps to form an output frame by
> +  any combination of bytes from the input frames.
> +
> +maintainers:
> +  - Jon Hunter <jonathanh at nvidia.com>
> +  - Mohan Kumar <mkumard at nvidia.com>
> +  - Sameer Pujar <spujar at nvidia.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "^amx@[0-9a-f]*$"
> +
> +  compatible:
> +    oneOf:
> +      - const: nvidia,tegra210-amx
> +      - items:
> +          - const: nvidia,tegra186-amx
> +          - const: nvidia,tegra210-amx
> +      - const: nvidia,tegra194-amx
> +
> +  reg:
> +    maxItems: 1
> +
> +  sound-name-prefix:
> +    pattern: "^AMX[1-9]$"
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description:
> +      used as prefix for sink/source names of the component. Must be a
> +      unique string among multiple instances of the same component.
> +      The name can be "AMX1" or "AMX2" ... "AMXx", where x depends on
> +      the maximum available instances on a Tegra SoC.
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    description: |
> +      AMX has four inputs and one output. Accordingly ACIF (Audio Client
> +      Interfaces) RX and TX port nodes are defined to represent AMX inputs
> +      and output respectively. These are connected to corresponding ports
> +      on AHUB.
> +
> +    patternProperties:
> +      '^port@[0-9]':
> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +
> +    amx at 702d3000 {
> +        compatible = "nvidia,tegra210-amx";
> +        reg = <0x702d3000 0x100>;
> +        sound-name-prefix = "AMX1";
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-mixer.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-mixer.yaml
> new file mode 100644
> index 0000000..0808355
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-mixer.yaml
> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/nvidia,tegra210-mixer.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Tegra210 Mixer Device Tree Bindings
> +
> +description: |
> +  The Mixer supports mixing of up to ten 7.1 audio input streams and
> +  generate five outputs (each of which can be any combination of the
> +  ten input streams).
> +
> +maintainers:
> +  - Jon Hunter <jonathanh at nvidia.com>
> +  - Mohan Kumar <mkumard at nvidia.com>
> +  - Sameer Pujar <spujar at nvidia.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "^mixer@[0-9a-f]*$"
> +
> +  compatible:
> +    oneOf:
> +      - const: nvidia,tegra210-amixer
> +      - items:
> +          - enum:
> +              - nvidia,tegra194-amixer
> +              - nvidia,tegra186-amixer
> +          - const: nvidia,tegra210-amixer
> +
> +  reg:
> +    maxItems: 1
> +
> +  sound-name-prefix:
> +    const: "MIXER"

Don't need quotes. A fixed string seems a bit pointless to put into DT.

> +    $ref: /schemas/types.yaml#/definitions/string
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    description: |
> +      Mixer has ten inputs and five outputs. Accordingly ACIF (Audio Client
> +      Interfaces) RX and TX port nodes are defined to represent MIXER inputs
> +      and outputs respectively. These are connected to corresponding ports
> +      on AHUB.
> +
> +    patternProperties:
> +      '^port@[0-9]':
> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +
> +    mixer at 702dbb00 {
> +        compatible = "nvidia,tegra210-amixer";
> +        reg = <0x702dbb00 0x800>;
> +        sound-name-prefix = "MIXER";
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-mvc.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-mvc.yaml
> new file mode 100644
> index 0000000..7d81b11
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-mvc.yaml
> @@ -0,0 +1,79 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/nvidia,tegra210-mvc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Tegra210 MVC Device Tree Bindings
> +
> +description: |
> +  The Master Volume Control (MVC) provides gain or attenuation to a digital
> +  signal path. It can be used in input or output signal path for per-stream
> +  volume control or it can be used as master volume control. The MVC block
> +  has one input and one output. The input digital stream can be mono or
> +  multi-channel (up to 7.1 channels) stream. An independent mute control is
> +  also included in the MVC block.
> +
> +maintainers:
> +  - Jon Hunter <jonathanh at nvidia.com>
> +  - Mohan Kumar <mkumard at nvidia.com>
> +  - Sameer Pujar <spujar at nvidia.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "^mvc@[0-9a-f]*$"
> +
> +  compatible:
> +    oneOf:
> +      - const: nvidia,tegra210-mvc
> +      - items:
> +          - enum:
> +              - nvidia,tegra194-mvc
> +              - nvidia,tegra186-mvc
> +          - const: nvidia,tegra210-mvc
> +
> +  reg:
> +    maxItems: 1
> +
> +  sound-name-prefix:
> +    pattern: "^MVC[1-9]$"
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description:
> +      used as prefix for sink/source names of the component. Must be a
> +      unique string among multiple instances of the same component.
> +      The name can be "MVC1" or "MVC2" ... "MVCx", where x depends on
> +      the maximum available instances on a Tegra SoC.
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    properties:
> +      port at 0:
> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +        description: |
> +          ACIF (Audio Client Interface) acting as MVC input (RX) port.
> +          This is connected to corresponding ACIF port on AHUB.
> +
> +      port at 1:
> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +        description: |
> +          ACIF (Audio Client Interface) acting as MVC output (TX) port.
> +          This is connected to corresponding ACIF port on AHUB.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +
> +    mvc at 702da000 {
> +        compatible = "nvidia,tegra210-mvc";
> +        reg = <0x702da000 0x200>;
> +        sound-name-prefix = "MVC1";
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-sfc.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-sfc.yaml
> new file mode 100644
> index 0000000..5f05e2a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-sfc.yaml
> @@ -0,0 +1,76 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/nvidia,tegra210-sfc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Tegra210 SFC Device Tree Bindings
> +
> +description: |
> +  The Sampling Frequency Converter (SFC) converts the sampling frequency
> +  of the input signal from one frequency to another. It supports sampling
> +  frequency conversions of streams of up to two channels (stereo).
> +
> +maintainers:
> +  - Jon Hunter <jonathanh at nvidia.com>
> +  - Mohan Kumar <mkumard at nvidia.com>
> +  - Sameer Pujar <spujar at nvidia.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "^sfc@[0-9a-f]*$"
> +
> +  compatible:
> +    oneOf:
> +      - const: nvidia,tegra210-sfc
> +      - items:
> +          - enum:
> +              - nvidia,tegra194-sfc
> +              - nvidia,tegra186-sfc
> +          - const: nvidia,tegra210-sfc
> +
> +  reg:
> +    maxItems: 1
> +
> +  sound-name-prefix:
> +    pattern: "^SFC[1-9]$"
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description:
> +      used as prefix for sink/source names of the component. Must be a
> +      unique string among multiple instances of the same component.
> +      The name can be "SFC1" or "SFC2" ... "SFCx", where x depends on
> +      the maximum available instances on a Tegra SoC.
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    properties:
> +      port at 0:
> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +        description: |
> +          ACIF (Audio Client Interface) acting as SFC input (RX) port.
> +          This is connected to corresponding ACIF port on AHUB.
> +
> +      port at 1:
> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +        description: |
> +          ACIF (Audio Client Interface) acting as SFC output (TX) port.
> +          This is connected to corresponding ACIF port on AHUB.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +
> +    sfc at 702d2000 {
> +        compatible = "nvidia,tegra210-sfc";
> +        reg = <0x702d2000 0x200>;
> +        sound-name-prefix = "SFC1";
> +    };
> +
> +...
> -- 
> 2.7.4
> 
> 



More information about the linux-arm-kernel mailing list