From patchwork Wed Oct 14 14:54:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 11837789 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 077B5921 for ; Wed, 14 Oct 2020 14:55:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C37F02222C for ; Wed, 14 Oct 2020 14:55:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VSX/xLh1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="gxZOPXc8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C37F02222C Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pLZUQGsLYIyORBlkhecamKCkQ5/9zIvvGfT1LmJGIic=; b=VSX/xLh1xwzjysY9OoELwLrTV zUN/qPUTsePAf41jSS9lt9L5rBHQH7iTVhnIE/U43xCsKVBfOjb0yfk6OV+rYGRhVoiPNwCWfjgdR V4/22g7s42g9os0/XzQJlLzVEKvMXdK85fBxt6FlWApNu1QefDKuwJVexBMAMmLG4RfIrL2zRketx qoH0qFHhU4D+aNtl0vZQgelyQeSjJAF96Ci7XZ0ZUjEk4XYWJdvAAqEPZTQ2Zh276lxb/rqqZy0BG 2pZ43RmbGf1rvT6fT43IMKxRbUACEzfETUzmaYCXXFL/6kfq0pzcqHDJmJYdNwE0+JANNTYY8Vh6X ZEvwetfzQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiBX-0006qQ-R8; Wed, 14 Oct 2020 14:55:23 +0000 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25] helo=mx0b-001ae601.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiAu-0006c4-47; Wed, 14 Oct 2020 14:54:48 +0000 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 09EEpi80023902; Wed, 14 Oct 2020 09:54:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=bBy5LfwwfVhr4zvv5l4NPCrI6nTVQPaTkMub+rmgFxk=; b=gxZOPXc8QwDEzQqDTGtZbO5DfO6DSKg+wjfE1X9m3Bqe5hzADmst5JyK5K0XYS6fhCaU SmlanPYY1A7gJC5tKEzR5BUK3vZMf+f1njexcHG2YBsrOplWcxFaJDcditMVeEXIfZBg 6IjOTvyJ4agKeJjeLJyeSFI8nnkx1PCFtsetW9LZS9jnYmBQMCAClQu2eHBfIGmnMs5b 4+IBphedy5ZKDiPnnhWozco20jY7YdJKrJFmEMy4SsPD7pDGMGTdl9NgLp6ZLh8FvGK9 AmueFfVuC7HQj+hDMOTmCbrC4fjQd7AzBV2WGrLWMQOTFC0KGJkA75TzW/sDCbp90MPi Dg== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 343ac1wbwc-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 14 Oct 2020 09:54:35 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Wed, 14 Oct 2020 15:54:33 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Wed, 14 Oct 2020 15:54:33 +0100 Received: from AUSNPC0LSNW1-debian.ad.cirrus.com (ausnpc0lsnw1.ad.cirrus.com [198.61.64.143]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id A86102AA; Wed, 14 Oct 2020 14:54:32 +0000 (UTC) From: Richard Fitzgerald To: , , Subject: [PATCH 1/7] of: base: Add of_count_phandle_with_fixed_args() Date: Wed, 14 Oct 2020 15:54:12 +0100 Message-ID: <20201014145418.31838-2-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201014145418.31838-1-rf@opensource.cirrus.com> References: <20201014145418.31838-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010140108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_105444_289665_F2F993BD X-CRM114-Status: GOOD ( 19.75 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [67.231.149.25 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Richard Fitzgerald , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add an equivalent of of_count_phandle_with_args() for fixed argument sets, to pair with of_parse_phandle_with_fixed_args(). Signed-off-by: Richard Fitzgerald --- drivers/of/base.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/linux/of.h | 9 +++++++++ 2 files changed, 51 insertions(+) diff --git a/drivers/of/base.c b/drivers/of/base.c index ea44fea99813..45d8b0e65345 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1772,6 +1772,48 @@ int of_count_phandle_with_args(const struct device_node *np, const char *list_na } EXPORT_SYMBOL(of_count_phandle_with_args); +/** + * of_count_phandle_with_fixed_args() - Find the number of phandles references in a property + * @np: pointer to a device tree node containing a list + * @list_name: property name that contains a list + * @cell_count: number of argument cells following the phandle + * + * Returns the number of phandle + argument tuples within a property. It + * is a typical pattern to encode a list of phandle and variable + * arguments into a single property. + */ +int of_count_phandle_with_fixed_args(const struct device_node *np, + const char *list_name, + int cells_count) +{ + struct of_phandle_iterator it; + int rc, cur_index = 0; + + if (!cells_count) { + const __be32 *list; + int size; + + list = of_get_property(np, list_name, &size); + if (!list) + return -ENOENT; + + return size / sizeof(*list); + } + + rc = of_phandle_iterator_init(&it, np, list_name, NULL, cells_count); + if (rc) + return rc; + + while ((rc = of_phandle_iterator_next(&it)) == 0) + cur_index += 1; + + if (rc != -ENOENT) + return rc; + + return cur_index; +} +EXPORT_SYMBOL(of_count_phandle_with_fixed_args); + /** * __of_add_property - Add a property to a node without lock operations */ diff --git a/include/linux/of.h b/include/linux/of.h index 5cf7ae0465d1..9f315da4e9da 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -377,6 +377,8 @@ extern int of_parse_phandle_with_fixed_args(const struct device_node *np, struct of_phandle_args *out_args); extern int of_count_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name); +extern int of_count_phandle_with_fixed_args(const struct device_node *np, + const char *list_name, int cells_count); /* phandle iterator functions */ extern int of_phandle_iterator_init(struct of_phandle_iterator *it, @@ -886,6 +888,13 @@ static inline int of_count_phandle_with_args(struct device_node *np, return -ENOSYS; } +static inline int of_count_phandle_with_fixed_args(const struct device_node *np, + const char *list_name, + int cells_count) +{ + return -ENOSYS; +} + static inline int of_phandle_iterator_init(struct of_phandle_iterator *it, const struct device_node *np, const char *list_name, From patchwork Wed Oct 14 14:54:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 11837785 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1456921 for ; Wed, 14 Oct 2020 14:55:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC3DE212CC for ; Wed, 14 Oct 2020 14:55:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Sz2yrfUZ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="eabBocoK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC3DE212CC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Z1U+ehRF1IqIMoAs5sdNJrAJMD18LpYKoxJs+T8jjA0=; b=Sz2yrfUZh+lXMDizCPNnJ7OV/ 9v5AIKKemvCTEhwnMjsANrmBRptks5ofiEBGPPmbj7iRNDAPpIQq14qh5cZCMMi3u4WsKEIMLm68y l0Li7UxoG/geiJpdJXwWz/NeDE+wjtN7aaFVq4uboUGNazNqdVzgYXoylYthf1nxDocVndeUU3Mcq Dmc+ZMX36VlpbUwHBNEsYPIhV+IGPbBmGzBkbufb2J3f3ZMOqYQFnJiVjuoqzqb1GHp8Sv2te2BxR fVf4FDu+Zot3eetBeW3OAiyRCpceOfU+AGiKPEqH7iL5fqOJyZTTW2/omb3V1BO80mLNw52ITeY3z BkjWDCEkQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiB6-0006gl-Au; Wed, 14 Oct 2020 14:54:56 +0000 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25] helo=mx0b-001ae601.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiAt-0006bb-6t; Wed, 14 Oct 2020 14:54:46 +0000 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 09EEpi81023902; Wed, 14 Oct 2020 09:54:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=9XWilk56wxWCD+dN2HKKYxzBT3c3C3CzLDThlC0mYw4=; b=eabBocoKBbHpL8CBnl6EQsJ3xicnEwn4bHygmuM5SMyZaLd4gkz1FlRkjur/diDqQzPm xFvLPz4nSXxiyOAXV8704aG5rbXHkEng26U5nli7d3VNwgdd1OJVaNHw8OtlJNLM+dOT MzhYomqOEVKz4s5PBFaiKJOjxmr4qCPrAXtOVUeGybdaOvrV+lKNHNtEzyx7aMyamdkN o0ddqs0fwzY4drDsmgP08hyeTbgeZO0g3VvJ5yIps+fjaFNhHWk3rJJXgWOSNJBwU0ya bbzem/M9rAIk7K3IuIQIoEHnTlUmpX9C6pd7jkx6MBWO8G1Adeektg7hsfdwZpsh54nN JQ== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 343ac1wbwc-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 14 Oct 2020 09:54:35 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Wed, 14 Oct 2020 15:54:33 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Wed, 14 Oct 2020 15:54:33 +0100 Received: from AUSNPC0LSNW1-debian.ad.cirrus.com (ausnpc0lsnw1.ad.cirrus.com [198.61.64.143]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 2DC7A2C1; Wed, 14 Oct 2020 14:54:33 +0000 (UTC) From: Richard Fitzgerald To: , , Subject: [PATCH 2/7] ASoC: simple-card: Add plls and sysclks DT schema Date: Wed, 14 Oct 2020 15:54:13 +0100 Message-ID: <20201014145418.31838-3-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201014145418.31838-1-rf@opensource.cirrus.com> References: <20201014145418.31838-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=706 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010140108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_105443_854087_72B321D9 X-CRM114-Status: GOOD ( 18.05 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [67.231.149.25 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Richard Fitzgerald , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This adds the two new properties 'plls' and 'sysclks' to the dt bindings schema document. These add the ability to set values that will be passed to snd_soc_component_set_sysclk() and snd_soc_component_set_pll(). Signed-off-by: Richard Fitzgerald --- .../bindings/sound/simple-card.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml index 35e669020296..48c9a4313d58 100644 --- a/Documentation/devicetree/bindings/sound/simple-card.yaml +++ b/Documentation/devicetree/bindings/sound/simple-card.yaml @@ -92,6 +92,25 @@ definitions: description: the widget names for which pin switches must be created. $ref: /schemas/types.yaml#/definitions/string-array + plls: + description: | + A list of component pll settings that will be applied with + snd_soc_component_set_pll. Each entry is a phandle to the node of the + codec or cpu component, followed by the four arguments id, source, + frequency_in, frequency_out. Multiple entries can have the same phandle + so that several plls can be set in the same component. + $ref: /schemas/types.yaml#/definitions/phandle-array + + sysclks: + description: | + A list of component sysclk settings that will be applied with + snd_soc_component_set_sysclk. Each entry is a phandle to the node of + the codec or cpu component, followed by the four arguments id, source, + frequency, direction. Direction is 0 if the clock is an input, 1 if it + is an output. Multiple entries can have the same phandle so that several + clocks can be set in the same component. + $ref: /schemas/types.yaml#/definitions/phandle-array + format: description: audio format. items: @@ -192,6 +211,10 @@ patternProperties: $ref: "#/definitions/prefix" "^simple-audio-card,pin-switches$": $ref: "#/definitions/pin-switches" + "^simple-audio-card,plls$": + $ref: "#/definitions/plls" + "^simple-audio-card,sysclks$": + $ref: "#/definitions/sysclks" "^simple-audio-card,hp-det-gpio$": maxItems: 1 "^simple-audio-card,mic-det-gpio$": @@ -489,3 +512,36 @@ examples: }; }; }; + +#-------------------- +# Codec with component PLL and SYSCLK settings +#-------------------- + - | + sound { + compatible = "simple-audio-card"; + + simple-audio-card,plls = < + &cs47l15 1 1 32768 98304000 + >; + + simple-audio-card,sysclks = < + &cs47l15 1 4 98304000 0 + &cs47l15 8 4 147456000 0 + >; + + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&cs47l15_codec_dai>; + simple-audio-card,frame-master = <&cs47l15_codec_dai>; + + simple-audio-card,cpu { + sound-dai = <&axi_i2s0 0>; + }; + + cs47l15_codec_dai: simple-audio-card,codec { + sound-dai = <&cs47l15 0>; + + /* Disable dai_set_sysclk() */ + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; From patchwork Wed Oct 14 14:54:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 11837815 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9219514B2 for ; Wed, 14 Oct 2020 14:57:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A690212CC for ; Wed, 14 Oct 2020 14:57:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OUsPTkSp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="efVzKBfs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A690212CC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sFSFwmWLoWK06XnjYUQQMUuh5dig/V89WwwQb5AOjAI=; b=OUsPTkSpRgTE4caTLU5dpyo9g 2dHNkB3v7dWIzxpIncQHlVVk4RLrOn6a+l/6SiixpoyODmf8uRDvMCMX81VcNo6XaSFpKyCNp42yY 2ONQCxn8sDu24JsrR3vxWiSrsoC1DLABy4tClGO4ZOl4nRdyph5kpnzgzJrIVl44dgSeL68kpfJK6 Gdnl0L6gjfKium2+9ePHixZOS0tdQMkc+D4pafOoTm+xMnCWhaVhYM7kf25+WmSVHyoplKFbrZorD VWnj9fk0klfT5MebpnKV96qaMhH5LsmJ7cNGY6mDBSSXH9J/hLRou6zg2I3XKUDu+L/6Revmg0Kwi PfrqSIjkw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiBk-0006uH-Lf; Wed, 14 Oct 2020 14:55:36 +0000 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25] helo=mx0b-001ae601.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiAt-0006bc-Hx; Wed, 14 Oct 2020 14:54:49 +0000 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 09EEpi83023902; Wed, 14 Oct 2020 09:54:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=fh+4rgHS0VmfLr4b6wdcLFhs1aYljIYED2WfDhiIjMQ=; b=efVzKBfsPYDai7Q3hc5q8+pxVQyK4DepbRAvhSii08BQBBmvfV8dwmj/DZ5BWeuleivp IIghH8/ZgjdGP9kIV1bD2bAqpksh7CSnmipgh3JXcWpEd+mbQrbsMWY3zjcFsttpMOaw AAZk/A0QSpahAP5Jkn/kump8LW7NWXHLLEVje0vfIFCcyzmNHaihCxRsJrw2eu4eWmbM Hsy1QEEI+JeMcmfCxwCO6t/lov5nhXAodkkAM+YrRuU26VUpaXvUqFJWj1+8VgRILi/b Ob+nX3m/XaYoNK2X/V6bTfOiufoS1UbbVif4P4ldGHZI+TwJipKsUHaNqC1Zt6S/GkfH 6Q== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 343ac1wbwc-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 14 Oct 2020 09:54:36 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Wed, 14 Oct 2020 15:54:34 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Wed, 14 Oct 2020 15:54:34 +0100 Received: from AUSNPC0LSNW1-debian.ad.cirrus.com (ausnpc0lsnw1.ad.cirrus.com [198.61.64.143]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id A46C22C6; Wed, 14 Oct 2020 14:54:33 +0000 (UTC) From: Richard Fitzgerald To: , , Subject: [PATCH 3/7] ASoC: simple-card: Support setting component plls and sysclks Date: Wed, 14 Oct 2020 15:54:14 +0100 Message-ID: <20201014145418.31838-4-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201014145418.31838-1-rf@opensource.cirrus.com> References: <20201014145418.31838-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010140108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_105443_855424_E809D266 X-CRM114-Status: GOOD ( 29.82 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [67.231.149.25 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Richard Fitzgerald , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Some codecs need plls and/or sysclks to be configured using the snd_soc_component_set_[sysclk|pll] functions. These drivers cannot necessarily be converted to use the clock framework. If the codec is on a I2C/SPI bus, a nested clk_get would be needed to enable the bus clock. But the clock framework does not support nested operations and this would deadlock. So it isn't possible to implement I2C/SPI connected pll/clock hardware through the clock framework. This patch adds new dt properties that list phandles of components with the pll/sysclk settings to be applied. Multiple settings can be given for the same phandle to allow for components with multiple clocks and plls. The plls and sysclks are enabled when the card bia level moves to STANDBY and disabled when it moved to OFF. As this is a _simple_ machine driver, the code does not attempt to handle specifying complex clock ordering interdependencies between components. The plls and sysclks are applied to a component as it is passed to the card set_bias_level/set_bias_level_post callbacks. It follows from this that the order components are configured is the order that they are passed to those callbacks. Signed-off-by: Richard Fitzgerald --- include/sound/simple_card_utils.h | 24 ++++ sound/soc/generic/simple-card-utils.c | 184 ++++++++++++++++++++++++++ sound/soc/generic/simple-card.c | 14 +- 3 files changed, 221 insertions(+), 1 deletion(-) diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 86a1e956991e..67e9034ed807 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -38,6 +38,15 @@ struct asoc_simple_jack { struct snd_soc_jack_gpio gpio; }; +struct asoc_simple_sysclk_pll { + struct device_node *node; + int id; + int source; + unsigned int freq_in; + unsigned int freq_out; + int dir; +}; + struct asoc_simple_priv { struct snd_soc_card snd_card; struct simple_dai_props { @@ -56,6 +65,11 @@ struct asoc_simple_priv { struct asoc_simple_dai *dais; struct snd_soc_codec_conf *codec_conf; struct gpio_desc *pa_gpio; + + struct asoc_simple_sysclk_pll *sysclks; + int num_sysclks; + struct asoc_simple_sysclk_pll *plls; + int num_plls; }; #define simple_priv_to_card(priv) (&(priv)->snd_card) #define simple_priv_to_props(priv, i) ((priv)->dai_props + (i)) @@ -94,6 +108,14 @@ void asoc_simple_shutdown(struct snd_pcm_substream *substream); int asoc_simple_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params); int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd); + +int asoc_simple_set_bias_level(struct snd_soc_card *card, + struct snd_soc_dapm_context *dapm, + enum snd_soc_bias_level level); +int asoc_simple_set_bias_level_post(struct snd_soc_card *card, + struct snd_soc_dapm_context *dapm, + enum snd_soc_bias_level level); + int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params); @@ -128,6 +150,8 @@ int asoc_simple_parse_widgets(struct snd_soc_card *card, char *prefix); int asoc_simple_parse_pin_switches(struct snd_soc_card *card, char *prefix); +int asoc_simple_parse_sysclks(struct asoc_simple_priv *priv, char *prefix); +int asoc_simple_parse_plls(struct asoc_simple_priv *priv, char *prefix); int asoc_simple_init_jack(struct snd_soc_card *card, struct asoc_simple_jack *sjack, diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 6cada4c1e283..6c0675187285 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -399,6 +399,123 @@ int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd) } EXPORT_SYMBOL_GPL(asoc_simple_dai_init); +static bool asoc_simple_node_is_component(struct snd_soc_component *component, + struct device_node *node) +{ + struct device_node *comp_node; + + comp_node = component->dev->of_node; + if (!comp_node && component->dev->parent) + comp_node = component->dev->parent->of_node; + + return (comp_node == node); +} + +int asoc_simple_set_bias_level(struct snd_soc_card *card, + struct snd_soc_dapm_context *dapm, + enum snd_soc_bias_level level) +{ + struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); + struct snd_soc_component *component = dapm->component; + int i, ret; + + if (!component) + return 0; + + switch (level) { + case SND_SOC_BIAS_STANDBY: + if (dapm->bias_level != SND_SOC_BIAS_OFF) + break; + + /* PLLs normally supply SYSCLKs so enable the PLLs first. */ + for (i = 0; i < priv->num_plls; ++i) { + if (!asoc_simple_node_is_component(component, priv->plls[i].node)) + continue; + + ret = snd_soc_component_set_pll(component, + priv->plls[i].id, + priv->plls[i].source, + priv->plls[i].freq_in, + priv->plls[i].freq_out); + if (ret) { + dev_err(card->dev, "Failed to set pll for %s: %d\n", + component->name, ret); + return ret; + } + } + + for (i = 0; i < priv->num_sysclks; ++i) { + if (!asoc_simple_node_is_component(component, priv->sysclks[i].node)) + continue; + + ret = snd_soc_component_set_sysclk(component, + priv->sysclks[i].id, + priv->sysclks[i].source, + priv->sysclks[i].freq_in, + priv->sysclks[i].dir); + if (ret) { + dev_err(card->dev, "Failed to set sysclk for %s: %d\n", + component->name, ret); + return ret; + } + } + break; + default: + break; + } + + return 0; +} +EXPORT_SYMBOL_GPL(asoc_simple_set_bias_level); + +int asoc_simple_set_bias_level_post(struct snd_soc_card *card, + struct snd_soc_dapm_context *dapm, + enum snd_soc_bias_level level) +{ + struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); + struct snd_soc_component *component = dapm->component; + int i, ret; + + if (!component) + goto out; + + switch (level) { + case SND_SOC_BIAS_OFF: + for (i = 0; i < priv->num_sysclks; ++i) { + if (!asoc_simple_node_is_component(component, priv->sysclks[i].node)) + continue; + + ret = snd_soc_component_set_sysclk(component, + priv->sysclks[i].id, + 0, + 0, + priv->sysclks[i].dir); + if (ret) + dev_warn(card->dev, "Failed to set sysclk for %s: %d\n", + component->name, ret); + } + + for (i = 0; i < priv->num_plls; ++i) { + if (!asoc_simple_node_is_component(component, priv->plls[i].node)) + continue; + + ret = snd_soc_component_set_pll(component, priv->plls[i].id, 0, 0, 0); + if (ret) + dev_warn(card->dev, "Failed to set pll for %s: %d\n", + component->name, ret); + } + break; + default: + break; + } + +out: + dapm->bias_level = level; + + return 0; +} +EXPORT_SYMBOL_GPL(asoc_simple_set_bias_level_post); + void asoc_simple_canonicalize_platform(struct snd_soc_dai_link *dai_link) { /* Assumes platform == cpu */ @@ -433,6 +550,7 @@ EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_cpu); int asoc_simple_clean_reference(struct snd_soc_card *card) { + struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); struct snd_soc_dai_link *dai_link; int i; @@ -440,6 +558,13 @@ int asoc_simple_clean_reference(struct snd_soc_card *card) of_node_put(dai_link->cpus->of_node); of_node_put(dai_link->codecs->of_node); } + + for (i = 0; i < priv->num_sysclks; ++i) + of_node_put(priv->sysclks[i].node); + + for (i = 0; i < priv->num_plls; ++i) + of_node_put(priv->plls[i].node); + return 0; } EXPORT_SYMBOL_GPL(asoc_simple_clean_reference); @@ -538,6 +663,65 @@ int asoc_simple_parse_pin_switches(struct snd_soc_card *card, } EXPORT_SYMBOL_GPL(asoc_simple_parse_pin_switches); +static int asoc_simple_parse_sysclks_plls(struct asoc_simple_priv *priv, + char *prefix, + char *prop_root_name, + struct asoc_simple_sysclk_pll **out, + int *out_count) +{ + struct device *dev = priv->snd_card.dev; + struct device_node *node = dev->of_node; + struct of_phandle_args args; + int n_elem, i, ret; + char prop[128]; + + if (!prefix) + prefix = ""; + + snprintf(prop, sizeof(prop), "%s%s", prefix, prop_root_name); + n_elem = of_count_phandle_with_fixed_args(node, prop, 4); + if (n_elem == -ENOENT || n_elem == 0) { + return 0; + } else if (n_elem < 0) { + dev_err(dev, "Failed to parse %s: %d\n", prop, n_elem); + return n_elem; + } + + *out = devm_kcalloc(dev, n_elem, sizeof(**out), GFP_KERNEL); + if (!*out) + return -ENOMEM; + *out_count = n_elem; + + for (i = 0; i < n_elem; ++i) { + ret = of_parse_phandle_with_fixed_args(node, prop, 4, i, &args); + if (ret < 0) + return ret; + + (*out)[i].node = args.np; + (*out)[i].id = args.args[0]; + (*out)[i].source = args.args[1]; + (*out)[i].freq_in = args.args[2]; + (*out)[i].dir = args.args[3]; /* for sysclks */ + (*out)[i].freq_out = args.args[3]; /* for plls */ + } + + return 0; +} + +int asoc_simple_parse_sysclks(struct asoc_simple_priv *priv, char *prefix) +{ + return asoc_simple_parse_sysclks_plls(priv, prefix, "sysclks", + &priv->sysclks, &priv->num_sysclks); +} +EXPORT_SYMBOL_GPL(asoc_simple_parse_sysclks); + +int asoc_simple_parse_plls(struct asoc_simple_priv *priv, char *prefix) +{ + return asoc_simple_parse_sysclks_plls(priv, prefix, "plls", + &priv->plls, &priv->num_plls); +} +EXPORT_SYMBOL_GPL(asoc_simple_parse_plls); + int asoc_simple_init_jack(struct snd_soc_card *card, struct asoc_simple_jack *sjack, int is_hp, char *prefix, diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 75365c7bb393..52c5f737f350 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -475,6 +475,14 @@ static int simple_parse_of(struct asoc_simple_priv *priv) ret = snd_soc_of_parse_aux_devs(card, PREFIX "aux-devs"); + ret = asoc_simple_parse_sysclks(priv, PREFIX); + if (ret < 0) + return ret; + + ret = asoc_simple_parse_plls(priv, PREFIX); + if (ret < 0) + return ret; + return ret; } @@ -604,6 +612,7 @@ static int asoc_simple_probe(struct platform_device *pdev) card->owner = THIS_MODULE; card->dev = dev; card->probe = simple_soc_probe; + snd_soc_card_set_drvdata(card, priv); memset(&li, 0, sizeof(li)); simple_get_dais_count(priv, &li); @@ -672,7 +681,10 @@ static int asoc_simple_probe(struct platform_device *pdev) sizeof(*dai_props->codec_dai)); } - snd_soc_card_set_drvdata(card, priv); + if (priv->num_sysclks || priv->num_plls) { + card->set_bias_level = asoc_simple_set_bias_level; + card->set_bias_level_post = asoc_simple_set_bias_level_post; + } asoc_simple_debug_info(priv); From patchwork Wed Oct 14 14:54:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 11837811 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1CE314B2 for ; Wed, 14 Oct 2020 14:57:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97EE6212CC for ; Wed, 14 Oct 2020 14:57:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="yNt6Tsq+"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="jxjvblyt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97EE6212CC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5+B6f6U9upGhWrmMT2Y+d9d0Q5hO6bCkQmSWPBajLUM=; b=yNt6Tsq+80aJrBfJA2lOMKZUh O0eeDG001KOqKfF+FLQgHWUszBDKjjVWjvO7JA/TSH3mMJAZtpYaRgKTe09PxXQsmT7iThwFCiNEp 6F3l2OH78t9g1yHMPMQUjsvxXPCpodY6DCsLIWJM9ZQ00rKzqp/n69GN4fczfQgGX3+XU7XoCFYnO M8VxyWjD0JXTo5HV1PYAsbtBm9EG7R6XziOncNJVYzdD9uzAr3PCHGjCusKYhzKzuZAPO6y/fDBMp 0CLSsw25WGu7DWf3cgcH2aI5eMNsESQYJftIQz/wWOX0kYv7OOHZB02GkXx9TiZJye5huzIZqE7Y0 NBy4L4e8A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiBR-0006nu-LA; Wed, 14 Oct 2020 14:55:17 +0000 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25] helo=mx0b-001ae601.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiAt-0006bd-Kx; Wed, 14 Oct 2020 14:54:46 +0000 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 09EEpi82023902; Wed, 14 Oct 2020 09:54:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=PfQTmtHq+WI6K5BmMwZ1tOrR7fNGk/HI3b3fMtqo+rw=; b=jxjvblytI4yQ9MH61vjajfiLxnq2TvtBFMezOJZ38HrUGNUFoxxYV7e9JJJeSLcxp2NR 1U0EndMf811qu5UdlBQaaJdPpn6een4Wwxeds5buMehfAmHvrvZXATghdbdw0SrbiSlN SCz8btFQGOu22uJq2r59DdMywQpPmktHauAuHegdjBRy75x59MLxwPMhr2xskYVsqTqV jb7LvTd7g3Ow6lzmnEDx9OUadrRXTXuP8M7hLLPWmbzPMPI09nXewP3m2tnuoUfEQTe6 UzyZfIkZwfPraAFxgdrvX78ISep/HghC/3n/hXDa1MPibq6oiRTIF2WNV9nNMw6XIDs9 Gw== Received: from ediex01.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 343ac1wbwq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 14 Oct 2020 09:54:36 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Wed, 14 Oct 2020 15:54:34 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Wed, 14 Oct 2020 15:54:34 +0100 Received: from AUSNPC0LSNW1-debian.ad.cirrus.com (ausnpc0lsnw1.ad.cirrus.com [198.61.64.143]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 2DEFD45; Wed, 14 Oct 2020 14:54:34 +0000 (UTC) From: Richard Fitzgerald To: , , Subject: [PATCH 4/7] ASoC: arizona: Allow codecs to be selected from kernel config Date: Wed, 14 Oct 2020 15:54:15 +0100 Message-ID: <20201014145418.31838-5-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201014145418.31838-1-rf@opensource.cirrus.com> References: <20201014145418.31838-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=743 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010140108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_105443_876246_02FC6374 X-CRM114-Status: GOOD ( 14.88 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [67.231.149.25 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Richard Fitzgerald , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The codec Kconfig options were hidden and intended to be selected by the machine driver that requires them. But that means having either a dedicated machine driver or building all codecs. This patch makes the Kconfig options visible so that they can be selected independently of the machine driver, allowing the codec to be used with simple-card and other machine drivers that are not hardcoded to use a fixed set of codecs. Signed-off-by: Richard Fitzgerald Reported-by: kernel test robot --- sound/soc/codecs/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 34c6dd04b85a..4a8d503bdd38 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -661,7 +661,7 @@ config SND_SOC_CS47L15 tristate config SND_SOC_CS47L24 - tristate + tristate "Cirrus Logic CS47L24 CODEC" depends on MFD_CS47L24 config SND_SOC_CS47L35 @@ -1484,11 +1484,11 @@ config SND_SOC_WM5100 depends on I2C config SND_SOC_WM5102 - tristate + tristate "Cirrus Logic WM5102 CODEC" depends on MFD_WM5102 config SND_SOC_WM5110 - tristate + tristate "Cirrus Logic WM5110 CODEC" depends on MFD_WM5110 config SND_SOC_WM8350 @@ -1657,7 +1657,7 @@ config SND_SOC_WM8997 depends on MFD_WM8997 config SND_SOC_WM8998 - tristate + tristate "Cirrus Logic WM8998 CODEC" depends on MFD_WM8998 config SND_SOC_WM9081 From patchwork Wed Oct 14 14:54:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 11837803 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33AA4921 for ; Wed, 14 Oct 2020 14:56:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E8A65212CC for ; Wed, 14 Oct 2020 14:56:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sAASpTDU"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="P8BfR/49" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8A65212CC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hUePXzfagJuXe8o3tKmhsttOoyTCMRA0qV4UifNFoWQ=; b=sAASpTDUvcvaFIn6+TzNvMU42 scZngclxKjr+x5CQROUtY2BZNg52xXwPJkQwrqCKswr8tpwvU+jRec17m15GSNQRZbyOuEnTiPgfc 7COOU4SY+z+cdXMt+QcLpaTIoz4TeNe2d0o9oLMONimWPTvWlTtuzlcC49EkH3r1WP/dOCkHJk6Ah R50fn4MsZtNQgUdG0EU5HvVmMXa40Wed7DZ/U2D8Q2Ybhnn2kNQgH9ZGVgAjkZGzJhmtLfAyUHXjc 0E7VyKWkrCDwrV/THanzBD+/LeaKBfMx4Ozb34tA5RqWOvcpy5rLU5EDPUitdU/iJ/cPD1C5ytcqN U3oZUZHhg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiB2-0006fW-5k; Wed, 14 Oct 2020 14:54:52 +0000 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25] helo=mx0b-001ae601.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiAt-0006bf-Hx; Wed, 14 Oct 2020 14:54:46 +0000 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 09EEpi84023902; Wed, 14 Oct 2020 09:54:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=rEkfyGQEhOwwT47AjLx9+bGijiBq7azRzUX3JTht/hM=; b=P8BfR/49dgWL+D9UmfaLEhemZV5LZOPCFByp2WEpVYE1XLxca/r9P+XLa/jzVi2CIgxF xfmhfacziX467RINc/xW1CjzlGL56Dmdn+tLRlehmdKWsxqhzpp+9Ak3Ez1NBvppv5QO ZemCPxD1/kidhxPjT/QExaPZC2VK3VjQTHb5ZPA2V7BJ10r31kO+a9MpVllsoldmCnzw fnLznLN3VL+vFKtsNElKswoiE0laCotOwMli8uWinMUrMOA2fB8WW8j3w1sO7965CGnX 2BN7rcW9l8zWs8lhTJrilTUjMQ8ccFu+6Eodl5XXeTnCA10FR/kwQqZFPAp6Wkc3BCmR mw== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 343ac1wbwc-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 14 Oct 2020 09:54:37 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Wed, 14 Oct 2020 15:54:35 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Wed, 14 Oct 2020 15:54:35 +0100 Received: from AUSNPC0LSNW1-debian.ad.cirrus.com (ausnpc0lsnw1.ad.cirrus.com [198.61.64.143]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id A1A362AA; Wed, 14 Oct 2020 14:54:34 +0000 (UTC) From: Richard Fitzgerald To: , , Subject: [PATCH 5/7] ASoC: madera: Allow codecs to be selected from kernel config Date: Wed, 14 Oct 2020 15:54:16 +0100 Message-ID: <20201014145418.31838-6-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201014145418.31838-1-rf@opensource.cirrus.com> References: <20201014145418.31838-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=863 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010140108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_105443_849145_76542B1E X-CRM114-Status: GOOD ( 16.55 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [67.231.149.25 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Richard Fitzgerald , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The codec Kconfig options were hidden and intended to be selected by the machine driver that requires them. But that means having either a dedicated machine driver or building all codecs. This patch makes the Kconfig options visible so that they can be selected independently of the machine driver, allowing the codec to be used with simple-card and other machine drivers that are not hardcoded to use a fixed set of codecs. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 4a8d503bdd38..e0aed608dbc3 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -658,23 +658,23 @@ config SND_SOC_CS4349 depends on I2C config SND_SOC_CS47L15 - tristate + tristate "Cirrus Logic CS47L15 CODEC" config SND_SOC_CS47L24 tristate "Cirrus Logic CS47L24 CODEC" depends on MFD_CS47L24 config SND_SOC_CS47L35 - tristate + tristate "Cirrus Logic CS47L35 CODEC" config SND_SOC_CS47L85 - tristate + tristate "Cirrus Logic CS47L85 CODEC" config SND_SOC_CS47L90 - tristate + tristate "Cirrus Logic CS47L90 CODEC" config SND_SOC_CS47L92 - tristate + tristate "Cirrus Logic CS47L92 CODEC" # Cirrus Logic Quad-Channel ADC config SND_SOC_CS53L30 From patchwork Wed Oct 14 14:54:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 11837823 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7077414B2 for ; Wed, 14 Oct 2020 14:57:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 17747212CC for ; Wed, 14 Oct 2020 14:57:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NYUz349S"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="FwuakYIu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17747212CC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=z/rjFTVXNB7Auon62ND/9UrqcPUHD+L9r8/T9nl037E=; b=NYUz349S8wKU6H0yizLO0oamH YhD3/QEHSXzxwbTZczWJGA3HsyYP16SJrpj2KyN7plXU6E3aU3A1XbNANPfdWSEqntCv9/VRpY40w KdsrYCl3FbuCgkCKPaYNlZ7MuTzytKOuMfyu7iscfA3cCjdXFi2YjRmsKa55d79l8ddyzLIfAnu/o 6Ack+BmleNApBzb8ZeuuquW2WzWGn0Fj/dMmMDb6oMX6YJ2uFosniZqzVmev0iBcg8zZsR8uBp5oO 7IvV9/p1QKiySoUfMwXumuvTzBPxQlJa3n2U3nClutlacexa+1wlaLZLRfcjxM9Amt/y2RawM90TZ QblmKWXgw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiBw-00072H-Ty; Wed, 14 Oct 2020 14:55:49 +0000 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25] helo=mx0b-001ae601.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiAt-0006bn-87; Wed, 14 Oct 2020 14:54:50 +0000 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 09EEpi85023902; Wed, 14 Oct 2020 09:54:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=6q42qWMD+D2lwT7KzTwshNAxwHn6MNlVYveR8WVXLAg=; b=FwuakYIuTK2dq/uIj3cjOMtUZPxP7seXwxqFPYF/wQ9+p9DLTaF5VA+2rDaQaH5QCtSU GR5yaBWRi9BVP5SCYhK/lyNMtRa3rth5u2lxLoha6owZFI+zJSNcTlpzSpfh0/kT069J B0CIiAyJYKrumKb/S2PzwLbSa98mwwjzlG0WKqZDTdDb0qNGSS1R7RM6FYb4A4Y8E+us W64dcZ18SLLLsqFRp6JMQ8WPdx46bn8cPEyfKuBntyIyEYPllpyiEeZAcx4xACLZrc+X ZfIpL25F7dh+z1JgZYuc5rzNxgg5Dl8EEgRhg5tdMEFAA8+fgeOoguigFm3MgI/NAKuu Ow== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 343ac1wbwc-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 14 Oct 2020 09:54:38 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Wed, 14 Oct 2020 15:54:35 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Wed, 14 Oct 2020 15:54:35 +0100 Received: from AUSNPC0LSNW1-debian.ad.cirrus.com (ausnpc0lsnw1.ad.cirrus.com [198.61.64.143]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 1DC2345; Wed, 14 Oct 2020 14:54:35 +0000 (UTC) From: Richard Fitzgerald To: , , Subject: [PATCH 6/7] ARM: dts: Add dts for Raspberry Pi 4 + Cirrus Logic Lochnagar2 Date: Wed, 14 Oct 2020 15:54:17 +0100 Message-ID: <20201014145418.31838-7-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201014145418.31838-1-rf@opensource.cirrus.com> References: <20201014145418.31838-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010140108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_105443_862752_A3456E5D X-CRM114-Status: GOOD ( 21.69 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [67.231.149.25 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Richard Fitzgerald , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This is based on the default bcm2711-rpi-4-b.dts. Configurations are provided for Cirrus Logic codecs CS42L92, CS47L15, CS47L24, CS47L35, CS47L90 and WM8998. For each codec there is a sound node and a codec device node and both default to disabled. Enable the pair for the codec in use. Signed-off-by: Richard Fitzgerald --- arch/arm/boot/dts/Makefile | 1 + .../dts/bcm2711-rpi4b-cirrus-lochnagar.dts | 1296 +++++++++++++++++ 2 files changed, 1297 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2711-rpi4b-cirrus-lochnagar.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 4572db3fa5ae..53db1be9552d 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -92,6 +92,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2837-rpi-3-b-plus.dtb \ bcm2837-rpi-cm3-io3.dtb \ bcm2711-rpi-4-b.dtb \ + bcm2711-rpi4b-cirrus-lochnagar.dtb \ bcm2835-rpi-zero.dtb \ bcm2835-rpi-zero-w.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \ diff --git a/arch/arm/boot/dts/bcm2711-rpi4b-cirrus-lochnagar.dts b/arch/arm/boot/dts/bcm2711-rpi4b-cirrus-lochnagar.dts new file mode 100644 index 000000000000..80e31ea39af5 --- /dev/null +++ b/arch/arm/boot/dts/bcm2711-rpi4b-cirrus-lochnagar.dts @@ -0,0 +1,1296 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +#include "bcm2711.dtsi" +#include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-usb-peripheral.dtsi" +#include +#include +#include +#include +#include + +/ { + compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; + model = "Raspberry Pi 4 Model B"; + + chosen { + /* 8250 auxiliary UART instead of pl011 */ + stdout-path = "serial1:115200n8"; + }; + + /* Will be filled by the bootloader */ + memory@0 { + device_type = "memory"; + reg = <0 0 0>; + }; + + aliases { + emmc2bus = &emmc2bus; + ethernet0 = &genet; + pcie0 = &pcie0; + }; + + leds { + act { + gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; + }; + + pwr { + label = "PWR"; + gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; + default-state = "keep"; + linux,default-trigger = "default-on"; + }; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; + }; + + sd_io_1v8_reg: sd_io_1v8_reg { + compatible = "regulator-gpio"; + regulator-name = "vdd-sd-io"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + regulator-settling-time-us = <5000>; + gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>; + states = <1800000 0x1 + 3300000 0x0>; + status = "okay"; + }; + + sd_vcc_reg: sd_vcc_reg { + compatible = "regulator-fixed"; + regulator-name = "vcc-sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + enable-active-high; + gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>; + }; + + wallvdd: wallvdd@0 { + compatible = "regulator-fixed"; + + regulator-name = "WALL_VDD_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + regulator-always-on; + }; + + sound-cs47l15 { + status = "disabled"; + + compatible = "simple-audio-card"; + #address-cells = <1>; + #size-cells = <0>; + + simple-audio-card,name = "Cirrus Logic CS47L15"; + + simple-audio-card,sysclks = < + &cs47l15 1 4 98304000 0 + &cs47l15 8 4 147456000 0 + >; + simple-audio-card,plls = < + &cs47l15 1 0 24576000 98304000 + >; + + simple-audio-card,widgets = + "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + + simple-audio-card,routing = + "Microphone Jack", "MICBIAS1A", + "Microphone Jack", "MICBIAS1B", + "IN1BRN", "Microphone Jack", + "IN1BRP", "Microphone Jack", + "Headphone Jack", "HPOUTL", + "Headphone Jack", "HPOUTR"; + + /* Host->Codec I2S */ + simple-audio-card,dai-link@0 { + reg = <0>; + format = "i2s"; + bitclock-master = <&cs47l15_codec_dai>; + frame-master = <&cs47l15_codec_dai>; + + cpu { + sound-dai = <&i2s 0>; + }; + + cs47l15_codec_dai: codec { + sound-dai = <&cs47l15 0>; + + /* Prevent calls to dai_set_sysclk() */ + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + + /* Debug trace compressed stream */ + simple-audio-card,dai-link@1 { + reg = <1>; + + cpu { + sound-dai = <&cs47l15 3>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + + codec { + sound-dai = <&cs47l15 4>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + }; + + sound-cs47l24 { + status = "disabled"; + + compatible = "simple-audio-card"; + #address-cells = <1>; + #size-cells = <0>; + + simple-audio-card,name = "Cirrus Logic CS47L24"; + + simple-audio-card,sysclks = < + &cs47l24 1 4 147456000 0 + >; + simple-audio-card,plls = < + &cs47l24 1 0 24576000 147456000 /* fll1 */ + &cs47l24 3 1 32768 0 /* fll1 refclk */ + >; + + simple-audio-card,widgets = + "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + + simple-audio-card,routing = + "Microphone Jack", "MICBIAS1", + "Microphone Jack", "MICBIAS2", + "IN1L", "Microphone Jack", + "IN1R", "Microphone Jack", + "Headphone Jack", "HPOUT1L", + "Headphone Jack", "HPOUT1R"; + + /* Host->Codec I2S */ + simple-audio-card,dai-link@0 { + reg = <0>; + format = "i2s"; + bitclock-master = <&cs47l24_codec_dai>; + frame-master = <&cs47l24_codec_dai>; + + cpu { + sound-dai = <&i2s 0>; + }; + + cs47l24_codec_dai: codec { + sound-dai = <&cs47l24 0>; + + /* Prevent calls to dai_set_sysclk() */ + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + + /* Debug trace compressed stream */ + simple-audio-card,dai-link@1 { + reg = <1>; + + cpu { + sound-dai = <&cs47l24 5>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + + codec { + sound-dai = <&cs47l24 6>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + + /* Voice control compressed stream */ + simple-audio-card,dai-link@2 { + reg = <2>; + + cpu { + sound-dai = <&cs47l24 3>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + + codec { + sound-dai = <&cs47l24 4>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + }; + + sound-cs47l35 { + status = "disabled"; + + compatible = "simple-audio-card"; + #address-cells = <1>; + #size-cells = <0>; + + simple-audio-card,name = "Cirrus Logic CS47L35"; + + simple-audio-card,sysclks = < + &cs47l35 1 4 98304000 0 + &cs47l35 8 4 147456000 0 + >; + simple-audio-card,plls = < + &cs47l35 1 0 24576000 98304000 + >; + + simple-audio-card,widgets = + "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + + simple-audio-card,routing = + "Microphone Jack", "MICBIAS1A", + "Microphone Jack", "MICBIAS2A", + "IN1BLN", "Microphone Jack", + "IN1BLP", "Microphone Jack", + "Headphone Jack", "HPOUTL", + "Headphone Jack", "HPOUTR"; + + /* Host->Codec I2S */ + simple-audio-card,dai-link@0 { + reg = <0>; + format = "i2s"; + bitclock-master = <&cs47l35_codec_dai>; + frame-master = <&cs47l35_codec_dai>; + + cpu { + sound-dai = <&i2s 0>; + }; + + cs47l35_codec_dai: codec { + sound-dai = <&cs47l35 0>; + + /* Prevent calls to dai_set_sysclk() */ + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + + /* Debug trace compressed stream */ + simple-audio-card,dai-link@1 { + reg = <1>; + + cpu { + sound-dai = <&cs47l35 7>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + + codec { + sound-dai = <&cs47l35 8>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + + /* Voice control compressed stream */ + simple-audio-card,dai-link@2 { + reg = <2>; + + cpu { + sound-dai = <&cs47l35 5>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + + codec { + sound-dai = <&cs47l35 6>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + }; + + sound-cs47l90 { + status = "disabled"; + + compatible = "simple-audio-card"; + #address-cells = <1>; + #size-cells = <0>; + + simple-audio-card,name = "Cirrus Logic CS47L90"; + + simple-audio-card,sysclks = < + &cs47l90 1 4 98304000 0 + &cs47l90 8 4 147456000 0 + >; + simple-audio-card,plls = < + &cs47l90 1 0 24576000 98304000 + >; + + simple-audio-card,widgets = + "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + + simple-audio-card,routing = + "Microphone Jack", "MICBIAS1A", + "Microphone Jack", "MICBIAS2A", + "IN1BRN", "Microphone Jack", + "IN1BRP", "Microphone Jack", + "Headphone Jack", "HPOUT1L", + "Headphone Jack", "HPOUT1R"; + + /* Host->Codec I2S */ + simple-audio-card,dai-link@0 { + reg = <0>; + format = "i2s"; + bitclock-master = <&cs47l90_codec_dai>; + frame-master = <&cs47l90_codec_dai>; + + cpu { + sound-dai = <&i2s 0>; + }; + + cs47l90_codec_dai: codec { + sound-dai = <&cs47l90 0>; + + /* Prevent calls to dai_set_sysclk() */ + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + + /* Debug trace compressed stream */ + simple-audio-card,dai-link@1 { + reg = <1>; + + cpu { + sound-dai = <&cs47l90 9>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + + codec { + sound-dai = <&cs47l90 10>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + + /* Voice control compressed stream */ + simple-audio-card,dai-link@2 { + reg = <2>; + + cpu { + sound-dai = <&cs47l90 7>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + + codec { + sound-dai = <&cs47l90 8>; + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + }; + + sound-cs42l92 { + status = "disabled"; + + compatible = "simple-audio-card"; + #address-cells = <1>; + #size-cells = <0>; + + simple-audio-card,name = "Cirrus Logic CS42L92"; + + simple-audio-card,sysclks = < + &cs42l92 1 4 98304000 0 + >; + simple-audio-card,plls = < + &cs42l92 1 0 24576000 98304000 + >; + + simple-audio-card,widgets = + "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + + simple-audio-card,routing = + "Microphone Jack", "MICBIAS1A", + "Microphone Jack", "MICBIAS1B", + "IN1BLN", "Microphone Jack", + "IN1BLP", "Microphone Jack", + "Headphone Jack", "HPOUT1L", + "Headphone Jack", "HPOUT1R"; + + /* Host->Codec I2S */ + simple-audio-card,dai-link@0 { + reg = <0>; + format = "i2s"; + bitclock-master = <&cs42l92_codec_dai>; + frame-master = <&cs42l92_codec_dai>; + + cpu { + sound-dai = <&i2s 0>; + }; + + cs42l92_codec_dai: codec { + sound-dai = <&cs42l92 0>; + + /* Prevent calls to dai_set_sysclk() */ + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + }; + + sound-wm8998 { + status = "disabled"; + + compatible = "simple-audio-card"; + #address-cells = <1>; + #size-cells = <0>; + + simple-audio-card,name = "Cirrus Logic WM8998"; + + simple-audio-card,sysclks = < + &wm8998 1 4 49152000 0 + >; + simple-audio-card,plls = < + &wm8998 1 0 24576000 49152000 + &wm8998 3 1 32768 0 + >; + + simple-audio-card,widgets = + "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + + simple-audio-card,routing = + "Microphone Jack", "MICBIAS1", + "Microphone Jack", "MICBIAS1", + "IN2B", "Microphone Jack", + "Headphone Jack", "HPOUTL", + "Headphone Jack", "HPOUTR"; + + /* Host->Codec I2S */ + simple-audio-card,dai-link@0 { + reg = <0>; + format = "i2s"; + bitclock-master = <&wm8998_codec_dai>; + frame-master = <&wm8998_codec_dai>; + + cpu { + sound-dai = <&i2s 0>; + }; + + wm8998_codec_dai: codec { + sound-dai = <&wm8998 0>; + + /* Prevent calls to dai_set_sysclk() */ + system-clock-frequency = <0>; + mclk-fs = <0>; + }; + }; + }; +}; + +&firmware { + firmware_clocks: clocks { + compatible = "raspberrypi,firmware-clocks"; + #clock-cells = <1>; + }; + + expgpio: gpio { + compatible = "raspberrypi,firmware-gpio"; + gpio-controller; + #gpio-cells = <2>; + gpio-line-names = "BT_ON", + "WL_ON", + "PWR_LED_OFF", + "GLOBAL_RESET", + "VDD_SD_IO_SEL", + "CAM_GPIO", + "SD_PWR_ON", + ""; + status = "okay"; + }; +}; + +&gpio { + /* + * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and + * the official GPU firmware DT blob. + * + * Legend: + * "FOO" = GPIO line named "FOO" on the schematic + * "FOO_N" = GPIO line named "FOO" on schematic, active low + */ + gpio-line-names = "ID_SDA", + "ID_SCL", + "SDA1", + "SCL1", + "GPIO_GCLK", + "GPIO5", + "GPIO6", + "SPI_CE1_N", + "SPI_CE0_N", + "SPI_MISO", + "SPI_MOSI", + "SPI_SCLK", + "GPIO12", + "GPIO13", + /* Serial port */ + "TXD1", + "RXD1", + "GPIO16", + "GPIO17", + "GPIO18", + "GPIO19", + "GPIO20", + "GPIO21", + "GPIO22", + "GPIO23", + "GPIO24", + "GPIO25", + "GPIO26", + "GPIO27", + "RGMII_MDIO", + "RGMIO_MDC", + /* Used by BT module */ + "CTS0", + "RTS0", + "TXD0", + "RXD0", + /* Used by Wifi */ + "SD1_CLK", + "SD1_CMD", + "SD1_DATA0", + "SD1_DATA1", + "SD1_DATA2", + "SD1_DATA3", + /* Shared with SPI flash */ + "PWM0_MISO", + "PWM1_MOSI", + "STATUS_LED_G_CLK", + "SPIFLASH_CE_N", + "SDA0", + "SCL0", + "RGMII_RXCLK", + "RGMII_RXCTL", + "RGMII_RXD0", + "RGMII_RXD1", + "RGMII_RXD2", + "RGMII_RXD3", + "RGMII_TXCLK", + "RGMII_TXCTL", + "RGMII_TXD0", + "RGMII_TXD1", + "RGMII_TXD2", + "RGMII_TXD3"; + + lochnagar_present: lochnagar_present { + brcm,pins = <22>; + brcm,function = ; + }; + + lochnagar_reset: lochnagar_reset { + brcm,pins = <24>; + brcm,function = ; + }; + + cdc_irq: cdc_irq { + brcm,pins = <27>; + brcm,function = ; + }; + + spi_pins: spi_pins { + brcm,pins = <9 10 11>; + brcm,function = ; + }; + + spi_cs: spi_cs { + brcm,pins = <7 8>; + brcm,function = ; + }; + + i2s_pins: i2s_pins { + brcm,pins = <18 19 20 21>; + brcm,function = ; + }; +}; + +&pwm1 { + pinctrl-names = "default"; + pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>; + status = "okay"; +}; + +/* SDHCI is used to control the SDIO for wireless */ +&sdhci { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_gpio34>; + bus-width = <4>; + non-removable; + mmc-pwrseq = <&wifi_pwrseq>; + status = "disabled"; + + brcmf: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; + +/* EMMC2 is used to drive the SD card */ +&emmc2 { + vqmmc-supply = <&sd_io_1v8_reg>; + vmmc-supply = <&sd_vcc_reg>; + broken-cd; + status = "okay"; +}; + +&genet { + phy-handle = <&phy1>; + phy-mode = "rgmii-rxid"; + status = "okay"; +}; + +&genet_mdio { + phy1: ethernet-phy@1 { + /* No PHY interrupt */ + reg = <0x1>; + }; +}; + +/* uart0 communicates with the BT module */ +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + max-speed = <2000000>; + shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; + }; +}; + +/* uart1 is mapped to the pin header */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_gpio14>; + status = "okay"; +}; + +&vchiq { + interrupts = ; +}; + +&i2s { + status = "okay"; + #sound-dai-cells = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&i2s_pins>; + dmas = <&dma 2>, <&dma 3>; + dma-names = "tx", "rx"; +}; + +&i2c1 { + status = "okay"; + + lochnagar: lochnagar@22 { + status = "okay"; + + compatible = "cirrus,lochnagar2"; + reg = <0x22>; + + pinctrl-names = "default"; + pinctrl-0 = <&lochnagar_present &lochnagar_reset>; + + reset-gpio = <&gpio 24 0>; + present-gpio = <&gpio 22 0>; + + lochnagar_vdd1v8: VDD1V8 { + compatible = "regulator-fixed"; + + regulator-name = "VDD1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + + vin-supply = <&wallvdd>; + }; + + clk_pmic: clk_pmic { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; + clk_24m: clk_24m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24576000>; + }; + + lochnagar_clk: clk { + compatible = "cirrus,lochnagar2-clk"; + + #clock-cells = <1>; + + clocks = <&clk_pmic>, <&clk_24m>; + clock-names = "ln-pmic-32k", "ln-clk-24m"; + + assigned-clocks = <&lochnagar_clk LOCHNAGAR_CDC_MCLK1>, + <&lochnagar_clk LOCHNAGAR_CDC_MCLK2>, + <&lochnagar_clk LOCHNAGAR_SOUNDCARD_MCLK>; + assigned-clock-parents = <&clk_24m>, + <&clk_pmic>, + <&clk_24m>; + }; + + lochnagar_pin: pin { + compatible = "cirrus,lochnagar-pinctrl"; + + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&lochnagar_pin 0 0 LOCHNAGAR2_PIN_NUM_GPIOS>; + + pinctrl-names = "default"; + pinctrl-0 = <&pin_settings>; + + pin_settings: pin_settings { + rpi_aif { + input-enable; + groups = "gf-aif1"; + function = "codec-aif1"; + }; + codec_aif1 { + output-master; + groups = "codec-aif1"; + function = "gf-aif1"; + }; + sc_codec_aif { + output-enable; + groups = "codec-aif2"; + function = "soundcard-aif"; + }; + sc_lochnagar_aif { + input-enable; + groups = "soundcard-aif"; + function = "codec-aif2"; + }; + }; + }; + + lochnagar_hwmon: hwmon { + compatible = "cirrus,lochnagar2-hwmon"; + }; + + lochnagar_micvdd: MICVDD { + compatible = "cirrus,lochnagar2-micvdd"; + + SYSVDD-supply = <&wallvdd>; + + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + MIC1VDD { + compatible = "cirrus,lochnagar2-mic1vdd"; + + regulator-always-on; + cirrus,micbias-input = <2>; + }; + + MIC2VDD { + compatible = "cirrus,lochnagar2-mic2vdd"; + + regulator-always-on; + cirrus,micbias-input = <3>; + }; + + lochnagar_vddcore: VDDCORE { + compatible = "cirrus,lochnagar2-vddcore"; + + SYSVDD-supply = <&wallvdd>; + + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + lochnagar_sc: soundcard { + compatible = "cirrus,lochnagar2-soundcard"; + + #sound-dai-cells = <1>; + + clocks = <&lochnagar_clk LOCHNAGAR_SOUNDCARD_MCLK>; + clock-names = "mclk"; + }; + }; + + cs42l92: cs42l92@1a { + status = "disabled"; + + compatible = "cirrus,cs47l92"; + reg = <0x1a>; + + interrupts = <27 8>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio>; + gpio-controller; + #gpio-cells = <2>; + #sound-dai-cells = <1>; + + AVDD-supply = <&lochnagar_vdd1v8>; + DBVDD1-supply = <&lochnagar_vdd1v8>; + CPVDD1-supply = <&lochnagar_vdd1v8>; + CPVDD2-supply = <&lochnagar_vddcore>; + DCVDD-supply = <&lochnagar_vddcore>; + SPKVDDL-supply = <&wallvdd>; + SPKVDDR-supply = <&wallvdd>; + + reset-gpios = <&lochnagar_pin 0 0>; + + cirrus,out-mono = <0 0 1 1 0 0>; + cirrus,dmic-ref = < + MADERA_DMIC_REF_MICBIAS1 + MADERA_DMIC_REF_MICBIAS1 + MADERA_DMIC_REF_MICBIAS1 + MADERA_DMIC_REF_MICBIAS1 + >; + cirrus,inmode = < + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN1A */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN1B */ + MADERA_INMODE_SE MADERA_INMODE_SE /* IN2A */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN2B */ + >; + + clocks = <&lochnagar_clk LOCHNAGAR_CDC_MCLK1>, + <&lochnagar_clk LOCHNAGAR_CDC_MCLK2>; + clock-names = "mclk1", "mclk2"; + + pinctrl-names = "default"; + pinctrl-0 = <&cdc_irq &cs42l92_defaults>; + + cs42l92_defaults: cs42l92-gpio-defaults { + aif1 { + groups = "aif1"; + function = "aif1"; + bias-bus-hold; + }; + + aif2 { + groups = "aif2"; + function = "aif2"; + bias-bus-hold; + }; + + aif3 { + groups = "aif3"; + function = "aif3"; + bias-bus-hold; + }; + }; + + micvdd { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + MICBIAS1 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + MICBIAS1A { + regulator-active-discharge = <1>; + }; + MICBIAS1B { + regulator-active-discharge = <1>; + }; + }; + + wm8998: wm8998@1a { + status = "disabled"; + + compatible = "wlf,wm8998"; + reg = <0x1a>; + + interrupts = <27 0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio>; + gpio-controller; + #gpio-cells = <2>; + #sound-dai-cells = <1>; + + LDOVDD-supply = <&lochnagar_vdd1v8>; + AVDD-supply = <&lochnagar_vdd1v8>; + DBVDD1-supply = <&lochnagar_vdd1v8>; + DBVDD2-supply = <&lochnagar_vdd1v8>; + DBVDD3-supply = <&lochnagar_vdd1v8>; + CPVDD-supply = <&lochnagar_vdd1v8>; + SPKVDDL-supply = <&wallvdd>; + SPKVDDR-supply = <&wallvdd>; + + wlf,gpio-defaults = < + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + >; + + wlf,reset = <&lochnagar_pin 0 0>; + wlf,ldoena = <&lochnagar_pin 3 0>; + + wlf,micd-configs = < + 0x0 ARIZONA_DMIC_MICBIAS1 0 + 0x2000 ARIZONA_DMIC_MICBIAS2 1 + >; + wlf,jd-invert; + wlf,micd-force-micbias; + wlf,gpsw = ; + wlf,micd-pol-gpio = <&wm8998 4 GPIO_TRANSITORY>; + wlf,micd-rate = ; + wlf,micd-detect-debounce = <500>; + wlf,dmic-ref = ; + wlf,inmode = ; + + clocks = <&lochnagar_clk LOCHNAGAR_CDC_MCLK1>, + <&lochnagar_clk LOCHNAGAR_CDC_MCLK2>; + clock-names = "mclk1", "mclk2"; + }; +}; + +&spi { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins &spi_cs>; + + cs-gpios = <&gpio 8 1>, <&gpio 7 1>; + + spidev1: spidev@1{ + compatible = "spidev"; + reg = <1>; + status = "disabled"; + }; + + cs47l15: cs47l15@1 { + status = "disabled"; + + compatible = "cirrus,cs47l15"; + reg = <0x1>; + + spi-max-frequency = <11000000>; + + interrupts = <27 8>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio>; + gpio-controller; + #gpio-cells = <2>; + #sound-dai-cells = <1>; + + AVDD-supply = <&lochnagar_vdd1v8>; + DCVDD-supply = <&lochnagar_vddcore>; + DBVDD1-supply = <&lochnagar_vdd1v8>; + CPVDD1-supply = <&lochnagar_vdd1v8>; + SPKVDD-supply = <&wallvdd>; + MICVDD-supply = <&lochnagar_micvdd>; + + reset-gpios = <&lochnagar_pin 0 0>; + + cirrus,dmic-ref = < + MADERA_DMIC_REF_MICBIAS1 + MADERA_DMIC_REF_MICBIAS2 + >; + cirrus,inmode = < + MADERA_INMODE_SE MADERA_INMODE_SE /* IN1A */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN1B */ + MADERA_INMODE_SE MADERA_INMODE_SE /* IN2A */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN2B */ + >; + + clocks = <&lochnagar_clk LOCHNAGAR_CDC_MCLK1>, + <&lochnagar_clk LOCHNAGAR_CDC_MCLK2>; + clock-names = "mclk1", "mclk2"; + + pinctrl-names = "default"; + pinctrl-0 = <&cdc_irq &cs47l15_defaults>; + + cs47l15_defaults: cs47l15-gpio-defaults { + aif1 { + groups = "aif1"; + function = "aif1"; + bias-bus-hold; + }; + aif2 { + groups = "aif2"; + function = "aif2"; + bias-bus-hold; + }; + aif3 { + groups = "aif3"; + function = "aif3"; + bias-bus-hold; + }; + pdmspk1 { + groups = "pdmspk1"; + function = "pdmspk1"; + }; + }; + + micvdd { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + MICBIAS1 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + MICBIAS1A { + regulator-active-discharge = <1>; + }; + MICBIAS1B { + regulator-active-discharge = <1>; + }; + MICBIAS1C { + regulator-active-discharge = <1>; + }; + }; + + cs47l24: cs47l24@1 { + status = "disabled"; + + compatible = "cirrus,cs47l24"; + reg = <0x1>; + + spi-max-frequency = <11000000>; + + interrupts = <27 0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio>; + gpio-controller; + #gpio-cells = <2>; + #sound-dai-cells = <1>; + + AVDD-supply = <&lochnagar_vdd1v8>; + DBVDD1-supply = <&lochnagar_vdd1v8>; + DBVDD2-supply = <&lochnagar_vdd1v8>; + DBVDD3-supply = <&lochnagar_vdd1v8>; + CPVDD-supply = <&lochnagar_vdd1v8>; + MICVDD-supply = <&lochnagar_micvdd>; + SPKVDD-supply = <&wallvdd>; + DCVDD-supply = <&lochnagar_vddcore>; + + wlf,gpio-defaults = < + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + >; + + wlf,reset = <&lochnagar_pin 0 0>; + + wlf,dmic-ref = ; + wlf,inmode = ; + + clocks = <&lochnagar_clk LOCHNAGAR_CDC_MCLK1>, + <&lochnagar_clk LOCHNAGAR_CDC_MCLK2>; + clock-names = "mclk1", "mclk2"; + }; + + cs47l35: cs47l35@1 { + status = "disabled"; + + compatible = "cirrus,cs47l35"; + reg = <0x1>; + + spi-max-frequency = <11000000>; + + interrupts = <27 8>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio>; + gpio-controller; + #gpio-cells = <2>; + #sound-dai-cells = <1>; + + AVDD-supply = <&lochnagar_vdd1v8>; + DBVDD1-supply = <&lochnagar_vdd1v8>; + DBVDD2-supply = <&lochnagar_vdd1v8>; + CPVDD1-supply = <&lochnagar_vdd1v8>; + CPVDD2-supply = <&lochnagar_vddcore>; + DCVDD-supply = <&lochnagar_vddcore>; + SPKVDD-supply = <&wallvdd>; + + reset-gpios = <&lochnagar_pin 0 0>; + + cirrus,dmic-ref = < + MADERA_DMIC_REF_MICVDD + CS47L35_DMIC_REF_MICBIAS2A + MADERA_DMIC_REF_MICVDD + >; + cirrus,inmode = < + MADERA_INMODE_SE MADERA_INMODE_SE /* IN1A */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN1B */ + MADERA_INMODE_SE MADERA_INMODE_SE /* IN2A */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN2B */ + >; + + clocks = <&lochnagar_clk LOCHNAGAR_CDC_MCLK1>, + <&lochnagar_clk LOCHNAGAR_CDC_MCLK2>; + clock-names = "mclk1", "mclk2"; + + pinctrl-names = "default"; + pinctrl-0 = <&cdc_irq &cs47l35_defaults>; + + cs47l35_defaults: cs47l35-gpio-defaults { + aif1 { + groups = "aif1"; + function = "aif1"; + bias-bus-hold; + }; + + aif2 { + groups = "aif2"; + function = "aif2"; + bias-bus-hold; + }; + + aif3 { + groups = "aif3"; + function = "aif3"; + bias-bus-hold; + }; + }; + + micvdd { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + MICBIAS1 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + MICBIAS1A { + regulator-active-discharge = <1>; + }; + + MICBIAS2 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + MICBIAS2A { + regulator-active-discharge = <1>; + }; + }; + + cs47l90: cs47l90@1 { + status = "disabled"; + + compatible = "cirrus,cs47l90"; + reg = <0x1>; + + spi-max-frequency = <11000000>; + + interrupts = <27 8>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio>; + gpio-controller; + #gpio-cells = <2>; + #sound-dai-cells = <1>; + + AVDD-supply = <&lochnagar_vdd1v8>; + DBVDD1-supply = <&lochnagar_vdd1v8>; + DBVDD2-supply = <&lochnagar_vdd1v8>; + DBVDD3-supply = <&lochnagar_vdd1v8>; + DBVDD4-supply = <&lochnagar_vdd1v8>; + CPVDD1-supply = <&lochnagar_vdd1v8>; + CPVDD2-supply = <&lochnagar_vddcore>; + DCVDD-supply = <&lochnagar_vddcore>; + SPKVDDL-supply = <&wallvdd>; + SPKVDDR-supply = <&wallvdd>; + + reset-gpios = <&lochnagar_pin 0 0>; + + cirrus,dmic-ref = < + MADERA_DMIC_REF_MICBIAS1 + MADERA_DMIC_REF_MICBIAS2 + >; + cirrus,inmode = < + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN1A */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN1B */ + MADERA_INMODE_SE MADERA_INMODE_SE /* IN2A */ + MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN2B */ + >; + + clocks = <&lochnagar_clk LOCHNAGAR_CDC_MCLK1>, + <&lochnagar_clk LOCHNAGAR_CDC_MCLK2>; + clock-names = "mclk1", "mclk2"; + + pinctrl-names = "default"; + pinctrl-0 = <&cdc_irq &cs47l90_defaults>; + + cs47l90_defaults: cs47l90-gpio-defaults { + aif1 { + groups = "aif1"; + function = "aif1"; + bias-bus-hold; + }; + + aif2 { + groups = "aif2"; + function = "aif2"; + bias-bus-hold; + }; + + aif3 { + groups = "aif3"; + function = "aif3"; + bias-bus-hold; + }; + }; + + micvdd { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + MICBIAS1 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + MICBIAS1A { + regulator-active-discharge = <1>; + }; + MICBIAS1B { + regulator-active-discharge = <1>; + }; + + MICBIAS2 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + MICBIAS2C { + regulator-active-discharge = <1>; + }; + }; +}; From patchwork Wed Oct 14 14:54:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 11837807 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30CF214B2 for ; Wed, 14 Oct 2020 14:56:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA242212CC for ; Wed, 14 Oct 2020 14:56:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="As3B9dlc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="eoVgEewy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA242212CC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K+JqrI0NT915uMIaWwDXXt5H2/Fx9B1oLc3KTzxYyxI=; b=As3B9dlcxmLZafDxGHWtI17ha Y/jFTzd7qxp5eQlnn1z50yu4aw0czn0MMhfCZ3lGrSsYGlInyrEdu6kGlOWDyslwLhXPwAFtQR9AB F97m1dKP6Og5zVmGlTPSJWMj5NwB/klOqJzzA2qsWkA05mDekRw0OXK1JRhNBJK51alNN71E9OQSG 7n3F/yVp/79FDDAVspZl4TAE7TNa5UPfubSvHEQKPTJ83gnBfFHtW53qa0730QJTTB/xrE3BeJpw8 v5mG3FHHszq6EPZBEcXBSCAqDYfD+4kNK1V7r1W4EIbHTCjbXtePc80P7vvJd2zR/4gMWLvML8PFP EAO4XYmhQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiBA-0006i3-AP; Wed, 14 Oct 2020 14:55:00 +0000 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25] helo=mx0b-001ae601.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiAt-0006bp-LQ; Wed, 14 Oct 2020 14:54:46 +0000 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 09EEpi86023902; Wed, 14 Oct 2020 09:54:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=NbuRtoi+iQyrOz1VZGTizLtn/VqJReoSWynFwYIAIsg=; b=eoVgEewyMaXaPElcE4qhIUvMuRcZHJuuzgblZ+UkA86T1S/gZhRKUffDAXAeleIf0CF8 L8L3cU0f/xNQdb0OLghok3s/r5Gz2Qwzn5LrUNNFXks2k0118VgbZNHD1qD3454kg6Rt 4q/s8xWICQToAPa3VzF/J1GdeKV8+iqbhuLSAQDlWVolIhX7Ud+3iJKFdTaPWO/giwrP sznPTYgpWqSw3hUv9AC9jwrayCAuFjRUQY2wCyIimYTsGTDFIZCeVj362t22otN/h0Lk Gdt9WaldBuj7RdNBpDs7PrKIfqFIKOoH6CxDuZLST0EXYDJzNzwL7G+1eAY7zJo8q4jp TQ== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 343ac1wbwc-7 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 14 Oct 2020 09:54:38 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Wed, 14 Oct 2020 15:54:36 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Wed, 14 Oct 2020 15:54:36 +0100 Received: from AUSNPC0LSNW1-debian.ad.cirrus.com (ausnpc0lsnw1.ad.cirrus.com [198.61.64.143]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id A1FEE2AA; Wed, 14 Oct 2020 14:54:35 +0000 (UTC) From: Richard Fitzgerald To: , , Subject: [PATCH 7/7] MAINTAINERS: Add dts for Cirrus Logic Lochnagar on RPi4 Date: Wed, 14 Oct 2020 15:54:18 +0100 Message-ID: <20201014145418.31838-8-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201014145418.31838-1-rf@opensource.cirrus.com> References: <20201014145418.31838-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010140108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_105443_877544_DBFDCD8F X-CRM114-Status: GOOD ( 16.05 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [67.231.149.25 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Richard Fitzgerald , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Update the Cirrus Logic driver maintainers to include the device tree .dts for using the Lochnagar with a Raspberry Pi 4. Signed-off-by: Richard Fitzgerald --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 87ceaac748a4..09bc583a5b2b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4199,6 +4199,7 @@ M: Charles Keepax M: Richard Fitzgerald L: patches@opensource.cirrus.com S: Supported +F: arch/arm/boot/dts/bcm2711-rpi4b-cirrus-lochnagar.dts F: Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml F: Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.yaml F: Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml