};
}; /* end of pinctrl_aobus */
+&sd_emmc_c {
+ status = "okay";
+ emmc {
+ caps = "MMC_CAP_8_BIT_DATA",
+ "MMC_CAP_MMC_HIGHSPEED",
+ "MMC_CAP_SD_HIGHSPEED",
+ "MMC_CAP_NONREMOVABLE",
+ /* "MMC_CAP_1_8V_DDR", */
+ "MMC_CAP_HW_RESET",
+ "MMC_CAP_ERASE",
+ "MMC_CAP_CMD23";
+ caps2 = "MMC_CAP2_HS200";
+ /* "MMC_CAP2_HS400";*/
+ f_min = <400000>;
+ f_max = <200000000>;
+ };
+};
+
&sd_emmc_b {
status = "okay";
sd {
};
}; /* end of pinctrl_aobus */
+&sd_emmc_c {
+ status = "okay";
+ emmc {
+ caps = "MMC_CAP_8_BIT_DATA",
+ "MMC_CAP_MMC_HIGHSPEED",
+ "MMC_CAP_SD_HIGHSPEED",
+ "MMC_CAP_NONREMOVABLE",
+ /* "MMC_CAP_1_8V_DDR", */
+ "MMC_CAP_HW_RESET",
+ "MMC_CAP_ERASE",
+ "MMC_CAP_CMD23";
+ caps2 = "MMC_CAP2_HS200";
+ /* "MMC_CAP2_HS400";*/
+ f_min = <400000>;
+ f_max = <200000000>;
+ };
+};
+
&sd_emmc_b {
status = "okay";
sd {
.sdmmc.init.core_phase = 3,
.sdmmc.init.tx_phase = 0,
.sdmmc.init.rx_phase = 0,
- .sdmmc.hs.core_phase = 1,
+ .sdmmc.hs.core_phase = 3,
.sdmmc.ddr.core_phase = 2,
.sdmmc.hs2.core_phase = 3,
.sdmmc.hs4.tx_delay = 0,
u32 vconf = 0;
struct sd_emmc_config *pconf = (struct sd_emmc_config *)&vconf;
struct mmc_phase *init = &(host->data->sdmmc.init);
+ struct mmc_phase *calc = &(host->data->sdmmc.calc);
writel(0, host->base + SD_EMMC_ADJUST_V3);
writel(0, host->base + SD_EMMC_DELAY1_V3);
pclkc->core_phase = init->core_phase; /* 2: 180 phase */
pclkc->rx_phase = init->rx_phase;
pclkc->tx_phase = init->tx_phase;
+ if ((host->data->chip_type >= MMC_CHIP_G12A)
+ && (host->data->chip_type != MMC_CHIP_TL1)) {
+ pclkc->core_phase = calc->core_phase;
+ pclkc->tx_phase = calc->tx_phase;
+ }
pclkc->always_on = 1; /* Keep clock always on */
writel(vclkc, host->base + SD_EMMC_CLOCK_V3);
/* overide co-phase by dts */
if (pdata->co_phase)
clkc->core_phase = pdata->co_phase;
- if (pdata->calc_f) {
+ if ((pdata->calc_f)
+ && ((host->data->chip_type >= MMC_CHIP_G12A)
+ && (host->data->chip_type != MMC_CHIP_TL1))) {
clkc->core_phase = para->calc.core_phase;
clkc->tx_phase = para->calc.tx_phase;
}
} else if (timing == MMC_TIMING_SD_HS) {
if (aml_card_type_non_sdio(pdata))
clkc->core_phase = para->sd_hs.core_phase;
- if (pdata->calc_f) {
+ if ((pdata->calc_f)
+ && ((host->data->chip_type >= MMC_CHIP_G12A)
+ && (host->data->chip_type != MMC_CHIP_TL1))) {
clkc->core_phase = para->calc.core_phase;
clkc->tx_phase = para->calc.tx_phase;
}
}
}
- if (pdata->calc_f) {
+ if ((pdata->calc_f)
+ && ((host->data->chip_type >= MMC_CHIP_G12A)
+ && (host->data->chip_type != MMC_CHIP_TL1))) {
if (timing <= MMC_TIMING_SD_HS) {
ret = aml_fixdiv_calc(&fixdiv, &pdata->clk_lay);
if (!ret) {