Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp563975imm; Thu, 26 Jul 2018 08:14:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfJE3i+NNK5xeNPJr0DuAq82gfnaPk6GiiF9bA2KgSXvB6hf/RA9twr27/bcw/wKlynCbiJ X-Received: by 2002:a17:902:b205:: with SMTP id t5-v6mr2325422plr.220.1532618072838; Thu, 26 Jul 2018 08:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532618072; cv=none; d=google.com; s=arc-20160816; b=Ixpz6FPif2bOdIsXmFpZ8OWPh4etB29clyTQ5ZhasKp2bWbVCclb+nnWZ6cnb+HeD/ V1jixy5ylQwhMH72N+DPbuY497sLv5M7IXhK59e8KqIL9Dug2fEFfJbgno4G+KhxUQqn 762xGOy28cBicZ98w8MrltCjDnVC1WLFMejMkRoLk85Hrdjc5RdiSdeTlcffpMYmKj7D rijssxSNG0o9bVvXpyCq2GphTEmmbrk9hxDZmWAV6KqlNfuIyQTiAiVE4ym5jsM40kGA kB6k9yAsYPyjrx5vg8hGs5j5NALfMu3Mwd3YBGlWlvjNO78oUnNn9HpUE3QOsVFaMGbE YAhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=3P0LrC/H2rDXehh9YBobksQfHOLq3sLwcW8yhCbsXR8=; b=iOKxxaOBN/WcxnBpB4PP4+4k104od08LbSL0p3F3d3oQm7QYwea8+BOBUnHUrcFI3J DPGmYgKvK4n4k7O/FOca9rxedsieYKLL6c9SesYf5bApFyOryp40H/8sVjkm8mTYh6J9 KNaBoZvQGvMu6mW2FbrPhuECGJ0BXtenpK2TW2pdUQq6E7lSYyAYxdtntwOkdVHJWdLi kEbtyWFWGQ7+tvW8enrvmcKgSTGAXT10PmZOtumr3obDa5HuM0bCN+rMPxyCIs1nPqR3 tgVn8PNjfMlNomqrB79WSskUgs1/YzlHG9IV54bksk87fBFi+sZjRY470crUxGlrh2ll gm4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KlEdJUeT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2-v6si1236191plm.202.2018.07.26.08.14.17; Thu, 26 Jul 2018 08:14:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KlEdJUeT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731667AbeGZQ3o (ORCPT + 99 others); Thu, 26 Jul 2018 12:29:44 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:41064 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729923AbeGZQ3o (ORCPT ); Thu, 26 Jul 2018 12:29:44 -0400 Received: by mail-qt0-f194.google.com with SMTP id e19-v6so1880273qtp.8; Thu, 26 Jul 2018 08:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3P0LrC/H2rDXehh9YBobksQfHOLq3sLwcW8yhCbsXR8=; b=KlEdJUeTl+BM+nPJIwe0TtHxGRV74OgsgCy/M7EoAYy2Y0dDIRSZ7rCV6BkTcxpo/F wMtlia2Tjr4VLWUsfh4lOd3XcZm5NoueeTKAzrb9+AAkkoTOTiGjVth4wWhLkeiNmNpY lepoX4hyg8X26ld3A7hWP5w5RVvxLdoYEcqQFlvkgpmaQcqUew5Ki0f7eTMuKXarj8Fh 4+4hmTXkDtdywguoECMrd1AOG25fZpVfYpO0Y7N6DM3qCESeKy2mHhK0SDRCXqHaM9Ez 4wzD7HZDWGKrRWFmxR3T96h+FQ1CBqhNKn8zIS8JqevF2A+CukcgI6WUZn/ncKaAptlC QszQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3P0LrC/H2rDXehh9YBobksQfHOLq3sLwcW8yhCbsXR8=; b=AUiyET9IsjPxIhQpl7ZlPux1bHzzL2/qyGza0fNVnLkDLcuZK7MmUqtrVElnK0bpAW BcAodzIeCifkBKN0eQYqF3oKjdggnbUroPhWmohBIWDrFhVHwv/MdgpWAkf/Z+9/w9xZ hDan8EJtQFvArUptDJABzdrGdSaNL1MkPNorlIOX1mqOEkrJVWSfAUBhIKr3/ZjRKTcm 9iwW7KS9FD3RDGsAPo/lPdn4+MpN23O6PalA97JaKJIzcZ5i5A9pFxENurD1J/CCdbQM SKI+YlzioTZzl+gbZa214DoSpNP9ZaiFPpIj6AJl1KzXYhInQ7p+pzKperjitRLG2B5f Sygg== X-Gm-Message-State: AOUpUlHl8X2F9c8cIaXh7iRM740Zti8X3XU/GziQKs2rXsFuaMv5kxAX qNj/lgZC3XObwiBpsnbRz6Awmiwfixk= X-Received: by 2002:aed:3b3c:: with SMTP id p57-v6mr2244782qte.153.1532617945747; Thu, 26 Jul 2018 08:12:25 -0700 (PDT) Received: from [192.168.44.96] (42.sub-174-226-17.myvzw.com. [174.226.17.42]) by smtp.gmail.com with ESMTPSA id i32-v6sm895474qtb.21.2018.07.26.08.12.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 08:12:25 -0700 (PDT) Subject: Re: [PATCH 3/3] mmc: tegra: prevent ACMD23 on Tegra 3 To: Stefan Agner Cc: adrian.hunter@intel.com, ulf.hansson@linaro.org, thierry.reding@gmail.com, jonathanh@nvidia.com, marcel.ziswiler@toradex.com, linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180712073904.4705-1-stefan@agner.ch> <20180712073904.4705-3-stefan@agner.ch> <430c718d-9ede-d47a-44c0-b8e47e297720@gmail.com> <1553c44e99b96a813af129d1c4169222@agner.ch> From: Peter Geis Message-ID: <553f9ed6-8f7c-775b-d731-fd9732f74b07@gmail.com> Date: Thu, 26 Jul 2018 11:12:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1553c44e99b96a813af129d1c4169222@agner.ch> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/26/2018 10:47 AM, Stefan Agner wrote: > On 26.07.2018 15:56, Peter Geis wrote: >> On 07/12/2018 03:39 AM, Stefan Agner wrote: >>> It seems that SD3.0 advertisement needs to be set for higher eMMC >>> speed modes (namely DDR52) as well. The TRM states that the SD3.0 >>> advertisement bit should be set for all controller instances, even >>> for those not supporting UHS-I mode... >>> >>> When specifying vqmmc-supply as a fixed 1.8V regulator on a Tegra >>> SD/MMC instance which is connected to a eMMC device, the stack >>> enables SD3.0. However, enabling it has consequences: If SDHCI 3.0 >>> support is advertised the stack enables Auto-CMD23. Unfortunately >>> Auto-CMD23 seems not to work well with Tegra 3 currently. It leads >>> to regular warnings: >>> mmc2: Got command interrupt 0x00010000 even though no command operation was in progress. >>> >>> It is not entirely clear why those errors happens. It seems that >>> a Linux 3.1 based downstream kernel which has Auto-CMD23 support >>> does not show those warnings. >>> >>> Use quirk SDHCI_QUIRK2_ACMD23_BROKEN to prevent Auto-CMD23 being >>> used for now. With this the eMMC works stable on high-speed mode >>> while still announcing SD3.0. >>> >>> This allows to use mmc-ddr-1_8v to enables DDR52 mode. In DDR52 >>> mode read speed improves from about 42MiB/s to 72MiB/s on an >>> Apalis T30. >>> >>> Signed-off-by: Stefan Agner >>> --- >>> drivers/mmc/host/sdhci-tegra.c | 10 +++++++++- >>> 1 file changed, 9 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c >>> index 888a1ad511db..11c0b2069c7c 100644 >>> --- a/drivers/mmc/host/sdhci-tegra.c >>> +++ b/drivers/mmc/host/sdhci-tegra.c >>> @@ -336,7 +336,15 @@ static const struct sdhci_pltfm_data sdhci_tegra30_pdata = { >>> SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC | >>> SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, >>> .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN | >>> - SDHCI_QUIRK2_BROKEN_HS200, >>> + SDHCI_QUIRK2_BROKEN_HS200 | >>> + /* >>> + * Auto-CMD23 leads to "Got command interrupt 0x00010000 even >>> + * though no command operation was in progress." >>> + * >>> + * The exact reason is unknown, as the same hardware seems >>> + * to support Auto CMD23 on a downstream 3.1 kernel. >>> + */ >>> + SDHCI_QUIRK2_ACMD23_BROKEN, >>> .ops = &tegra_sdhci_ops, >>> }; >>> >> >> I finally got around to testing this on the Ouya (Tegra 3). > > Thanks for testing! > >> >> I found that the "Got command interrupt 0x00010000 even though no >> command operation was in progress." error occurred when the interface >> is unstable. >> I've had a lot of problems with sdmmc4 stability on the Ouya above 34 >> Mhz, probably due to the fact that they are using the internal cmd and >> clock pull-up resistors, against the TRM's instruction. >> At 39Mhz, I saw the error this patch corrects. >> With the patch, the error went away, but the interface is still >> unstable under load. > > How does this instability manifest exactly? > At the very edge of stability, you see write errors under heavy load. As clock rate increases, the write errors occur more frequently. At a certain point, you start getting read errors. Following that you get constant io errors during card probing. Eventually the emmc will fail to initialize, with errors 87 or 110. I've been tweaking the pull up/down values to try and improve the stability, but without access to anything but the TRM it's a lot of trial and error. >> >> Lowering down to 32Mhz, without the patch there are no errors. > > So the patch does not make it less stable right? > No, it did not affect stability. Although I'd conduct some performance testing to check for degradation. Of course I'm nowhere near the limits of the controller, so it is doubtful I'd see a hit. > -- > Stefan >