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: 9533051 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 B964560434 for ; Mon, 23 Jan 2017 16:36:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC50026CFC for ; Mon, 23 Jan 2017 16:36:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0F9826E3E; Mon, 23 Jan 2017 16:36:35 +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 autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2E28826CFC for ; Mon, 23 Jan 2017 16:36:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cVhbW-0000U1-6u; Mon, 23 Jan 2017 16:36:26 +0000 Received: from mx07-00178001.pphosted.com ([62.209.51.94]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cVhZb-0006lY-Or for linux-arm-kernel@lists.infradead.org; Mon, 23 Jan 2017 16:34:30 +0000 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 Subject: [PATCH 6/7] ASoC: add bindings for STM32 DFSDM driver 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170123_083428_132829_2882F662 X-CRM114-Status: GOOD ( 13.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnaud.pouliquen@st.com, Alexandre Torgue , Maxime Coquelin Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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>; + }; + }; + };