This patch adds the posibility to remove the HS400 support directly from the devicetree. This is useful for example for the sdcard slot of the Nitrogen8M mini that doesn't support the HS400 standard. Signed-off-by: Adrien Grassein <adrien.grassein@xxxxxxxxx> --- drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index fce8fa7e6b30..6fbd4bcca7a1 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -294,6 +294,7 @@ struct pltfm_imx_data { } multiblock_status; u32 is_ddr; struct pm_qos_request pm_qos_req; + u32 disable_caps; }; static const struct platform_device_id imx_esdhc_devtype[] = { @@ -454,6 +455,8 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg) IS_ERR_OR_NULL(imx_data->pins_200mhz)) val &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50 | SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_HS400); + + val &= ~imx_data->disable_caps; } } @@ -1502,6 +1505,9 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line)) boarddata->delay_line = 0; + if (of_find_property(np, "fsl,no-mmc-hs400", NULL)) + imx_data->disable_caps |= SDHCI_SUPPORT_HS400; + mmc_of_parse_voltage(np, &host->ocr_mask); if (esdhc_is_usdhc(imx_data)) { -- 2.20.1