[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250424180036.1541568-2-jm@ti.com>
Date: Thu, 24 Apr 2025 13:00:35 -0500
From: Judith Mendez <jm@...com>
To: Judith Mendez <jm@...com>, Adrian Hunter <adrian.hunter@...el.com>,
Ulf
Hansson <ulf.hansson@...aro.org>
CC: Josua Mayer <josua@...id-run.com>, <linux-mmc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Nishanth Menon <nm@...com>,
Francesco Dolcini
<francesco@...cini.it>,
Hiago De Franco <hiagofranco@...il.com>, Moteen Shah
<m-shah@...com>
Subject: [PATCH v4 1/2] mmc: sdhci: Add a quirk for suppressing V1P8_SIGNAL_ENA
There are init failures across Kingston eMMC and SD cards like Microcenter
and Patriot due to the sequence of when V1P8_SIGNAL_ENA is set. Since it
is not always required, add a quirk SDHCI_QUIRK2_SUPPRESS_V1P8_ENA which
allows users with init failures to suppress V1P8_SIGNAL_ENA.
Fixes: ac5a41b472b4 ("Revert "mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch"")
Fixes: 941a7abd4666 ("mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch")
Cc: stable@...r.kernel.org
Signed-off-by: Judith Mendez <jm@...com>
---
drivers/mmc/host/sdhci.c | 8 +++++---
drivers/mmc/host/sdhci.h | 2 ++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index fd5681d1e31f..ef66dede8d09 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2698,8 +2698,10 @@ int sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
* Enable 1.8V Signal Enable in the Host Control2
* register
*/
- ctrl |= SDHCI_CTRL_VDD_180;
- sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
+ if (!(host->quirks2 & SDHCI_QUIRK2_SUPPRESS_V1P8_ENA)) {
+ ctrl |= SDHCI_CTRL_VDD_180;
+ sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
+ }
/* Some controller need to do more when switching */
if (host->ops->voltage_switch)
@@ -2707,7 +2709,7 @@ int sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
/* 1.8V regulator output should be stable within 5 ms */
ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
- if (ctrl & SDHCI_CTRL_VDD_180)
+ if (ctrl & SDHCI_CTRL_VDD_180 || (host->quirks2 & SDHCI_QUIRK2_SUPPRESS_V1P8_ENA))
return 0;
pr_warn("%s: 1.8V regulator output did not become stable\n",
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index cd0e35a80542..60e180456ccc 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -536,6 +536,8 @@ struct sdhci_host {
#define SDHCI_QUIRK2_USE_32BIT_BLK_CNT (1<<18)
/* Issue CMD and DATA reset together */
#define SDHCI_QUIRK2_ISSUE_CMD_DAT_RESET_TOGETHER (1<<19)
+/* Suppress setting V1P8_SIGNAL_ENA */
+#define SDHCI_QUIRK2_SUPPRESS_V1P8_ENA (1<<20)
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */
--
2.49.0
Powered by blists - more mailing lists