From patchwork Thu Feb 25 09:52:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 12103759 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72709C433DB for ; Thu, 25 Feb 2021 09:53:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ED0ED64EDB for ; Thu, 25 Feb 2021 09:53:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED0ED64EDB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=DBKLiiqIj8fwLezYYJ1pFuJZ5H22c7ZHr+zdTSyM/uQ=; b=aDi48aBUHfGGIhle4lcuMKWZWb Bm5TRKo29oHf+ySkJhAPeRUGVhpQUBxxSRdgz4UDppXmoig/P/vlOxV+ehUcyNma89Gi2c3WvpJHl 4e10haJteAkAt9FtzJkVQY7vcxycpq+Zy3A9tT0LFaPnPpBxxj9OP5cF+5A4NHwHB7oiNmpr6Klkt ZEEtjL5QalV/BhVMhO5O/JyZXvJY0mrZhPyxJlpmDc3xjkpxr+B1hpo2qZ0iDYRHFPJ+Lkl9ujdUB 1xcaam3Kd97GAwwh2wcxiSs9Mm+y5wSrKB3rS4wvZhp/KtEJEiRaiNLPv6+s376hYGS6KP9gOPz08 9VvA+SSA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFDJy-0007yH-HB; Thu, 25 Feb 2021 09:52:34 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFDJs-0007vS-28; Thu, 25 Feb 2021 09:52:29 +0000 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 6996CAC1D; Thu, 25 Feb 2021 09:52:25 +0000 (UTC) From: Nicolas Saenz Julienne To: linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org Subject: [RFC 0/2] sdhci-iproc CMD timeouts Date: Thu, 25 Feb 2021 10:52:14 +0100 Message-Id: <20210225095216.28591-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210225_045228_241373_DE7549A7 X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: f.fainelli@gmail.com, tim.gover@raspberrypi.com, sbranden@broadcom.com, alcooperx@gmail.com, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, phil@raspberrypi.com, Nicolas Saenz Julienne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org I'm seeing a rather odd behavior from sdhci-iproc's integration in BCM2711 (Raspberry Pi 4's SoC), and would appreciate some opinions. The controller will timeout on SDHCI CMDs under the following conditions: - No SD card plugged in (the card polling thread is running, CD irq disabled). - BCM2711's VPU clock[1] configured at 500MHz or more, lower clocks are OK. There is no specific command that will time out, it seems random. Here's what I found out. The SDHCI controller runs at 100MHz, by bumping the frequency to 150MHz the issue disapears. Might be pure luck, or maybe I hit the nail and it's proper interference. Can't say. Regards, Nicolas --- [1] For those who are not aware, here's the relationship between VPU's clock and emmc2's: osc 54000000 plld 3000000091 plld_per 750000023 emmc2 149882908 pllc 2999999988 pllc_core0 999999996 vpu 499999998 Nicolas Saenz Julienne (2): ARM: dts: Fix-up EMMC2 controller's frequency mmc: sdhci-iproc: Set clock frequency as per DT arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 6 ++++++ drivers/mmc/host/sdhci-iproc.c | 10 ++++++++++ 2 files changed, 16 insertions(+)