Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp307381lqt; Thu, 6 Jun 2024 04:27:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUc8NvrAl1VpxGr3cC5LsVgwHmhmYH4YE/kR/xrAPRJW6qP8p7/H6bzMWylXfk2Ct1+63pvKiyc5Ef4zX8KhRWPp+tb/D66BRyp37drow== X-Google-Smtp-Source: AGHT+IH/V+oaSPjOVP2gWhr5cvgiy15aKzIrSvWq0YnLvBODhDqtF59gkpKCffKlD/ssgEilC8Lp X-Received: by 2002:a17:90b:4d11:b0:2bd:f4cb:bd87 with SMTP id 98e67ed59e1d1-2c284a818aamr4331698a91.14.1717673270848; Thu, 06 Jun 2024 04:27:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717673270; cv=pass; d=google.com; s=arc-20160816; b=eI/Fr3KTSsdwkRkuc/7dw53bbmQYnMHDjXHNIH4bQDcpjm0qV5oS0qWHxM222hiN0m eeW//MXOM/rN9c3T71O0skSixJsX0TsL9jEyTHWNXZncqPjiSQb6fSe1e8ACX7CoReNw bf0UafL9E81cP07rPDPq/TO35X7UVh+ASsyKvDbLS/2kqLbqu8lUQEnS8SOyUwLczy0I svVz6SpuEUGioYftTp6bXJrvVjElo+iDT/1CkRWsf/cLq8tev6eVBnLMgCdgmX26vXz9 GSqwVFgP6XJEETGne+0taGtFo1+HTmvaG6K5TK5TOEoY86HEUJ+ED/sXo3ozt1Kfnv3C YlAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=7H5RlqVYDUyhbQV2vrFzVsqeAI5zP+J54d70UEPgNX4=; fh=pKbRz5ZFJ8GVYy7IFSYUXeKK7Q8MniRYvoTaOuD3Y6E=; b=LF9ilOSPLcW4j6BFMYpPobYtZc5vXiy/tgOJ/sJhr+i+pHuWQyVtq8a2r+ISjBbAlN 9g4Lb+/myIfc3GnK0+WpbWSJ69yQ++yJHRUpmja+C/vC7btap54Y15bLToCZueylNlVQ 6G//NB4rRhjR2Sy6hazdTEJxdf7SLv36nkB6t2AgrTKT87tEhZFR2sp/hmPOC7MvP40S jDU5fhjosHyilcqyWussVLgHRIXVFtADV0A13YqSXV1P7Ny9jchpn8ULowdoPDlvZNGQ ZqBTHxGgZbAAmtQyfAPSHvYLqfdkOQeILHVepyk5yhYwyOBR4ZJcNc0ZxgqRZVURAY8C Pvcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ICalM9Yj; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204170-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c29c48c482si1043754a91.145.2024.06.06.04.27.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 04:27:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204170-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ICalM9Yj; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204170-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 73FA6281CBB for ; Thu, 6 Jun 2024 11:27:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 407481957F5; Thu, 6 Jun 2024 11:27:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ICalM9Yj" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 784B91957EF for ; Thu, 6 Jun 2024 11:27:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717673261; cv=none; b=ub+/FGg908cEtjTlcTK6wCdJyKLSl9tY/fQXtxqeFn5l7cenfivv754rCshwGvbW3ljz00T7ho/DtdkQhpejwFTG/EK+IcFukUay7dU2J60EXwI5UJuxQBoObaNkACw7DcqHTZz7ItxwuFAJ9Uz4BBVhdH3KTh4cTjMTuOnOUSk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717673261; c=relaxed/simple; bh=IKJMKta3gKbm6WrlCyDsenNN9FGXLJuX8rzYumUp5gw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DEj8ITUjJuHTTeKskCrmozg2j2W31cy9ki92Ad6cDEnyIeZUnsvH0LaB4pTL4irKA3OWNAfU8qpTBuzp1FR6zoc2OXfI/RwSi+okN9yExkDhIqv65fvk3Y+nRCJbIuvHVNF0dqTQaYMLVsCwCwustAVEzkh80W4/9ZU0XEipolE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ICalM9Yj; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a68b41ef3f6so81440866b.1 for ; Thu, 06 Jun 2024 04:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717673258; x=1718278058; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=7H5RlqVYDUyhbQV2vrFzVsqeAI5zP+J54d70UEPgNX4=; b=ICalM9YjyU3RlE2NJy1LnnesmUY+7WMTwG44CEQYDmqBmwQYW+l/CBkvcyw46CuXJm 75GSeCslSy0UxQFD8EFfwR6z6p4eFKIeq3zBuxhbkoWaVU+pMg6CZP+hQVco5dPh/Nic Sguo3qu0wmJcRObJds9ovhOgCDgRprGVwOLDYSaX/B/0zF/fVG3UPlDPWeyCcjfSdz8d hV0myeivfemDs9+Q9bDrcanhrqMKIy40hqA6fMyaSZ7Eme4thxecxNwC34ZUnJ/sdAX3 S9Z9UvF2AJiYSIDpIoB03mwtVD1pKNdlzGIw1pBDTmQM5YomKiKSNywHyTMBLh/sN+mW 47Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717673258; x=1718278058; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7H5RlqVYDUyhbQV2vrFzVsqeAI5zP+J54d70UEPgNX4=; b=Jgb2hlZknYNT0sb3yj+hw5Op5aIJLd1Mc1DIpSO65RhFK6I37BiWQpR1416YZnXFA2 fDenfvbly+0K5vYU63VSdjZ1ki7Qj/f5d/ZELiTQA5HOZctDGCAVLx7u/1MVS8Fm6U6+ nLY1gs5CfLBcPqV2JyHT0VwaN2t+XyWzv9ZDD4q9JDInVIFwCp7Rcppx8WFfj1CIF2fY 1VjTjIFj88UbXYmmX4xBNhVnm5/o4mYy6dnfROYIOYqlx1PgB+H2c9i3Md09rcBfsMwP 3L6tBdfPYQRnZqooI8fNEs8aP9XQQsF3fRML/RwHkwV5KC1g9jL2f0n4IOfxJtBfASxQ m4MQ== X-Forwarded-Encrypted: i=1; AJvYcCWytDyOZVilxrVhVtnyw2XRBRGIqIMKmmLXiwNGaleMKUIkjJ9uMoG+VDwjkmLPUWMPBa4TKFCpz0vZiqyxJstZIM7yQaqwOusl1QJY X-Gm-Message-State: AOJu0YwzXzHP1SeoRfHe3qPaWKsvxf7DCTyhM8jHh76IhhjNYRbqH/e1 ZZHBdFOrcyV8RDZRLqXH/CHol2R9UsYzN9/y9e7BVCMcEoxAg/n+YrzMGuXPLM4= X-Received: by 2002:a17:906:3498:b0:a58:e8c7:c0b8 with SMTP id a640c23a62f3a-a699f361c21mr336766866b.7.1717673257748; Thu, 06 Jun 2024 04:27:37 -0700 (PDT) Received: from [192.168.128.139] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c8070e2fcsm83411466b.154.2024.06.06.04.27.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jun 2024 04:27:37 -0700 (PDT) Message-ID: <202852cb-d49e-4380-8073-8bb679fcf53e@linaro.org> Date: Thu, 6 Jun 2024 13:27:34 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/5] clk: qcom: clk-alpha-pll: Add HUAYRA_2290 support To: Stephen Boyd , Bjorn Andersson , Conor Dooley , Krzysztof Kozlowski , Michael Turquette , Rob Herring Cc: Marijn Suijten , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov References: <20240219-topic-rb1_gpu-v3-0-86f67786539a@linaro.org> <20240219-topic-rb1_gpu-v3-2-86f67786539a@linaro.org> Content-Language: en-US From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgp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2BBgBCAAgFiEEU24if9oCL2zd AAQVR4cBcg5dfFgFAmQ5bvICGwwACgkQR4cBcg5dfFju1Q//Xta1ShwL0MLSC1KL1lXGXeRM 8arzfyiB5wJ9tb9U/nZvhhdfilEDLe0jKJY0RJErbdRHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5.04.2024 11:37 PM, Stephen Boyd wrote: > Quoting Konrad Dybcio (2024-03-26 14:08:24) >> diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c >> index 8a412ef47e16..27ba8aa3e577 100644 >> --- a/drivers/clk/qcom/clk-alpha-pll.c >> +++ b/drivers/clk/qcom/clk-alpha-pll.c >> @@ -779,6 +792,40 @@ static long clk_alpha_pll_round_rate(struct clk_hw *hw, unsigned long rate, >> return clamp(rate, min_freq, max_freq); >> } >> >> +void clk_huayra_2290_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, >> + const struct alpha_pll_config *config) >> +{ >> + u32 val; >> + >> + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val); >> + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U(pll), config->config_ctl_hi_val); >> + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U1(pll), config->config_ctl_hi1_val); >> + 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_L_VAL(pll), config->l); >> + clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha); >> + clk_alpha_pll_write_config(regmap, PLL_USER_CTL(pll), config->user_ctl_val); >> + >> + /* Set PLL_BYPASSNL */ >> + regmap_update_bits(regmap, PLL_MODE(pll), PLL_BYPASSNL, PLL_BYPASSNL); >> + regmap_read(regmap, PLL_MODE(pll), &val); >> + >> + /* Wait 5 us between setting BYPASS and deasserting reset */ >> + udelay(5); >> + >> + /* Take PLL out from reset state */ >> + regmap_update_bits(regmap, PLL_MODE(pll), PLL_RESET_N, PLL_RESET_N); >> + regmap_read(regmap, PLL_MODE(pll), &val); >> + >> + /* Wait 50us for PLL_LOCK_DET bit to go high */ > > Is the bit not reliable or something? I'd expect to see a polling loop > here but it's a sleep. Unfortunately, it seems so. Konrad