1
0
Fork 0

MLK-19183-12 iMX8QXP SPL: Add QSPI support for imx8qxp_mek

Allow iMX8QXP SPL to boot from QSPI.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
zero-sugar
Abel Vesa 2018-09-13 11:16:38 +03:00
parent c70afc348e
commit f7587cc948
4 changed files with 28 additions and 0 deletions

View File

@ -119,6 +119,8 @@ u32 spl_boot_device(void)
return BOOT_DEVICE_MMC2_2;
case SD3_BOOT:
return BOOT_DEVICE_MMC1;
case FLEXSPI_BOOT:
return BOOT_DEVICE_SPI;
#elif defined(CONFIG_IMX8M)
case SD1_BOOT:
case MMC1_BOOT:

View File

@ -173,12 +173,32 @@ int board_mmc_getcd(struct mmc *mmc)
void spl_board_init(void)
{
#if defined(CONFIG_QSPI_BOOT)
sc_ipc_t ipcHndl = 0;
ipcHndl = gd->arch.ipc_channel_handle;
if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_ON)) {
puts("Warning: failed to initialize FSPI0\n");
}
#endif
/* DDR initialization */
spl_dram_init();
puts("Normal Boot\n");
}
void spl_board_prepare_for_boot(void)
{
#if defined(CONFIG_QSPI_BOOT)
sc_ipc_t ipcHndl = 0;
ipcHndl = gd->arch.ipc_channel_handle;
if (sc_pm_set_resource_power_mode(ipcHndl, SC_R_FSPI_0, SC_PM_PW_MODE_OFF)) {
puts("Warning: failed to turn off FSPI0\n");
}
#endif
}
void board_init_f(ulong dummy)
{
/* Clear global data */

View File

@ -8,6 +8,7 @@
obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += sf_probe.o spi_flash.o spi_flash_ids.o sf.o
obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o
obj-$(CONFIG_SPL_SPI_SUNXI) += sunxi_spi_spl.o
endif

View File

@ -13,6 +13,11 @@
#include "imx_env.h"
#ifdef CONFIG_SPL_BUILD
#ifdef CONFIG_QSPI_BOOT
#define CONFIG_SPL_SPI_LOAD
#endif
#define CONFIG_SPL_TEXT_BASE 0x0
#define CONFIG_SPL_MAX_SIZE (124 * 1024)
#define CONFIG_SYS_MONITOR_LEN (1024 * 1024)