summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-11-18 20:56:22 +0000
committerMark Brown <broonie@kernel.org>2020-11-18 20:56:22 +0000
commitde3de881db8e072a5c35b702e0a14ac971fffcb1 (patch)
tree28dee6808cc0000b84747be40ab588208fa9da80 /Documentation
parent7d94ca3c8acd0117200f34523536ee01615e7dc3 (diff)
parent251bf658558f9feff8a92ddcde402ffa220d13b8 (diff)
Merge series "ASoC: graph card schema rework" from Rob Herring <robh@kernel.org>:
This series updates Sameer's patch to repartition the graph card binding schema and incorporate the OF graph schema. The schema was also mixing card node and DAI node properties, so I've split the DAI part (the 'port' node) into a separate schema. There's another problem that 'frame-master' and 'bitclock-master' have inconsistent types of boolean and phandle. Having the properties just point to the local or remote endpoint within an endpoint node is kind of pointless. We should have gone with just boolean, but looks like we already have several users. MMP OLPC is the one platform using boolean, but it happens to work because the properties are effectively ignored and CPU DAI as the master is the default. Rob Rob Herring (3): ASoC: dt-bindings: Use OF graph schema ASoC: dt-bindings: marvell,mmp-sspa: Use audio-graph-port schema ASoC: dt-bindings: Refine 'frame-master' and 'bitclock-master' type Sameer Pujar (1): ASoC: audio-graph-card: Refactor schema .../bindings/sound/audio-graph-card.yaml | 106 +----------------- .../bindings/sound/audio-graph-port.yaml | 72 ++++++++++++ .../bindings/sound/audio-graph.yaml | 45 ++++++++ .../bindings/sound/marvell,mmp-sspa.yaml | 25 +---- .../bindings/sound/renesas,rsnd.yaml | 12 +- .../bindings/sound/simple-card.yaml | 6 +- 6 files changed, 132 insertions(+), 134 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-port.yaml create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml base-commit: e2e99930ec006c6fe1d62af339a765ade71a0d9a -- 2.25.1
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/sound/audio-graph-card.yaml106
-rw-r--r--Documentation/devicetree/bindings/sound/audio-graph-port.yaml84
-rw-r--r--Documentation/devicetree/bindings/sound/audio-graph.yaml45
-rw-r--r--Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml25
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,rsnd.yaml12
-rw-r--r--Documentation/devicetree/bindings/sound/simple-card.yaml6
6 files changed, 144 insertions, 134 deletions
diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
index 2329aeb91db7..109e55f9e597 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
@@ -4,120 +4,24 @@
$id: http://devicetree.org/schemas/sound/audio-graph-card.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Audio Graph Card Driver Device Tree Bindings
+title: Audio Graph Card Device Tree Bindings
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+allOf:
+ - $ref: /schemas/sound/audio-graph.yaml#
+
properties:
compatible:
enum:
- audio-graph-card
- audio-graph-scu-card
- dais:
- $ref: /schemas/types.yaml#/definitions/phandle-array
- label:
- maxItems: 1
- prefix:
- description: "device name prefix"
- $ref: /schemas/types.yaml#/definitions/string
- routing:
- description: |
- A list of the connections between audio components.
- Each entry is a pair of strings, the first being the
- connection's sink, the second being the connection's source.
- $ref: /schemas/types.yaml#/definitions/non-unique-string-array
- widgets:
- description: User specified audio sound widgets.
- $ref: /schemas/types.yaml#/definitions/non-unique-string-array
- 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
- pa-gpios:
- maxItems: 1
- hp-det-gpio:
- maxItems: 1
- mic-det-gpio:
- maxItems: 1
-
- port:
- description: single OF-Graph subnode
- type: object
- properties:
- 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:
- 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-array
- maxItems: 1
- bitclock-master:
- description: Indicates dai-link bit clock master
- $ref: /schemas/types.yaml#/definitions/phandle-array
- maxItems: 1
- 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
- required:
- - remote-endpoint
-
- ports:
- description: multi OF-Graph subnode
- type: object
- patternProperties:
- "^port(@[0-9a-f]+)?":
- $ref: "#/properties/port"
-
required:
- compatible
- - dais
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
new file mode 100644
index 000000000000..2005014161be
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/audio-graph-port.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Audio Graph Card 'port' Node Bindings
+
+maintainers:
+ - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+select: false
+
+properties:
+ port:
+ description: single OF-Graph subnode
+ type: object
+ properties:
+ 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:
+ 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
+
+ required:
+ - remote-endpoint
+
+ ports:
+ description: multi OF-Graph subnode
+ type: object
+ patternProperties:
+ "^port(@[0-9a-f]+)?":
+ $ref: "#/properties/port"
+
+additionalProperties: true
diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml
new file mode 100644
index 000000000000..4b46794e5153
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/audio-graph.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Audio Graph Device Tree Bindings
+
+maintainers:
+ - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+properties:
+ dais:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ label:
+ maxItems: 1
+ prefix:
+ description: "device name prefix"
+ $ref: /schemas/types.yaml#/definitions/string
+ routing:
+ description: |
+ A list of the connections between audio components.
+ Each entry is a pair of strings, the first being the
+ connection's sink, the second being the connection's source.
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ widgets:
+ description: User specified audio sound widgets.
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ 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
+ pa-gpios:
+ maxItems: 1
+ hp-det-gpio:
+ maxItems: 1
+ mic-det-gpio:
+ maxItems: 1
+
+required:
+ - dais
+
+additionalProperties: true
diff --git a/Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml b/Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml
index 6d20a24a2ae9..234f64a32184 100644
--- a/Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml
+++ b/Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml
@@ -9,6 +9,9 @@ title: Marvel SSPA Digital Audio Interface Bindings
maintainers:
- Lubomir Rintel <lkundrak@v3.sk>
+allOf:
+ - $ref: audio-graph-port.yaml#
+
properties:
$nodename:
pattern: "^audio-controller(@.*)?$"
@@ -58,29 +61,9 @@ properties:
type: object
properties:
- remote-endpoint: true
-
- frame-master:
- type: boolean
- description: SoC generates the frame clock
-
- bitclock-master:
- type: boolean
- description: SoC generates the bit clock
-
dai-format:
- $ref: /schemas/types.yaml#/definitions/string
- description: The digital audio format
const: i2s
- required:
- - remote-endpoint
-
- required:
- - endpoint
-
- additionalProperties: false
-
required:
- "#sound-dai-cells"
- compatible
@@ -112,8 +95,6 @@ examples:
port {
endpoint {
remote-endpoint = <&rt5631_0>;
- frame-master;
- bitclock-master;
dai-format = "i2s";
};
};
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 51f4dcaa970d..cbfd5914b432 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -9,6 +9,10 @@ title: Renesas R-Car Sound Driver Device Tree Bindings
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+allOf:
+ - $ref: audio-graph.yaml#
+ - $ref: audio-graph-port.yaml#
+
properties:
compatible:
@@ -111,13 +115,7 @@ properties:
- pattern: '^dvc\.[0-1]$'
- pattern: '^clk_(a|b|c|i)$'
- port:
- description: OF-Graph subnode
- $ref: "audio-graph-card.yaml#/properties/port"
-
- ports:
- description: multi OF-Graph subnode
- $ref: "audio-graph-card.yaml#/properties/ports"
+ port: true
# use patternProperties to avoid naming "xxx,yyy" issue
patternProperties:
diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
index 35e669020296..45fd9fd9eb54 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.yaml
+++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
@@ -13,13 +13,11 @@ definitions:
frame-master:
description: Indicates dai-link frame master.
- $ref: /schemas/types.yaml#/definitions/phandle-array
- maxItems: 1
+ $ref: /schemas/types.yaml#/definitions/phandle
bitclock-master:
description: Indicates dai-link bit clock master
- $ref: /schemas/types.yaml#/definitions/phandle-array
- maxItems: 1
+ $ref: /schemas/types.yaml#/definitions/phandle
frame-inversion:
description: dai-link uses frame clock inversion