MLK-12531 mx6sxsabresd: Add CM4 fast boot up demo
This is a demo that CM4 will boot up by u-boot without typing any command. It boots up at u-boot early init, try to minimize the time from power up to the CM4 running. Since CM4 runs on QSPI NOR XIP, we have to disable the QSPI driver in u-boot to avoid conflict. RDC for shared GPIO1 is added, but not enabled, because the kernel is not ready for shared GPIO1. Users can uncomment the CONFIG_IMX_RDC to enable it. Some legacy codes in mx6sxsabreauto are removed. We only need this work on mx6sxsabresd as a demo. Signed-off-by: Ye Li <ye.li@nxp.com>
This commit is contained in:
@ -60,4 +60,7 @@ void board_late_mmc_env_init(void);
|
||||
|
||||
void vadc_power_up(void);
|
||||
void vadc_power_down(void);
|
||||
|
||||
int arch_auxiliary_core_up(u32 core_id, u32 boot_private_data);
|
||||
int arch_auxiliary_core_check_up(u32 core_id);
|
||||
#endif
|
||||
|
||||
@ -32,6 +32,11 @@
|
||||
#include <usb/ehci-fsl.h>
|
||||
#include <asm/imx-common/video.h>
|
||||
|
||||
#ifdef CONFIG_IMX_RDC
|
||||
#include <asm/imx-common/rdc-sema.h>
|
||||
#include <asm/arch/imx-rdc.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FSL_FASTBOOT
|
||||
#include <fsl_fastboot.h>
|
||||
#ifdef CONFIG_ANDROID_RECOVERY
|
||||
@ -436,8 +441,22 @@ int board_phy_config(struct phy_device *phydev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IMX_RDC
|
||||
static rdc_peri_cfg_t const shared_resources[] = {
|
||||
(RDC_PER_GPIO1 | RDC_DOMAIN(0) | RDC_DOMAIN(1)),
|
||||
};
|
||||
#endif
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
#ifdef CONFIG_IMX_RDC
|
||||
imx_rdc_setup_peripherals(shared_resources, ARRAY_SIZE(shared_resources));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_AUXCORE_FASTUP
|
||||
arch_auxiliary_core_up(0, CONFIG_SYS_AUXCORE_BOOTDATA);
|
||||
#endif
|
||||
|
||||
setup_iomux_uart();
|
||||
|
||||
return 0;
|
||||
|
||||
5
configs/mx6sxsabresd_m4fastup_defconfig
Normal file
5
configs/mx6sxsabresd_m4fastup_defconfig
Normal file
@ -0,0 +1,5 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_MX6SXSABRESD=y
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg,SYS_BOOT_QSPI,SYS_AUXCORE_FASTUP"
|
||||
CONFIG_CMD_GPIO=y
|
||||
@ -40,9 +40,7 @@
|
||||
#endif
|
||||
|
||||
#define CONFIG_SYS_AUXCORE_BOOTDATA 0x68000000 /* Set to QSPI1 B flash at default */
|
||||
#ifndef CONFIG_SYS_AUXCORE_FASTUP
|
||||
#define CONFIG_IMX_BOOTAUX /* Boot M4 by command, disable this when M4 fast up */
|
||||
#endif
|
||||
#define CONFIG_IMX_BOOTAUX
|
||||
|
||||
#ifdef CONFIG_IMX_BOOTAUX
|
||||
#define UPDATE_M4_ENV \
|
||||
@ -190,10 +188,7 @@
|
||||
#define CONFIG_SYS_INIT_SP_ADDR \
|
||||
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
|
||||
|
||||
#ifdef CONFIG_SYS_AUXCORE_FASTUP
|
||||
/*#define CONFIG_IMX_RDC*/ /* Disable the RDC temporarily, will enable it in future */
|
||||
#define CONFIG_ENV_IS_IN_MMC /* Must disable QSPI driver, because M4 run on QSPI */
|
||||
#elif defined CONFIG_SYS_BOOT_QSPI
|
||||
#if defined CONFIG_SYS_BOOT_QSPI
|
||||
#define CONFIG_ENV_IS_IN_SPI_FLASH
|
||||
#elif defined CONFIG_SYS_BOOT_NAND
|
||||
#define CONFIG_ENV_IS_IN_NAND
|
||||
|
||||
@ -41,13 +41,11 @@
|
||||
#define CONFIG_MXC_UART
|
||||
#define CONFIG_MXC_UART_BASE UART1_BASE
|
||||
|
||||
#define CONFIG_SYS_AUXCORE_BOOTDATA 0x78000000
|
||||
#ifndef CONFIG_SYS_AUXCORE_FASTUP
|
||||
#define CONFIG_SYS_AUXCORE_BOOTDATA 0x78000000 /* Set to QSPI2 B flash at default */
|
||||
#define CONFIG_IMX_BOOTAUX
|
||||
/* Set to QSPI2 B flash at default */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX_BOOTAUX
|
||||
/* When using M4 fastup demo, no need these M4 env, since QSPI is used by M4 */
|
||||
#ifndef CONFIG_SYS_AUXCORE_FASTUP
|
||||
#define UPDATE_M4_ENV \
|
||||
"m4image=m4_qspi.bin\0" \
|
||||
"loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \
|
||||
@ -177,7 +175,7 @@
|
||||
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
|
||||
|
||||
#ifdef CONFIG_SYS_AUXCORE_FASTUP
|
||||
/*#define CONFIG_IMX_RDC*/ /* Disable the RDC temporarily, will enable it in future */
|
||||
/* #define CONFIG_IMX_RDC */ /* Disable the RDC temporarily, will enable it in future */
|
||||
#define CONFIG_ENV_IS_IN_MMC /* Must disable QSPI driver, because M4 run on QSPI */
|
||||
#elif defined CONFIG_SYS_BOOT_QSPI
|
||||
#define CONFIG_FSL_QSPI
|
||||
|
||||
Reference in New Issue
Block a user