Message ID | 1671618061-6329-3-git-send-email-quic_srivasam@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp3445800wrn; Wed, 21 Dec 2022 02:26:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXu6XWWyWdbcOg2g0xw5TVaeMENFc8SNlqkn14ifNmhwBkcK81XEbNRFMKDLPSROkUzP7MjX X-Received: by 2002:a17:90a:664a:b0:223:ff2e:ca5c with SMTP id f10-20020a17090a664a00b00223ff2eca5cmr2075071pjm.42.1671618400114; Wed, 21 Dec 2022 02:26:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671618400; cv=none; d=google.com; s=arc-20160816; b=RfkHtw1odCzPi197oUwedDeg5QvdSgfXlrsYgvQ925p1032sbWnlhc9HRDCU63zDP5 amdknps/aJUKBRoxi3EeuZ06+AApbM1/Y7XLTWu1/8lT+FHpqNx+idyp62PZuZtUZQc2 hDOZxg56aTJCLdaMajwKLVPO2/M1q5aTb34hB6w1UOvCSph91EoLlDrcj4VMWeYIClxg CpfbaIP3ejiWjv8OkCi4mFzsBqu2+VVFhi1NUrXfv2lJkun33TXD2JNHS8NiVnk0ABlF 3/iJBz7yRXTIGHL3d0fN8ZSWTlIBlNXEO+Eh8ABWzqW5wciXBGnnPAtd0+aUlMYvl4Wx Cy4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=UlrBEz+jj/tt8k9cYd/2t13oSpbOq2SrChpJYQMNwm0=; b=eos1kD+LXAv7s/ArzsuwkYmYYvJsrCNI4hKYNdib7Cb+o3VGnuYOfxDhiGCGl5PlGh nv9EdoWc7rN4u51fARtVZxoSgBAyQupc6jLIH2Rmz4vSSBFp4quWP5wOUb06LSIRhPIf hj2euYCAQCvHGmV8Coa3wOqjllBXeULDtNK73clpPDTdoOcQK3wEtNn7KUGZGHoKNrOk GIWPh0OYYrPDovI+oeEdA2SdWMUIdVUPY+29GHyau9FgAwIWHhhZexqKPgE+h2YIarXB Aaz+xORB3PvNl/AbveSEaqgH9N8mp9kGGbP2sThmool+o5fsU8zqNDByj76WxjxTK8Mi Hzdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dLInHRkj; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on18-20020a17090b1d1200b00219648ff3a5si1437677pjb.171.2022.12.21.02.26.26; Wed, 21 Dec 2022 02:26:40 -0800 (PST) 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=@quicinc.com header.s=qcppdkim1 header.b=dLInHRkj; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234826AbiLUKYD (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Wed, 21 Dec 2022 05:24:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234697AbiLUKW3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 21 Dec 2022 05:22:29 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7D2321E0D; Wed, 21 Dec 2022 02:21:38 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BL9N8gY011465; Wed, 21 Dec 2022 10:21:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=UlrBEz+jj/tt8k9cYd/2t13oSpbOq2SrChpJYQMNwm0=; b=dLInHRkjuHIjTMZ701rUbmrKbA8auzcia8bNOnaF0VACrOudoBfv8vzUxY1Qw/qkiO3H fIqj9VhgQaW1Kg7mvtlLdjbMDnYqX/M37htUUuZPj1IvOJfc7RM5KT1QwgS5x1gXNIjo ux3MI6RPZq+0+ukLRgm1+ZIF0iuyOAWz1j+jDjCqtlmnK0XUgZiIe6GT528QSf/Nlwj8 G23nvCF+fwV6+8H9taUVinkExlk9U5wkhdiF0gZqMMMiHGs+NAW594DETwF7JuywwbGb HcTNReic1iuZrM3yG8r3JRaTruCjOmgmCNOzOXzhc/mSYGpnb1V/B39iMkwBj4grk07d tA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3mk85xu411-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Dec 2022 10:21:32 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2BLALVmp025818 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Dec 2022 10:21:31 GMT Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 21 Dec 2022 02:21:26 -0800 From: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> To: <swboyd@chromium.org>, <agross@kernel.org>, <andersson@kernel.org>, <robh+dt@kernel.org>, <broonie@kernel.org>, <quic_plai@quicinc.com>, <krzysztof.kozlowski+dt@linaro.org>, <konrad.dybcio@somainline.org>, <mturquette@baylibre.com>, <sboyd@kernel.org>, <linux-arm-msm@vger.kernel.org>, <linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <quic_rohkumar@quicinc.com> CC: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Subject: [PATCH 2/2] clk: qcom: lpasscc: Add resets for SC7280 audioreach clock controller Date: Wed, 21 Dec 2022 15:51:01 +0530 Message-ID: <1671618061-6329-3-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1671618061-6329-1-git-send-email-quic_srivasam@quicinc.com> References: <1671618061-6329-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: p9vgMLqlHuIM3AIliG0Ruxsl12CubEfa X-Proofpoint-GUID: p9vgMLqlHuIM3AIliG0Ruxsl12CubEfa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-21_04,2022-12-21_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 spamscore=0 suspectscore=0 malwarescore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212210083 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752818935635617521?= X-GMAIL-MSGID: =?utf-8?q?1752818935635617521?= |
Series |
Add resets for ADSP based audio clock controller driver.
|
|
Commit Message
Srinivasa Rao Mandadapu
Dec. 21, 2022, 10:21 a.m. UTC
The clock gating control for TX/RX/WSA core bus clocks would be required
to be reset(moved from hardware control) from audio core driver. Thus
add the support for the reset clocks in audioreach based clock driver.
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
---
drivers/clk/qcom/lpasscc-sc7280.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
Comments
On 21/12/2022 11:21, Srinivasa Rao Mandadapu wrote: > The clock gating control for TX/RX/WSA core bus clocks would be required > to be reset(moved from hardware control) from audio core driver. Thus > add the support for the reset clocks in audioreach based clock driver. > > Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> > --- > drivers/clk/qcom/lpasscc-sc7280.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/drivers/clk/qcom/lpasscc-sc7280.c b/drivers/clk/qcom/lpasscc-sc7280.c > index 5c1e17b..d81d81b 100644 > --- a/drivers/clk/qcom/lpasscc-sc7280.c > +++ b/drivers/clk/qcom/lpasscc-sc7280.c > @@ -12,10 +12,12 @@ > #include <linux/regmap.h> > > #include <dt-bindings/clock/qcom,lpass-sc7280.h> > +#include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> These are bindings for different device. > > #include "clk-regmap.h" > #include "clk-branch.h" > #include "common.h" > +#include "reset.h" > > static struct clk_branch lpass_top_cc_lpi_q6_axim_hs_clk = { > .halt_reg = 0x0, > @@ -102,6 +104,18 @@ static const struct qcom_cc_desc lpass_qdsp6ss_sc7280_desc = { > .num_clks = ARRAY_SIZE(lpass_qdsp6ss_sc7280_clocks), > }; > > +static const struct qcom_reset_map lpass_cc_sc7280_resets[] = { > + [LPASS_AUDIO_SWR_RX_CGCR] = { 0xa0, 1 }, > + [LPASS_AUDIO_SWR_TX_CGCR] = { 0xa8, 1 }, > + [LPASS_AUDIO_SWR_WSA_CGCR] = { 0xb0, 1 }, These are example the same - IDs and values - as qcom,sc7280-lpassaudiocc. Aren't you duplicating same control? Best regards, Krzysztof
On 12/21/2022 4:09 PM, Krzysztof Kozlowski wrote: Thanks for your time Krzysztof!!! > On 21/12/2022 11:21, Srinivasa Rao Mandadapu wrote: >> The clock gating control for TX/RX/WSA core bus clocks would be required >> to be reset(moved from hardware control) from audio core driver. Thus >> add the support for the reset clocks in audioreach based clock driver. >> >> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> >> --- >> drivers/clk/qcom/lpasscc-sc7280.c | 18 ++++++++++++++++++ >> 1 file changed, 18 insertions(+) >> >> diff --git a/drivers/clk/qcom/lpasscc-sc7280.c b/drivers/clk/qcom/lpasscc-sc7280.c >> index 5c1e17b..d81d81b 100644 >> --- a/drivers/clk/qcom/lpasscc-sc7280.c >> +++ b/drivers/clk/qcom/lpasscc-sc7280.c >> @@ -12,10 +12,12 @@ >> #include <linux/regmap.h> >> >> #include <dt-bindings/clock/qcom,lpass-sc7280.h> >> +#include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> > These are bindings for different device. They are not exactly for different device. It's for same device with ADSP enabled platforms. Basically lpassaudiocc-sc7280.c and lpasscorecc-sc7280.c are for legacy path. lpasscc-sc7280.c is for ADSP based AudioReach Solution. > >> >> #include "clk-regmap.h" >> #include "clk-branch.h" >> #include "common.h" >> +#include "reset.h" >> >> static struct clk_branch lpass_top_cc_lpi_q6_axim_hs_clk = { >> .halt_reg = 0x0, >> @@ -102,6 +104,18 @@ static const struct qcom_cc_desc lpass_qdsp6ss_sc7280_desc = { >> .num_clks = ARRAY_SIZE(lpass_qdsp6ss_sc7280_clocks), >> }; >> >> +static const struct qcom_reset_map lpass_cc_sc7280_resets[] = { >> + [LPASS_AUDIO_SWR_RX_CGCR] = { 0xa0, 1 }, >> + [LPASS_AUDIO_SWR_TX_CGCR] = { 0xa8, 1 }, >> + [LPASS_AUDIO_SWR_WSA_CGCR] = { 0xb0, 1 }, > These are example the same - IDs and values - as > qcom,sc7280-lpassaudiocc. Aren't you duplicating same control? As explained above legacy path drivers and ADSP path drivers are enabled/used exclusively, adding reset controls here. > > Best regards, > Krzysztof >
On 21/12/2022 14:18, Srinivasa Rao Mandadapu wrote: > > On 12/21/2022 4:09 PM, Krzysztof Kozlowski wrote: > Thanks for your time Krzysztof!!! >> On 21/12/2022 11:21, Srinivasa Rao Mandadapu wrote: >>> The clock gating control for TX/RX/WSA core bus clocks would be required >>> to be reset(moved from hardware control) from audio core driver. Thus >>> add the support for the reset clocks in audioreach based clock driver. >>> >>> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> >>> --- >>> drivers/clk/qcom/lpasscc-sc7280.c | 18 ++++++++++++++++++ >>> 1 file changed, 18 insertions(+) >>> >>> diff --git a/drivers/clk/qcom/lpasscc-sc7280.c b/drivers/clk/qcom/lpasscc-sc7280.c >>> index 5c1e17b..d81d81b 100644 >>> --- a/drivers/clk/qcom/lpasscc-sc7280.c >>> +++ b/drivers/clk/qcom/lpasscc-sc7280.c >>> @@ -12,10 +12,12 @@ >>> #include <linux/regmap.h> >>> >>> #include <dt-bindings/clock/qcom,lpass-sc7280.h> >>> +#include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> >> These are bindings for different device. > > They are not exactly for different device. It's for same device with > ADSP enabled platforms. > > Basically lpassaudiocc-sc7280.c and lpasscorecc-sc7280.c are for legacy > path. > > lpasscc-sc7280.c is for ADSP based AudioReach Solution. I see two different devices: lpasscc@3000000 clock-controller@3300000 clock inputs and outputs are different, so it does not look like for same device. Best regards, Krzysztof
On 12/22/2022 4:14 PM, Krzysztof Kozlowski wrote: Thanks for Your Time Krzyszto!!! > On 21/12/2022 14:18, Srinivasa Rao Mandadapu wrote: >> On 12/21/2022 4:09 PM, Krzysztof Kozlowski wrote: >> Thanks for your time Krzysztof!!! >>> On 21/12/2022 11:21, Srinivasa Rao Mandadapu wrote: >>>> The clock gating control for TX/RX/WSA core bus clocks would be required >>>> to be reset(moved from hardware control) from audio core driver. Thus >>>> add the support for the reset clocks in audioreach based clock driver. >>>> >>>> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> >>>> --- >>>> drivers/clk/qcom/lpasscc-sc7280.c | 18 ++++++++++++++++++ >>>> 1 file changed, 18 insertions(+) >>>> >>>> diff --git a/drivers/clk/qcom/lpasscc-sc7280.c b/drivers/clk/qcom/lpasscc-sc7280.c >>>> index 5c1e17b..d81d81b 100644 >>>> --- a/drivers/clk/qcom/lpasscc-sc7280.c >>>> +++ b/drivers/clk/qcom/lpasscc-sc7280.c >>>> @@ -12,10 +12,12 @@ >>>> #include <linux/regmap.h> >>>> >>>> #include <dt-bindings/clock/qcom,lpass-sc7280.h> >>>> +#include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> >>> These are bindings for different device. >> They are not exactly for different device. It's for same device with >> ADSP enabled platforms. >> >> Basically lpassaudiocc-sc7280.c and lpasscorecc-sc7280.c are for legacy >> path. >> >> lpasscc-sc7280.c is for ADSP based AudioReach Solution. > I see two different devices: > lpasscc@3000000 > clock-controller@3300000 > > clock inputs and outputs are different, so it does not look like for > same device. Actually, even though there are 2 different device nodes, they are being used exclusively. In ADSP enabled path(on same sc7280 based platform it's enabled for some vendors) only lpasscc node is being used and legacy path nodes are being disabled due to register region conflicts. Below is the patch for the same: https://patchwork.kernel.org/project/linux-arm-msm/patch/1671702170-24781-8-git-send-email-quic_srivasam@quicinc.com/ > > Best regards, > Krzysztof >
diff --git a/drivers/clk/qcom/lpasscc-sc7280.c b/drivers/clk/qcom/lpasscc-sc7280.c index 5c1e17b..d81d81b 100644 --- a/drivers/clk/qcom/lpasscc-sc7280.c +++ b/drivers/clk/qcom/lpasscc-sc7280.c @@ -12,10 +12,12 @@ #include <linux/regmap.h> #include <dt-bindings/clock/qcom,lpass-sc7280.h> +#include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h> #include "clk-regmap.h" #include "clk-branch.h" #include "common.h" +#include "reset.h" static struct clk_branch lpass_top_cc_lpi_q6_axim_hs_clk = { .halt_reg = 0x0, @@ -102,6 +104,18 @@ static const struct qcom_cc_desc lpass_qdsp6ss_sc7280_desc = { .num_clks = ARRAY_SIZE(lpass_qdsp6ss_sc7280_clocks), }; +static const struct qcom_reset_map lpass_cc_sc7280_resets[] = { + [LPASS_AUDIO_SWR_RX_CGCR] = { 0xa0, 1 }, + [LPASS_AUDIO_SWR_TX_CGCR] = { 0xa8, 1 }, + [LPASS_AUDIO_SWR_WSA_CGCR] = { 0xb0, 1 }, +}; + +static const struct qcom_cc_desc lpass_audio_cc_reset_sc7280_desc = { + .config = &lpass_regmap_config, + .resets = lpass_cc_sc7280_resets, + .num_resets = ARRAY_SIZE(lpass_cc_sc7280_resets), +}; + static int lpass_cc_sc7280_probe(struct platform_device *pdev) { const struct qcom_cc_desc *desc; @@ -132,6 +146,10 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev) if (ret) goto destroy_pm_clk; + ret = qcom_cc_probe_by_index(pdev, 1, &lpass_audio_cc_reset_sc7280_desc); + if (ret) + goto destroy_pm_clk; + return 0; destroy_pm_clk: