Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1864634rwb; Fri, 19 Aug 2022 10:39:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR6liqPGvRQ08qySmyfwcbULwbdRUO16sCc3pQHYAznMEK/rdLKTP8BlflxVntDmJfl2f3Z4 X-Received: by 2002:a05:6402:2684:b0:43d:9964:d2a0 with SMTP id w4-20020a056402268400b0043d9964d2a0mr6972679edd.250.1660930781032; Fri, 19 Aug 2022 10:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930781; cv=none; d=google.com; s=arc-20160816; b=VTnOpPL/i6qFJzUKMHce/l6fTxkA7SNLPRReFHqiF+/FWlD+cLzGKFYh4Tmzm8+u87 KmbFQyiRkVBbC9qW1hcjdYy37lYeiY18QoLUtHIMPGn0YPPO7FE2/3LOFm4kfKMh8PEY xYF/5HrDlpEihbSM1J1aVcu2eJpgsChbXH3yqek7lNipZ3xV6Gkw4ACWGP0vwwIt0K5Q hg6FzAG8MIlrsT21NuLncizx0LYnb5KlExhWncCMTgW9K/LCga/pRSBYSqh12VR8V3VE 4e3+Jc+cQiVIewgMPe/u3vpnzn8ElXsspzpNaNmSxtCtP9bRydxEO4Af8HON/+e+zbRV 16yg== 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=E/Kse6+PkYUhpznGwDJBBttBlaVmdDfsMtc2c68CgJkXxjH5cIXIMJHFYaUtp+8gdx 7gkcHvCgMfAFx49uSc1aHDZ7ZA6wMi3eMqyVSnKE+x42F/MVUJ6e5o/P7y9wt+/IT/wg dF79x7ODfdjE/AAG4Ycu4m1Aq9bforD+x2e/8kcGHywNWv3IJ+s/968DXbjPt0egaZJK pqd/vQHnb58yWWFE7vQ4hpCuBAU9baMAVC9/thg9n2feSnUNk0CnzhfGBlTaVHpIXUqQ Lu8x5t1zPflLIs52Nyhi+qcqE3TVefaNl5/Aw/Ygs3EoSdclRRRhmF24STZMYJ2tlThx 59Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UtEhaITq; 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 eh1-20020a0564020f8100b0043e33c1d5eesi3009985edb.230.2022.08.19.10.39.15; Fri, 19 Aug 2022 10:39:41 -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=UtEhaITq; 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 S1352560AbiHSQXW (ORCPT + 99 others); Fri, 19 Aug 2022 12:23:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352880AbiHSQSB (ORCPT ); Fri, 19 Aug 2022 12:18:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2555E1184D3; Fri, 19 Aug 2022 09:00:58 -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 677266178A; Fri, 19 Aug 2022 16:00:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C655C433C1; Fri, 19 Aug 2022 16:00:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924834; bh=Sl8pAt6Q0dhidSZAmwSvNFkkV5IgZon/SaDP+uWCIr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UtEhaITqvq7v2/yeDgKDD5/TybOH8qurl1X5pfbFdqx/D3qxvodg6KQAizNURy9IU Lj2c0XKbgSjPZA9fB37nwb+Fe2NT1Zi1D2rKxd0IMYJ19Z2bR8lZXv20WM0CuLySxF g5iMUu6Ko25uwb4pj0OkytS1VJWksvQo/34+LPD0= 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.10 297/545] clk: qcom: ipq8074: SW workaround for UBI32 PLL lock Date: Fri, 19 Aug 2022 17:41:07 +0200 Message-Id: <20220819153842.623711925@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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