Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D524EC64ED6 for ; Tue, 28 Feb 2023 03:46:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2B65D85932; Tue, 28 Feb 2023 04:46:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 325FB85953; Tue, 28 Feb 2023 04:46:52 +0100 (CET) Received: from mail-m11874.qiye.163.com (mail-m11874.qiye.163.com [115.236.118.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DD5CF856C0 for ; Tue, 28 Feb 2023 04:46:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [172.16.12.93] (unknown [58.22.7.114]) by mail-m11874.qiye.163.com (Hmail) with ESMTPA id 888933C0181; Tue, 28 Feb 2023 11:46:35 +0800 (CST) Message-ID: Date: Tue, 28 Feb 2023 11:46:35 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] clk: rockchip: rk3568: add more supported clk rates for sdmmc and emmc Content-Language: en-US To: Vasily Khoruzhick , Lukasz Majewski , Sean Anderson , Simon Glass , Philipp Tomsich , Akash , u-boot@lists.denx.de References: <20230223210332.108763-1-anarsoul@gmail.com> From: Kever Yang In-Reply-To: <20230223210332.108763-1-anarsoul@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGkxCSFYdTkhKGRlJQx4dSkhVEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSkpLSEpMVUpLS1VLWQ Y+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OVE6CDo6CT0JIkgIKEwoFywf KklPCTpVSlVKTUxMTk5OQkJNSUtCVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlOQ1VJSVVMVUpKT1lXWQgBWUFJTE5INwY+ X-HM-Tid: 0a869621144d2eb0kusn888933c0181 X-HM-MType: 1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 2023/2/24 05:03, Vasily Khoruzhick wrote: > SDHCI driver may attempt to set 26MHz clock, but clk_rk3568 > will return error in this case. Apparently, SDHCI silently ignores the > error and as a result eMMC initialization fails. > > Add 25 MHz and 26 MHz clk rates for sdmmc and emmc on rk3568 to fix that. > > Signed-off-by: Vasily Khoruzhick Reviewed-by: Kever Yang Thanks, - Kever > --- > drivers/clk/rockchip/clk_rk3568.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/clk/rockchip/clk_rk3568.c b/drivers/clk/rockchip/clk_rk3568.c > index c83ae22dc3..253b69504f 100644 > --- a/drivers/clk/rockchip/clk_rk3568.c > +++ b/drivers/clk/rockchip/clk_rk3568.c > @@ -1443,6 +1443,7 @@ static ulong rk3568_sdmmc_set_clk(struct rk3568_clk_priv *priv, > switch (rate) { > case OSC_HZ: > case 26 * MHz: > + case 25 * MHz: > src_clk = CLK_SDMMC_SEL_24M; > break; > case 400 * MHz: > @@ -1632,6 +1633,8 @@ static ulong rk3568_emmc_set_clk(struct rk3568_clk_priv *priv, ulong rate) > > switch (rate) { > case OSC_HZ: > + case 26 * MHz: > + case 25 * MHz: > src_clk = CCLK_EMMC_SEL_24M; > break; > case 52 * MHz: