summaryrefslogtreecommitdiff
path: root/board/ti/am57xx
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2018-01-30 18:01:52 +0300
committerJaehoon Chung <jh80.chung@samsung.com>2018-02-19 10:58:55 +0300
commitc413baa95c6ce4adda3646f0c4d5a3119f463de6 (patch)
tree23219f6af306c63c2997809d5cd2078469087fc1 /board/ti/am57xx
parente74adafb04b908a5f007994138e46237a49e9bfd (diff)
downloadu-boot-c413baa95c6ce4adda3646f0c4d5a3119f463de6.tar.xz
ARM: DRA7x/AM57x: Add MMC/SD fixups for rev1.0 and rev 1.1
Since DRA7xx/AM57xx SR1.1 and SR1.0 has errata to limit the frequency of MMC1 to 96MHz and frequency of MMC2 to 48MHz for AM572x SR1.1, limit the frequency and disable higher speed modes for those revision. Also use the recommended IO delays (those tagged with "rev11") Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'board/ti/am57xx')
-rw-r--r--board/ti/am57xx/board.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index c3f60f60c8..5bd8778563 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -30,6 +30,7 @@
#include <dwc3-uboot.h>
#include <dwc3-omap-uboot.h>
#include <ti-usb-phy-uboot.h>
+#include <mmc.h>
#include "../common/board_detect.h"
#include "mux_data.h"
@@ -815,6 +816,35 @@ int board_mmc_init(bd_t *bis)
omap_mmc_init(1, 0, 0, -1, -1);
return 0;
}
+
+static const struct mmc_platform_fixups am57x_es1_1_mmc1_fixups = {
+ .hw_rev = "rev11",
+ .unsupported_caps = MMC_CAP(MMC_HS_200) |
+ MMC_CAP(UHS_SDR104),
+ .max_freq = 96000000,
+};
+
+static const struct mmc_platform_fixups am57x_es1_1_mmc23_fixups = {
+ .hw_rev = "rev11",
+ .unsupported_caps = MMC_CAP(MMC_HS_200) |
+ MMC_CAP(UHS_SDR104) |
+ MMC_CAP(UHS_SDR50),
+ .max_freq = 48000000,
+};
+
+const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr)
+{
+ switch (omap_revision()) {
+ case DRA752_ES1_0:
+ case DRA752_ES1_1:
+ if (addr == OMAP_HSMMC1_BASE)
+ return &am57x_es1_1_mmc1_fixups;
+ else
+ return &am57x_es1_1_mmc23_fixups;
+ default:
+ return NULL;
+ }
+}
#endif
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT)