From patchwork Wed May 24 14:52:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagadeesh Kona X-Patchwork-Id: 98534 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2909753vqo; Wed, 24 May 2023 07:59:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kX9LsVL+gbdRvB9/IxcVRePvYCasMohaQHPoV3gIuhhKibBzNiONTi2GcVt9mWBkMHA6r X-Received: by 2002:a05:6a00:b93:b0:63b:7fc0:a4af with SMTP id g19-20020a056a000b9300b0063b7fc0a4afmr3722830pfj.26.1684940381679; Wed, 24 May 2023 07:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684940381; cv=none; d=google.com; s=arc-20160816; b=kEbJsNYQQ3yl5s39Fhx9Ya5nLyd9svo5KQGzattEszr4dS1vF+rXCLXYXpY69iq2rj ckb6r5gh7XcXU7PqlP+EyZrM3eDpOtcQ2NGrFPOvlxBx/sdYOhQNvyqEZEdXTvAkoAtN 4AKkx6Wanqz6vDpQaf7grgiej7sl3ZBL6PTyjzLzpusdaqUJfhS3kMV3UIrvKexULCHp 1tgdcodIlzpKe7pLlvMmq80jswp1s8iIJhTnBfjgjamPYBZskH6Kbw8glPxI8bFoZ5hk Kbr3hWRCUr9WScB6dVVnQHyrUIoVHIkfRSjsXA+Z8HQHw57f3JB/kCeVryTqtSVLULSE Ky7Q== 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=Iqr6g+qe5cjYyM8XWX+BH5wCqWhDn76KtEevdZl8cvU=; b=S1IpVeOaXmy/yrTh0edboQZEnswls7DrCHGK7A3s6z9pzO8xfwV1k1jhX3n1z8If0l 7YgAYt4OglMV+42+rC/t5mQYwEHeY+ClTKusIYcy0SvtFn1ixgUtvHr7BV2E1bsgPLWc jAIxM/WSh5rSTjSM4FDCicWqdmsdY6Z8mOavsWKlziwigQN1/Od9MJ4NSoLdWMEU4gRX VJJLjVUlnrt9+G7/hwUX5qjXsEMkyqMiNrMParpcAs6520zAe4rt1q4eEmqjdbm3fqqP sm2uHUfLa2ylIBFns3HJ15AfYkkai3jG2rNsYE7QjZyHh14ogH88Ov19HBdCubhjCH97 nmxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=X8KKzOsm; 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 p4-20020a637404000000b0051985ec117bsi1143874pgc.69.2023.05.24.07.59.29; Wed, 24 May 2023 07:59:41 -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=X8KKzOsm; 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 S236245AbjEXOxk (ORCPT + 99 others); Wed, 24 May 2023 10:53:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235913AbjEXOx1 (ORCPT ); Wed, 24 May 2023 10:53:27 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57C81E4B; Wed, 24 May 2023 07:52:59 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34OAQeHP002613; Wed, 24 May 2023 14:52:31 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=Iqr6g+qe5cjYyM8XWX+BH5wCqWhDn76KtEevdZl8cvU=; b=X8KKzOsmMWnTCcoyQS/zLh6nqGpul4V5baz8d7/PmUZr7BOB8V1Gl9Wjml1c0Eiluotc xRoZvKJ2RVEA8YBFav9JRv2KXbGEiZ/6YWR1bGKXJ5PkiCXDIjJxQBgZel9jBABxSkcr 4t0pZW1TiKnYE3ASvHd8X/PuCNXXAjCXNpR1Wox5IBxDl5LAi5Epld8spkwxSeVW/bJV vBv5HP7XWdYEOKgKt5M6CsRcQHMI+wBHIdnH2ozrkPUKHCyEs2ZzyAKkjAT7Emff1yH5 PJVTE3Uaqb35KaTtLDYyqz/R3OUrQwLT28mp/9ZaA3g/whB/ZVfUjZowkBY+gtqjnPBp TQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qscaus7at-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 14:52:31 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34OEqTER010416 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 14:52:30 GMT Received: from hu-jkona-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.42; Wed, 24 May 2023 07:52:25 -0700 From: Jagadeesh Kona To: Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Bjorn Andersson , Konrad Dybcio , , , , , Taniya Das , "Jagadeesh Kona" , Satya Priya Kakitapalli , Imran Shaik , "Ajit Pandey" Subject: [PATCH V2 1/4] clk: qcom: clk-alpha-pll: Add support to configure PLL_TEST_CTL_U2 Date: Wed, 24 May 2023 20:22:00 +0530 Message-ID: <20230524145203.13153-2-quic_jkona@quicinc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230524145203.13153-1-quic_jkona@quicinc.com> References: <20230524145203.13153-1-quic_jkona@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: RC8Otj10Cwq1s1apHpCPJ6NCQZVkl2ca X-Proofpoint-GUID: RC8Otj10Cwq1s1apHpCPJ6NCQZVkl2ca X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-24_09,2023-05-24_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 impostorscore=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 suspectscore=0 clxscore=1015 malwarescore=0 mlxlogscore=487 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305240120 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766788045460302995?= X-GMAIL-MSGID: =?utf-8?q?1766788045460302995?= The lucid ole pll reuses lucid evo ops but it has an additional test control register which is required to be programmed, add support to program the same. Signed-off-by: Jagadeesh Kona --- Changes since V1: - Removed redefining ole ops same as evo ops drivers/clk/qcom/clk-alpha-pll.c | 2 ++ drivers/clk/qcom/clk-alpha-pll.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index b9f6535a7ba7..f81c7c561352 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -55,6 +55,7 @@ #define PLL_TEST_CTL(p) ((p)->offset + (p)->regs[PLL_OFF_TEST_CTL]) #define PLL_TEST_CTL_U(p) ((p)->offset + (p)->regs[PLL_OFF_TEST_CTL_U]) #define PLL_TEST_CTL_U1(p) ((p)->offset + (p)->regs[PLL_OFF_TEST_CTL_U1]) +#define PLL_TEST_CTL_U2(p) ((p)->offset + (p)->regs[PLL_OFF_TEST_CTL_U2]) #define PLL_STATUS(p) ((p)->offset + (p)->regs[PLL_OFF_STATUS]) #define PLL_OPMODE(p) ((p)->offset + (p)->regs[PLL_OFF_OPMODE]) #define PLL_FRAC(p) ((p)->offset + (p)->regs[PLL_OFF_FRAC]) @@ -2096,6 +2097,7 @@ void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma clk_alpha_pll_write_config(regmap, PLL_TEST_CTL(pll), config->test_ctl_val); clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U(pll), config->test_ctl_hi_val); clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U1(pll), config->test_ctl_hi1_val); + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U2(pll), config->test_ctl_hi2_val); /* Disable PLL output */ regmap_update_bits(regmap, PLL_MODE(pll), PLL_OUTCTRL, 0); diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h index d07b17186b90..6ff0d08eb938 100644 --- a/drivers/clk/qcom/clk-alpha-pll.h +++ b/drivers/clk/qcom/clk-alpha-pll.h @@ -125,6 +125,7 @@ struct alpha_pll_config { u32 test_ctl_val; u32 test_ctl_hi_val; u32 test_ctl_hi1_val; + u32 test_ctl_hi2_val; u32 main_output_mask; u32 aux_output_mask; u32 aux2_output_mask;