All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>, devicetree@vger.kernel.org
Subject: [PATCH v2 09/14] ASoC: audio-graph-card2: add Yaml Document
Date: 20 Jul 2021 10:41:01 +0900	[thread overview]
Message-ID: <87wnplvk2a.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87a6mhwyqn.wl-kuninori.morimoto.gx@renesas.com>


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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        | 80 +++++++++++++++++++
 .../bindings/sound/audio-graph-card2.yaml     | 51 ++++++++++++
 2 files changed, 131 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card2-items.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card2.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..ec94cad6b939
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card2-items.yaml
@@ -0,0 +1,80 @@
+# 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
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^ports(@[0-1])?$":
+    $ref: /schemas/graph.yaml#/properties/ports
+    properties:
+      port(@[0-9a-f]+)?:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+    additionalProperties: true
+
+required:
+  - compatible
+
+additionalProperties: true
+
+examples:
+  - |
+    mix {
+        compatible = "audio-graph-card2-dsp";
+
+        /* sample ports
+        ports@0 {
+            port@0 { mix_fe0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; };
+            port@1 { mix_fe1_ep: endpoint { remote-endpoint = <&cpu1_ep>; }; };
+        };
+        ports@1 {
+            port@0 { mix_be0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
+        };
+        */
+    };
+
+    multi {
+        compatible = "audio-graph-card2-multi";
+
+        /* sample ports
+        ports@0 {
+            port@0 { multi_00_ep: endpoint { remote-endpoint = <&cpu2_ep>; }; };
+            port@1 { multi_01_ep: endpoint { remote-endpoint = <&cpu3_ep>; }; };
+        };
+        ports@1 {
+            port@0 { multi_10_ep: endpoint { remote-endpoint = <&codec1_ep>; }; };
+            port@1 { multi_11_ep: endpoint { remote-endpoint = <&codec2_ep>; }; };
+        };
+        */
+    };
+
+    codec2codec {
+        compatible = "audio-graph-card2-codec2codec";
+
+        /* sample ports
+        rate = <48000>;
+        ports {
+            port@0 { c2c_0_ep: endpoint { remote-endpoint = <&codec3_ep>; }; };
+            port@1 { c2c_1_ep: endpoint { remote-endpoint = <&codec4_ep>; }; };
+        };
+        */
+    };
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..4975f88de025
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
@@ -0,0 +1,51 @@
+# 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
+  label:
+    maxItems: 1
+  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
+
+additionalProperties: false
+
+examples:
+  - |
+    sound {
+        compatible = "audio-graph-card2";
+
+        links = <&cpu_port>;
+    };
+
+    cpu {
+        compatible = "cpu-driver";
+
+        cpu_port: port { cpu_ep: endpoint { remote-endpoint = <&codec_ep>; }; };
+    };
+
+    codec {
+        compatible = "codec-driver";
+
+        port { codec_ep: endpoint { remote-endpoint = <&cpu_ep>; }; };
+    };
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: devicetree@vger.kernel.org, Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH v2 09/14] ASoC: audio-graph-card2: add Yaml Document
Date: 20 Jul 2021 10:41:01 +0900	[thread overview]
Message-ID: <87wnplvk2a.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87a6mhwyqn.wl-kuninori.morimoto.gx@renesas.com>


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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        | 80 +++++++++++++++++++
 .../bindings/sound/audio-graph-card2.yaml     | 51 ++++++++++++
 2 files changed, 131 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card2-items.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card2.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..ec94cad6b939
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card2-items.yaml
@@ -0,0 +1,80 @@
+# 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
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^ports(@[0-1])?$":
+    $ref: /schemas/graph.yaml#/properties/ports
+    properties:
+      port(@[0-9a-f]+)?:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+    additionalProperties: true
+
+required:
+  - compatible
+
+additionalProperties: true
+
+examples:
+  - |
+    mix {
+        compatible = "audio-graph-card2-dsp";
+
+        /* sample ports
+        ports@0 {
+            port@0 { mix_fe0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; };
+            port@1 { mix_fe1_ep: endpoint { remote-endpoint = <&cpu1_ep>; }; };
+        };
+        ports@1 {
+            port@0 { mix_be0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
+        };
+        */
+    };
+
+    multi {
+        compatible = "audio-graph-card2-multi";
+
+        /* sample ports
+        ports@0 {
+            port@0 { multi_00_ep: endpoint { remote-endpoint = <&cpu2_ep>; }; };
+            port@1 { multi_01_ep: endpoint { remote-endpoint = <&cpu3_ep>; }; };
+        };
+        ports@1 {
+            port@0 { multi_10_ep: endpoint { remote-endpoint = <&codec1_ep>; }; };
+            port@1 { multi_11_ep: endpoint { remote-endpoint = <&codec2_ep>; }; };
+        };
+        */
+    };
+
+    codec2codec {
+        compatible = "audio-graph-card2-codec2codec";
+
+        /* sample ports
+        rate = <48000>;
+        ports {
+            port@0 { c2c_0_ep: endpoint { remote-endpoint = <&codec3_ep>; }; };
+            port@1 { c2c_1_ep: endpoint { remote-endpoint = <&codec4_ep>; }; };
+        };
+        */
+    };
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..4975f88de025
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
@@ -0,0 +1,51 @@
+# 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
+  label:
+    maxItems: 1
+  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
+
+additionalProperties: false
+
+examples:
+  - |
+    sound {
+        compatible = "audio-graph-card2";
+
+        links = <&cpu_port>;
+    };
+
+    cpu {
+        compatible = "cpu-driver";
+
+        cpu_port: port { cpu_ep: endpoint { remote-endpoint = <&codec_ep>; }; };
+    };
+
+    codec {
+        compatible = "codec-driver";
+
+        port { codec_ep: endpoint { remote-endpoint = <&cpu_ep>; }; };
+    };
-- 
2.25.1


  parent reply	other threads:[~2021-07-20  1:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20  1:38 [PATCH v2 00/14] ASoC: add Audio Graph Card2 driver Kuninori Morimoto
2021-07-20  1:39 ` [PATCH v2 01/14] ASoC: test-component: add Test Component YAML bindings Kuninori Morimoto
2021-07-20  1:39   ` Kuninori Morimoto
2021-07-20  1:39 ` [PATCH v2 02/14] ASoC: test-component: add Test Component for Sound debug/test Kuninori Morimoto
2021-08-03 17:08   ` Mark Brown
2021-08-03 23:55     ` Kuninori Morimoto
2021-08-04 17:37       ` Mark Brown
2021-07-20  1:39 ` [PATCH v2 03/14] ASoC: simple-card-utils: add asoc_graph_is_ports0() Kuninori Morimoto
2021-07-20  1:40 ` [PATCH v2 04/14] ASoC: simple-card-utils: add codec2codec support Kuninori Morimoto
2021-07-20  1:40 ` [PATCH v2 05/14] ASoC: audio-graph-card2: add Audio Graph Card2 driver Kuninori Morimoto
2021-07-20  1:40 ` [PATCH v2 06/14] ASoC: audio-graph-card2: add DPCM support Kuninori Morimoto
2021-07-20  1:40 ` [PATCH v2 07/14] ASoC: audio-graph-card2: add Multi CPU/Codec support Kuninori Morimoto
2021-07-20  1:40 ` [PATCH v2 08/14] ASoC: audio-graph-card2: add Codec2Codec support Kuninori Morimoto
2021-07-20  1:41 ` Kuninori Morimoto [this message]
2021-07-20  1:41   ` [PATCH v2 09/14] ASoC: audio-graph-card2: add Yaml Document Kuninori Morimoto
2021-07-20 13:11   ` Rob Herring
2021-07-20 13:11     ` Rob Herring
2021-07-20 15:12   ` Rob Herring
2021-07-20 15:12     ` Rob Herring
2021-07-20 23:32     ` Kuninori Morimoto
2021-07-20 23:32       ` Kuninori Morimoto
2021-07-21 11:54       ` Mark Brown
2021-07-26  2:19         ` Kuninori Morimoto
2021-08-03 16:53           ` Mark Brown
2021-08-04  0:49             ` Kuninori Morimoto
2021-08-04 17:17               ` Mark Brown
2021-08-04 23:47                 ` Kuninori Morimoto
2021-08-04 23:51                   ` Kuninori Morimoto
2021-08-05 12:52                     ` Mark Brown
2021-08-13 19:43                   ` Mark Brown
2021-08-16  4:33                     ` Kuninori Morimoto
2021-07-20  1:41 ` [PATCH v2 10/14] ASoC: sample-custom-card: add Audio Graph Card2 custome sample Kuninori Morimoto
2021-07-20  1:41 ` [PATCH v2 11/14] ASoC: audio-graph-card2-sample.dtsi: add Sample DT for Audio Graph Card2 Kuninori Morimoto
2021-07-20  1:41 ` [PATCH v2 12/14] ASoC: audio-graph-card2-sample.dtsi: add DPCM sample Kuninori Morimoto
2021-07-20  1:41 ` [PATCH v2 13/14] ASoC: audio-graph-card2-sample.dtsi: add Multi CPU/Codec sample Kuninori Morimoto
2021-07-20  1:41 ` [PATCH v2 14/14] ASoC: audio-graph-card2-sample.dtsi: add Codec2Codec sample Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnplvk2a.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.