diff --git a/arch/arm64/boot/dts/adi/sc59x-64.dtsi b/arch/arm64/boot/dts/adi/sc59x-64.dtsi index 69df9a7098a09e..c9f5347ee9d150 100644 --- a/arch/arm64/boot/dts/adi/sc59x-64.dtsi +++ b/arch/arm64/boot/dts/adi/sc59x-64.dtsi @@ -659,12 +659,13 @@ mmc0: mmc@310c7000 { - compatible = "snps,dwcmshc-sdhci"; + compatible = "adi,adsp-sc598-dwcmshc", "snps,dwcmshc-sdhci"; reg = <0x310c7000 0x1000>; interrupts = ; /* Status */ /*;*/ /* Wakeup */ - clocks = <&clk ADSP_SC598_CLK_EMMC>; - clock-names = "core"; + clocks = <&clk ADSP_SC598_CLK_EMMC>, + <&clk ADSP_SC598_CLK_EMMC_TIMER_QMC>; + clock-names = "core", "timer"; bus-width = <8>; status = "disabled"; }; diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index 5b7ffc359414ad..dc99134853a92a 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -1120,6 +1120,15 @@ static int sg2042_init(struct device *dev, struct sdhci_host *host, ARRAY_SIZE(clk_ids), clk_ids); } +static int dwcmshc_adsp_sc598_init(struct device *dev, struct sdhci_host *host, + struct dwcmshc_priv *dwc_priv) +{ + static const char * const clk_ids[] = {"timer"}; + + return dwcmshc_get_enable_other_clks(mmc_dev(host->mmc), dwc_priv, + ARRAY_SIZE(clk_ids), clk_ids); +} + static const struct sdhci_ops sdhci_dwcmshc_ops = { .set_clock = sdhci_set_clock, .set_bus_width = sdhci_set_bus_width, @@ -1202,6 +1211,15 @@ static const struct dwcmshc_pltfm_data sdhci_dwcmshc_pdata = { }, }; +static const struct dwcmshc_pltfm_data sdhci_dwcmshc_adsp_sc598_pdata = { + .pdata = { + .ops = &sdhci_dwcmshc_ops, + .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, + }, + .init = dwcmshc_adsp_sc598_init, +}; + #ifdef CONFIG_ACPI static const struct dwcmshc_pltfm_data sdhci_dwcmshc_bf3_pdata = { .pdata = { @@ -1343,6 +1361,10 @@ static const struct of_device_id sdhci_dwcmshc_dt_ids[] = { .compatible = "rockchip,rk3568-dwcmshc", .data = &sdhci_dwcmshc_rk35xx_pdata, }, + { + .compatible = "adi,adsp-sc598-dwcmshc", + .data = &sdhci_dwcmshc_adsp_sc598_pdata, + }, { .compatible = "snps,dwcmshc-sdhci", .data = &sdhci_dwcmshc_pdata,