Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp697977rdb; Sun, 3 Sep 2023 06:42:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhOjh10v/Xujtg75f1SbtbaCZKcMOYuLqiBE9884HmROwo9CHUXBqJ8X3k6hb9z999WJHe X-Received: by 2002:a17:907:78c3:b0:9a5:a0c6:9e8d with SMTP id kv3-20020a17090778c300b009a5a0c69e8dmr4905034ejc.5.1693748552561; Sun, 03 Sep 2023 06:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693748552; cv=none; d=google.com; s=arc-20160816; b=XIP/LI9OuDgHHE778CMPJ+6QXBlsB5LkKUFiYnXzUiWPMvYVkJOMhSLblplJdxYfHc 4iisfnjmFP+xvJp4R5uAIivkK6MUpM6hi/EifCiY7bjHOWREbxQEeVjcV4vsmicj/fvB QVzS6NUOYhMXKamB1t7SNID22AcBFEMjooimEBTOicD5a3NUvSABlvoAI/HO+luwQ7JS 3BaH3Khb75c3ljVtCa5MthRK/foHH9sW5WE3wRBKAILXBHEAmYvIpyxK651LADqYdsjy XSxSGFwsi22NL3KSmFRo2IpGzOxyPwJmiB920hdxnzxfUd/e/Ff6CSzj+vsg6rz4s+ed zz2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cRP2OU2xJab9AmweoY8xGNRQBx+HUUOK+XTV2yweFFU=; fh=OwM2Q0ayVU492jNbHOttCCjlHfb8pL8474q4vxSoSik=; b=e6MmVaVDFSzxjO4SsnpCzGiQ4DyOqjcfY6MOxag5hfkVoS6Tt5k9RDwg11iy0Ie1te cnvP9UeY13lociNC0E8yX8O4vuU29VrSpXnfDw/VYCYAShpujJUOaO3FIKww9cONWvfS 6wtWR4EBVJIDVZOGpfY7ASJaxwJcDbgndCgHsW3Mt9O429N/IeZHTQ/U1UiOqcibJQ1y tzzUDMm21IYgyGD47lQ1zUvjIkdFjJihXMvGfBxNixyEaMgutWReqQYrV44JADkI5z6r /DptIorkH6pETDrafcgzG8HyrwlfUydMe9De40Vjg4R0ZwvLrtd8DUXCShq/tJKW6wsy OLCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=TtuqTHCU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qx14-20020a170906fcce00b0099cc4b278c9si5068688ejb.208.2023.09.03.06.42.25; Sun, 03 Sep 2023 06:42:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=TtuqTHCU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346778AbjHaQVS (ORCPT + 28 others); Thu, 31 Aug 2023 12:21:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346770AbjHaQVR (ORCPT ); Thu, 31 Aug 2023 12:21:17 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E27AF12C; Thu, 31 Aug 2023 09:21:14 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 37VFjmJr032437; Thu, 31 Aug 2023 11:21:00 -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=cRP2OU2xJab9AmweoY8xGNRQBx+HUUOK+XTV2yweFFU=; b= TtuqTHCU5YcNcQeheIHAgKeLT69Q45DgQlbELCHwpxU0J7eMxBOqTFulSM9672ro d33cMBjpSasZ8pdPIWFvDwwTtEVn3dsDQq2ThzWTe0wTybFmmBjvhbl7CQkPJrjM 1eWssKfqwyhXgx4ERKFzeyN30sSuKfr2pnFSqwjcG4ZWpP6BMdsrgp5PQQJOVLJA 9wVw18KelnwMyrq3f+VQapTg66+B9XIVc4T9wrYPghQ78bbdLB9a+ckHiC/s/VuQ vY9XrG7x4gEs+j/LPXstUkNQRM9TKQvcRIaUjBYk3Mc/ch22lF0pQuidwzrVkX88 ETuYmLWP80mPJTn0A7qAtg== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3sqdtj5mge-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Aug 2023 11:21:00 -0500 (CDT) 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_256_GCM_SHA384) id 15.2.1118.37; Thu, 31 Aug 2023 17:20:59 +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.2.1118.37 via Frontend Transport; Thu, 31 Aug 2023 17:20:59 +0100 Received: from vkarpovich-ThinkStation-P620.crystal.cirrus.com (vkarpovich-ThinkStation-P620.ad.cirrus.com [141.131.145.49]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 08E8911D6; Thu, 31 Aug 2023 16:20:56 +0000 (UTC) From: Vlad Karpovich To: James Schulman , David Rhodes , Richard Fitzgerald , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Rob Herring CC: , , , , Vlad Karpovich Subject: [PATCH v3 3/4] ASoC: cs35l45: Connect DSP to the monitoring signals Date: Thu, 31 Aug 2023 11:20:41 -0500 Message-ID: <20230831162042.471801-3-vkarpovi@opensource.cirrus.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230831162042.471801-1-vkarpovi@opensource.cirrus.com> References: <20230831162042.471801-1-vkarpovi@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: oa-ugEslqU_NQSichKIO3DGF63Um9zyC X-Proofpoint-GUID: oa-ugEslqU_NQSichKIO3DGF63Um9zyC X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Link VMON, IMON, TEMPMON, VDD_BSTMON and VDD_BATTMON to DSP1. The CSPL firmware uses them for the speaker calibration and monitoring. Signed-off-by: Vlad Karpovich --- sound/soc/codecs/cs35l45.c | 33 +++++++++++++++++++++++++++------ sound/soc/codecs/cs35l45.h | 1 + 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs35l45.c b/sound/soc/codecs/cs35l45.c index 18e656e72cb3..4abc922ef210 100644 --- a/sound/soc/codecs/cs35l45.c +++ b/sound/soc/codecs/cs35l45.c @@ -433,17 +433,25 @@ static const struct snd_soc_dapm_widget cs35l45_dapm_widgets[] = { SND_SOC_DAPM_SIGGEN("VMON_SRC"), SND_SOC_DAPM_SIGGEN("IMON_SRC"), + SND_SOC_DAPM_SIGGEN("TEMPMON_SRC"), SND_SOC_DAPM_SIGGEN("VDD_BATTMON_SRC"), SND_SOC_DAPM_SIGGEN("VDD_BSTMON_SRC"), SND_SOC_DAPM_SIGGEN("ERR_VOL"), SND_SOC_DAPM_SIGGEN("AMP_INTP"), SND_SOC_DAPM_SIGGEN("IL_TARGET"), - SND_SOC_DAPM_ADC("VMON", NULL, CS35L45_BLOCK_ENABLES, CS35L45_VMON_EN_SHIFT, 0), - SND_SOC_DAPM_ADC("IMON", NULL, CS35L45_BLOCK_ENABLES, CS35L45_IMON_EN_SHIFT, 0), - SND_SOC_DAPM_ADC("VDD_BATTMON", NULL, CS35L45_BLOCK_ENABLES, - CS35L45_VDD_BATTMON_EN_SHIFT, 0), - SND_SOC_DAPM_ADC("VDD_BSTMON", NULL, CS35L45_BLOCK_ENABLES, - CS35L45_VDD_BSTMON_EN_SHIFT, 0), + + SND_SOC_DAPM_SUPPLY("VMON_EN", CS35L45_BLOCK_ENABLES, CS35L45_VMON_EN_SHIFT, 0, NULL, 0), + SND_SOC_DAPM_SUPPLY("IMON_EN", CS35L45_BLOCK_ENABLES, CS35L45_IMON_EN_SHIFT, 0, NULL, 0), + SND_SOC_DAPM_SUPPLY("TEMPMON_EN", CS35L45_BLOCK_ENABLES, CS35L45_TEMPMON_EN_SHIFT, 0, NULL, 0), + SND_SOC_DAPM_SUPPLY("VDD_BATTMON_EN", CS35L45_BLOCK_ENABLES, CS35L45_VDD_BATTMON_EN_SHIFT, 0, NULL, 0), + SND_SOC_DAPM_SUPPLY("VDD_BSTMON_EN", CS35L45_BLOCK_ENABLES, CS35L45_VDD_BSTMON_EN_SHIFT, 0, NULL, 0), + + SND_SOC_DAPM_ADC("VMON", NULL, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_ADC("IMON", NULL, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_ADC("TEMPMON", NULL, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_ADC("VDD_BATTMON", NULL, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_ADC("VDD_BSTMON", NULL, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("ASP_RX1", NULL, 0, CS35L45_ASP_ENABLES1, CS35L45_ASP_RX1_EN_SHIFT, 0), SND_SOC_DAPM_AIF_IN("ASP_RX2", NULL, 1, CS35L45_ASP_ENABLES1, CS35L45_ASP_RX2_EN_SHIFT, 0), @@ -503,9 +511,16 @@ static const struct snd_soc_dapm_route cs35l45_dapm_routes[] = { /* Feedback */ { "VMON", NULL, "VMON_SRC" }, { "IMON", NULL, "IMON_SRC" }, + { "TEMPMON", NULL, "TEMPMON_SRC" }, { "VDD_BATTMON", NULL, "VDD_BATTMON_SRC" }, { "VDD_BSTMON", NULL, "VDD_BSTMON_SRC" }, + { "VMON", NULL, "VMON_EN" }, + { "IMON", NULL, "IMON_EN" }, + { "TEMPMON", NULL, "TEMPMON_EN" }, + { "VDD_BATTMON", NULL, "VDD_BATTMON_EN" }, + { "VDD_BSTMON", NULL, "VDD_BSTMON_EN" }, + { "Capture", NULL, "ASP_TX1"}, { "Capture", NULL, "ASP_TX2"}, { "Capture", NULL, "ASP_TX3"}, @@ -560,6 +575,12 @@ static const struct snd_soc_dapm_route cs35l45_dapm_routes[] = { {"DSP1", NULL, "DSP_RX7 Source"}, {"DSP1", NULL, "DSP_RX8 Source"}, + {"DSP1", NULL, "VMON_EN"}, + {"DSP1", NULL, "IMON_EN"}, + {"DSP1", NULL, "VDD_BATTMON_EN"}, + {"DSP1", NULL, "VDD_BSTMON_EN"}, + {"DSP1", NULL, "TEMPMON_EN"}, + {"DSP1 Preload", NULL, "DSP1 Preloader"}, {"DSP1", NULL, "DSP1 Preloader"}, diff --git a/sound/soc/codecs/cs35l45.h b/sound/soc/codecs/cs35l45.h index 16857321d945..e2ebcf58d7e0 100644 --- a/sound/soc/codecs/cs35l45.h +++ b/sound/soc/codecs/cs35l45.h @@ -165,6 +165,7 @@ /* BLOCK_ENABLES */ #define CS35L45_IMON_EN_SHIFT 13 #define CS35L45_VMON_EN_SHIFT 12 +#define CS35L45_TEMPMON_EN_SHIFT 10 #define CS35L45_VDD_BSTMON_EN_SHIFT 9 #define CS35L45_VDD_BATTMON_EN_SHIFT 8 #define CS35L45_BST_EN_SHIFT 4 -- 2.25.1