From patchwork Wed Jan 11 13:49:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 641279 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 94726C5479D for ; Wed, 11 Jan 2023 13:50:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9730EE758; Wed, 11 Jan 2023 14:49:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9730EE758 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1673445034; bh=72Or1qUgafJsd37ESUByqIlqJUw5RdgVuvU2Ms963kI=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=Pme7emsrTkDqHhy/a+NhsFlQ4+43Nk5O43PVYfJQz+9Z4tNtEY30kJW78mPmu704W 0u7+3ytuAhhO9shEZgOUOGHdWSgYTIovZAuHSMfKvM96qlTb0a7uUQcKpixVdcbi3v JF/+rFKDLUgutyd6Y6Axcxc16Hszt0l1iBv82K8c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3C6B7F80425; Wed, 11 Jan 2023 14:49:23 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4E95CF80424; Wed, 11 Jan 2023 14:49:22 +0100 (CET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7F8B8F80424 for ; Wed, 11 Jan 2023 14:49:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7F8B8F80424 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=itfjrbvW Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id F3FB4FF80D; Wed, 11 Jan 2023 13:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1673444960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NMswGhUaze/v3+qic5VpHszBxBNoPuzv9ek9RV8ZYW4=; b=itfjrbvWHwsoMaF5WE3s7Am2NwNtjC5JHm6CMoCMWzMKNI++OcAbyr4Hx5DC5TqB/1n1wc kJd51ocvxxrZsrG/VslKSbyv53CfTJXhlnDMVESUMuQjCv6RBRjqqQ6sUd+aOeTR0JyxoU V/D3kxbR9B+EetgXovAsGhYgm6MITU6Ox+vP7iNZIkTa0SeFB7LyRsBII1ljsJtFTQPDVQ NYPtWbC+DSVIRMEIc5NPEb6BX8CWsl75qjlLwQPJqSRqABKgKFxTPgRhM+SWsA25nlzxnS X5rlwNs/iKuKRsSBIX313a1KCNN77uaWrFhQ3vSULTc8pB8cCYpY4Hp1pEBRAg== From: Herve Codina To: Herve Codina , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Linus Walleij , Bartosz Golaszewski , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 1/3] dt-bindings: sound: Add Renesas IDT821034 codec Date: Wed, 11 Jan 2023 14:49:03 +0100 Message-Id: <20230111134905.248305-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230111134905.248305-1-herve.codina@bootlin.com> References: <20230111134905.248305-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Christophe Leroy , linux-gpio@vger.kernel.org, Thomas Petazzoni Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The Renesas IDT821034 codec is a quad PCM codec with programmable gain. Signed-off-by: Herve Codina --- .../bindings/sound/renesas,idt821034.yaml | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/renesas,idt821034.yaml diff --git a/Documentation/devicetree/bindings/sound/renesas,idt821034.yaml b/Documentation/devicetree/bindings/sound/renesas,idt821034.yaml new file mode 100644 index 000000000000..2c29b770e3f7 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/renesas,idt821034.yaml @@ -0,0 +1,97 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/renesas,idt821034.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas IDT821034 codec device + +maintainers: + - Herve Codina + +description: | + The IDT821034 codec is a four channel PCM codec with onchip filters and + programmable gain setting. + + The time-slots used by the codec must be set and so, the properties + 'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and + 'dai-tdm-slot-rx-mask' must be present in the ALSA sound card node for + sub-nodes that involve the codec. The codec uses one 8bit time-slot per + channel. + 'dai-tdm-tdm-slot-with' must be set to 8. + + The IDT821034 codec also supports 5 gpios (SLIC signals) per channel. + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + - $ref: /schemas/gpio/gpio.yaml# + - $ref: dai-common.yaml# + +properties: + compatible: + const: renesas,idt821034 + + reg: + description: + SPI device address. + maxItems: 1 + + spi-max-frequency: + maximum: 8192000 + + spi-cpha: true + + '#sound-dai-cells': + const: 0 + + '#gpio-cells': + const: 2 + + gpio-controller: true + +required: + - compatible + - reg + - spi-cpha + - '#sound-dai-cells' + - gpio-controller + - '#gpio-cells' + +additionalProperties: false + +examples: + - | + #include + spi0 { + #address-cells = <1>; + #size-cells = <0>; + codec: idt821034@0 { + compatible = "renesas,idt821034"; + reg = <0>; + spi-max-frequency = <8192000>; + spi-cpha; + #sound-dai-cells = <0>; + gpio-controller; + #gpio-cells = <2>; + }; + }; + sound { + compatible = "simple-audio-card"; + #address-cells = <1>; + #size-cells = <0>; + simple-audio-card,dai-link@0 { + reg = <0>; + format = "dsp_b"; + cpu { + sound-dai = <&cpu_dai>; + }; + codec { + sound-dai = <&codec>; + dai-tdm-slot-num = <4>; + dai-tdm-slot-width = <8>; + /* TS 2, 3, 5, 7 */ + dai-tdm-slot-tx-mask = <0 0 1 1 0 1 0 1>; + dai-tdm-slot-rx-mask = <0 0 1 1 0 1 0 1>; + }; + }; + };