Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2877962rwb; Mon, 15 Aug 2022 13:08:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR65RCPKAaN4ZrkVcpDtmWHepvSjIA7/1/P2swLb4aeJdmKJGthQUqnJ9UkexdzY1vJe6hjs X-Received: by 2002:a05:6a00:9a7:b0:52e:460f:8eac with SMTP id u39-20020a056a0009a700b0052e460f8eacmr18048702pfg.12.1660594137021; Mon, 15 Aug 2022 13:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594137; cv=none; d=google.com; s=arc-20160816; b=Arht5NuzMSq3X7jPtye3287wIQi/93WjBd8C4SlFE1Z3umDPnx8Jv8tdi7EyYoVcqL /6kWrGHGTkO3zaIKDggfm/Nfp346Rnb/Z7rHNbMX5dKJNMvZdPiohu7lg1vw6nbZaH7t GWLzoU1Vic8j4WiNp4H1qG88NfH9HdTQw32c8655VtjYQCQW83iMuClLGmL1mqRYpvGJ rnUoaqQ8VrjMn5b1iv13YMKD3Fk+yQB/enrXQEOFxaPn51q7UVtUAdSwKTZY8n31hqJs E1uzSP30JGG7xNNwL0wSwylbn9Oc8KGWxqPlmGa+48nHfg5IMuF/ljC8/GAO9Cgvsxtx kWWA== 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=zhCTcaF1JfwgX8WlkhpmCe8qcu9YN18rLfKorLttEuTRzn6cvov17I8wbWbMrbk0cJ 4osFy55E+I5bXHTp7zEvS7hTL4DYE/J4+83B+A/nyMZ6m2+sL9WPJYraI9JiKEmS0rae uDvyJF8ELhbdiy9OTq9HE5pyBw269HM+lWb/mrKEoquqbw+wX+SpQs+J8UhB+aXjaFLz lRx7M1vLCpBOhK5NuB6BtkvQoWTXNsHQiqacozvdoqH5QJljyhAoPFdkcBAe/GHZFeaV UukfEYbkWPzBftuN2jRFn0pNVNs1B8fOw3ydUuVjDpUfmj+6SZgQ/M/3YvonSK74A0xI RWWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="n/p9KiYj"; 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 l6-20020a170903120600b001727963f93esi754429plh.68.2022.08.15.13.08.45; Mon, 15 Aug 2022 13:08:57 -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="n/p9KiYj"; 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 S1343917AbiHOTNj (ORCPT + 99 others); Mon, 15 Aug 2022 15:13:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343695AbiHOTKO (ORCPT ); Mon, 15 Aug 2022 15:10:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A296B2D1C8; Mon, 15 Aug 2022 11:36:28 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 3EE3960FB8; Mon, 15 Aug 2022 18:36:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47EFFC433D6; Mon, 15 Aug 2022 18:36:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588587; bh=Sl8pAt6Q0dhidSZAmwSvNFkkV5IgZon/SaDP+uWCIr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n/p9KiYjA2mTR37XWRlF3GObNNJ8fTQ8rRQMo+v8xF/Po//H96Sae4HEMZydrO7il gj1lwT9MpHmOanrYd2MUeE9WU+odIt/D/NQKOZtc6bKPtY94Mrc8ZC2xzUINBtn3NA vYr7jCEAkTDSMdWYaFo1ymo9crl7U0syRKd4JRmY= 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.15 451/779] clk: qcom: ipq8074: SW workaround for UBI32 PLL lock Date: Mon, 15 Aug 2022 20:01:35 +0200 Message-Id: <20220815180356.556661797@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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