Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp630918lqz; Sat, 30 Mar 2024 11:29:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwpm8AJuDvut9+ar6r+cug8gTlZChkTr9/juB5D9ZEPScnBAkeqBfKG7yCtJa+g+Ozu6BzHVz0XYpWJJnO2C9HP+khjJSSUzviaD9S6g== X-Google-Smtp-Source: AGHT+IFYLsdNFiW6m/THlWLgBG3cYB5XtNxsUKf1vlBT1EHCk25nO9x0AS6PZ1xYzR/5ljJ7xnME X-Received: by 2002:a05:6214:c29:b0:696:8402:84d2 with SMTP id a9-20020a0562140c2900b00696840284d2mr7083469qvd.15.1711823386371; Sat, 30 Mar 2024 11:29:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711823386; cv=pass; d=google.com; s=arc-20160816; b=MEZo5l+kP+M82HWDo0ZtyC8u4D7El+TIqOmdBV66zUkaBjUvr264uYuC6yoa/hsZse 15yFb0jjKpZ6IhJ6eIMXoDrRXnKPSpovW12vVVnmL25KOQY+F+JodvJXsD5C3NufFcej qu3lqK7HXyyURFGsd1yQzzmEsKaq4oL+fweD7KZuhdyxx54bsrom39xrZ+/7aC06d2LS Ju4NXS/fLiMsGM2PXqJbBWqd8A8sNc0RgTmURoREDpIrpXatxh6OQ7E+MAUolWCMwgKA kSNEnSmUpu8MOKhsbam23Ug3Mh9aeTMFPKKW0uJBO4Ckr1Ap3/b6+KXFrPlwKcrgQMzQ jtmQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xqvzsZnF1LlgMc+oL0HG34IbDapDYKlJEYS6dCsjsSs=; fh=ltD4NEjwbC4RGEHPUuqGQ0qwbckVZiSSUiu8uXIzw8k=; b=ZBEeczbuFCYRC/qfW/NzqG0b9vvBO5GP78xys1F80TogS/y2f6yvrgEspw+04D9i0E sgifjw44NXgL7hwJ3ssBGlVYSWxvkUSH+wYaesKDM+dc8npLlT/czG+PRyR7vyDeCNXx t1EjElUBKkZbBKjgv/UhoSHpZmccT0ZdCz6fnillCI08TjACFe1sxIMeF2qTzjl9TxTN LVjdQKVyK6v0dZhFgMbiP9Xdl7gvz5rheB7TYm1M3l9sGiHobP9rT31t05PT20V+1pXy YTV2z3ZR66N4nso0V7rooSnFovuJgghTromNgvVLDOE1Pm07tpyMD7ImdYpFrKM+E3FO yE0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cwCfs920; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-125811-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r9-20020ad44049000000b006966f96951esi6318178qvp.306.2024.03.30.11.29.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 11:29:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125811-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cwCfs920; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-125811-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1B78B1C2148B for ; Sat, 30 Mar 2024 18:29:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DDE9441C93; Sat, 30 Mar 2024 18:29:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="cwCfs920" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95D684369A; Sat, 30 Mar 2024 18:29:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711823370; cv=none; b=BlCYH4miFiChT5Qk1YsgyL9nKkarO4JD0w6t6WJF4iUgV5NrONwvb/m7FQyhN3U7T8W4lNVl1tkaWk2NlUc2CLTmzBn7K9TQYSwe+txGlRpWwiK+7FUVW5K5l2jOmAZcdaGx0AKMnPRbj2shOw+dXJkIBWTMkbd33ZqQi+m7GnY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711823370; c=relaxed/simple; bh=Cbhf7LOtDxm8kXQrY3cn33odrNMLb2snExadHbiAGxQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ool/MiYOmXvR3EpEtrOUYX1mx1Vn8/xsMjBNUu+czlm35Sgivy2HiVWSzlqjxnmwKKsZCUzwP89kqlFSzgwZ6fANyg5VA1k7QnsycKY65jJ7aco3UbxVyvcDWhYTzhbbN6wbWGTmO2TQWyU4qNii4dVPfxb3UylOenzE8rU/4ts= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=cwCfs920; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42UHp8Yu003789; Sat, 30 Mar 2024 18:29:19 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=xqvzsZnF1LlgMc+oL0HG34IbDapDYKlJEYS6dCsjsSs=; b=cw Cfs9208oocEe1Fqm8VJf5VNF8aXUb9T12xGFVTGjxHcz1nEmyx2SImMleH/P/Xbh 79O818fyaBY2+3PsRXE5jHNzG4Zz+KzgR1Mmj2zZ+s/4K+W6FIJWwordk2IROA1q ze4JVVKa/u1R2LqTCmcQKLd5zBn0DZMs1JHDWE6J6N2mh3HeIwr8P2bvmMcV38ii hfakXtnygHSSUm8vhZXaPDfoGJlqcOzD13C8dbOIpvnuIbbmaRILg1S79R0jP4MI DaBJH08OOeNRovMkLqFY06k0DirVz62/ukx1QHJQgV00iXn05W/CX6vZtb3Pkoln 7BqAO1//BJkp55JGDIwA== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3x6c1dh5h7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 30 Mar 2024 18:29:19 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42UIT6sd027336 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 30 Mar 2024 18:29:06 GMT Received: from hu-ajipan-hyd.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Sat, 30 Mar 2024 11:29:01 -0700 From: Ajit Pandey To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Vladimir Zapolskiy CC: , , , Taniya Das , "Jagadeesh Kona" , Imran Shaik , "Satya Priya Kakitapalli" , Ajit Pandey Subject: [PATCH 1/7] clk: qcom: clk-alpha-pll: Fix CAL_L_VAL override for LUCID EVO PLL Date: Sat, 30 Mar 2024 23:58:11 +0530 Message-ID: <20240330182817.3272224-2-quic_ajipan@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240330182817.3272224-1-quic_ajipan@quicinc.com> References: <20240330182817.3272224-1-quic_ajipan@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: lQ7NSYlB1sYhIgOvF87s8qaNmsMIxU9V X-Proofpoint-ORIG-GUID: lQ7NSYlB1sYhIgOvF87s8qaNmsMIxU9V X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-30_13,2024-03-28_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 adultscore=0 clxscore=1015 bulkscore=0 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2403210001 definitions=main-2403300151 In LUCID EVO PLL CAL_L_VAL and L_VAL bitfields are part of single PLL_L_VAL register. Update for L_VAL bitfield values in PLL_L_VAL register using regmap_write() API in __alpha_pll_trion_set_rate callback will override LUCID EVO PLL initial configuration related to PLL_CAL_L_VAL bit fields in PLL_L_VAL register. Observed random PLL lock failures during PLL enable due to such override in PLL calibration value. Use regmap_update_bits() with L_VAL bitfield mask instead of regmap_write() API to update only PLL_L_VAL bitfields in __alpha_pll_trion_set_rate callback. Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces") Signed-off-by: Ajit Pandey --- drivers/clk/qcom/clk-alpha-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 8a412ef47e16..81cabd28eabe 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -1656,7 +1656,7 @@ static int __alpha_pll_trion_set_rate(struct clk_hw *hw, unsigned long rate, if (ret < 0) return ret; - regmap_write(pll->clkr.regmap, PLL_L_VAL(pll), l); + regmap_update_bits(pll->clkr.regmap, PLL_L_VAL(pll), LUCID_EVO_PLL_L_VAL_MASK, l); regmap_write(pll->clkr.regmap, PLL_ALPHA_VAL(pll), a); /* Latch the PLL input */ -- 2.25.1