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 B6F8FC77B73 for ; Thu, 20 Apr 2023 10:03:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8FB0C8630E; Thu, 20 Apr 2023 12:02:49 +0200 (CEST) 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 75CF78630D; Thu, 20 Apr 2023 12:02:47 +0200 (CEST) Received: from mail-m11880.qiye.163.com (mail-m11880.qiye.163.com [115.236.118.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CA5A4862F8 for ; Thu, 20 Apr 2023 12:02:43 +0200 (CEST) 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-m11880.qiye.163.com (Hmail) with ESMTPA id BA3982016A; Thu, 20 Apr 2023 18:02:30 +0800 (CST) Message-ID: Date: Thu, 20 Apr 2023 18:02:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v2 11/17] mmc: rockchip_sdhci: Fix HS400 and HS400ES mode on RK3568 Content-Language: en-US To: Jonas Karlman , Simon Glass , Philipp Tomsich , Peng Fan , Jaehoon Chung Cc: u-boot@lists.denx.de, Eugen Hristev , Yifeng Zhao References: <20230418164618.2571309-1-jonas@kwiboo.se> <20230418164618.2571309-12-jonas@kwiboo.se> From: Kever Yang In-Reply-To: <20230418164618.2571309-12-jonas@kwiboo.se> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZQkNDTVZITR5LSBkYTEkfTx5VEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSkpLSEpMVUpLS1VLWQ Y+ X-HM-Tid: 0a879e1d92cb2eb6kusnba3982016a X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Pk06Ayo*Dj0XKBULMx03HgNK AQ8aCTZVSlVKTUNKQkNPQk5KSENPVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlOQ1VJSVVMVUpKT1lXWQgBWUFITE5CNwY+ 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.8 at phobos.denx.de X-Virus-Status: Clean On 2023/4/19 00:46, Jonas Karlman wrote: > Adjust tap number for transmit clock, tap number and delay number for > strobe input to fix HS400 modes on RK3568. > > New values have been picked from vendor kernel and u-boot and have > successfully been tested with rock-3a-rk3568_defconfig and > > CONFIG_MMC_HS200_SUPPORT=y > CONFIG_MMC_HS400_SUPPORT=y > CONFIG_MMC_HS400_ES_SUPPORT=y > CONFIG_MMC_SPEED_MODE_SET=y > > using the following command to switch mode and then read 512 MiB of data > from eMMC into memory, > > => mmc dev 0 0 && mmc info && mmc read 10000000 2000 10000 > > for each of the modes below. > > 0 = MMC legacy > 1 = MMC High Speed (26MHz) > 3 = MMC High Speed (52MHz) > 4 = MMC DDR52 (52MHz) > 10 = HS200 (200MHz) > 11 = HS400 (200MHz) > 12 = HS400ES (200MHz) > > Signed-off-by: Yifeng Zhao > Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang Thanks, - Kever > --- > v2: > - Add Signed-off-by tag > > drivers/mmc/rockchip_sdhci.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c > index bcf65e091741..12a616d3dfb8 100644 > --- a/drivers/mmc/rockchip_sdhci.c > +++ b/drivers/mmc/rockchip_sdhci.c > @@ -69,13 +69,13 @@ > #define DWCMSHC_EMMC_DLL_DLYENA BIT(27) > #define DLL_RXCLK_NO_INVERTER BIT(29) > #define DLL_RXCLK_ORI_GATE BIT(31) > -#define DLL_TXCLK_TAPNUM_DEFAULT 0xA > +#define DLL_TXCLK_TAPNUM_DEFAULT 0x10 > #define DLL_TXCLK_TAPNUM_FROM_SW BIT(24) > -#define DLL_STRBIN_TAPNUM_DEFAULT 0x8 > +#define DLL_STRBIN_TAPNUM_DEFAULT 0x4 > #define DLL_STRBIN_TAPNUM_FROM_SW BIT(24) > #define DLL_STRBIN_DELAY_NUM_SEL BIT(26) > #define DLL_STRBIN_DELAY_NUM_OFFSET 16 > -#define DLL_STRBIN_DELAY_NUM_DEFAULT 0x16 > +#define DLL_STRBIN_DELAY_NUM_DEFAULT 0x10 > > #define DLL_LOCK_WO_TMOUT(x) \ > ((((x) & DWCMSHC_EMMC_DLL_LOCKED) == DWCMSHC_EMMC_DLL_LOCKED) && \