From patchwork Tue Jun 22 01:15:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 465935 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DB34C4743C for ; Tue, 22 Jun 2021 01:19:03 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C421B610C7 for ; Tue, 22 Jun 2021 01:19:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C421B610C7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6526316AB; Tue, 22 Jun 2021 03:18:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6526316AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1624324741; bh=hvO1M56M6EtTG7vVgCl714E11oI/JaW85rzS/nOe0wQ=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ptgv1RjY6L++PR93xWRLBkOIPFNU6ManpNeI2KfROogDNTiJsNsLAn79R1ICRUHJU CoI+m6Kmkr2wkuMNb8hHIMbGaiXiupjt/YBSwah94+wAW2922UfXTEpv/dsYfZeS+p kBoK8GR4xpfPwy2ahGVWZXl/nLxgIJSt1d0fxPkk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 33158F80515; Tue, 22 Jun 2021 03:15:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 48D2FF8051E; Tue, 22 Jun 2021 03:15:29 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id E6F80F80518 for ; Tue, 22 Jun 2021 03:15:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E6F80F80518 Date: 22 Jun 2021 10:15:21 +0900 X-IronPort-AV: E=Sophos;i="5.83,290,1616425200"; d="scan'208";a="84989975" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 Jun 2021 10:15:21 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 68A98400D0C5; Tue, 22 Jun 2021 10:15:21 +0900 (JST) Message-ID: <87mtri3djq.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH RFC 10/15] ASoC: audio-graph-card2: add Yaml Document User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown , Rob Herring In-Reply-To: <871r8u4s6q.wl-kuninori.morimoto.gx@renesas.com> References: <871r8u4s6q.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 | 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 + +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 + +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 + +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