[REGRESSION] mmc: "unable to select a mode: -5" on i.MX8M/AM62 platforms

Tanmay Kathpalia tanmay.kathpalia at altera.com
Thu Jan 8 12:12:26 CET 2026


Hi Fabio,


On 1/8/2026 4:38 PM, Fabio Estevam wrote:
> Could you please send a revert?

Here is the revert patch for commit aebb523a2381 ("mmc: mmc-uclass: Use 
max-frequency from device tree with default handling"):

diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index bf0bea93853..2f4dc5bd887 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -243,13 +243,8 @@ int mmc_of_parse(struct udevice *dev, struct 
mmc_config *cfg)
  		return -EINVAL;
  	}

-	/*
-	 * Maximum frequency is obtained from the optional "max-frequency" 
property.
-	 * If not specified in device tree, defaults to 0 and sdhci_setup_cfg()
-	 * will set the MMC configuration maximum frequency to the host 
controller's
-	 * maximum base clock frequency from capabilities register.
-	 */
-	cfg->f_max = dev_read_u32_default(dev, "max-frequency", 0);
+	/* f_max is obtained from the optional "max-frequency" property */
+	dev_read_u32(dev, "max-frequency", &cfg->f_max);

  	if (dev_read_bool(dev, "cap-sd-highspeed"))
  		cfg->host_caps |= MMC_CAP(SD_HS);


More information about the U-Boot mailing list