mmc: core: Add DT bindings for eMMC high-speed DDR 1.8/1.2V
[deliverable/linux.git] / drivers / mmc / core / host.c
index 6fb6f77450cba2237cd2d07a18fc951b5b1397cc..d014127f10437fc3e3bdec14f4bb627aea6881a7 100644 (file)
@@ -374,7 +374,7 @@ int mmc_of_parse(struct mmc_host *host)
                        if (!(flags & OF_GPIO_ACTIVE_LOW))
                                gpio_inv_cd = true;
 
-                       ret = mmc_gpio_request_cd(host, gpio);
+                       ret = mmc_gpio_request_cd(host, gpio, 0);
                        if (ret < 0) {
                                dev_err(host->parent,
                                        "Failed to request CD GPIO #%d: %d!\n",
@@ -419,6 +419,16 @@ int mmc_of_parse(struct mmc_host *host)
                host->caps |= MMC_CAP_SD_HIGHSPEED;
        if (of_find_property(np, "cap-mmc-highspeed", &len))
                host->caps |= MMC_CAP_MMC_HIGHSPEED;
+       if (of_find_property(np, "sd-uhs-sdr12", &len))
+               host->caps |= MMC_CAP_UHS_SDR12;
+       if (of_find_property(np, "sd-uhs-sdr25", &len))
+               host->caps |= MMC_CAP_UHS_SDR25;
+       if (of_find_property(np, "sd-uhs-sdr50", &len))
+               host->caps |= MMC_CAP_UHS_SDR50;
+       if (of_find_property(np, "sd-uhs-sdr104", &len))
+               host->caps |= MMC_CAP_UHS_SDR104;
+       if (of_find_property(np, "sd-uhs-ddr50", &len))
+               host->caps |= MMC_CAP_UHS_DDR50;
        if (of_find_property(np, "cap-power-off-card", &len))
                host->caps |= MMC_CAP_POWER_OFF_CARD;
        if (of_find_property(np, "cap-sdio-irq", &len))
@@ -429,6 +439,10 @@ int mmc_of_parse(struct mmc_host *host)
                host->pm_caps |= MMC_PM_KEEP_POWER;
        if (of_find_property(np, "enable-sdio-wakeup", &len))
                host->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
+       if (of_find_property(np, "mmc-ddr-1_8v", &len))
+               host->caps |= MMC_CAP_1_8V_DDR;
+       if (of_find_property(np, "mmc-ddr-1_2v", &len))
+               host->caps |= MMC_CAP_1_2V_DDR;
 
        return 0;
 
This page took 0.025888 seconds and 5 git commands to generate.