emmc: Fixed adj mode for HS200 uses 1G clock source [1/1]
authorLong Yu <long.yu@amlogic.com>
Thu, 1 Aug 2019 08:08:29 +0000 (16:08 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Mon, 5 Aug 2019 08:10:54 +0000 (01:10 -0700)
PD#SWPL-12162

Problem:
1)no use 1G source clock

Solution:
1)use 1G

Verify:
TL1

Change-Id: I4bf9036cb8223e9adf865c9cbdc64a8f6031ec05
Signed-off-by: Long Yu <long.yu@amlogic.com>
arch/arm/boot/dts/amlogic/tl1_t962x2_t309.dts
arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g.dts
arch/arm/boot/dts/amlogic/tl1_t962x2_x301_2g.dts
arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts
arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g.dts
arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g.dts
drivers/amlogic/mmc/aml_sd_emmc_v3.c

index c1dd987..99f1590 100644 (file)
                caps2 = "MMC_CAP2_HS200";
                /* "MMC_CAP2_HS400";*/
                f_min = <400000>;
-               f_max = <198000000>;
+               f_max = <200000000>;
        };
 };
 
index 70f8d2d..ca5bfba 100644 (file)
                caps2 = "MMC_CAP2_HS200";
                /*MMC_CAP2_HS400"*/
                f_min = <400000>;
-               f_max = <198000000>;
+               f_max = <200000000>;
        };
 };
 
index 9b09e39..0eb91c8 100644 (file)
                caps2 = "MMC_CAP2_HS200";
                /*MMC_CAP2_HS400"*/
                f_min = <400000>;
-               f_max = <198000000>;
+               f_max = <200000000>;
        };
 };
 
index 912ad88..c19166d 100644 (file)
                caps2 = "MMC_CAP2_HS200";
                /* "MMC_CAP2_HS400";*/
                f_min = <400000>;
-               f_max = <198000000>;
+               f_max = <200000000>;
        };
 };
 
index df5f263..9ea0825 100644 (file)
                caps2 = "MMC_CAP2_HS200";
                /*MMC_CAP2_HS400"*/
                f_min = <400000>;
-               f_max = <198000000>;
+               f_max = <200000000>;
        };
 };
 
index 74b0a86..b14484f 100644 (file)
                caps2 = "MMC_CAP2_HS200";
                /*MMC_CAP2_HS400"*/
                f_min = <400000>;
-               f_max = <198000000>;
+               f_max = <200000000>;
        };
 };
 
index 5ebc4f9..401a469 100644 (file)
@@ -245,7 +245,8 @@ static int meson_mmc_clk_set_rate_v3(struct mmc_host *mmc,
                                pr_warn("set comp0 as mux_clk parent error\n");
                } else if (((host->data->chip_type == MMC_CHIP_TL1)
                                || (host->data->chip_type == MMC_CHIP_G12B))
-                               && (clk_ios >= 166000000)) {
+                               && (clk_ios >= 166000000)
+                               && (pdata->caps2 & MMC_CAP2_HS400)) {
                        src0_clk = devm_clk_get(host->dev, "clkin2");
                        if (ret)
                                pr_warn("not get clkin2\n");