summaryrefslogtreecommitdiff
authorruixuan.li <ruixuan.li@amlogic.com>2019-04-02 12:37:38 (GMT)
committer Ruixuan Li <ruixuan.li@amlogic.com>2019-05-22 03:15:06 (GMT)
commit3dcf1c8d25d5b169e8223296a2c9f9adc7a8837c (patch)
tree62b007a1edba67cc38f014dfd8d0fecb55ec2b06
parentca709001f4ec7f79296970e0d4557ee67f8326e6 (diff)
downloadcommon-3dcf1c8d25d5b169e8223296a2c9f9adc7a8837c.zip
common-3dcf1c8d25d5b169e8223296a2c9f9adc7a8837c.tar.gz
common-3dcf1c8d25d5b169e8223296a2c9f9adc7a8837c.tar.bz2
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>
Diffstat
-rw-r--r--arch/arm/boot/dts/amlogic/mesontm2.dtsi2
-rw-r--r--arch/arm/boot/dts/amlogic/sm1_s905x3_ac213.dts3
-rw-r--r--arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts3
-rw-r--r--arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts2
-rw-r--r--arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts3
-rw-r--r--arch/arm64/boot/dts/amlogic/mesontm2.dtsi2
-rw-r--r--arch/arm64/boot/dts/amlogic/sm1_s905x3_ac213.dts3
-rw-r--r--arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts3
-rw-r--r--arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts2
-rw-r--r--arch/arm64/boot/dts/amlogic/tm2_t962x3_ab301.dts3
-rw-r--r--drivers/amlogic/mmc/aml_sd_emmc_v3.c9
11 files changed, 15 insertions, 20 deletions
diff --git a/arch/arm/boot/dts/amlogic/mesontm2.dtsi b/arch/arm/boot/dts/amlogic/mesontm2.dtsi
index 60d7ff9..5798e1a 100644
--- a/arch/arm/boot/dts/amlogic/mesontm2.dtsi
+++ b/arch/arm/boot/dts/amlogic/mesontm2.dtsi
@@ -1334,7 +1334,7 @@
tx_delay = <0>;
max_req_size = <0x20000>; /**128KB*/
gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
- hw_reset = <&gpio BOOT_12 GPIO_ACTIVE_HIGH>;
+ hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
card_type = <1>;
/* 1:mmc card(include eMMC),
* 2:sd card(include tSD)
diff --git a/arch/arm/boot/dts/amlogic/sm1_s905x3_ac213.dts b/arch/arm/boot/dts/amlogic/sm1_s905x3_ac213.dts
index afbfaa9..b3de0ff 100644
--- a/arch/arm/boot/dts/amlogic/sm1_s905x3_ac213.dts
+++ b/arch/arm/boot/dts/amlogic/sm1_s905x3_ac213.dts
@@ -1635,8 +1635,7 @@
"MMC_CAP_HW_RESET",
"MMC_CAP_ERASE",
"MMC_CAP_CMD23";
- caps2 = "MMC_CAP2_HS200";
- /* "MMC_CAP2_HS400";*/
+ caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
f_min = <400000>;
f_max = <200000000>;
};
diff --git a/arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts b/arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts
index 8d055f7..46b666d 100644
--- a/arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts
+++ b/arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts
@@ -1981,8 +1981,7 @@
"MMC_CAP_HW_RESET",
"MMC_CAP_ERASE",
"MMC_CAP_CMD23";
- caps2 = "MMC_CAP2_HS200";
- /* "MMC_CAP2_HS400";*/
+ caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
f_min = <400000>;
f_max = <200000000>;
};
diff --git a/arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts b/arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts
index db2014e..d135ebe 100644
--- a/arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts
+++ b/arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts
@@ -1876,7 +1876,7 @@
"MMC_CAP_ERASE",
"MMC_CAP_CMD23";
caps2 = "MMC_CAP2_HS200";
- /* "MMC_CAP2_HS400";*/
+ /*"MMC_CAP2_HS400";*/
f_min = <400000>;
f_max = <200000000>;
};
diff --git a/arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts b/arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts
index c84e551..5a284e5 100644
--- a/arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts
+++ b/arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts
@@ -1988,8 +1988,7 @@
"MMC_CAP_HW_RESET",
"MMC_CAP_ERASE",
"MMC_CAP_CMD23";
- caps2 = "MMC_CAP2_HS200";
- /* "MMC_CAP2_HS400";*/
+ caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
f_min = <400000>;
f_max = <200000000>;
};
diff --git a/arch/arm64/boot/dts/amlogic/mesontm2.dtsi b/arch/arm64/boot/dts/amlogic/mesontm2.dtsi
index bef2ee5..4051135 100644
--- a/arch/arm64/boot/dts/amlogic/mesontm2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/mesontm2.dtsi
@@ -1320,7 +1320,7 @@
tx_delay = <0>;
max_req_size = <0x20000>; /**128KB*/
gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
- hw_reset = <&gpio BOOT_12 GPIO_ACTIVE_HIGH>;
+ hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
card_type = <1>;
/* 1:mmc card(include eMMC),
* 2:sd card(include tSD)
diff --git a/arch/arm64/boot/dts/amlogic/sm1_s905x3_ac213.dts b/arch/arm64/boot/dts/amlogic/sm1_s905x3_ac213.dts
index bbb65ece..849ed43 100644
--- a/arch/arm64/boot/dts/amlogic/sm1_s905x3_ac213.dts
+++ b/arch/arm64/boot/dts/amlogic/sm1_s905x3_ac213.dts
@@ -1711,8 +1711,7 @@
"MMC_CAP_HW_RESET",
"MMC_CAP_ERASE",
"MMC_CAP_CMD23";
- caps2 = "MMC_CAP2_HS200";
- /* "MMC_CAP2_HS400";*/
+ caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
f_min = <400000>;
f_max = <200000000>;
};
diff --git a/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts b/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts
index fdf9cc5..067af6a 100644
--- a/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts
+++ b/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts
@@ -1978,8 +1978,7 @@
"MMC_CAP_HW_RESET",
"MMC_CAP_ERASE",
"MMC_CAP_CMD23";
- caps2 = "MMC_CAP2_HS200";
- /* "MMC_CAP2_HS400";*/
+ caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
f_min = <400000>;
f_max = <200000000>;
};
diff --git a/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts b/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts
index 78fce0a..744e190 100644
--- a/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts
+++ b/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts
@@ -1876,7 +1876,7 @@
"MMC_CAP_ERASE",
"MMC_CAP_CMD23";
caps2 = "MMC_CAP2_HS200";
- /* "MMC_CAP2_HS400";*/
+ /*"MMC_CAP2_HS400";*/
f_min = <400000>;
f_max = <200000000>;
};
diff --git a/arch/arm64/boot/dts/amlogic/tm2_t962x3_ab301.dts b/arch/arm64/boot/dts/amlogic/tm2_t962x3_ab301.dts
index 7e38b56..44d9923 100644
--- a/arch/arm64/boot/dts/amlogic/tm2_t962x3_ab301.dts
+++ b/arch/arm64/boot/dts/amlogic/tm2_t962x3_ab301.dts
@@ -1984,8 +1984,7 @@
"MMC_CAP_HW_RESET",
"MMC_CAP_ERASE",
"MMC_CAP_CMD23";
- caps2 = "MMC_CAP2_HS200";
- /* "MMC_CAP2_HS400";*/
+ caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
f_min = <400000>;
f_max = <200000000>;
};
diff --git a/drivers/amlogic/mmc/aml_sd_emmc_v3.c b/drivers/amlogic/mmc/aml_sd_emmc_v3.c
index e9c25c1..aabfd06 100644
--- a/drivers/amlogic/mmc/aml_sd_emmc_v3.c
+++ b/drivers/amlogic/mmc/aml_sd_emmc_v3.c
@@ -1619,6 +1619,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);
@@ -1627,6 +1628,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))) {
@@ -1944,11 +1946,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;