Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3080857rwb; Mon, 15 Aug 2022 17:39:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR6+xnDx6+t+iKlzbqeGCj5Dk6FWdH7voVkGySxEHifmoYtKOiZwVeGqRtYMELsMA0ua6b16 X-Received: by 2002:a05:6a00:32cb:b0:52e:2756:3558 with SMTP id cl11-20020a056a0032cb00b0052e27563558mr18587183pfb.59.1660610352406; Mon, 15 Aug 2022 17:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610352; cv=none; d=google.com; s=arc-20160816; b=HwoTB5mrGh+PVE+zsx5qDlED2BIHp9Z1/n1zgMVhl4QsIogyZhPAm69QLPZ3UrUHlb eVft7Mf3U/iusZ5t+trdfKu6wl5qZ/DOGJmzW7+o1hgDZrPsII8T2HVeo4UjNQ9kS9l/ inEsE++64v7A4eH6u1R7NQtBDxQ/Ao+p0ceZu9EqAo9+EDzl6+CVoC9I+CvdDy8OE+9E UTyPDOENEI2Y1t45OYOMcYhTYy9DYavAKaBfDIn8EcBpSHU6oFPk4pPyk/xOXgslhHLP YuupKNxUd0Jwdr1W4equztLexiHk+Zpfg0dM3wM11CRS0p2LMuEYrp1dtEdJxjSkqo6V hw1w== 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=oYZ0QMnhp5znrkNe+vyI3gPRKVikEQs4OTpte8KAhpiw3RNuB4xxshLTktJs/xQM/B X6ZWTdZDO28QtdEByHjDCopZyPHBZppQpLE5K+OCIWAZSqQVvdCMwncg87g0TbPFONid tWewEDtATSB88SxrKtYyaX+Hvop6SizcJm4URWkZeZXNr0C8yPQCcFgTsinst3HBLOCJ n4eQxtS1Pu6jTgdpRq5Sk14mJ+hhvMTQ3VZpZdHhgX0qoWg2lLzEOlv20T5qAmm3GUPM uSUo/wMwqhGDzIBYX9gdy+JUMRu0Up2CfujIi5c7ZJVuCSkJbLI5bNwAygjzzDrXnhaG cEpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QU2sdD8g; 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 z11-20020a170902cccb00b0016d2c4d1d1esi11976723ple.218.2022.08.15.17.39.00; Mon, 15 Aug 2022 17:39:12 -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=QU2sdD8g; 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 S1351408AbiHPAU2 (ORCPT + 99 others); Mon, 15 Aug 2022 20:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357565AbiHPANv (ORCPT ); Mon, 15 Aug 2022 20:13:51 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E7F117828B; Mon, 15 Aug 2022 13:30:20 -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 sin.source.kernel.org (Postfix) with ESMTPS id A401FCE1344; Mon, 15 Aug 2022 20:30:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE62DC433C1; Mon, 15 Aug 2022 20:30:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595417; bh=Sl8pAt6Q0dhidSZAmwSvNFkkV5IgZon/SaDP+uWCIr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QU2sdD8g9GFHGCuVMj88jkCcYIk8L8u2E8QCrE2EEYHMq08C8pxeKnuTPiHwjP4pJ jFWSCTukjpegCCUtNfy56XMY98+itawithALKoeTp5M+ySvcfNVK+dcER/8YBOjK+e JopOtPqplSygkRRvZ5nxbfTxQBogo4dD34Ov/sik= 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.19 0756/1157] clk: qcom: ipq8074: SW workaround for UBI32 PLL lock Date: Mon, 15 Aug 2022 20:01:52 +0200 Message-Id: <20220815180509.746385658@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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