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 32F61C77B73 for ; Thu, 27 Apr 2023 14:45:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C1100862A0; Thu, 27 Apr 2023 16:45:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="SEcpijug"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4C4B1862C3; Thu, 27 Apr 2023 16:45:49 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) (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 69EC586157 for ; Thu, 27 Apr 2023 16:45:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=eugen.hristev@collabora.com Received: from [192.168.0.125] (unknown [82.76.24.202]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ehristev) by madras.collabora.co.uk (Postfix) with ESMTPSA id 75D8266003AC; Thu, 27 Apr 2023 15:45:44 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1682606745; bh=mVTY6HI2DTLbFFHBxE8Yfmn3WrM2mj3BVXW07ddRtgE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SEcpijugG94AE/4gSSjMKRzZd24+FjvOqcg94uy53iQxf7Z2X0hbr7y5knj6TVKDj krUW07h1lqRvXGyFI8qnJWYfep70E5KfTohIyR/CGSigv8g8ZsE7JWYiF7eIxzWsNY iipabwzlRcuTFBauGkJQG+3sOKcd7Tjz4iX/Ekx323i+knaYAym3Q5PIWhoQxdV1F5 yA5LTIzrlIfZsRIsJsXE25ahez/Q7A4+NFmcULpaiQo/O+6kO2NhEiU2G1kmkchZL+ Fu/8FOkzIJYdnS5EyXs2aIFHNFMfyTvPMHNgKTSkaqtoEytrzh2BCEtWLWZGJLPkLu r7mrRa/uZuSjA== Message-ID: <5ee2f78d-9edb-eb5a-3523-99c10b8d7db0@collabora.com> Date: Thu, 27 Apr 2023 17:45:41 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2 00/17] rockchip: eMMC fixes for RK3568 and support for RK3588 Content-Language: en-US To: Jonas Karlman , Kever Yang , Simon Glass , Philipp Tomsich Cc: u-boot@lists.denx.de References: <20230418164618.2571309-1-jonas@kwiboo.se> From: Eugen Hristev In-Reply-To: <20230418164618.2571309-1-jonas@kwiboo.se> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 4/18/23 19:46, Jonas Karlman wrote: > This series fixes eMMC HS400 modes on RK3568 and add support for RK3588. > > It has been tested with rock-3a-rk3568/rock5b-rk3588 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) > > All reads have reported OK, prior to this some of these modes worked and > others failed. > > Patch 1-2 fixes an issue with high-speed bit and uhs speed mode field. > Patch 3-6 refactors the rk3568 driver to use set_clock and config_dll > ops, so that clocks and regs are changed when output clock is disabled. > Patch 7-10 continues refactoring and simplification of the driver. > Patch 11-12 updates tap and delay values to fix HS400 modes on RK3568. > Patch 13-15 adds support for RK3588 to driver and device tree. > Patch 16-17 adds workarounds needed to use PIO mode in SPL to > successfully load TF-A into SRAM when booting from eMMC on RK3588. > > Note that this series does not include any change to defconfigs to > enable HS200/HS400/HS400ES modes. > > Changes in v2: > - Add Signed-off-by tag and update commit message with a note from where > reg-values originates from > - Rename quirks to flags > - Use driver data for hs200/hs400 txclk tapnum values > - Change u-boot,dm-spl to bootph-pre-ram > > This series require working pinctrl, see [1]. A copy of this series and > its dependencies can be found at [2]. > > [1] https://patchwork.ozlabs.org/project/uboot/patch/20230315153215.389809-1-eugen.hristev@collabora.com/ > [2] https://github.com/Kwiboo/u-boot-rockchip/commits/rk35xx-emmc-v2 > > Jonas Karlman (16): > mmc: sdhci: Fix HISPD bit handling for MMC HS 52MHz mode > mmc: sdhci: Set UHS Mode Select field for UHS SDR25 mode > mmc: rockchip_sdhci: Fix use of device private data > mmc: rockchip_sdhci: Remove unneeded emmc_phy_init ops > mmc: rockchip_sdhci: Add set_clock and config_dll sdhci_ops > mmc: rockchip_sdhci: Use set_clock and config_dll sdhci_ops > mmc: rockchip_sdhci: Refactor execute tuning error handling > mmc: rockchip_sdhci: Update speed mode controls in set_ios_post > mmc: rockchip_sdhci: Remove empty get_phy and set_enhanced_strobe ops > mmc: rockchip_sdhci: Rearrange and simplify used regs and flags > mmc: rockchip_sdhci: Fix HS400 and HS400ES mode on RK3568 > rockchip: rk3568-rock-3a: Enable support for more eMMC modes > mmc: rockchip_sdhci: Add support for RK3588 > rockchip: rk3588-rock-5b: Include eMMC node in SPL dtb > clk: rockchip: rk3588: Add limited TMCLK_EMMC clock support > mmc: rockchip_sdhci: Limit number of blocks read in a single command > > Peter Geis (1): > mmc: sdhci: Allow disabling of SDMA in SPL > > arch/arm/dts/rk3568-rock-3a-u-boot.dtsi | 8 + > arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 12 +- > arch/arm/dts/rk3588s-u-boot.dtsi | 4 + > configs/rock5b-rk3588_defconfig | 1 + > drivers/clk/rockchip/clk_rk3588.c | 2 + > drivers/mmc/Kconfig | 8 + > drivers/mmc/rockchip_sdhci.c | 309 +++++++++++++----------- > drivers/mmc/sdhci.c | 13 +- > 8 files changed, 215 insertions(+), 142 deletions(-) > Hi Jonas, I saw in the logs you provided in the series that the SPL should also work in eMMC in rk3588, however, I am getting this error on my rock5b : Trying to boot from MMC2 spl: mmc boot mode: raw hdr read sector 4000, count=1 mmc_load_image_raw_sector: mmc block read error Do you have any idea of what's going wrong ? Thanks ! Eugen