summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2021-05-10 21:04:00 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2021-06-14 13:57:39 +0200
commitf722e650d965307f8c4c24cf4edc166b6abe9dc6 (patch)
tree1f0fef0dacda31e9ea52b2ba93e95621e0be0d36
parent2991ad76d2537a4ebe7132d087cdbc76377da302 (diff)
mmc: core: add support for disabling HS400 mode via DT
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 <dev@lynxeye.de> Link: https://lore.kernel.org/r/20210510190400.105162-3-l.stach@pengutronix.de Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/core/host.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 0b0577990ddc..eda4a1892c33 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -388,6 +388,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) {