Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3198075pxp; Mon, 14 Mar 2022 13:08:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGMDnS59qu+2gDiQLDl1HXp/4+UGgmoEsIRZOF3hfAYKoDyFAAj8TFoa3Oi9OidpYLcbdT X-Received: by 2002:a05:6a00:2450:b0:4f7:bf07:c063 with SMTP id d16-20020a056a00245000b004f7bf07c063mr9064113pfj.51.1647288485778; Mon, 14 Mar 2022 13:08:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647288485; cv=none; d=google.com; s=arc-20160816; b=RyDHGDy+mNatdYVCGl4M3M2JOWNyvfznmkrRBOZUN4wOzz5smPipq5w2p7+sun0EeE /5T/wYYroHQ24vAQU4PneXKFOftes0Lduxg1JSvaW3K3G8mN4ZldVKWhi72B2Mm7aAwd w1LzKh98C29IoS7J/1I5KbUyuUGDJ1Fix6wAusAkU/UFVFp2HjOAGfzHRkHH6jTHSE2k rdp4XsUeFHnxiUwoUsHEbCUda+DruzRZ/sS+t/oVMHnLnLXDuiE9EFw46pHNhLqr30I1 Ip5NjSDNOTNzecdNEzKSW4a/f9nN8Gx6867Gihgu9xX9/s93SFEWZpwoY+1kDOW/CM/G ga7g== 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=HUxcmcsXfiuIi5x8jnA0NVerHEc43Nn929LwBq1P3p8=; b=xlO1vS4dCUQN9SeZj2uUD/1PLZt0uvRx4z42Vt9vg2SWBuXB4NiZUNAxk2xzhRZwBi Vs9/ocChMFySe0Cnypu4JRW8badFg39q8pbXZ3OzHrRHTNctm/w5DsFzN1xPBc9KGnBM uaeqvq+Neb8Nn0LSe2rEBz6Visrq22XXz2YXp0apxSAivwVE5hgaOwx2qyTyh7cQiq+e yKfiV+wpGvwVlZl2yfvHGF+6TXyn6agG5lk7IDdqprSiAjEVRuV14obqtJwvPkTN91Us /+dWt+DjC++HjBREWhkBZk17nf/hp6YffmyYO5b8juFM+Isnbu6Mmsp+1q6V+zidcHBg jlhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rYU26h+b; 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 z1-20020a170902708100b0014f9099a17asi16004099plk.273.2022.03.14.13.07.13; Mon, 14 Mar 2022 13:08:05 -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=rYU26h+b; 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 S240804AbiCNMMT (ORCPT + 99 others); Mon, 14 Mar 2022 08:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241321AbiCNMIh (ORCPT ); Mon, 14 Mar 2022 08:08:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A35C4504B; Mon, 14 Mar 2022 05:04:57 -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 21FFBB80DED; Mon, 14 Mar 2022 12:04:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39C10C340E9; Mon, 14 Mar 2022 12:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647259494; bh=oVlhXAJLdhxfU/4NKvyFlxWx+GgAVon1B+jYTpfRdyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rYU26h+bzC8VcX4sXpCM8sBQgHVUz2g3Svpg06vihTP0lnZH2YIXa414Ety1yva4Z PHqztFsftDpwn6s0A8sRmzlsrC3ir3XxCtfFjqZikanv6l8osopiz8xs5irD1EdxWg H0MyjptPwwsLadE5NDLhKa7ZwKl4EG2AODgvnXdQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Andersson , Vinod Koul , Dmitry Baryshkov , Sasha Levin Subject: [PATCH 5.15 002/110] arm64: dts: qcom: sm8350: Correct UFS symbol clocks Date: Mon, 14 Mar 2022 12:53:04 +0100 Message-Id: <20220314112743.099608119@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112743.029192918@linuxfoundation.org> References: <20220314112743.029192918@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 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: Bjorn Andersson [ Upstream commit 0fd4dcb607ce29110d6c0b481a98c4ff3d300551 ] The introduction of '9a61f813fcc8 ("clk: qcom: regmap-mux: fix parent clock lookup")' broke UFS support on SM8350. The cause for this is that the symbol clocks have a specified rate in the "freq-table-hz" table in the UFS node, which causes the UFS code to request a rate change, for which the "bi_tcxo" happens to provide the closest rate. Prior to the change in regmap-mux it was determined (incorrectly) that no change was needed and everything worked. The rates of 75 and 300MHz matches the documentation for the symbol clocks, but we don't represent the parent clocks today. So let's mimic the configuration found in other platforms, by omitting the rate for the symbol clocks as well to avoid the rate change. While at it also fill in the dummy symbol clocks that was dropped from the GCC driver as it was upstreamed. Fixes: 59c7cf814783 ("arm64: dts: qcom: sm8350: Add UFS nodes") Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20211222162058.3418902-1-bjorn.andersson@linaro.org Signed-off-by: Sasha Levin --- arch/arm64/boot/dts/qcom/sm8350.dtsi | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi index 09d919793758..a8886adaaf37 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -35,6 +35,24 @@ sleep_clk: sleep-clk { clock-frequency = <32000>; #clock-cells = <0>; }; + + ufs_phy_rx_symbol_0_clk: ufs-phy-rx-symbol-0 { + compatible = "fixed-clock"; + clock-frequency = <1000>; + #clock-cells = <0>; + }; + + ufs_phy_rx_symbol_1_clk: ufs-phy-rx-symbol-1 { + compatible = "fixed-clock"; + clock-frequency = <1000>; + #clock-cells = <0>; + }; + + ufs_phy_tx_symbol_0_clk: ufs-phy-tx-symbol-0 { + compatible = "fixed-clock"; + clock-frequency = <1000>; + #clock-cells = <0>; + }; }; cpus { @@ -462,9 +480,9 @@ gcc: clock-controller@100000 { <0>, <0>, <0>, - <0>, - <0>, - <0>, + <&ufs_phy_rx_symbol_0_clk>, + <&ufs_phy_rx_symbol_1_clk>, + <&ufs_phy_tx_symbol_0_clk>, <0>, <0>; }; @@ -1082,8 +1100,8 @@ ufs_mem_hc: ufshc@1d84000 { <75000000 300000000>, <0 0>, <0 0>, - <75000000 300000000>, - <75000000 300000000>; + <0 0>, + <0 0>; status = "disabled"; }; -- 2.34.1