[PATCH 10/30] mci: respect no-1-8-v OF property
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon May 5 05:06:13 PDT 2025
no-1-8-v is much more relevant to SD-Cards, but on the off-chance that
is' set on an eMMC node, we should respect it and disable 1.8V speed
modes accordingly.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/mci/mci-core.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index f416998f39b2..bd538ccb4a79 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -3093,6 +3093,17 @@ void mci_of_parse_node(struct mci_host *host,
if (of_property_read_bool(np, "no-mmc-hs400"))
host->caps2 &= ~(MMC_CAP2_HS400_1_8V | MMC_CAP2_HS400_1_2V |
MMC_CAP2_HS400_ES);
+ if (of_property_read_bool(np, "no-1-8-v")) {
+ /*
+ * The SDHCI controller in a SoC might support HS200/HS400
+ * (indicated using mmc-hs200-1_8v/mmc-hs400-1_8v dt property),
+ * but if the board is modeled such that the IO lines are not
+ * connected to 1.8v then HS200/HS400 cannot be supported.
+ * Disable HS200/HS400 if the board does not have 1.8v connected
+ * to the IO lines. (Applicable for other modes in 1.8v)
+ */
+ host->caps2 &= ~(MMC_CAP2_HSX00_1_8V | MMC_CAP2_HS400_ES);
+ }
}
}
--
2.39.5
More information about the barebox
mailing list