Received: by 10.223.164.202 with SMTP id h10csp986899wrb; Thu, 23 Nov 2017 09:18:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMaOLy7JxfCwfGBfF0HStniZQgOG6DM5HfA1sh+TXZ5Fyev5uSKLS0okq8KLUSCK5R+u541a X-Received: by 10.84.132.65 with SMTP id 59mr25676086ple.146.1511457510485; Thu, 23 Nov 2017 09:18:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511457510; cv=none; d=google.com; s=arc-20160816; b=m/D6B/fYmv91Od3krRfk6PvMh+CiL4LddYBmok+DdRqiKT0b5nEgKsxfcPSCP09FwP LSsj8qENwu1xsRwi191vUIr4q2aV3DDGxZNpU6Q2Nnd6DZH470u6zEUFAOK3PoLdpZZF S+RJ8PZTm7BL98eipBeye+FVkI4lq4ZDarCQFikX+QQaikPvT+0Xy2VY7U43tUK/8niU E3plKOfI2e8DHvGHqU5dMfDdbLtodP6GJyFAI8rGnXBdHJdlZtiBw4Vka9/Wh6AUSwOz GL1qv8OTppu4KS96ZcuLyQQvX+gRyzPBJKSnzoPLTzyaTtlfVFM7ZCaD+ql9bShhBh4W 23qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=MFK86K2vXqwikl99RYHiH6i8E/Kalpv/lREYLIrb5IM=; b=ZOce/aPECs+fX5J0a010MkI2r9JcDkjotTPLSo1shkSu5ihLvO56x48pmV5qh7cvnu NZTtk28ckrdPkJF8UN+aZH1BkWWaaLEeZQT2HOEyBc2quD9xRYjRX2wZfT25pkqJ7Zuv W/45J7mFqZcnBWilzdQa4mVo6lT3EbVWaAjQB4v6oY2LKAPqS3CUZiIV5NMKlM9oHrIp V+p+7OmGjtWuSpeclaaRVoNoiyxj24uiitCptNQmbXwhG8FJCEQepoRSxNMNj1gfBsSr EzgSNY85/kDnaCSayHohD+y265QAjIaV8o+PcFMxoQldsS33iewIwC6G2zQ3iGAjDP+v Lnqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o128si18053856pfg.203.2017.11.23.09.18.19; Thu, 23 Nov 2017 09:18:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753206AbdKWRNk (ORCPT + 76 others); Thu, 23 Nov 2017 12:13:40 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:55524 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752931AbdKWRNi (ORCPT ); Thu, 23 Nov 2017 12:13:38 -0500 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vANH9IeX002499; Thu, 23 Nov 2017 11:13:27 -0600 Authentication-Results: ppops.net; spf=none smtp.mailfrom=rf@opensource.wolfsonmicro.com Received: from mail1.cirrus.com (mail1.cirrus.com [141.131.3.20]) by mx0b-001ae601.pphosted.com with ESMTP id 2ecrj59pgw-1; Thu, 23 Nov 2017 11:13:27 -0600 Received: from EX17.ad.cirrus.com (unknown [172.20.9.81]) by mail1.cirrus.com (Postfix) with ESMTP id B5FB660D9748; Thu, 23 Nov 2017 11:13:26 -0600 (CST) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.301.0; Thu, 23 Nov 2017 17:13:22 +0000 Received: from edi-sw-dsktp006.ad.cirrus.com (edi-sw-dsktp006.ad.cirrus.com [198.90.223.54]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id vANHDKxD008967; Thu, 23 Nov 2017 17:13:21 GMT From: Richard Fitzgerald To: , , , , , , CC: , , , , , Richard Fitzgerald Subject: [PATCH v6 13/17] ASoC: madera: Add DT bindings for Cirrus Logic Madera codecs Date: Thu, 23 Nov 2017 17:13:12 +0000 Message-ID: <20171123171316.10868-14-rf@opensource.wolfsonmicro.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171123171316.10868-1-rf@opensource.wolfsonmicro.com> References: <20171123171316.10868-1-rf@opensource.wolfsonmicro.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711230233 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Cirrus Logic Madera codecs are a family of related codecs with extensive digital and analogue I/O, digital mixing and routing, signal processing and programmable DSPs. Signed-off-by: Richard Fitzgerald Acked-by: Rob Herring --- Documentation/devicetree/bindings/sound/madera.txt | 67 ++++++++++++++++++++++ MAINTAINERS | 1 + include/dt-bindings/sound/madera.h | 27 +++++++++ 3 files changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/madera.txt create mode 100644 include/dt-bindings/sound/madera.h diff --git a/Documentation/devicetree/bindings/sound/madera.txt b/Documentation/devicetree/bindings/sound/madera.txt new file mode 100644 index 000000000000..1114fcf1aa4c --- /dev/null +++ b/Documentation/devicetree/bindings/sound/madera.txt @@ -0,0 +1,67 @@ +Cirrus Logic Madera class audio codecs + +This describes audio configuration bindings for these codecs. + +See also the core bindings for the parent MFD driver: +See Documentation/devicetree/bindings/mfd/madera.txt + +and defines for values used in these bindings: +include/dt-bindings/sound/madera.h + +These properties are all contained in the parent MFD node. + +Optional properties: + - cirrus,dmic-ref : Indicates how the MICBIAS pins have been externally + connected to DMICs on each input, one cell per input. + + A value of 0 indicates MICVDD and is the default, other values depend on the + codec: + For CS47L35 one of the CS47L35_DMIC_REF_xxx values + For all other codecs one of the MADERA_DMIC_REF_xxx values + Also see the datasheet for a description of the INn_DMIC_SUP field. + + - cirrus,inmode : A list of input mode settings for each input. A maximum of + 16 cells, with four cells per input in the order INnAL, INnAR INnBL INnBR. + For non-muxed inputs the first two cells for that input set the mode for + the left and right channel and the second two cells must be 0. + For muxed inputs the first two cells for that input set the mode of the + left and right A inputs and the second two cells set the mode of the left + and right B inputs. + Valid mode values are one of the MADERA_INMODE_xxx. If the array is shorter + than the number of inputs the unspecified inputs default to + MADERA_INMODE_DIFF. + + - cirrus,out-mono : Mono bit for each output, must contain six cells if + specified. A non-zero value indicates the corresponding output is mono. + + - cirrus,max-channels-clocked : Maximum number of channels that I2S clocks + will be generated for. Useful when clock master for systems where the I2S + bus has multiple data lines. + One cell for each AIF, use a value of zero for AIFs that should be handled + normally. + + - cirrus,pdm-fmt : PDM speaker data format, must contain 2 cells + (OUT5 and OUT6). See the PDM_SPKn_FMT field in the datasheet for a + description of this value. + The second cell is ignored for codecs that do not have OUT6. + + - cirrus,pdm-mute : PDM mute format, must contain 2 cells + (OUT5 and OUT6). See the PDM_SPKn_CTRL_1 register in the datasheet for a + description of this value. + The second cell is ignored for codecs that do not have OUT6. + +Example: + +cs47l35@0 { + compatible = "cirrus,cs47l35"; + + cirrus,dmic-ref = <0 0 CS47L35_DMIC_REF_MICBIAS1B 0>; + cirrus,inmode = < + MADERA_INMODE_DMIC MADERA_INMODE_DMIC /* IN1A digital */ + MADERA_INMODE_SE MADERA_INMODE_SE /* IN1B single-ended */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN2 differential */ + 0 0 /* not used on this codec */ + >; + cirrus,out-mono = <0 0 0 0 0 0>; + cirrus,max-channels-clocked = <2 0 0>; +}; diff --git a/MAINTAINERS b/MAINTAINERS index 7f3f2de4cc44..a336fde993f4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3488,6 +3488,7 @@ W: https://github.com/CirrusLogic/linux-drivers/wiki S: Supported F: Documentation/devicetree/bindings/mfd/madera.txt F: Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt +F: include/dt-bindings/sound/madera* F: include/linux/irqchip/irq-madera* F: include/linux/mfd/madera/* F: drivers/gpio/gpio-madera* diff --git a/include/dt-bindings/sound/madera.h b/include/dt-bindings/sound/madera.h new file mode 100644 index 000000000000..5c05b7a9bab8 --- /dev/null +++ b/include/dt-bindings/sound/madera.h @@ -0,0 +1,27 @@ +/* + * Device Tree defines for Madera codecs + * + * Copyright 2016-2017 Cirrus Logic + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef DT_BINDINGS_SOUND_MADERA_H +#define DT_BINDINGS_SOUND_MADERA_H + +#define MADERA_INMODE_DIFF 0 +#define MADERA_INMODE_SE 1 +#define MADERA_INMODE_DMIC 2 + +#define MADERA_DMIC_REF_MICVDD 0 +#define MADERA_DMIC_REF_MICBIAS1 1 +#define MADERA_DMIC_REF_MICBIAS2 2 +#define MADERA_DMIC_REF_MICBIAS3 3 + +#define CS47L35_DMIC_REF_MICBIAS1B 1 +#define CS47L35_DMIC_REF_MICBIAS2A 2 +#define CS47L35_DMIC_REF_MICBIAS2B 3 + +#endif -- 2.11.0 From 1584878228152688042@xxx Thu Nov 23 17:21:00 +0000 2017 X-GM-THRID: 1584878228152688042 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread