mmc: sdhci_am654: Write ITAPDLY for DDR52 timing
authorJudith Mendez <jm@ti.com>
Wed, 20 Mar 2024 22:38:32 +0000 (17:38 -0500)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 2 Apr 2024 10:21:39 +0000 (12:21 +0200)
For DDR52 timing, DLL is enabled but tuning is not carried
out, therefore the ITAPDLY value in PHY CTRL 4 register is
not correct. Fix this by writing ITAPDLY after enabling DLL.

Fixes: a161c45f2979 ("mmc: sdhci_am654: Enable DLL only for some speed modes")
Signed-off-by: Judith Mendez <jm@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20240320223837.959900-3-jm@ti.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci_am654.c

index d8c9821b0b66302c4b7b1064ec481dcee84d63fb..cfb614d0b42b482d3c97af8a57976681f7aada4b 100644 (file)
@@ -300,6 +300,7 @@ static void sdhci_am654_set_clock(struct sdhci_host *host, unsigned int clock)
        if (timing > MMC_TIMING_UHS_SDR25 && clock >= CLOCK_TOO_SLOW_HZ) {
                sdhci_am654_setup_dll(host, clock);
                sdhci_am654->dll_enable = true;
+               sdhci_am654_write_itapdly(sdhci_am654, sdhci_am654->itap_del_sel[timing]);
        } else {
                sdhci_am654_setup_delay_chain(sdhci_am654, timing);
                sdhci_am654->dll_enable = false;