ASoC: dt-bindings: Rework audio-graph-port schema
Subsystems (6)
Rob Herring
maintainercover ASoC: dt-bindings: Rework audio-graph-port schema
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.
Rob
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(-)
Signature · 1 line
2.27.0
Rob Herring
maintainerPATCH 1/3 ASoC: dt-bindings: Move port/ports properties out of audio-graph-port.yaml
Users of the audio-graph-port schema need to define how many ports and what each port is, so they need to define 'ports' and/or 'port' anyways. Let's drop 'ports' and 'port' from the schema and adjust users to reference audio-graph-port.yaml from a port property.
--- .../bindings/sound/audio-graph-port.yaml | 101 ++++++++---------- .../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 +- 8 files changed, 82 insertions(+), 85 deletions(-)
Documentation/devicetree/bindings/sound/audio-graph-port.yaml +45 -56
@@ -12,70 +12,59 @@ maintainers: select: false properties: - port: - description: single OF-Graph subnode + reg: + maxItems: 1 + prefix: + description: "device name prefix" + $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]+)?": type: object properties: - reg: + remote-endpoint: maxItems: 1 - prefix: - description: "device name prefix" - $ref: /schemas/types.yaml#/definitions/string + 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 - 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
Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml +2 -4
@@ -9,9 +9,6 @@ title: Marvel SSPA Digital Audio Interface Bindings maintainers: - Lubomir Rintel <[email protected]> -allOf: - - $ref: audio-graph-port.yaml# - properties: $nodename: pattern: "^audio-controller(@.*)?$"
@@ -54,7 +51,8 @@ properties: - const: rx port: - type: object + $ref: audio-graph-port.yaml# + unevaluatedProperties: false properties: endpoint:
Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml +6 -5
@@ -17,9 +17,6 @@ maintainers: - Jon Hunter <[email protected]> - Sameer Pujar <[email protected]> -allOf: - - $ref: audio-graph-port.yaml# - properties: $nodename: pattern: "^dspk@[0-9a-f]*$"
@@ -59,14 +56,18 @@ properties: available instances on a Tegra SoC. ports: - type: object + $ref: /schemas/graph.yaml#/properties/ports properties: port@0: + $ref: audio-graph-port.yaml# + unevaluatedProperties: false description: | DSPK ACIF (Audio Client Interface) port connected to the corresponding AHUB (Audio Hub) ACIF port. port@1: + $ref: audio-graph-port.yaml# + unevaluatedProperties: false description: | DSPK DAP (Digital Audio Port) interface which can be connected to external audio codec for playback.
@@ -80,7 +81,7 @@ required: - assigned-clock-parents - sound-name-prefix -unevaluatedProperties: false +additionalProperties: false examples: - |
Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml +7 -4
@@ -17,9 +17,6 @@ maintainers: - Jon Hunter <[email protected]> - Sameer Pujar <[email protected]> -allOf: - - $ref: audio-graph-port.yaml# - properties: $nodename: pattern: "^admaif@[0-9a-f]*$"
@@ -41,6 +38,7 @@ properties: dma-names: true ports: + $ref: /schemas/graph.yaml#/properties/ports description: | Contains list of ACIF (Audio CIF) port nodes for ADMAIF channels. The number of port nodes depends on the number of ADMAIF channels
@@ -48,6 +46,11 @@ properties: in AHUB (Audio Hub). Each port is capable of data transfers in both directions. + patternProperties: + '^port@[0-9]': + $ref: audio-graph-port.yaml# + unevaluatedProperties: false + if: properties: compatible:
@@ -92,7 +95,7 @@ required: - dmas - dma-names -unevaluatedProperties: false +additionalProperties: false examples: - |
Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml +7 -4
@@ -17,9 +17,6 @@ maintainers: - Jon Hunter <[email protected]> - Sameer Pujar <[email protected]> -allOf: - - $ref: audio-graph-port.yaml# - properties: $nodename: pattern: "^ahub@[0-9a-f]*$"
@@ -60,12 +57,18 @@ properties: ranges: true ports: + $ref: /schemas/graph.yaml#/properties/ports description: | Contains list of ACIF (Audio CIF) port nodes for AHUB (Audio Hub). These are connected to ACIF interfaces of AHUB clients. Thus the number of port nodes depend on the number of clients that AHUB may have depending on the SoC revision. + patternProperties: + '^port@[0-9]': + $ref: audio-graph-port.yaml# + unevaluatedProperties: false + required: - compatible - reg
@@ -77,7 +80,7 @@ required: - "#size-cells" - ranges -unevaluatedProperties: false +additionalProperties: false examples: - |
Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml +6 -5
@@ -16,9 +16,6 @@ maintainers: - Jon Hunter <[email protected]> - Sameer Pujar <[email protected]> -allOf: - - $ref: audio-graph-port.yaml# - properties: $nodename: pattern: "^dmic@[0-9a-f]*$"
@@ -60,14 +57,18 @@ properties: on the maximum available instances on a Tegra SoC. ports: - type: object + $ref: /schemas/graph.yaml#/properties/ports properties: port@0: + $ref: audio-graph-port.yaml# + unevaluatedProperties: false description: | DMIC ACIF (Audio Client Interface) port connected to the corresponding AHUB (Audio Hub) ACIF port. port@1: + $ref: audio-graph-port.yaml# + unevaluatedProperties: false description: | DMIC DAP (Digital Audio Port) interface which can be connected to external audio codec for capture.
@@ -80,7 +81,7 @@ required: - assigned-clocks - assigned-clock-parents -unevaluatedProperties: false +additionalProperties: false examples: - |
Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml +6 -5
@@ -16,9 +16,6 @@ maintainers: - Jon Hunter <[email protected]> - Sameer Pujar <[email protected]> -allOf: - - $ref: audio-graph-port.yaml# - properties: $nodename: pattern: "^i2s@[0-9a-f]*$"
@@ -78,14 +75,18 @@ properties: on the maximum available instances on a Tegra SoC. ports: - type: object + $ref: /schemas/graph.yaml#/properties/ports properties: port@0: + $ref: audio-graph-port.yaml# + unevaluatedProperties: false description: | I2S ACIF (Audio Client Interface) port connected to the corresponding AHUB (Audio Hub) ACIF port. port@1: + $ref: audio-graph-port.yaml# + unevaluatedProperties: false description: | I2S DAP (Digital Audio Port) interface which can be connected to external audio codec for playback or capture.
@@ -98,7 +99,7 @@ required: - assigned-clocks - assigned-clock-parents -unevaluatedProperties: false +additionalProperties: false examples: - |
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +3 -2
@@ -111,7 +111,9 @@ properties: - pattern: '^dvc\.[0-1]$' - pattern: '^clk_(a|b|c|i)$' - port: true + port: + $ref: audio-graph-port.yaml# + unevaluatedProperties: false # use patternProperties to avoid naming "xxx,yyy" issue patternProperties:
@@ -257,7 +259,6 @@ required: allOf: - $ref: audio-graph.yaml# - - $ref: audio-graph-port.yaml# - if: properties: compatible:
Signature · 1 line
2.27.0
Rob Herring
maintainerRe: [PATCH 1/3] ASoC: dt-bindings: Move port/ports properties out of audio-graph-port.yaml
Quoted 52 lines · Rob Herring
Users of the audio-graph-port schema need to define how many ports and what each port is, so they need to define 'ports' and/or 'port' anyways. Let's drop 'ports' and 'port' from the schema and adjust users to reference
audio-graph-port.yamlfrom a port property.Cc Liam Girdwood <[email protected]>Cc Mark Brown <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc Kuninori Morimoto <[email protected]>Cc Lubomir Rintel <[email protected]>Cc Sameer Pujar <[email protected]>Signed-off-by Rob Herring <[email protected]>---
Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml +6
-3@@ -17,9 +17,6 @@ maintainers: - Jon Hunter <[email protected]> - Sameer Pujar <[email protected]> -allOf: - - $ref: audio-graph-port.yaml# - properties: $nodename: pattern: "^ahub@[0-9a-f]*$"@@ -60,12 +57,18 @@ properties: ranges: true ports: + $ref: /schemas/graph.yaml#/properties/ports description: | Contains list of ACIF (Audio CIF) port nodes for AHUB (Audio Hub). These are connected to ACIF interfaces of AHUB clients. Thus the number of port nodes depend on the number of clients that AHUB may have depending on the SoC revision. + patternProperties: + '^port@[0-9]': + $ref: audio-graph-port.yaml# + unevaluatedProperties: false + required: - compatible - reg
Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml required: · line 83
Quoted 5 lines
Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml +1
-1@@ -77,7 +80,7 @@ required: - "#size-cells" - ranges -unevaluatedProperties: false +additionalProperties: false
Adding this results in schema errors in the example, so a prerequisite patch is needed.
Rob
Mark Brown
maintainerRe: [PATCH 1/3] ASoC: dt-bindings: Move port/ports properties out of audio-graph-port.yaml
In reply to Rob HerringQuoted 4 lines · Rob Herring
Users of the audio-graph-port schema need to define how many ports and what each port is, so they need to define 'ports' and/or 'port' anyways. Let's drop 'ports' and 'port' from the schema and adjust users to reference
audio-graph-port.yamlfrom a port property.
This doesn't apply against current code, please check and resend:
Applying: ASoC: dt-bindings: Move port/ports properties out of audio-graph-port.yaml Using index info to reconstruct a base tree...
M Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
Falling back to patching base and 3-way merge...
Auto-merging Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml CONFLICT (content): Merge conflict in Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
error: Failed to merge in the changes.
Rob Herring
maintainerPATCH 2/3 ASoC: dt-bindings: Use OF graph schema
In reply to Rob HerringNow that we have an OF graph schema, let's use it for the audio-graph-port schema.
--- .../devicetree/bindings/sound/audio-graph-port.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/sound/audio-graph-port.yaml +4 -5
@@ -11,9 +11,10 @@ maintainers: select: false +allOf: + - $ref: /schemas/graph.yaml#/$defs/port-base + properties: - reg: - maxItems: 1 prefix: description: "device name prefix" $ref: /schemas/types.yaml#/definitions/string
@@ -25,10 +26,8 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 patternProperties: "^endpoint(@[0-9a-f]+)?": - type: object + $ref: /schemas/graph.yaml#/$defs/endpoint-base properties: - remote-endpoint: - maxItems: 1 mclk-fs: description: | Multiplication factor between stream rate and codec mclk.
Signature · 1 line
2.27.0
Rob Herring
maintainerPATCH 3/3 ASoC: dt-bindings: socionext: Use audio-graph-port schema
In reply to Rob HerringConvert the Socionext audio schemas to use audio-graph-port.yaml schema for 'port' nodes.
The number and numbering of port nodes should be documented, but is not. Leave a FIXME here so others don't copy.
--- .../devicetree/bindings/sound/socionext,uniphier-aio.yaml | 8 +++----- .../bindings/sound/socionext,uniphier-evea.yaml | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/sound/socionext,uniphier-aio.yaml +3 -5
@@ -46,11 +46,9 @@ properties: patternProperties: "^port@[0-9]$": - type: object - properties: - endpoint: true - required: - - endpoint + description: FIXME, Need to define what each port is. + $ref: audio-graph-port.yaml# + unevaluatedProperties: false additionalProperties: false
Documentation/devicetree/bindings/sound/socionext,uniphier-evea.yaml +3 -5
@@ -40,11 +40,9 @@ properties: patternProperties: "^port@[0-9]$": - type: object - properties: - endpoint: true - required: - - endpoint + description: FIXME, Need to define what each port is. + $ref: audio-graph-port.yaml# + unevaluatedProperties: false additionalProperties: false
Signature · 1 line
2.27.0
Mark Brown
maintainerQuoted 8 lines · Rob Herring
This series refactors the
audio-graph-port.yamlschema moving the 'port' node out of the schema and updating to usegraph.yamlschema. This allows users to define what each 'port' node is like other graph binding users.Rob
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: dt-bindings: Move port/ports properties out of audio-graph-port.yaml
commit: 9c1e0439ada9973ec99cc1e0887eb84fd26444b8
[2/3] ASoC: dt-bindings: Use OF graph schema
commit: ec1c8302178a946986bb7b52ac7bb9ccdcdf7d92
[3/3] ASoC: dt-bindings: socionext: Use audio-graph-port schema
commit: f1321c9766b2c9e79de268225e291dead0a8f969All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark