mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-08 22:24:32 +00:00
8d9c0762a8
This commit adds board support for i.MXRT1050-EVK from NXP. This board is an evaluation kit provided by NXP for i.MXRT105x processor family. More information about this board can be found here: https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK The initial supported/tested devices include: - Debug serial - SD Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
81 lines
1.3 KiB
C
81 lines
1.3 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2019
|
|
* Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <dm.h>
|
|
#include <ram.h>
|
|
#include <spl.h>
|
|
#include <asm/io.h>
|
|
#include <asm/armv7m.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
int dram_init(void)
|
|
{
|
|
#ifndef CONFIG_SUPPORT_SPL
|
|
int rv;
|
|
struct udevice *dev;
|
|
|
|
rv = uclass_get_device(UCLASS_RAM, 0, &dev);
|
|
if (rv) {
|
|
debug("DRAM init failed: %d\n", rv);
|
|
return rv;
|
|
}
|
|
|
|
#endif
|
|
return fdtdec_setup_mem_size_base();
|
|
}
|
|
|
|
int dram_init_banksize(void)
|
|
{
|
|
return fdtdec_setup_memory_banksize();
|
|
}
|
|
|
|
#ifdef CONFIG_SPL_BUILD
|
|
#ifdef CONFIG_SPL_OS_BOOT
|
|
int spl_start_uboot(void)
|
|
{
|
|
debug("SPL: booting kernel\n");
|
|
/* break into full u-boot on 'c' */
|
|
return serial_tstc() && serial_getc() == 'c';
|
|
}
|
|
#endif
|
|
|
|
int spl_dram_init(void)
|
|
{
|
|
struct udevice *dev;
|
|
int rv;
|
|
|
|
rv = uclass_get_device(UCLASS_RAM, 0, &dev);
|
|
if (rv)
|
|
debug("DRAM init failed: %d\n", rv);
|
|
return rv;
|
|
}
|
|
|
|
void spl_board_init(void)
|
|
{
|
|
spl_dram_init();
|
|
preloader_console_init();
|
|
arch_cpu_init(); /* to configure mpu for sdram rw permissions */
|
|
}
|
|
|
|
u32 spl_boot_device(void)
|
|
{
|
|
return BOOT_DEVICE_MMC1;
|
|
}
|
|
#endif
|
|
|
|
u32 get_board_rev(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
int board_init(void)
|
|
{
|
|
gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
|
|
|
|
return 0;
|
|
}
|