Commit 75c324d5 authored by Mark Brown's avatar Mark Brown

Merge series "ASoC: dt-bindings: Rework audio-graph-port schema" from Rob...

Merge series "ASoC: dt-bindings: Rework audio-graph-port schema" from Rob Herring <robh@kernel.org>:

This series refactors the audio-graph-port.yaml schema moving the
'port' node out of the schema and updating to use graph.yaml schema.
This allows users to define what each 'port' node is like other graph
binding users.

v2:
- Rebase on ASoC tree

Rob

Cc: alsa-devel@alsa-project.org
Cc: linux-tegra@vger.kernel.org
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Cc: Mark Brown <broonie@kernel.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Sameer Pujar <spujar@nvidia.com>
Cc: Thierry Reding <thierry.reding@gmail.com>

Rob Herring (3):
  ASoC: dt-bindings: Move port/ports properties out of
    audio-graph-port.yaml
  ASoC: dt-bindings: Use OF graph schema
  ASoC: dt-bindings: socionext: Use audio-graph-port schema

 .../bindings/sound/audio-graph-port.yaml      | 104 ++++++++----------
 .../bindings/sound/marvell,mmp-sspa.yaml      |   6 +-
 .../bindings/sound/nvidia,tegra186-dspk.yaml  |  11 +-
 .../sound/nvidia,tegra210-admaif.yaml         |  11 +-
 .../bindings/sound/nvidia,tegra210-ahub.yaml  |  11 +-
 .../bindings/sound/nvidia,tegra210-dmic.yaml  |  11 +-
 .../bindings/sound/nvidia,tegra210-i2s.yaml   |  11 +-
 .../bindings/sound/renesas,rsnd.yaml          |   5 +-
 .../sound/socionext,uniphier-aio.yaml         |   8 +-
 .../sound/socionext,uniphier-evea.yaml        |   8 +-
 10 files changed, 89 insertions(+), 97 deletions(-)

--
2.27.0
parents 73935e93 f1321c97
...@@ -11,71 +11,59 @@ maintainers: ...@@ -11,71 +11,59 @@ maintainers:
select: false select: false
allOf:
- $ref: /schemas/graph.yaml#/$defs/port-base
properties: properties:
port: prefix:
description: single OF-Graph subnode description: "device name prefix"
type: object $ref: /schemas/types.yaml#/definitions/string
convert-rate:
description: CPU to Codec rate convert.
$ref: /schemas/types.yaml#/definitions/uint32
convert-channels:
description: CPU to Codec rate channels.
$ref: /schemas/types.yaml#/definitions/uint32
patternProperties:
"^endpoint(@[0-9a-f]+)?":
$ref: /schemas/graph.yaml#/$defs/endpoint-base
properties: properties:
reg: mclk-fs:
maxItems: 1 description: |
prefix: Multiplication factor between stream rate and codec mclk.
description: "device name prefix" When defined, mclk-fs property defined in dai-link sub nodes are
$ref: /schemas/types.yaml#/definitions/string ignored.
$ref: /schemas/types.yaml#/definitions/uint32
frame-inversion:
description: dai-link uses frame clock inversion
$ref: /schemas/types.yaml#/definitions/flag
bitclock-inversion:
description: dai-link uses bit clock inversion
$ref: /schemas/types.yaml#/definitions/flag
frame-master:
description: Indicates dai-link frame master.
$ref: /schemas/types.yaml#/definitions/phandle
bitclock-master:
description: Indicates dai-link bit clock master
$ref: /schemas/types.yaml#/definitions/phandle
dai-format:
description: audio format.
items:
enum:
- i2s
- right_j
- left_j
- dsp_a
- dsp_b
- ac97
- pdm
- msb
- lsb
convert-rate: convert-rate:
description: CPU to Codec rate convert. description: CPU to Codec rate convert.
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
convert-channels: convert-channels:
description: CPU to Codec rate channels. description: CPU to Codec rate channels.
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
patternProperties:
"^endpoint(@[0-9a-f]+)?":
type: object
properties:
remote-endpoint:
maxItems: 1
mclk-fs:
description: |
Multiplication factor between stream rate and codec mclk.
When defined, mclk-fs property defined in dai-link sub nodes are
ignored.
$ref: /schemas/types.yaml#/definitions/uint32
frame-inversion:
description: dai-link uses frame clock inversion
$ref: /schemas/types.yaml#/definitions/flag
bitclock-inversion:
description: dai-link uses bit clock inversion
$ref: /schemas/types.yaml#/definitions/flag
frame-master:
description: Indicates dai-link frame master.
$ref: /schemas/types.yaml#/definitions/phandle
bitclock-master:
description: Indicates dai-link bit clock master
$ref: /schemas/types.yaml#/definitions/phandle
dai-format:
description: audio format.
items:
enum:
- i2s
- right_j
- left_j
- dsp_a
- dsp_b
- ac97
- pdm
- msb
- lsb
convert-rate:
description: CPU to Codec rate convert.
$ref: /schemas/types.yaml#/definitions/uint32
convert-channels:
description: CPU to Codec rate channels.
$ref: /schemas/types.yaml#/definitions/uint32
ports:
description: multi OF-Graph subnode
type: object
patternProperties:
"^port(@[0-9a-f]+)?":
$ref: "#/properties/port"
additionalProperties: true additionalProperties: true
...@@ -9,9 +9,6 @@ title: Marvel SSPA Digital Audio Interface Bindings ...@@ -9,9 +9,6 @@ title: Marvel SSPA Digital Audio Interface Bindings
maintainers: maintainers:
- Lubomir Rintel <lkundrak@v3.sk> - Lubomir Rintel <lkundrak@v3.sk>
allOf:
- $ref: audio-graph-port.yaml#
properties: properties:
$nodename: $nodename:
pattern: "^audio-controller(@.*)?$" pattern: "^audio-controller(@.*)?$"
...@@ -54,7 +51,8 @@ properties: ...@@ -54,7 +51,8 @@ properties:
- const: rx - const: rx
port: port:
type: object $ref: audio-graph-port.yaml#
unevaluatedProperties: false
properties: properties:
endpoint: endpoint:
......
...@@ -17,9 +17,6 @@ maintainers: ...@@ -17,9 +17,6 @@ maintainers:
- Jon Hunter <jonathanh@nvidia.com> - Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com> - Sameer Pujar <spujar@nvidia.com>
allOf:
- $ref: audio-graph-port.yaml#
properties: properties:
$nodename: $nodename:
pattern: "^dspk@[0-9a-f]*$" pattern: "^dspk@[0-9a-f]*$"
...@@ -59,14 +56,18 @@ properties: ...@@ -59,14 +56,18 @@ properties:
available instances on a Tegra SoC. available instances on a Tegra SoC.
ports: ports:
type: object $ref: /schemas/graph.yaml#/properties/ports
properties: properties:
port@0: port@0:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
description: | description: |
DSPK ACIF (Audio Client Interface) port connected to the DSPK ACIF (Audio Client Interface) port connected to the
corresponding AHUB (Audio Hub) ACIF port. corresponding AHUB (Audio Hub) ACIF port.
port@1: port@1:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
description: | description: |
DSPK DAP (Digital Audio Port) interface which can be connected DSPK DAP (Digital Audio Port) interface which can be connected
to external audio codec for playback. to external audio codec for playback.
...@@ -80,7 +81,7 @@ required: ...@@ -80,7 +81,7 @@ required:
- assigned-clock-parents - assigned-clock-parents
- sound-name-prefix - sound-name-prefix
unevaluatedProperties: false additionalProperties: false
examples: examples:
- | - |
......
...@@ -17,9 +17,6 @@ maintainers: ...@@ -17,9 +17,6 @@ maintainers:
- Jon Hunter <jonathanh@nvidia.com> - Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com> - Sameer Pujar <spujar@nvidia.com>
allOf:
- $ref: audio-graph-port.yaml#
properties: properties:
$nodename: $nodename:
pattern: "^admaif@[0-9a-f]*$" pattern: "^admaif@[0-9a-f]*$"
...@@ -41,6 +38,7 @@ properties: ...@@ -41,6 +38,7 @@ properties:
dma-names: true dma-names: true
ports: ports:
$ref: /schemas/graph.yaml#/properties/ports
description: | description: |
Contains list of ACIF (Audio CIF) port nodes for ADMAIF channels. Contains list of ACIF (Audio CIF) port nodes for ADMAIF channels.
The number of port nodes depends on the number of ADMAIF channels The number of port nodes depends on the number of ADMAIF channels
...@@ -48,6 +46,11 @@ properties: ...@@ -48,6 +46,11 @@ properties:
in AHUB (Audio Hub). Each port is capable of data transfers in in AHUB (Audio Hub). Each port is capable of data transfers in
both directions. both directions.
patternProperties:
'^port@[0-9]':
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
if: if:
properties: properties:
compatible: compatible:
...@@ -92,7 +95,7 @@ required: ...@@ -92,7 +95,7 @@ required:
- dmas - dmas
- dma-names - dma-names
unevaluatedProperties: false additionalProperties: false
examples: examples:
- | - |
......
...@@ -17,9 +17,6 @@ maintainers: ...@@ -17,9 +17,6 @@ maintainers:
- Jon Hunter <jonathanh@nvidia.com> - Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com> - Sameer Pujar <spujar@nvidia.com>
allOf:
- $ref: audio-graph-port.yaml#
properties: properties:
$nodename: $nodename:
pattern: "^ahub@[0-9a-f]*$" pattern: "^ahub@[0-9a-f]*$"
...@@ -60,12 +57,18 @@ properties: ...@@ -60,12 +57,18 @@ properties:
ranges: true ranges: true
ports: ports:
$ref: /schemas/graph.yaml#/properties/ports
description: | description: |
Contains list of ACIF (Audio CIF) port nodes for AHUB (Audio Hub). Contains list of ACIF (Audio CIF) port nodes for AHUB (Audio Hub).
These are connected to ACIF interfaces of AHUB clients. Thus the These are connected to ACIF interfaces of AHUB clients. Thus the
number of port nodes depend on the number of clients that AHUB may number of port nodes depend on the number of clients that AHUB may
have depending on the SoC revision. have depending on the SoC revision.
patternProperties:
'^port@[0-9]':
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
patternProperties: patternProperties:
'^i2s@[0-9a-f]+$': '^i2s@[0-9a-f]+$':
type: object type: object
...@@ -93,7 +96,7 @@ required: ...@@ -93,7 +96,7 @@ required:
- "#size-cells" - "#size-cells"
- ranges - ranges
unevaluatedProperties: false additionalProperties: false
examples: examples:
- | - |
......
...@@ -16,9 +16,6 @@ maintainers: ...@@ -16,9 +16,6 @@ maintainers:
- Jon Hunter <jonathanh@nvidia.com> - Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com> - Sameer Pujar <spujar@nvidia.com>
allOf:
- $ref: audio-graph-port.yaml#
properties: properties:
$nodename: $nodename:
pattern: "^dmic@[0-9a-f]*$" pattern: "^dmic@[0-9a-f]*$"
...@@ -60,14 +57,18 @@ properties: ...@@ -60,14 +57,18 @@ properties:
on the maximum available instances on a Tegra SoC. on the maximum available instances on a Tegra SoC.
ports: ports:
type: object $ref: /schemas/graph.yaml#/properties/ports
properties: properties:
port@0: port@0:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
description: | description: |
DMIC ACIF (Audio Client Interface) port connected to the DMIC ACIF (Audio Client Interface) port connected to the
corresponding AHUB (Audio Hub) ACIF port. corresponding AHUB (Audio Hub) ACIF port.
port@1: port@1:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
description: | description: |
DMIC DAP (Digital Audio Port) interface which can be connected DMIC DAP (Digital Audio Port) interface which can be connected
to external audio codec for capture. to external audio codec for capture.
...@@ -80,7 +81,7 @@ required: ...@@ -80,7 +81,7 @@ required:
- assigned-clocks - assigned-clocks
- assigned-clock-parents - assigned-clock-parents
unevaluatedProperties: false additionalProperties: false
examples: examples:
- | - |
......
...@@ -16,9 +16,6 @@ maintainers: ...@@ -16,9 +16,6 @@ maintainers:
- Jon Hunter <jonathanh@nvidia.com> - Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com> - Sameer Pujar <spujar@nvidia.com>
allOf:
- $ref: audio-graph-port.yaml#
properties: properties:
$nodename: $nodename:
pattern: "^i2s@[0-9a-f]*$" pattern: "^i2s@[0-9a-f]*$"
...@@ -78,14 +75,18 @@ properties: ...@@ -78,14 +75,18 @@ properties:
on the maximum available instances on a Tegra SoC. on the maximum available instances on a Tegra SoC.
ports: ports:
type: object $ref: /schemas/graph.yaml#/properties/ports
properties: properties:
port@0: port@0:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
description: | description: |
I2S ACIF (Audio Client Interface) port connected to the I2S ACIF (Audio Client Interface) port connected to the
corresponding AHUB (Audio Hub) ACIF port. corresponding AHUB (Audio Hub) ACIF port.
port@1: port@1:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
description: | description: |
I2S DAP (Digital Audio Port) interface which can be connected I2S DAP (Digital Audio Port) interface which can be connected
to external audio codec for playback or capture. to external audio codec for playback or capture.
...@@ -98,7 +99,7 @@ required: ...@@ -98,7 +99,7 @@ required:
- assigned-clocks - assigned-clocks
- assigned-clock-parents - assigned-clock-parents
unevaluatedProperties: false additionalProperties: false
examples: examples:
- | - |
......
...@@ -111,7 +111,9 @@ properties: ...@@ -111,7 +111,9 @@ properties:
- pattern: '^dvc\.[0-1]$' - pattern: '^dvc\.[0-1]$'
- pattern: '^clk_(a|b|c|i)$' - pattern: '^clk_(a|b|c|i)$'
port: true port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
# use patternProperties to avoid naming "xxx,yyy" issue # use patternProperties to avoid naming "xxx,yyy" issue
patternProperties: patternProperties:
...@@ -257,7 +259,6 @@ required: ...@@ -257,7 +259,6 @@ required:
allOf: allOf:
- $ref: audio-graph.yaml# - $ref: audio-graph.yaml#
- $ref: audio-graph-port.yaml#
- if: - if:
properties: properties:
compatible: compatible:
......
...@@ -46,11 +46,9 @@ properties: ...@@ -46,11 +46,9 @@ properties:
patternProperties: patternProperties:
"^port@[0-9]$": "^port@[0-9]$":
type: object description: FIXME, Need to define what each port is.
properties: $ref: audio-graph-port.yaml#
endpoint: true unevaluatedProperties: false
required:
- endpoint
additionalProperties: false additionalProperties: false
......
...@@ -40,11 +40,9 @@ properties: ...@@ -40,11 +40,9 @@ properties:
patternProperties: patternProperties:
"^port@[0-9]$": "^port@[0-9]$":
type: object description: FIXME, Need to define what each port is.
properties: $ref: audio-graph-port.yaml#
endpoint: true unevaluatedProperties: false
required:
- endpoint
additionalProperties: false additionalProperties: false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment