From patchwork Sat May 8 20:56:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 12246247 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=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 B70AFC433B4 for ; Sat, 8 May 2021 20:59:38 +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 4D09D613F0 for ; Sat, 8 May 2021 20:59:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D09D613F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lynxeye.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=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=NIDawQdZPXoZlIF2vubMgHtZj0EJTvXEuFic2MnbTK8=; b=qAzBklrMLEZl28StT4Q+x6CguD hNfbP4dD0+tiFt5T9W1ITI7rAb/Iak2XUGw9hMnywtqRbIZtkkFEg71WtMBWUtNJhlMqniGhg27xe JCHU/vGbEs8vnVMPUVdvrs2bLyl8AOHyHla2wId9e/VnaPl34YS1Ey7yNHuD/MZ4tGDJ0hDF7i9YK z8bfVyVrlv4Rbi6TKmQ5kqfzFe39XfhMJjR5mNMnO0TsOes06WYzthaOEeD3FHbw0TMqUoaaYDb6j IhRq++T4T5i/CKlA9WRZZOGorMn7RlZH82KEeezmsPhVqWzYAWh19bsHaxp+oUpznObhDFich5rHg LZbpaKTQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfU19-00AKJC-8t; Sat, 08 May 2021 20:57:43 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfU16-00AKIw-DC for linux-arm-kernel@desiato.infradead.org; Sat, 08 May 2021 20:57:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=0eTY4vZSI+/lIy9Q0mlS2m9o7hwqH5QA3QX3BwfZqP8=; b=GBW5DgK3oxRZj92s8TRSZz7fWd D7Go1HNA77RcnReQrszBIutusd6rJRekmGsTqa5VFAEImmJRoHdxy1iq6Mxu5Zd1ZCvCSCKfVYJYF BKreOljLE21LrkHiumW5hAYoIuY+jMJaBMl8z504xzg9iRBkHeznBZx2ntgRcRCpNRxQOPa5Tpjgw sJ2/UNf5yynGc8BFBqcOonY6F4a8b9u/xjbYYG0oPnoXIUjKNpGIBK55MMu9+iBsGiENjNDI8aXPe 29QtbYkNLJL8woyIolDyvQeyaNWfwcJjqfRoG91mm/pvtkrB4bdPvrt951a9kjcn6j3VHP7yI3+w/ JDxKbvuQ==; Received: from ns.lynxeye.de ([87.118.118.114] helo=lynxeye.de) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfU13-007iTh-IP for linux-arm-kernel@lists.infradead.org; Sat, 08 May 2021 20:57:39 +0000 Received: by lynxeye.de (Postfix, from userid 501) id 0DA46E7425C; Sat, 8 May 2021 22:57:03 +0200 (CEST) Received: from astat.fritz.box (a89-183-71-68.net-htp.de [89.183.71.68]) by lynxeye.de (Postfix) with ESMTPA id B0865E74214; Sat, 8 May 2021 22:57:02 +0200 (CEST) From: Lucas Stach To: Rob Herring , Ulf Hansson , Adrian Hunter Cc: Pengutronix Kernel Team , Fabio Estevam , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] dt-bindings: mmc: add no-mmc-hs400 flag Date: Sat, 8 May 2021 22:56:57 +0200 Message-Id: <20210508205658.91105-1-dev@lynxeye.de> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210508_135737_802906_5FFD7DB1 X-CRM114-Status: GOOD ( 12.77 ) 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 HS400 requires a data strobe line in addition to the other MMC signal lines, so if a board design neglects to wire up this signal, HS400 mode is no available, even if both the controller and the eMMC are claiming to support this mode. Add a DT flag to allow boards to disable the HS400 support in this case. Signed-off-by: Lucas Stach Acked-by: Rob Herring --- Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml index e141330c1114..ac80d09df3a9 100644 --- a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml +++ b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml @@ -220,6 +220,11 @@ properties: description: eMMC HS400 enhanced strobe mode is supported + no-mmc-hs400: + $ref: /schemas/types.yaml#/definitions/flag + description: + All eMMC HS400 modes are not supported. + dsr: description: Value the card Driver Stage Register (DSR) should be programmed From patchwork Sat May 8 20:56:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 12246245 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=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 7183AC433ED for ; Sat, 8 May 2021 20:59:37 +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 F278D613F0 for ; Sat, 8 May 2021 20:59:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F278D613F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lynxeye.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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=JCSyRCX/EW57Qao4L1S0EnHsQGpGBhJnJVtScKGcSn4=; b=GnYQfuVYVwZlg28/aoaYiszOg i/c8RVBUxjh6KSQvIUrBf/noV+eRDNuLWaOipn9KPTNLIV4LLNzb49cja6051uJAZO9vVQbpNBDPU puDGB242UCx9kbUCNXx9NHcXxtbZrGHKFsa/6w+yqIKdLz4l8b/fgCn70/ArZL2QUuwaBEmIKci+c zRARbcZKWmuztv6qP+SnxGl+S2i/StsEcMBkI2jdYuHYmxmd3XvAqoPim/BSJOvNiGWu8aUWwj7sB lxw4ZlVXt8GVKes/ddAhWPC1DFjETJrJ8+cc1hcCtFq8o6/U7Kb2RVFrKmNXkO3GHQXgfGunj5NXd W13pl1EQg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfU1J-00AKJm-0U; Sat, 08 May 2021 20:57:53 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfU16-00AKIx-DJ for linux-arm-kernel@desiato.infradead.org; Sat, 08 May 2021 20:57:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=X5JIJYBmWPLbY7+UtavhMunxRlIjGeLlGpWhpc7UJvc=; b=rhBHaOYDLEzjBvoBBgzO6noOGm PZ5GLOVS4IiWLqfvbvyUKdvrd6N/nm+j7exTMWiKuEO78afhoJies2U21dan+3fzNYnFdrzLEX+5a KxgNDlXVtsj5ySjpfJiXrZ1vBTMY67bWO4B1p6fgi8CXGkLPK4s/t7JoYlJMt2oUSCrmZ+XGj8L1H ln3aPPFS93+e6XVR45iSFwXDPdwIqWPtKFBizf2OmEFtL0zF+xroo5dAlJBauhG1NcgoxUs2gUO3N zmBQrOaJ49+Qva67LudW4NRK82Ibcg5QP6iBl5IB0YJD49r/Vr66RmDGvz57dtsy3AbuO3GuuN7pQ SeaLjOGA==; Received: from ns.lynxeye.de ([87.118.118.114] helo=lynxeye.de) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfU13-007iTg-IQ for linux-arm-kernel@lists.infradead.org; Sat, 08 May 2021 20:57:39 +0000 Received: by lynxeye.de (Postfix, from userid 501) id 78D66E74251; Sat, 8 May 2021 22:57:04 +0200 (CEST) Received: from astat.fritz.box (a89-183-71-68.net-htp.de [89.183.71.68]) by lynxeye.de (Postfix) with ESMTPA id 0727CE7424E; Sat, 8 May 2021 22:57:03 +0200 (CEST) From: Lucas Stach To: Rob Herring , Ulf Hansson , Adrian Hunter Cc: Pengutronix Kernel Team , Fabio Estevam , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] mmc: sdhci-esdhc-imx: add support for disabling HS400 mode via DT Date: Sat, 8 May 2021 22:56:58 +0200 Message-Id: <20210508205658.91105-2-dev@lynxeye.de> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210508205658.91105-1-dev@lynxeye.de> References: <20210508205658.91105-1-dev@lynxeye.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210508_135737_802681_9E6C0706 X-CRM114-Status: GOOD ( 12.42 ) 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 On some boards the data strobe line isn't wired up, rendering HS400 support broken, even if both the controller and the eMMC claim to support it. Allow to disable HS400 mode via DT. Signed-off-by: Lucas Stach --- drivers/mmc/host/sdhci-esdhc-imx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index a20459744d21..1d6068507fb6 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1483,6 +1483,9 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, if (of_find_property(np, "no-1-8-v", NULL)) host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; + if (of_find_property(np, "no-mmc-hs400", NULL)) + host->quirks2 &= ~SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400; + if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line)) boarddata->delay_line = 0;