Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7311748imm; Thu, 28 Jun 2018 01:22:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUVFyZjjQ+q1wRCGCQeih/aHHK/C6xu5asZnMKBhr7uwTHv4vppWjESSo9LvVNPsS7H6mL X-Received: by 2002:a62:170c:: with SMTP id 12-v6mr9161544pfx.139.1530174134122; Thu, 28 Jun 2018 01:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530174134; cv=none; d=google.com; s=arc-20160816; b=qTGmcTTCw7Wf8B/i5BGvV54iJlfy9FF67qIpzl1tjQ7pH7+46H6ZibqOIy4wkCBPJc QNECwvVJreRsyvp1/PBRm9tDiPoepkBhOXR63GKZGVEvl+V12X+L6WvhJZ12gLi9RDyb nGQ98H/eIqlk1g0FHxFGGcVBv2o0xQNMBaPuK6qnZSKiNVv8+0bpWWJbMcakyJUQMMu5 NIYIxbKt0Or7R4hJe9JmkZn6QENeQ4It/mXyfJZxWLKGbZyTojgCcbQ4FwrOO2QvutX4 qBquiWSuVGLhSw2s76kpQQF5VB+w4HguOmq084BAdswo8IsBpKiukbXkw9Kl/bHJby49 wQ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=AW0AXaKWv0I5JtfJLm0H1BTgUszfU1M/rHZROIKYnb0=; b=cbUwY49+CleVoIAn3f4CC67A8687Oxkf18YElB8Kpzcp5r5riFp1Zga8xbYU9NvRZD nGV6dCPtiYumrPsxs7tab5a1Tw4Oti+zwcQ3sVIV4Hxc7UIlYMxqXubHq3nntAIphr4q EHkfXqBhFXLSF2eYEZuDirmVUSDx93zc+ssS7viB1X6Aex9IbBR3+ewJqtDcmG808TjJ HMvu/sO+EvKRMPcsInANQJt5z2E/dj0jLv5qv3JdYWU8tdJcBM3DIMG+xvppnrXlcF4B iTu6Gy5z7W2mLjfiVQkPaWWnOxh1176Nn1sOyNvxBvkJzmee4ZpbgPTtd1AP13CLCZ2O EB3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b="qlJoTy/1"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o10-v6si5264973pgp.153.2018.06.28.01.21.56; Thu, 28 Jun 2018 01:22:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b="qlJoTy/1"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934758AbeF1IOM (ORCPT + 99 others); Thu, 28 Jun 2018 04:14:12 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:49418 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934470AbeF1INg (ORCPT ); Thu, 28 Jun 2018 04:13:36 -0400 Received: from trochilidae.toradex.int (unknown [46.140.72.82]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 4E0615C0C49; Thu, 28 Jun 2018 10:13:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1530173615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AW0AXaKWv0I5JtfJLm0H1BTgUszfU1M/rHZROIKYnb0=; b=qlJoTy/1L8i1FCJGtqEIu0c5FeY3WBKZwEs9r+p/3zFCB/pVTe9U1t4GRSAzQm3gZlc9Jk hQEUWMByStJoew92HCPrn2a01xhwolswgKCx4LeLinxwgVtlX6TIN5CwmyKC5A+gxOcVpR lXqeoakriB9zaoBbaujuCLpRKjnD2mM= From: Stefan Agner To: adrian.hunter@intel.com, ulf.hansson@linaro.org Cc: fabio.estevam@nxp.com, haibo.chen@nxp.com, aisheng.dong@nxp.com, michael@amarulasolutions.com, rmk+kernel@armlinux.org.uk, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Agner Subject: [PATCH 3/3] mmc: sdhci-esdhc-imx: prevent stack from using higher speed modes Date: Thu, 28 Jun 2018 10:13:31 +0200 Message-Id: <20180628081331.13051-4-stefan@agner.ch> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180628081331.13051-1-stefan@agner.ch> References: <20180628081331.13051-1-stefan@agner.ch> X-Spamd-Result: default: False [-2.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; TAGGED_RCPT(0.00)[kernel]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[10]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MID_CONTAINS_FROM(1.00)[]; ASN(0.00)[asn:6830, ipnet:46.140.0.0/17, country:AT]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If pinctrl configurations for higher speed modes are missing, the stack currently uses the no 1.8V quirk. This comes close to what we need but not exactly: E.g. if a eMMC chip uses 1.8V signaling (by specifying a 1.8V only vqmmc-supply) while not providing any 100MHz/200MHz pinctrl configurations then the SDHCI_QUIRK2_NO_1_8_V leads the stack to print signaling voltage switch failed errors continuously: mmc1: Switching to 3.3V signalling voltage failed Presumably because the stack tries to use 3.3V signaling: # cat /sys/kernel/debug/mmc1/ios ... timing spec: 8 (mmc DDR52) signal voltage: 0 (3.30 V) ... With using SDHCI_QUIRK2_NO_UHS_HS200_HS400 we prevent the stack from choosing any modes require speeds higher than 52MHz while still allowing to select modes using 1.8V at lower speeds (e.g. DDR52): # cat /sys/kernel/debug/mmc1/ios ... timing spec: 8 (mmc DDR52) signal voltage: 1 (1.80 V) ... Signed-off-by: Stefan Agner --- drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 20a420b765b3..4a1c33018072 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1165,10 +1165,10 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, * fall back to not supporting uhs by specifying no * 1.8v quirk */ - host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; + host->quirks2 |= SDHCI_QUIRK2_NO_UHS_HS200_HS400; } } else { - host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; + host->quirks2 |= SDHCI_QUIRK2_NO_UHS_HS200_HS400; } /* call to generic mmc_of_parse to support additional capabilities */ -- 2.18.0