Message ID | 1652895372-29885-2-git-send-email-spujar@nvidia.com |
---|---|
State | Superseded |
Headers | show |
Series | OPE support on Tegra210 and later | expand |
On Thu, May 19, 2022 at 01:40:54PM +0200, Krzysztof Kozlowski wrote: > On 18/05/2022 19:36, Sameer Pujar wrote: > > +title: Tegra210 MBDRC Device Tree Bindings > s/Device Tree Bindings// > and then you have enough space to de-acronym this MBDRC. I suspect people rarely expand the acronym when referring to this device so it's probably clearer the way it is.
On 20/05/2022 06:19, Sameer Pujar wrote: > Thanks Krzysztof for review. > > > On 19-05-2022 17:10, Krzysztof Kozlowski wrote: >> On 18/05/2022 19:36, Sameer Pujar wrote: >>> +description: | >>> + The Multi Band Dynamic Range Compressor (MBDRC) is part of Output >>> + Processing Engine (OPE) which interfaces with Audio Hub (AHUB) via >>> + Audio Client Interface (ACIF). MBDRC can be used as a traditional >>> + single full band or a dual band or a multi band dynamic processor. >>> + >>> +maintainers: >>> + - Jon Hunter <jonathanh@nvidia.com> >>> + - Mohan Kumar <mkumard@nvidia.com> >>> + - Sameer Pujar <spujar@nvidia.com> >>> + >>> +properties: >>> + $nodename: >>> + pattern: "^mbdrc@[0-9a-f]*$" >> Why? We enforce only generic names in shared schemas and this is neither >> shared schema nor is it generic name. > > Idea was to keep these node names consistent across DT files and parent > node can allow a given list of child nodes with strict checks. Does name > like "dynamic-range-compressor@xxx" The checks are not coming from device node name, but from matching schema to compatible. Why do you need consistent names across DTS files? They should be anyway generic but what happens if they differ? Additionally, the parent schema enforces nodes of children, so if this is included in other schema, then the change is pointless. I propose to drop it, unless it is a shared schema for many different vendors. >> >>> + >>> + compatible: >>> + oneOf: >>> + - const: nvidia,tegra210-mbdrc >>> + - items: >>> + - enum: >>> + - nvidia,tegra234-mbdrc >>> + - nvidia,tegra194-mbdrc >>> + - nvidia,tegra186-mbdrc >>> + - const: nvidia,tegra210-mbdrc >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> +required: >>> + - compatible >>> + - reg >>> + >>> +additionalProperties: false >>> + >>> +examples: >>> + - | >>> + >> No need for space > > will remove > > >>> + >>> + compatible: >>> + oneOf: >>> + - const: nvidia,tegra210-ope >>> + - items: >>> + - enum: >>> + - nvidia,tegra234-ope >>> + - nvidia,tegra194-ope >>> + - nvidia,tegra186-ope >>> + - const: nvidia,tegra210-ope >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + "#address-cells": >>> + const: 1 >>> + >>> + "#size-cells": >>> + const: 1 >>> + >>> + ranges: true >>> + >>> + sound-name-prefix: >>> + pattern: "^OPE[1-9]$" >>> + >>> + ports: >>> + $ref: /schemas/graph.yaml#/properties/ports >>> + properties: >>> + port@0: >>> + $ref: audio-graph-port.yaml# >>> + unevaluatedProperties: false >>> + description: | >> No need for | > > will remove. > > >> >>> + ope@702d8000 { >> I would suggest generic node name, if it is possible. > > May be "processing-engine@xxx" ? Sure. Best regards, Krzysztof
On 20-05-2022 12:21, Krzysztof Kozlowski wrote: > >>> On 18/05/2022 19:36, Sameer Pujar wrote: >>>> +description: | >>>> + The Multi Band Dynamic Range Compressor (MBDRC) is part of Output >>>> + Processing Engine (OPE) which interfaces with Audio Hub (AHUB) via >>>> + Audio Client Interface (ACIF). MBDRC can be used as a traditional >>>> + single full band or a dual band or a multi band dynamic processor. >>>> + >>>> +maintainers: >>>> + - Jon Hunter <jonathanh@nvidia.com> >>>> + - Mohan Kumar <mkumard@nvidia.com> >>>> + - Sameer Pujar <spujar@nvidia.com> >>>> + >>>> +properties: >>>> + $nodename: >>>> + pattern: "^mbdrc@[0-9a-f]*$" >>> Why? We enforce only generic names in shared schemas and this is neither >>> shared schema nor is it generic name. >> Idea was to keep these node names consistent across DT files and parent >> node can allow a given list of child nodes with strict checks. Does name >> like "dynamic-range-compressor@xxx" > The checks are not coming from device node name, but from matching > schema to compatible. Why do you need consistent names across DTS files? > They should be anyway generic but what happens if they differ? The IP is re-used in many Tegra SoC generations and thus it is nice to use the same name. But, > Additionally, the parent schema enforces nodes of children, so if this > is included in other schema, then the change is pointless. I see your point. Since parent schema already enforces the child node names, another place from child schema to enforce similar rule is not really necessary for now. I will drop this. Thanks.
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml index 6df6f85..1fb93d9 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml @@ -110,6 +110,10 @@ patternProperties: type: object $ref: nvidia,tegra186-asrc.yaml# + '^ope@[0-9a-f]+$': + type: object + $ref: nvidia,tegra210-ope.yaml# + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-mbdrc.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-mbdrc.yaml new file mode 100644 index 00000000..199712ed --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-mbdrc.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra210-mbdrc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Tegra210 MBDRC Device Tree Bindings + +description: | + The Multi Band Dynamic Range Compressor (MBDRC) is part of Output + Processing Engine (OPE) which interfaces with Audio Hub (AHUB) via + Audio Client Interface (ACIF). MBDRC can be used as a traditional + single full band or a dual band or a multi band dynamic processor. + +maintainers: + - Jon Hunter <jonathanh@nvidia.com> + - Mohan Kumar <mkumard@nvidia.com> + - Sameer Pujar <spujar@nvidia.com> + +properties: + $nodename: + pattern: "^mbdrc@[0-9a-f]*$" + + compatible: + oneOf: + - const: nvidia,tegra210-mbdrc + - items: + - enum: + - nvidia,tegra234-mbdrc + - nvidia,tegra194-mbdrc + - nvidia,tegra186-mbdrc + - const: nvidia,tegra210-mbdrc + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + + mbdrc@702d8200 { + compatible = "nvidia,tegra210-mbdrc"; + reg = <0x702d8200 0x200>; + }; + +... diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-ope.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ope.yaml new file mode 100644 index 00000000..92488fd --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-ope.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra210-ope.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Tegra210 OPE Device Tree Bindings + +description: | + The Output Processing Engine (OPE) is one of the AHUB client. It has + PEQ (Parametric Equalizer) and MBDRC (Multi Band Dynamic Range Compressor) + sub blocks for data processing. + +maintainers: + - Jon Hunter <jonathanh@nvidia.com> + - Mohan Kumar <mkumard@nvidia.com> + - Sameer Pujar <spujar@nvidia.com> + +allOf: + - $ref: name-prefix.yaml# + +properties: + $nodename: + pattern: "^ope@[0-9a-f]*$" + + compatible: + oneOf: + - const: nvidia,tegra210-ope + - items: + - enum: + - nvidia,tegra234-ope + - nvidia,tegra194-ope + - nvidia,tegra186-ope + - const: nvidia,tegra210-ope + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + + sound-name-prefix: + pattern: "^OPE[1-9]$" + + ports: + $ref: /schemas/graph.yaml#/properties/ports + properties: + port@0: + $ref: audio-graph-port.yaml# + unevaluatedProperties: false + description: | + OPE ACIF (Audio Client Interface) input port. This is connected + to corresponding ACIF output port on AHUB (Audio Hub). + + port@1: + $ref: audio-graph-port.yaml# + unevaluatedProperties: false + description: | + OPE ACIF output port. This is connected to corresponding ACIF + input port on AHUB. + +patternProperties: + '^peq@[0-9a-f]+$': + type: object + $ref: nvidia,tegra210-peq.yaml# + + '^mbdrc@[0-9a-f]+$': + type: object + $ref: nvidia,tegra210-mbdrc.yaml# + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + + ope@702d8000 { + compatible = "nvidia,tegra210-ope"; + reg = <0x702d8000 0x100>; + sound-name-prefix = "OPE1"; + }; + +... diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-peq.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-peq.yaml new file mode 100644 index 00000000..0f78746 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-peq.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra210-peq.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Tegra210 PEQ Device Tree Bindings + +description: | + The Parametric Equalizer (PEQ) is a cascade of biquad filters with + each filter tuned based on certain parameters. It can be used to + equalize the irregularities in the speaker frequency response. + PEQ sits inside Output Processing Engine (OPE) which interfaces + with Audio Hub (AHUB) via Audio Client Interface (ACIF). + +maintainers: + - Jon Hunter <jonathanh@nvidia.com> + - Mohan Kumar <mkumard@nvidia.com> + - Sameer Pujar <spujar@nvidia.com> + +properties: + $nodename: + pattern: "^peq@[0-9a-f]*$" + + compatible: + oneOf: + - const: nvidia,tegra210-peq + - items: + - enum: + - nvidia,tegra234-peq + - nvidia,tegra194-peq + - nvidia,tegra186-peq + - const: nvidia,tegra210-peq + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + + peq@702d8100 { + compatible = "nvidia,tegra210-peq"; + reg = <0x702d8100 0x100>; + }; + +...
This patch adds YAML schema for DT bindings of Output Processing Engine (OPE) module. It consists of Parametric Equalizer (PEQ) and Multi Band Dynamic Range Compressor (MBDRC) sub blocks and binding doc for these blocks are added as well. The OPE will be registered as an ASoC component and can be plugged into an audio path as per need via ALSA mixer controls. The DT bindings are applicable on Tegra210 and later SoCs where OPE module is present. Signed-off-by: Sameer Pujar <spujar@nvidia.com> --- .../bindings/sound/nvidia,tegra210-ahub.yaml | 4 + .../bindings/sound/nvidia,tegra210-mbdrc.yaml | 51 ++++++++++++ .../bindings/sound/nvidia,tegra210-ope.yaml | 91 ++++++++++++++++++++++ .../bindings/sound/nvidia,tegra210-peq.yaml | 52 +++++++++++++ 4 files changed, 198 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-mbdrc.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-ope.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-peq.yaml