tm2: emmc run hs400 200M [1/1]

PD#SWPL-5658

Problem:
emmc run hs200 200M now

Solution:
set emmc busmode to hs400 200M

Verify:
passed on t962e2 ab311

Change-Id: If5fef5c3b55cc95152b0d5d19bb5a56b293aafcf
Signed-off-by: ruixuan.li <ruixuan.li@amlogic.com>
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>

Conflicts:
	arch/arm/boot/dts/amlogic/sm1_s905x3_ac213.dts
	arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts
	arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts
	arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts
	arch/arm64/boot/dts/amlogic/sm1_s905x3_ac213.dts
	arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts
	arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts
	arch/arm64/boot/dts/amlogic/tm2_t962x3_ab301.dts
This commit is contained in:
ruixuan.li
2019-04-02 20:37:38 +08:00
committed by Luke Go
parent e2b93503cd
commit 480564fb45

View File

@@ -1947,6 +1947,7 @@ int aml_emmc_hs200_tl1(struct mmc_host *mmc)
writel(vclkc, host->base + SD_EMMC_CLOCK_V3);
pr_info("[%s][%d] clk config:0x%x\n",
__func__, __LINE__, readl(host->base + SD_EMMC_CLOCK_V3));
for (i = 0; i < 63; i++) {
retry_times = 0;
delay2 += (1 << 24);
@@ -1955,6 +1956,7 @@ retry:
err = emmc_eyetest_log(mmc, 9);
if (err)
continue;
count = fbinary(pdata->align[9]);
if (((count >= 14) && (count <= 20))
|| ((count >= 48) && (count <= 54))) {
@@ -2293,11 +2295,10 @@ int aml_post_hs400_timming(struct mmc_host *mmc)
struct amlsd_platform *pdata = mmc_priv(mmc);
struct amlsd_host *host = pdata->host;
aml_sd_emmc_clktest(mmc);
if ((host->data->chip_type == MMC_CHIP_TL1)
|| (host->data->chip_type == MMC_CHIP_SM1))
aml_emmc_hs400_tl1(mmc);
else if (host->data->chip_type == MMC_CHIP_G12B)
if (host->data->chip_type == MMC_CHIP_G12B)
aml_emmc_hs400_Revb(mmc);
else if (host->data->chip_type >= MMC_CHIP_TL1)
aml_emmc_hs400_tl1(mmc);
else
aml_emmc_hs400_general(mmc);
return 0;