From patchwork Mon Mar 22 18:58:13 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: 12155937 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=-12.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 63827C433E4 for ; Mon, 22 Mar 2021 19:01:35 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 EFE5161998 for ; Mon, 22 Mar 2021 19:01:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFE5161998 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc: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=KFJrMQ0I9CHtXAEKp3Swshu/27u2xiA5PG2uIHEr0IA=; b=TjhIrJpdr8Ezk34MKV6qyTDrqN bASXVHG9kKgMsiewUw9Yl0Vd5KoJ9kL8CHofV2KXIR3LDX0j8bDoZP+fEHeeFPnq6HbkbQaCl9aQs yagZW7Bk5IGy9PQlSth4LXbb9qHOxmG8kTl3GfLjBsQLU4Nmf/9y7BHFGTkdA5iYhk91EU1BKdmeg JZDmX1gAU1gkfYX4Syc0YKmidBQ7rXQzAARir0uuyzGnG05a2p7n5holN9LuD+lbG94QbDAC1Yihk Es9j/WfucyhpCB9gC5YB7T2WS0jxKWo7nsnUrObJmMrhwy8K+UW91bAERAS1PMClXch1atwdKGEr/ +egl2sHQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOPlt-00CN3f-8b; Mon, 22 Mar 2021 18:59:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOPlo-00CN2J-Uy; Mon, 22 Mar 2021 18:59:22 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id B511061994; Mon, 22 Mar 2021 18:59:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616439559; bh=ma5DQZiST6UuyaXhG1RK3qqQkaUKYMAQFWfliR48sPE=; h=From:To:Cc:Subject:Date:From; b=SSE65I6P2nTrfma4pzn7lsxd92K0aAl/O+XlncTRhO8W0n5ebTr9vJiqrSGp9SFU4 ZuF0GnSFVn9cAGDPux0FfqWjdO0+iYQsqrkuwY5exIOyI3baeOdK7kKv8RsFmIuYdU V/EptWkZNcZwK0+OM4XQMAUwKZck6lsb7syKaECwiwy8A+p05qeIqTbB5LH2mJTwrF ie89t+Tao0fEir6bV9rwwCgOTJqUJBl/eap9BV3oapVQ0gYdhpgwN8uIuUkiFW1Jgk PA7jyPVE5kP94PsnmLPjtk603Do6P80UFGHG9mxQXQIJ0M9+pbkBIBgI0m7OQrFTIq As88LluFAuPYg== 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, Saenz Julienne Cc: f.fainelli@gmail.com, phil@raspberrypi.com, tim.gover@raspberrypi.com, adrian.hunter@intel.com, sbranden@broadcom.com, alcooperx@gmail.com, nsaenzjulienne@suse.de, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org Subject: [PATCH 0/4] BCM2711's sdhci-iproc CMD timeouts Date: Mon, 22 Mar 2021 19:58:13 +0100 Message-Id: <20210322185816.27582-1-nsaenz@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210322_185921_302085_BB34FB8B X-CRM114-Status: UNSURE ( 7.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series tries to address rather odd behavior from BCM2711's integration of sdhci-iproc (Raspberry Pi 4's SoC). 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 configured at 500MHz or more, lower clocks are OK. There is no specific command that will time out, it seems random. I found out that by bumping the controller's frequency to 150MHz the issue disapears. So let's do that. Regards, Nicolas --- Nicolas Saenz Julienne (4): dt-bindings: mmc: iproc-sdhci: Convert to json-schema dt-bindings: mmc: iproc-sdhci: Add clock-frequency support mmc: sdhci-iproc: Set clock frequency as per DT ARM: dts: Fix-up EMMC2 controller's frequency .../bindings/mmc/brcm,iproc-sdhci.yaml | 64 +++++++++++++++++++ .../bindings/mmc/brcm,sdhci-iproc.txt | 37 ----------- arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 6 ++ drivers/mmc/host/sdhci-iproc.c | 10 +++ 4 files changed, 80 insertions(+), 37 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt