From patchwork Mon May 10 19:04:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 12249241 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 CC0BEC433B4 for ; Mon, 10 May 2021 19:13: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 9541B61492 for ; Mon, 10 May 2021 19:13:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9541B61492 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.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=6UlluEqc+w88R7RPKh00/IvvsDUyhEEfeYGfjX6jpu8=; b=hzOMTVGU0JMP35uZwLyaXKx97 C243kiW3jr7622j4q/MJ09QNgr207ikaITcLi0XK3+welEUIEBuXhlswuDZvdiGM8f0KSwfOHt/1w AkV9B/G3JSDxx1FfQrx2z/hby2+31b/B4G+4i/cjm0vM7tNQh2doVEQga8Dz1GNwcsprmpXx2XCmh D66p1t3smMRnYZRQs88p0JhVsSfc4CsYaFNiNgkWxSAgD7vdYdfJFNq0ODsZNpDTwy4MEn8AyOoNj Q6tu9sVQeTg3p6h9w6ViYjpRkrxfCXutyo5eweNiNTkshXMLAn7ZvuJd5AavdJJ2i9kQ1gx11pHuQ ltYOUHffQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgBJq-00FVeL-Ij; Mon, 10 May 2021 19:11:54 +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 1lgBJk-00FVdO-Ag for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 19:11:51 +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=hi40FOU+Ug3fZwI3hIyugFgoTziR4dpU8x0rG3iOBJs=; b=DFRKNu4BAibm/bsj/1NTIC8lGJ LLMcBab4213pA4aAeD6kht0K0UKNbAJ6Ddde9P9yvC8ph+RSO+tDgnzVNcAxin/8EAVpkMTzKXuWy J+qEWqmPEKHrzG2Xs2mfSADXkL+FfQ+h7phr1k5w+sHasFkmrNrO4bbPxpA6UKme54YtVGJe7vUTV LW5aHdZTP2TADnJB7o62pGpam8kuPc4aTY408JkGb/ESzfour2bSNt+ZwYg91ACA2ti0t3EMzMAaI DCjf7GP65BP/HxE9hIWz8xhJHDyTgh7SM8oEMUHGgycuYfj2H5r6b6iN6lyrObWOXRCT9Ib6By7oh GmsTYFWw==; 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 1lgBJg-0093i7-MS for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 19:11:47 +0000 Received: by lynxeye.de (Postfix, from userid 501) id 6F7BBE7426B; Mon, 10 May 2021 21:04:06 +0200 (CEST) Received: from astat.fritz.box (a89-183-115-43.net-htp.de [89.183.115.43]) by lynxeye.de (Postfix) with ESMTPA id A22E9E7426A; Mon, 10 May 2021 21:04:04 +0200 (CEST) From: Lucas Stach To: Ulf Hansson , Adrian Hunter , Haibo Chen Cc: Rob Herring , NXP Linux Team , kernel@pengutronix.de, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/3] mmc: core: add support for disabling HS400 mode via DT Date: Mon, 10 May 2021 21:04:00 +0200 Message-Id: <20210510190400.105162-3-l.stach@pengutronix.de> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510190400.105162-1-l.stach@pengutronix.de> References: <20210510190400.105162-1-l.stach@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_121144_889688_ECEE70DD X-CRM114-Status: GOOD ( 13.87 ) 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 From: Lucas Stach 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 --- v2: - move to core - actually disable all HS400 modes --- drivers/mmc/core/host.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 9b89a91b6b47..0e066c5f5243 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -351,6 +351,9 @@ int mmc_of_parse(struct mmc_host *host) host->caps2 |= MMC_CAP2_NO_SD; if (device_property_read_bool(dev, "no-mmc")) host->caps2 |= MMC_CAP2_NO_MMC; + if (device_property_read_bool(dev, "no-mmc-hs400")) + host->caps2 &= ~(MMC_CAP2_HS400_1_8V | MMC_CAP2_HS400_1_2V | + MMC_CAP2_HS400_ES); /* Must be after "non-removable" check */ if (device_property_read_u32(dev, "fixed-emmc-driver-type", &drv_type) == 0) {