3 * Marvell Semiconductor <www.marvell.com>
4 * Written-by: Lei Wen <leiwen@marvell.com>
6 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/arch/mfp.h>
13 #include <asm/arch/cpu.h>
14 #ifdef CONFIG_GENERIC_MMC
18 DECLARE_GLOBAL_DATA_PTR;
20 int board_early_init_f(void)
23 /* Enable Console on UART2 */
45 MFP_EOC /*End of configureation*/
55 /* arch number of Board */
56 gd->bd->bi_arch_number = MACH_TYPE_TTC_DKB;
57 /* adress of boot parameters */
58 gd->bd->bi_boot_params = panth_sdram_base(0) + 0x100;
62 #ifdef CONFIG_GENERIC_MMC
63 #define I2C_SLAVE_ADDR 0x34
64 #define LDO13_REG 0x28
66 #define LDO_VOLTAGE(x) ((x & 0x7) << 1)
68 int board_mmc_init(bd_t *bd)
70 ulong mmc_base_address[CONFIG_SYS_MMC_NUM] = CONFIG_SYS_MMC_BASE;
73 /* set LDO 13 to 3.0v */
74 data = LDO_VOLTAGE(LDO_V30) | LDO_EN;
75 i2c_write(I2C_SLAVE_ADDR, LDO13_REG, 1, &data, 1);
77 for (i = 0; i < CONFIG_SYS_MMC_NUM; i++) {
78 if (mv_sdh_init(mmc_base_address[i], 0, 0,
79 SDHCI_QUIRK_32BIT_DMA_ADDR))