]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
ARM: DRA7x/AM57x: Add MMC/SD fixups for rev1.0 and rev 1.1
authorKishon Vijay Abraham I <kishon@ti.com>
Tue, 30 Jan 2018 15:01:52 +0000 (16:01 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 19 Feb 2018 07:58:55 +0000 (16:58 +0900)
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>
board/ti/am57xx/board.c
board/ti/dra7xx/evm.c

index c3f60f60c891b11061852dd889fb5f30500daebe..5bd87785639d486246de7d910282bf46b1bc56f1 100644 (file)
@@ -30,6 +30,7 @@
 #include <dwc3-uboot.h>
 #include <dwc3-omap-uboot.h>
 #include <ti-usb-phy-uboot.h>
 #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"
 
 #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;
 }
        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)
 #endif
 
 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT)
index 519475e01f534d69edec9f1060c272cb1a2a9126..06f061c92c88118c7f6aa007b83c4cf7a3d3c98d 100644 (file)
@@ -866,6 +866,35 @@ void board_mmc_poweron_ldo(uint voltage)
                palmas_mmc1_poweron_ldo(LDO1_VOLTAGE, LDO1_CTRL, voltage);
        }
 }
                palmas_mmc1_poweron_ldo(LDO1_VOLTAGE, LDO1_CTRL, voltage);
        }
 }
+
+static const struct mmc_platform_fixups dra7x_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 dra7x_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 &dra7x_es1_1_mmc1_fixups;
+               else
+                       return &dra7x_es1_1_mmc23_fixups;
+       default:
+               return NULL;
+       }
+}
 #endif
 
 #ifdef CONFIG_USB_DWC3
 #endif
 
 #ifdef CONFIG_USB_DWC3