Commit 97709d36 authored by Rob Herring's avatar Rob Herring

ASoC: dt-bindings: Centralize the 'sound-dai' definition

'sound-dai' is a common property, but has duplicate type definitions.
Create a new common definition to define the type and then update all
the other occurrences to just define how many entries there are just
like other phandle+arg properties.

The constraints on the number of entries is based on the examples and
could be wrong.

Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Acked-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220126231427.1638089-1-robh@kernel.org
parent d7f17b66
...@@ -57,7 +57,7 @@ patternProperties: ...@@ -57,7 +57,7 @@ patternProperties:
rate rate
sound-dai: sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle-array maxItems: 1
description: phandle of the CPU DAI description: phandle of the CPU DAI
patternProperties: patternProperties:
...@@ -71,7 +71,7 @@ patternProperties: ...@@ -71,7 +71,7 @@ patternProperties:
properties: properties:
sound-dai: sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle-array maxItems: 1
description: phandle of the codec DAI description: phandle of the codec DAI
required: required:
......
...@@ -62,13 +62,15 @@ patternProperties: ...@@ -62,13 +62,15 @@ patternProperties:
description: Holds subnode which indicates cpu dai. description: Holds subnode which indicates cpu dai.
type: object type: object
properties: properties:
sound-dai: true sound-dai:
maxItems: 1
codec: codec:
description: Holds subnode which indicates codec dai. description: Holds subnode which indicates codec dai.
type: object type: object
properties: properties:
sound-dai: true sound-dai:
maxItems: 1
required: required:
- link-name - link-name
......
...@@ -59,13 +59,16 @@ patternProperties: ...@@ -59,13 +59,16 @@ patternProperties:
description: Holds subnode which indicates cpu dai. description: Holds subnode which indicates cpu dai.
type: object type: object
properties: properties:
sound-dai: true sound-dai:
maxItems: 1
codec: codec:
description: Holds subnode which indicates codec dai. description: Holds subnode which indicates codec dai.
type: object type: object
properties: properties:
sound-dai: true sound-dai:
minItems: 1
maxItems: 2
fsl,mclk-equal-bclk: fsl,mclk-equal-bclk:
description: Indicates mclk can be equal to bclk, especially for sai interface description: Indicates mclk can be equal to bclk, especially for sai interface
......
...@@ -69,19 +69,23 @@ patternProperties: ...@@ -69,19 +69,23 @@ patternProperties:
description: Holds subnode which indicates cpu dai. description: Holds subnode which indicates cpu dai.
type: object type: object
properties: properties:
sound-dai: true sound-dai:
maxItems: 1
platform: platform:
description: Holds subnode which indicates platform dai. description: Holds subnode which indicates platform dai.
type: object type: object
properties: properties:
sound-dai: true sound-dai:
maxItems: 1
codec: codec:
description: Holds subnode which indicates codec dai. description: Holds subnode which indicates codec dai.
type: object type: object
properties: properties:
sound-dai: true sound-dai:
minItems: 1
maxItems: 4
required: required:
- link-name - link-name
......
...@@ -27,9 +27,6 @@ properties: ...@@ -27,9 +27,6 @@ properties:
sound-dai: sound-dai:
minItems: 2 minItems: 2
maxItems: 2 maxItems: 2
items:
maxItems: 1
$ref: /schemas/types.yaml#/definitions/phandle-array
description: | description: |
phandles to the I2S controller and bluetooth codec, phandles to the I2S controller and bluetooth codec,
in that order in that order
...@@ -38,7 +35,7 @@ properties: ...@@ -38,7 +35,7 @@ properties:
type: object type: object
properties: properties:
sound-dai: sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle-array maxItems: 1
description: phandle to the WM8994 CODEC description: phandle to the WM8994 CODEC
samsung,audio-routing: samsung,audio-routing:
......
...@@ -21,7 +21,6 @@ properties: ...@@ -21,7 +21,6 @@ properties:
type: object type: object
properties: properties:
sound-dai: sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle-array
maxItems: 1 maxItems: 1
description: phandle to the I2S controller description: phandle to the I2S controller
required: required:
...@@ -31,7 +30,6 @@ properties: ...@@ -31,7 +30,6 @@ properties:
type: object type: object
properties: properties:
sound-dai: sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle-array
maxItems: 1 maxItems: 1
description: phandle to the WM1811 CODEC description: phandle to the WM1811 CODEC
required: required:
......
...@@ -37,18 +37,15 @@ properties: ...@@ -37,18 +37,15 @@ properties:
type: object type: object
properties: properties:
sound-dai: sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: phandles to the I2S controllers description: phandles to the I2S controllers
codec: codec:
type: object type: object
properties: properties:
sound-dai: sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle-array items:
description: | - description: phandle of the MAX98090 CODEC
List of phandles to the CODEC nodes, - description: phandle of the HDMI IP block node
first entry must be corresponding to the MAX98090 CODEC and
the second entry must be the phandle of the HDMI IP block node.
samsung,audio-routing: samsung,audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array $ref: /schemas/types.yaml#/definitions/non-unique-string-array
......
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/sound-dai.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Digital Audio Interface consumer Device Tree Bindings
maintainers:
- Rob Herring <robh@kernel.org>
select: true
properties:
sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: A phandle plus args to digital audio interface provider(s)
additionalProperties: true
...
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