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: 718658 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3v6cP53ZHlz9t0k for ; Tue, 24 Jan 2017 03:35:21 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751035AbdAWQfU (ORCPT ); Mon, 23 Jan 2017 11:35:20 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:23956 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbdAWQfS (ORCPT ); Mon, 23 Jan 2017 11:35:18 -0500 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 CC: Maxime Coquelin , Alexandre Torgue , 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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>; + }; + }; + };