Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3028837rwb; Mon, 15 Aug 2022 16:27:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR7NUpBJQ9AvtJelk7DhMvlrZ26ZudRSiRcXs/Zut6EhseQOauGgLR7yrox6Bvc3WbhamXYk X-Received: by 2002:a17:907:1361:b0:730:e5c4:6eba with SMTP id yo1-20020a170907136100b00730e5c46ebamr11744494ejb.597.1660605958790; Mon, 15 Aug 2022 16:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605958; cv=none; d=google.com; s=arc-20160816; b=n+Yke40Znvcht9vcdqee3FYLadV0srYuWl99Ti2UkiOp9VSbo0UxwlLWXq3+4Y0boE gIUhFGBF86H4BmhVO24Jpw1Pt6t2eHUjK13DaXd7o7xsEa4uvfjauh+xEg+KTTKcef3P 6DQp9Ahd0BKs62Wb5LjhKhKzwEwkNvT+rENQl9pn6hVgJneHKhnnBMjOWTC3yez17AB0 spHd32ZbFI44T4+UR+X6EBWpOvw3a3aRV1agw7WU3ybttsEKXBWMAjsi5eJ80kINNzie ngeDlMlT5re23pyXKSpQRm6TCMozEvJ+jc2pe4QHUs/4IsC1vgdaoAypLniC9dCQSLXP K4Tg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=z1THkx+xe7FeJ4bYLJnnJ5TJ+R/vi3+EX0kZ4h7jj5E=; b=zDjb4ZpsP2ILr9KsmTDnyDoa3xt4HnW8FU8TJ6xpSfOXfAzGS63pQZ4+VAbRjx5qjS q5mE0dTId6UYa0uBh9q/LZjMXc6Yw6ZGNzXMWlUWs0KYy54EqAaa0bK6lDJyHMMLmQmG TzXqYdnyj/U1/HpB4owTcTLxBvt3WmbUCQLzlQD8iCCimLvyv/+RYz3GSldbdi4740JX dVlPYu6/sQG9l0kb0wqJoD1OSrXWur6cyt5rZ95NIQS2IzFrsuzLUUmtROKkZKXvggGK C9OMjWwak8wCRSXWPfLKwcyA6wL3TMfO5uCfdRAjtinpHlpcGweoUzk2o2AwFQ3oS4Zv 34CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JF4CRkpF; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r18-20020a170906c29200b0073146c420dbsi7259487ejz.479.2022.08.15.16.25.33; Mon, 15 Aug 2022 16:25:58 -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=@linuxfoundation.org header.s=korg header.b=JF4CRkpF; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348332AbiHOVx3 (ORCPT + 99 others); Mon, 15 Aug 2022 17:53:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350218AbiHOVuw (ORCPT ); Mon, 15 Aug 2022 17:50:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF530DEB57; Mon, 15 Aug 2022 12:32:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 76B89B81126; Mon, 15 Aug 2022 19:32:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC52AC433C1; Mon, 15 Aug 2022 19:32:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591939; bh=Sl8pAt6Q0dhidSZAmwSvNFkkV5IgZon/SaDP+uWCIr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JF4CRkpFMQRi/6zirq/w9cGhy/l40AIDNwNerQsxoCInHzvBVfgOnJTvSJZcLTSRZ 5EUzPaZA6D0GuXhGhgU5L1eNBHMQ0PajVIcu94ALiqMD+XRujtJMpY38nLGDbMJE0n TKjUAa56W9uxo3EaH0SqlLGYe80WlErgFaC7fwDM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Marko , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.18 0707/1095] clk: qcom: ipq8074: SW workaround for UBI32 PLL lock Date: Mon, 15 Aug 2022 20:01:46 +0200 Message-Id: <20220815180458.639328837@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Robert Marko [ Upstream commit 3401ea2856ef84f39b75f0dc5ebcaeda81cb90ec ] UBI32 Huayra PLL fails to lock in 5 us in some SoC silicon and thus it will cause the wait_for_pll() to timeout and thus return the error indicating that the PLL failed to lock. This is bug in Huayra PLL HW for which SW workaround is to set bit 26 of TEST_CTL register. This is ported from the QCA 5.4 based downstream kernel. Fixes: b8e7e519625f ("clk: qcom: ipq8074: add remaining PLL’s") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220515210048.483898-2-robimarko@gmail.com Signed-off-by: Sasha Levin --- drivers/clk/qcom/gcc-ipq8074.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c index 1a5141da7e23..b4291ba53c78 100644 --- a/drivers/clk/qcom/gcc-ipq8074.c +++ b/drivers/clk/qcom/gcc-ipq8074.c @@ -4805,6 +4805,9 @@ static int gcc_ipq8074_probe(struct platform_device *pdev) if (IS_ERR(regmap)) return PTR_ERR(regmap); + /* SW Workaround for UBI32 Huayra PLL */ + regmap_update_bits(regmap, 0x2501c, BIT(26), BIT(26)); + clk_alpha_pll_configure(&ubi32_pll_main, regmap, &ubi32_pll_config); clk_alpha_pll_configure(&nss_crypto_pll_main, regmap, &nss_crypto_pll_config); -- 2.35.1