]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: Imply HS200 cap with mmc-hs400 prop to match linux
authorJonas Karlman <jonas@kwiboo.se>
Mon, 8 Apr 2024 21:06:15 +0000 (21:06 +0000)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 26 Apr 2024 06:31:27 +0000 (15:31 +0900)
eMMC nodes in linux device tree files typically only contain a mmc-hs400
prop to signal support for both HS400 and HS200. However, U-Boot require
an explicit mmc-hs200 prop to signal support for the HS200 mode.

Fix this by follow linux and imply HS200 cap when HS400 cap is signaled
using a mmc-hs400 prop.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@theobrma-systems.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/mmc-uclass.c

index 1e03901e9dcf5a47ad8eadc7cc98edeb722e747e..22c64aa949134fca0d05eabe251c7e0d0d1166c9 100644 (file)
@@ -257,9 +257,9 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg)
        if (dev_read_bool(dev, "mmc-hs200-1_2v"))
                cfg->host_caps |= MMC_CAP(MMC_HS_200);
        if (dev_read_bool(dev, "mmc-hs400-1_8v"))
-               cfg->host_caps |= MMC_CAP(MMC_HS_400);
+               cfg->host_caps |= MMC_CAP(MMC_HS_400) | MMC_CAP(MMC_HS_200);
        if (dev_read_bool(dev, "mmc-hs400-1_2v"))
-               cfg->host_caps |= MMC_CAP(MMC_HS_400);
+               cfg->host_caps |= MMC_CAP(MMC_HS_400) | MMC_CAP(MMC_HS_200);
        if (dev_read_bool(dev, "mmc-hs400-enhanced-strobe"))
                cfg->host_caps |= MMC_CAP(MMC_HS_400_ES);