diff options
author | Peng Fan <peng.fan@nxp.com> | 2019-07-10 09:43:07 +0300 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2019-07-15 05:30:08 +0300 |
commit | 44acd492480f8c8047326f3cb02d3e4d3760ecd0 (patch) | |
tree | 903240d5b3fac9eacf60a5899ff655b67967f6c8 /drivers/mmc/mmc-uclass.c | |
parent | 8277171663084e20c0eca7c0b9681019f1a2a353 (diff) | |
download | u-boot-44acd492480f8c8047326f3cb02d3e4d3760ecd0.tar.xz |
mmc: support hs400 enhanced strobe mode
eMMC 5.1+ supports HS400 Enhances Strobe mode without the need for
tuning procedure.
The flow is as following:
- set HS_TIMIMG (Highspeed)
- Host change freq to <= 52Mhz
- set the bus width to Enhanced strobe and DDR8Bit(CMD6),
EXT_CSD[183] = 0x86 instead of 0x80
- set HS_TIMING to 0x3 (HS400)
- Host change freq to <= 200Mhz
- Host select HS400 enhanced strobe complete
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/mmc/mmc-uclass.c')
-rw-r--r-- | drivers/mmc/mmc-uclass.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 9327c8302d..8bf63bbd9c 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -105,6 +105,23 @@ int mmc_execute_tuning(struct mmc *mmc, uint opcode) } #endif +#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +int dm_mmc_set_enhanced_strobe(struct udevice *dev) +{ + struct dm_mmc_ops *ops = mmc_get_ops(dev); + + if (ops->set_enhanced_strobe) + return ops->set_enhanced_strobe(dev); + + return -ENOTSUPP; +} + +int mmc_set_enhanced_strobe(struct mmc *mmc) +{ + return dm_mmc_set_enhanced_strobe(mmc->dev); +} +#endif + int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg) { int val; |