From patchwork Mon Jan 23 16:32:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud POULIQUEN X-Patchwork-Id: 9533221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3915B60434 for ; Mon, 23 Jan 2017 17:32:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29E0A28409 for ; Mon, 23 Jan 2017 17:32:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DEB328468; Mon, 23 Jan 2017 17:32:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F317E28450 for ; Mon, 23 Jan 2017 17:32:56 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 549232670C1; Mon, 23 Jan 2017 18:32:55 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9794626669C; Mon, 23 Jan 2017 18:30:36 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4C62326669C; Mon, 23 Jan 2017 17:33:59 +0100 (CET) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [62.209.51.94]) by alsa0.perex.cz (Postfix) with ESMTP id 4708B26708F for ; Mon, 23 Jan 2017 17:33:56 +0100 (CET) Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id v0NGRTNj021084; Mon, 23 Jan 2017 17:33:55 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-.pphosted.com with ESMTP id 283x024ykg-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 23 Jan 2017 17:33:55 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DA13B34; Mon, 23 Jan 2017 16:33:54 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8B72E29E5; Mon, 23 Jan 2017 16:33:54 +0000 (GMT) Received: from localhost (10.201.23.162) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 23 Jan 2017 17:33:54 +0100 From: Arnaud Pouliquen To: , , , , Lee Jones , Rob Herring , Mark Rutland , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Date: Mon, 23 Jan 2017 17:32:24 +0100 Message-ID: <1485189145-29576-7-git-send-email-arnaud.pouliquen@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1485189145-29576-1-git-send-email-arnaud.pouliquen@st.com> References: <1485189145-29576-1-git-send-email-arnaud.pouliquen@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.162] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-01-23_15:, , signatures=0 Cc: arnaud.pouliquen@st.com, Alexandre Torgue , Maxime Coquelin Subject: [alsa-devel] [PATCH 6/7] ASoC: add bindings for STM32 DFSDM driver X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds documentation of device tree bindings for the STM32 DFSDM ASoC driver. Signed-off-by: Arnaud Pouliquen --- .../devicetree/bindings/sound/st,sm32-adfsdm.txt | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/st,sm32-adfsdm.txt diff --git a/Documentation/devicetree/bindings/sound/st,sm32-adfsdm.txt b/Documentation/devicetree/bindings/sound/st,sm32-adfsdm.txt new file mode 100644 index 0000000..a1d27b8 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/st,sm32-adfsdm.txt @@ -0,0 +1,84 @@ +STMicroelectronics STM32 ADFSDM ASoC DAI device driver. + +STM32 ADFSDM ASoC is a sigma delta audio interface for digital microphone. +It has to be declared in device-tree as a subnode of the DFSDM mfd node. + +It offers possibility to record several mono microphones, with an option to +synchronize all microphones on a main one (that must be piped to filter 0) +Audio interface can be exposed through the generic ASoC simple card. + +2 Dmics can be connected on one SPI interface instance n. +Convention is that the DMIC that strobes data on rising edge is connected to the +corresponding DFSDM channel n; while the Dmic that strobes data on falling edge +is connected to the channel n-1. Simple card property "bitclock-inversion = <1>" +is used to specify that microphone strobes data on falling edge. + +SPI interface allows to be scheduled by an external SPI clock. To use it +simple card properties "bitclock-master = <&codec>" and "system-clock-frequency" +have to be defined in dai-link node. + +Required properties: +- compatible: Must be "st,stm32-dfsdm-audio", +- reg: Specifies the DFSDM filter instance. +- interrupts: DFSDM filter instance interrupt line. +- dma: DMA controller phandle and DMA request line associated to the + filter instance ( specified by the field "reg") +- dma-names: must be "rx" + +- st,input-id: Id of the SPI/Manchester interface used. +- st,dai-filter-order: SinC filter order from 0 to 5. + 0: FastSinC + [1-5]: order 1 to 5. + For audio purpose it is recommended to use order 3 to 5. + +Optional properties: + - st,dai0-synchronized: Set to 1 to synchronize DAI with DFSDM instance 0. + +Exemple of a card with 2 Dmics synchronized and connected on SPI interface 1. + + dfsdm: dfsdm@4400D000 { + dai_dfsdm0: dfsdm-audio@0 { + compatible = "st,stm32-dfsdm-audio"; + #sound-dai-cells = <0>; + reg = <0>; + dmas = <&dmamux1 101 0x400 0x00>; + dma-names = "rx"; + st,input-id = <0>; + st,dai-filter-order = <5>; + }; + dai_dfsdm1: dfsdm-audio@1 { + compatible = "st,stm32-dfsdm-audio"; + #sound-dai-cells = <0>; + reg = <0>; + dmas = <&dmamux1 102 0x400 0x00>; + dma-names = "rx"; + st,input-id = <0>; + st,dai0-synchronized = <1>; + st,dai-filter-order = <5>; + }; + }; + sound_dfsdm_pdm { + compatible = "simple-audio-card"; + simple-audio-card,name = "dfsdm_pdm"; + status = "okay"; + + dfsdm0_mic0: simple-audio-card,dai-link@0 { + format = "pdm"; + cpu { + sound-dai = <&dai_dfsdm0>; + }; + dmic0_codec: codec { + sound-dai = <&dmic0>; + }; + }; + dfsdm0_mic1: simple-audio-card,dai-link@1 { + format = "pdm"; + bitclock-inversion = <1>; + cpu { + sound-dai = <&dai_dfsdm1>; + }; + codec { + sound-dai = <&dmic1>; + }; + }; + };