From: long yu Date: Fri, 15 Mar 2019 07:38:47 +0000 (+0800) Subject: storage: emmc: reduce cmd/ds/data pins driver strength for TL1 SOC [1/1] X-Git-Tag: hardkernel-4.9.236-104~1573 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=912ef8f6f2753b2eb5e626f9a292ab6f33e610f8;p=platform%2Fkernel%2Flinux-amlogic.git storage: emmc: reduce cmd/ds/data pins driver strength for TL1 SOC [1/1] PD#SWPL-5334 Problem: TX window is not stable Solution: Reduce the drive capability of emmc controller pins Verify: TL1-T962X2_X301 Change-Id: Ib641c66131c2dee41eb68fb262f4770f431676b9 Signed-off-by: long yu --- diff --git a/arch/arm/boot/dts/amlogic/mesontl1.dtsi b/arch/arm/boot/dts/amlogic/mesontl1.dtsi index 4ab7e08..38d98da 100644 --- a/arch/arm/boot/dts/amlogic/mesontl1.dtsi +++ b/arch/arm/boot/dts/amlogic/mesontl1.dtsi @@ -1630,7 +1630,7 @@ function = "emmc"; input-enable; bias-pull-up; - drive-strength = <3>; + drive-strength = <2>; }; }; @@ -1649,7 +1649,7 @@ function = "emmc"; input-enable; bias-pull-up; - drive-strength = <3>; + drive-strength = <2>; }; }; @@ -1659,7 +1659,7 @@ function = "emmc"; input-enable; bias-pull-down; - drive-strength = <3>; + drive-strength = <2>; }; }; diff --git a/arch/arm/boot/dts/amlogic/tl1_t962x2_t309.dts b/arch/arm/boot/dts/amlogic/tl1_t962x2_t309.dts index 4a62607..17de4a7 100644 --- a/arch/arm/boot/dts/amlogic/tl1_t962x2_t309.dts +++ b/arch/arm/boot/dts/amlogic/tl1_t962x2_t309.dts @@ -1629,11 +1629,12 @@ "MMC_CAP_1_8V_DDR", "MMC_CAP_HW_RESET", "MMC_CAP_ERASE", - "MMC_CAP_CMD23"; + "MMC_CAP_CMD23", + "MMC_CAP_DRIVER_TYPE_D"; caps2 = "MMC_CAP2_HS200"; /* "MMC_CAP2_HS400";*/ f_min = <400000>; - f_max = <200000000>; + f_max = <198000000>; }; }; diff --git a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301.dts b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301.dts index a044246c..c6e2a9a 100644 --- a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301.dts +++ b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301.dts @@ -1732,7 +1732,8 @@ "MMC_CAP_1_8V_DDR", "MMC_CAP_HW_RESET", "MMC_CAP_ERASE", - "MMC_CAP_CMD23"; + "MMC_CAP_CMD23", + "MMC_CAP_DRIVER_TYPE_D"; caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400"; f_min = <400000>; f_max = <198000000>; diff --git a/arch/arm64/boot/dts/amlogic/mesontl1.dtsi b/arch/arm64/boot/dts/amlogic/mesontl1.dtsi index e2bbeb5..f7a4c8d 100644 --- a/arch/arm64/boot/dts/amlogic/mesontl1.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesontl1.dtsi @@ -1611,7 +1611,7 @@ function = "emmc"; input-enable; bias-pull-up; - drive-strength = <3>; + drive-strength = <2>; }; }; @@ -1630,7 +1630,7 @@ function = "emmc"; input-enable; bias-pull-up; - drive-strength = <3>; + drive-strength = <2>; }; }; @@ -1640,7 +1640,7 @@ function = "emmc"; input-enable; bias-pull-down; - drive-strength = <3>; + drive-strength = <2>; }; }; diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts index a2d0a40c..2dad4fd 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts @@ -1634,11 +1634,12 @@ "MMC_CAP_1_8V_DDR", "MMC_CAP_HW_RESET", "MMC_CAP_ERASE", - "MMC_CAP_CMD23"; + "MMC_CAP_CMD23", + "MMC_CAP_DRIVER_TYPE_D"; caps2 = "MMC_CAP2_HS200"; /* "MMC_CAP2_HS400";*/ f_min = <400000>; - f_max = <200000000>; + f_max = <198000000>; }; }; diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301.dts index 465e88f..63c65b6 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301.dts @@ -1691,7 +1691,8 @@ "MMC_CAP_1_8V_DDR", "MMC_CAP_HW_RESET", "MMC_CAP_ERASE", - "MMC_CAP_CMD23"; + "MMC_CAP_CMD23", + "MMC_CAP_DRIVER_TYPE_D"; caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400"; f_min = <400000>; f_max = <198000000>; diff --git a/drivers/amlogic/mmc/aml_sd_emmc_v3.c b/drivers/amlogic/mmc/aml_sd_emmc_v3.c index 79f362a..08559f0 100644 --- a/drivers/amlogic/mmc/aml_sd_emmc_v3.c +++ b/drivers/amlogic/mmc/aml_sd_emmc_v3.c @@ -806,7 +806,7 @@ RETRY: pdata->intf3 = intf3; retry--; if (retry == 0) { - pr_warn("[%s][%d] retry eyetest failed-line:%d\n", + pr_debug("[%s][%d] retry eyetest failed-line:%d\n", __func__, __LINE__, line_x); return 1; } diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index ae8b397..fbac7f2 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1184,7 +1184,7 @@ static int mmc_select_hs400(struct mmc_card *card) pr_info("%s:use ds type0\n", mmc_hostname(host)); /*3 -> type4 -> MMC_CAP_DRIVER_TYPED*/ - } else if (ds & (1 << 3)) { + } else if (ds & (1 << 2)) { raw_driver_strength &= ~(1 << 1); pr_info("%s:use ds type4\n", mmc_hostname(host));