Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3057843pxf; Mon, 5 Apr 2021 01:56:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAmfzbYCmvEAe6uzG5xIzlHKWBqUWool3Ai+TTaPNIZMIszKMXaxIpi/fgag3R9qUbmvbW X-Received: by 2002:a05:6e02:f06:: with SMTP id x6mr19239078ilj.292.1617612983241; Mon, 05 Apr 2021 01:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617612983; cv=none; d=google.com; s=arc-20160816; b=n13Kj3xWDjPSKTIcqzwvLcyU8K8UE9xbXlMb/yAT8qMUAt6iQYmxfJ9rV+VcY03fho OvBUlkIB+uWqvc9COoVF7w/34cGHELP50aYKzfFJawmxdLSYTWoM0G6YtVbwtmHEjvbM j1AhpAxrwsBHd38mCd1P+rYsDrZTJITEEOQEwszlIzzvVMaBopsCRcV9jsfSy6oOZho1 NtPl5oFIhGjzxxz2B/m+Zi7MN12UASQ3ELtxFNhrz2ByR80Wz558rUg1viVSHEmycYN9 yNDrHmRjmdkOZJ6ITedG64qgGAlpnMS6jvtY65nBK3V6Fd4fGjSl3IgjblUIv1npAGGK 0sSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :date:cc:to:from:subject:message-id; bh=0U+csJxzGxX4hNr8YwZLcGPVIerLF3PvsjtxZr3ctdo=; b=HGMeRnWn9NbW0yps09jrc5LKuEeMSo0pYl+Sblht0C5f1VrKYHCkMsxmL3b7DNeZNx ol1LsWxnv2XxijHUlr7ce5KTwm/gnqOxR5Fq9RhRTNeLwjFaYtInfH5Z82EAfUWylr93 iUYcDLP0pfKvR8p3ryhQUAMdtsue9W5/v1Ulcx3htpKCXF5X+2CPEwEoj9dcQpEJkH07 z5daP55xX456uOsoXoX7SKvmobfZcuHQcwLH1cFkvZdrwof8sLnFe+nZZGyh88NPeYwl CED1usY/2Sak8Q/gE5B0uvi3Dexa0J/KphKgq2+ZdXtsFu1NgdxQsKhS/K2CRulhvOim jwBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si4561197ilo.116.2021.04.05.01.56.11; Mon, 05 Apr 2021 01:56:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232572AbhDEIpj (ORCPT + 99 others); Mon, 5 Apr 2021 04:45:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:36444 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231979AbhDEIpi (ORCPT ); Mon, 5 Apr 2021 04:45:38 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 163A1B12D; Mon, 5 Apr 2021 08:45:31 +0000 (UTC) Message-ID: <4d4e3de99dbee711cf47878bf98a7cc34c3f1e65.camel@suse.de> Subject: Re: [PATCH 4/4] ARM: dts: Fix-up EMMC2 controller's frequency From: Nicolas Saenz Julienne To: Alan Cooper Cc: Stefan Wahren , Nicolas Saenz Julienne , "moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE" , linux-mmc , DTML , BCM Kernel Feedback , linux-rpi-kernel@lists.infradead.org, Florian Fainelli , phil@raspberrypi.com, Tim Gover , Scott Branden , Adrian Hunter , ": Linux Kernel Mailing List" , Ulf Hansson , Rob Herring Date: Mon, 05 Apr 2021 10:45:29 +0200 In-Reply-To: References: <20210322185816.27582-1-nsaenz@kernel.org> <20210322185816.27582-5-nsaenz@kernel.org> <401100ea-90ad-57b1-50da-967118a090da@i2se.com> <78dec30c052e9bb76e52c38f3da5af371e5d65f5.camel@suse.de> <2d2a2638-8213-5d6e-0a3a-927ed5bb2ed7@i2se.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-38waL8wK1Aj1RRmL0Xy5" User-Agent: Evolution 3.38.4 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-38waL8wK1Aj1RRmL0Xy5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Alan, On Thu, 2021-04-01 at 11:23 -0400, Alan Cooper wrote: > Nicolas, >=20 > Sorry, I just noticed this thread. > This is a known bug in some newer Arasan cores. > The problem happens when the difference between the core clock and the bu= s > clock is too great. > Limiting the clock to 200KHz minimum should be a good fix. Great, that's what I was hoping to hear :). Out of curiosity, can you share more details on how the failure occurs? > In my experience, it's only eMMC that needs the clock to be retried > below 400KHz and not SD or SDIO. That's because the CMD signal for > eMMC starts out as open-drain during identification and the size of > the pull-up on the CMD signal can require the <400KHz clock. Once eMMC > is out of identification mode the CMD signal is switched to push-pull > and can run at much higher clock rates. Fair enough, I need to do some tests, some of the compute modules use an eM= MC. > I don't think that SD and SDIO have any open-drain signals, so they > shouldn't need to retry at slower clock speeds. Noted. > I'm trying to get more detail on the bug, like the exact ratio of core > clock to bus clock that causes the problem. When I first found this > bug I was told that the failure would not happen at 200KHz, but we > were using a 405MHz core clock. That would be nice to have. > One other question. Why are you using polling for the SD card, this > newer controller supports the interrupt driven "Card Inserted" signal > and avoids wasting time polling? I believe the line isn't routed on RPi4. > Al --=-38waL8wK1Aj1RRmL0Xy5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAmBqzikACgkQlfZmHno8 x/5vvAf+LwODH29W1eKi1mUblY7T8nHOw5yF+PQbXyMex7hzFkTJYqotZkZnT4RS +RAKLLEH8r+drFB3D2hz/TJEazqr6fvhiJMQlE5mZMsAY4fUhDJUcKuuPLgXidXM vDNEVEFnoshhZnX/cTNVaxdNBKEzUPCD85kbqZNScQFifR2BtiTFMcebavyVJHP2 ELOLaKtx1XaqEmtfxufzh6lFAHR9WTIRZffL4c+b8a90kdiApV8NV9RLILO5KIzx XNA+Zi0L0vfAGEGrNu397g9lkZPYq6VKOy/cwB9hmI1yiJOxLLeqaY5yQb96NtaY sZwwA0sB1TKPJXGdQVsX1Kt1+1SqIA== =H6cA -----END PGP SIGNATURE----- --=-38waL8wK1Aj1RRmL0Xy5--