From patchwork Tue Jul 20 01:41:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 1507357 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4GTM7K181Tz9sWc for ; Tue, 20 Jul 2021 11:48:29 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241275AbhGTBFs (ORCPT ); Mon, 19 Jul 2021 21:05:48 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:10402 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239320AbhGTBA1 (ORCPT ); Mon, 19 Jul 2021 21:00:27 -0400 Date: 20 Jul 2021 10:41:01 +0900 X-IronPort-AV: E=Sophos;i="5.84,253,1620658800"; d="scan'208";a="88130038" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 20 Jul 2021 10:41:01 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 961BA415371D; Tue, 20 Jul 2021 10:41:01 +0900 (JST) Message-ID: <87wnplvk2a.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 09/14] ASoC: audio-graph-card2: add Yaml Document User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown Cc: Linux-ALSA , devicetree@vger.kernel.org In-Reply-To: <87a6mhwyqn.wl-kuninori.morimoto.gx@renesas.com> References: <87a6mhwyqn.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Kuninori Morimoto 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 --- .../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 + +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 + +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>; }; }; + };