mmc: tmio: sdhi: Configure DT2FF register for HS400 mode
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Thu, 14 Feb 2019 14:16:15 +0000 (15:16 +0100)
committerMarek Vasut <marex@denx.de>
Sat, 16 Feb 2019 17:12:17 +0000 (18:12 +0100)
The DT2FF register must be configured differently for HS400 mode
and for HS200/SDR104 mode. Configure the DT2FF register according
to the recommended datasheet settings for each mode.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/mmc/renesas-sdhi.c

index a556acd5cb5f6c30e0a9fcea1c6d9397562b4542..923f846370f4f299c1e4011d5933441a0215349b 100644 (file)
@@ -148,6 +148,9 @@ static int renesas_sdhi_hs400(struct udevice *dev)
                tmio_sd_writel(priv, priv->tap_set, RENESAS_SDHI_SCC_TAPSET);
        }
 
+       tmio_sd_writel(priv, hs400 ? 0x704 : 0x300,
+                      RENESAS_SDHI_SCC_DT2FF);
+
        reg = tmio_sd_readl(priv, RENESAS_SDHI_SCC_CKSEL);
        reg |= RENESAS_SDHI_SCC_CKSEL_DTSEL;
        tmio_sd_writel(priv, reg, RENESAS_SDHI_SCC_CKSEL);