On Mon, Jun 21, 2021 at 7:15 PM Kuninori Morimoto kuninori.morimoto.gx@renesas.com wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
Needs to go to DT list for checks and review...
This patch adds Audio Graph Card2 Yaml bindings. It is similar to Audio Graph Card, but different.
- audio-graph-card used "dais" to indicate DAI-links, audio-graph-card2 uses "links" to it. - audio-graph-card used "phandle" to indicate bitclock/frame-master, audio-graph-card2 uses flag to it. - audio-graph-card used "format" to indicate DAI format, audio-graph-card2 assumes CPU/Codec drivers have .get_fmt support.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
.../sound/audio-graph-card2-items.yaml | 36 +++++++++ .../bindings/sound/audio-graph-card2.yaml | 45 +++++++++++ .../bindings/sound/audio-graph-port2.yaml | 74 +++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card2-items.yaml create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card2.yaml create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-port2.yaml
diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card2-items.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card2-items.yaml new file mode 100644 index 000000000000..40439f78df60 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/audio-graph-card2-items.yaml @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/audio-graph-card2-items.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
+title: Audio Graph Card2 Items Bindings
+maintainers:
- Kuninori Morimoto kuninori.morimoto.gx@renesas.com
+properties:
- compatible:
- enum:
- audio-graph-card2-dsp
- audio-graph-card2-multi
- audio-graph-card2-codec2codec
+required:
- compatible
+additionalProperties: true
+examples:
- |
- mix {
compatible = "audio-graph-card2-dsp";
- };
- multi {
compatible = "audio-graph-card2-multi";
- };
- codec2codec {
compatible = "audio-graph-card2-codec2codec";
- };
diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml new file mode 100644 index 000000000000..b5908ef144c1 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/audio-graph-card2.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-card2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
+title: Audio Graph Card2 Device Tree Bindings
+maintainers:
- Kuninori Morimoto kuninori.morimoto.gx@renesas.com
+properties:
- compatible:
- enum:
- audio-graph-card2
- links:
- $ref: /schemas/types.yaml#/definitions/phandle-array
- 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
+required:
- compatible
- links
+unevaluatedProperties: false
+examples:
- |
- sound {
compatible = "audio-graph-card2";
links = <&cpu_port>;
- };
- cpu {
cpu_port: port { cpu_ep: endpoint { remote-endpoint = <&codec_ep>; }; };
- };
- codec {
port { codec_ep: endpoint { remote-endpoint = <&cpu_ep>; }; };
- };
diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port2.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port2.yaml new file mode 100644 index 000000000000..0a7753a140bf --- /dev/null +++ b/Documentation/devicetree/bindings/sound/audio-graph-port2.yaml @@ -0,0 +1,74 @@ +# 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 Card2 '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
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
- 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/flag
bitclock-master:
description: Indicates dai-link bit clock master
$ref: /schemas/types.yaml#/definitions/flag
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
2.25.1