]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: rockchip_sdhci: enable strobe line for HS400
authorYifeng Zhao <yifeng.zhao@rock-chips.com>
Fri, 15 Oct 2021 08:41:27 +0000 (16:41 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 15 Oct 2021 12:57:41 +0000 (20:57 +0800)
The default configuration of rk3399 EMMC PHY does not enable the
strobe line, and EMMC controller will got data transmission error
at HS400 mode.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/mmc/rockchip_sdhci.c

index 1ac00587d44cd7cf7dfc3b33cdb95e7401f60959..278473899c7c0655331944d8cea3db0b3a20aaa8 100644 (file)
@@ -143,6 +143,9 @@ static void rk3399_emmc_phy_power_on(struct rockchip_emmc_phy *phy, u32 clock)
        writel(RK_CLRSETBITS(3 << 12, freqsel << 12), &phy->emmcphy_con[0]);
        writel(RK_CLRSETBITS(1 << 1, 1 << 1), &phy->emmcphy_con[6]);
 
+       /* REN Enable on STRB Line for HS400 */
+       writel(RK_CLRSETBITS(0, 1 << 9), &phy->emmcphy_con[2]);
+
        read_poll_timeout(readl, &phy->emmcphy_status, dllrdy,
                          PHYCTRL_DLL_LOCK_WO_TMOUT(dllrdy), 1, 5000);
 }