storage: emmc: reduce cmd/ds/data pins driver strength for TL1 SOC [1/1]
authorlong yu <long.yu@amlogic.com>
Fri, 15 Mar 2019 07:38:47 +0000 (15:38 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Mon, 25 Mar 2019 03:11:59 +0000 (20:11 -0700)
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 <long.yu@amlogic.com>
arch/arm/boot/dts/amlogic/mesontl1.dtsi
arch/arm/boot/dts/amlogic/tl1_t962x2_t309.dts
arch/arm/boot/dts/amlogic/tl1_t962x2_x301.dts
arch/arm64/boot/dts/amlogic/mesontl1.dtsi
arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts
arch/arm64/boot/dts/amlogic/tl1_t962x2_x301.dts
drivers/amlogic/mmc/aml_sd_emmc_v3.c
drivers/mmc/core/mmc.c

index 4ab7e08..38d98da 100644 (file)
                        function = "emmc";
                        input-enable;
                        bias-pull-up;
-                       drive-strength = <3>;
+                       drive-strength = <2>;
                };
        };
 
                        function = "emmc";
                        input-enable;
                        bias-pull-up;
-                       drive-strength = <3>;
+                       drive-strength = <2>;
                };
        };
 
                        function = "emmc";
                        input-enable;
                        bias-pull-down;
-                       drive-strength = <3>;
+                       drive-strength = <2>;
                };
        };
 
index 4a62607..17de4a7 100644 (file)
                         "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>;
        };
 };
 
index a044246..c6e2a9a 100644 (file)
                         "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>;
index e2bbeb5..f7a4c8d 100644 (file)
                        function = "emmc";
                        input-enable;
                        bias-pull-up;
-                       drive-strength = <3>;
+                       drive-strength = <2>;
                };
        };
 
                        function = "emmc";
                        input-enable;
                        bias-pull-up;
-                       drive-strength = <3>;
+                       drive-strength = <2>;
                };
        };
 
                        function = "emmc";
                        input-enable;
                        bias-pull-down;
-                       drive-strength = <3>;
+                       drive-strength = <2>;
                };
        };
 
index a2d0a40..2dad4fd 100644 (file)
                         "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>;
        };
 };
 
index 465e88f..63c65b6 100644 (file)
                         "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>;
index 79f362a..08559f0 100644 (file)
@@ -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;
                }
index ae8b397..fbac7f2 100644 (file)
@@ -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));