Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18937036rwd; Wed, 28 Jun 2023 02:48:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xS0XwjdYJKSnQNo5CBGj6aM1DZadJsNs0tUSPGTP3fQO6QYmVKv6lW2LEhZMrjiMxZ3qs X-Received: by 2002:a17:902:7fc8:b0:1b5:5a5f:368a with SMTP id t8-20020a1709027fc800b001b55a5f368amr935095plb.27.1687945707143; Wed, 28 Jun 2023 02:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687945707; cv=none; d=google.com; s=arc-20160816; b=U72dVQEBR1/dBDfrJNNKi1Iaeb+4S9RzNGebef/DkAc8oeu2lfJK1dT7Ny1OkJtrPc DyX3kU2svk2mV0V7qWNvLBRQc4XUpiVIFVK3B3z1+8A7SNSP3MaM9Zcwq/raWrX+JN+P Py3pGHVSbKoayRzkh1nD3QSoHdowVhRRd21o1NfRcm0+8BDrsPxxx2EirMYtL+PUMCsv K094Du712nVWkMxM/v3vPbBWgQ3UqRMa/PsZURzdecDl2P1jXf5g1goC2Ul0YuHsPCKH Lv6V6runbkRLDfXO0sVel7ZFDAdnthkM+6m2DoSlTpEXTEV1/2d+3Nmttz9KuR+rQ/HA CRzA== 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=LM6gXSpRzTncrjxysNX3sJppNHeXx482q07I5WDoc5Q=; fh=w4jsPtcPsVeA09vMnWtt1CUCL1R8oa8DphqzCofVFbs=; b=EVtBZOu80v7kRqQ0xMHV5+xhQ1mpLvvgGTqBici8szgXr0hD6AaP5n7bIxXB1df+pO VJvA762Ung/fGajkTzcYfMngiZDbdxbgaWaOB/eCUsso4s+UZUH+xmmeno6ax2HEGDOy tM2h5aJ+d9Jd5tsho+WzYcwPBkIGgGVU4uoM3MsiibbYewGxiWZ2UuXFGg87V+G4XAVm 5LqrNiS3uwPzdDkgTWsuZFocKfpKJLl7otwmm+HYXEa35O3OQ2Xuy23C9Qj6aNo6ELi/ wW2rgqV+8+D1C1Yh3Ku2/ryNnumW6wVCXu+o6dBwc26rtXM2wJ+Sz0ZiA+VY6t/OJuiR gVJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cUrdaECh; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o6-20020a63e346000000b0053ff2b1be42si8587529pgj.113.2023.06.28.02.48.14; Wed, 28 Jun 2023 02:48:27 -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=@quicinc.com header.s=qcppdkim1 header.b=cUrdaECh; 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 S235243AbjF1JeW (ORCPT + 99 others); Wed, 28 Jun 2023 05:34:22 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]:21786 "EHLO mx0b-0031df01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233660AbjF1J30 (ORCPT ); Wed, 28 Jun 2023 05:29:26 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35S7pbeQ009653; Wed, 28 Jun 2023 09:29:22 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-transfer-encoding : content-type; s=qcppdkim1; bh=LM6gXSpRzTncrjxysNX3sJppNHeXx482q07I5WDoc5Q=; b=cUrdaEChrYrNW94BNkR1Q21QWLemiIQ7/4+4uW0wZUgf9wLcrW//X6R66ZGv1DunPeyI gGgjvt9vMT/RiDKo1k+UKITscVVPW5+ZI0y8no4ndMcl6eFs7U+o4DI6KZicoYpWGDh7 fS82NSEtLW4YsKEhEEIeNx3MHD6zFN/zeuF0OFYHouFnvlZJUCI87M6H9WQ6qE0y0CWQ 441txDjFUypALJRw4SbaZaefEUZSY85fmhi8PkO760HiVlEXjDX+GBe4NSd4RZRru04X +d4Jg+6fG/W4jvm9AEyWCzTEeALFgl7L+Juh4WeSg6w+D1zYb15zkBSCPmUTzNrR7wKH Fg== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rgetpghk9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Jun 2023 09:29:21 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35S9TK5e028827 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Jun 2023 09:29:20 GMT Received: from hu-imrashai-hyd.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Wed, 28 Jun 2023 02:29:14 -0700 From: Imran Shaik To: Andy Gross , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Taniya Das , Imran Shaik , Melody Olvera , "Dmitry Baryshkov" , , , , , Jagadeesh Kona , Satya Priya Kakitapalli , Ajit Pandey Subject: [PATCH V2 3/5] clk: qcom: gcc-qdu1000: Update GCC clocks as per the latest hw version Date: Wed, 28 Jun 2023 14:58:35 +0530 Message-ID: <20230628092837.3090801-4-quic_imrashai@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230628092837.3090801-1-quic_imrashai@quicinc.com> References: <20230628092837.3090801-1-quic_imrashai@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 35YqLzCXHC29oZz6jcL5PEdjWNiRjaOX X-Proofpoint-GUID: 35YqLzCXHC29oZz6jcL5PEdjWNiRjaOX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-28_06,2023-06-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 bulkscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306280082 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for gcc_ddrss_ecpri_gsi_clk and update the GCC clkref clocks as per the latest hardware version of QDU1000 and QRU100 SoCs. Co-developed-by: Taniya Das Signed-off-by: Taniya Das Signed-off-by: Imran Shaik --- Changes since v1: - Newly added drivers/clk/qcom/gcc-qdu1000.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/clk/qcom/gcc-qdu1000.c b/drivers/clk/qcom/gcc-qdu1000.c index c00d26a3e6df..991fb2bc97e9 100644 --- a/drivers/clk/qcom/gcc-qdu1000.c +++ b/drivers/clk/qcom/gcc-qdu1000.c @@ -1131,6 +1131,26 @@ static struct clk_branch gcc_ddrss_ecpri_dma_clk = { }, }; +static struct clk_branch gcc_ddrss_ecpri_gsi_clk = { + .halt_reg = 0x54298, + .halt_check = BRANCH_HALT_VOTED, + .hwcg_reg = 0x54298, + .hwcg_bit = 1, + .clkr = { + .enable_reg = 0x54298, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gcc_ddrss_ecpri_gsi_clk", + .parent_hws = (const struct clk_hw*[]) { + &gcc_aggre_noc_ecpri_gsi_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_aon_ops, + }, + }, +}; + static struct clk_branch gcc_ecpri_ahb_clk = { .halt_reg = 0x3a008, .halt_check = BRANCH_HALT_VOTED, @@ -1447,14 +1467,13 @@ static struct clk_branch gcc_pcie_0_cfg_ahb_clk = { static struct clk_branch gcc_pcie_0_clkref_en = { .halt_reg = 0x9c004, - .halt_bit = 31, - .halt_check = BRANCH_HALT_ENABLE, + .halt_check = BRANCH_HALT, .clkr = { .enable_reg = 0x9c004, .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data) { .name = "gcc_pcie_0_clkref_en", - .ops = &clk_branch_ops, + .ops = &clk_branch2_ops, }, }, }; @@ -2274,14 +2293,13 @@ static struct clk_branch gcc_tsc_etu_clk = { static struct clk_branch gcc_usb2_clkref_en = { .halt_reg = 0x9c008, - .halt_bit = 31, - .halt_check = BRANCH_HALT_ENABLE, + .halt_check = BRANCH_HALT, .clkr = { .enable_reg = 0x9c008, .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data) { .name = "gcc_usb2_clkref_en", - .ops = &clk_branch_ops, + .ops = &clk_branch2_ops, }, }, }; @@ -2523,6 +2541,8 @@ static struct clk_regmap *gcc_qdu1000_clocks[] = { [GCC_AGGRE_NOC_ECPRI_GSI_CLK] = &gcc_aggre_noc_ecpri_gsi_clk.clkr, [GCC_PCIE_0_PHY_AUX_CLK_SRC] = &gcc_pcie_0_phy_aux_clk_src.clkr, [GCC_PCIE_0_PIPE_CLK_SRC] = &gcc_pcie_0_pipe_clk_src.clkr, + [GCC_GPLL1_OUT_EVEN] = &gcc_gpll1_out_even.clkr, + [GCC_DDRSS_ECPRI_GSI_CLK] = &gcc_ddrss_ecpri_gsi_clk.clkr, }; static const struct qcom_reset_map gcc_qdu1000_resets[] = { -- 2.25.1