Commit a4e932ca authored by Peng Fan's avatar Peng Fan

MLK-18577-7 imx8qm: mek: support uboot in vm

We are targeting let uboot loading images from emmc to boot android.
Currently only emmc1 is enabled, so other devices are disabled.

Also change memory layout according to VM layout. The memory layout
needs to be samesize as what you configured in as "memory = "3584"".

Add a new dts dedicated for this kind uboot, add a new defconfig
to select CONFIG_XEN/CONFIG_XEN_DEBUG_SERIAL, deselect CONFIG_DM_SERIAL,
select CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK, and disable some devices
compared with imx8qm_mek_androidauto_defconfig.
Signed-off-by: 's avatarPeng Fan <peng.fan@nxp.com>
parent 344ddf76
......@@ -395,6 +395,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += fsl-imx8mq-evk.dtb \
dtb-$(CONFIG_ARCH_IMX8) += fsl-imx8qm-lpddr4-arm2.dtb \
fsl-imx8qm-ddr4-arm2.dtb \
fsl-imx8qm-mek.dtb \
fsl-imx8qm-mek-xen.dtb \
fsl-imx8qxp-lpddr4-arm2.dtb \
fsl-imx8qxp-mek.dtb
......
/*
* Copyright 2018 NXP
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/dts-v1/;
#include "fsl-imx8qm-mek.dts"
&usdhc1 {
/* Need to be same as iomem for sdhc1 in domu.cfg */
reg = <0x1 0x5b010000 0x0 0x10000>;
};
&usdhc2 {
/* Need to be same as iomem for sdhc2 in domu.cfg */
reg = <0x1 0x5b020000 0x0 0x10000>;
status = "disabled";
};
&gpio2 {
status = "disabled";
};
&gpio4 {
status = "disabled";
};
&gpio5 {
status = "disabled";
};
&usb2 {
status = "disabled";
};
&fec1 {
status = "disabled";
};
&fec2 {
status = "disabled";
};
&flexspi0 {
status = "disabled";
};
&i2c0 {
status = "disabled";
};
&i2c1_lvds0 {
status = "disabled";
};
&i2c1_lvds1 {
status = "disabled";
};
&lpspi0 {
status = "disabled";
};
&lpuart0 {
status = "disabled";
};
......@@ -65,6 +65,10 @@ int board_early_init_f(void)
sc_ipc_t ipcHndl = 0;
sc_err_t sciErr = 0;
/* When start u-boot in XEN VM, directly return */
if (IS_ENABLED(CONFIG_XEN))
return 0;
ipcHndl = gd->arch.ipc_channel_handle;
/* Power up UART0, this is very early while power domain is not working */
......@@ -404,6 +408,9 @@ int board_usb_cleanup(int index, enum usb_init_type init)
int board_init(void)
{
if (IS_ENABLED(CONFIG_XEN))
return 0;
/* Power up base board */
sc_pm_set_resource_power_mode(gd->arch.ipc_channel_handle,
SC_R_BOARD_R1, SC_PM_PW_MODE_ON);
......@@ -432,6 +439,9 @@ void board_quiesce_devices(void)
"dma_lpuart0",
};
if (IS_ENABLED(CONFIG_XEN))
return;
power_off_pd_devices(power_on_devices, ARRAY_SIZE(power_on_devices));
}
......@@ -460,11 +470,19 @@ int ft_board_setup(void *blob, bd_t *bd)
int board_mmc_get_env_dev(int devno)
{
/* Use EMMC */
if (IS_ENABLED(CONFIG_XEN))
return 0;
return devno;
}
int mmc_map_to_kernel_blk(int dev_no)
{
/* Use EMMC */
if (IS_ENABLED(CONFIG_XEN))
return 0;
return dev_no;
}
......
CONFIG_ARM=y
CONFIG_ARCH_IMX8=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-mek-xen"
CONFIG_SYS_EXTRA_OPTIONS="ANDROID_AUTO_SUPPORT"
CONFIG_TARGET_IMX8QM_MEK=y
CONFIG_EFI_PARTITION=y
CONFIG_CMD_IMPORTENV=n
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_DM=y
CONFIG_DM_WARN=n
CONFIG_DM_DEVICE_REMOVE=n
CONFIG_DM_SERIAL=n
CONFIG_FSL_LPUART=n
CONFIG_OF_CONTROL=y
CONFIG_DM_I2C=n
# CONFIG_DM_I2C_COMPAT is not set
CONFIG_SYS_I2C_IMX_LPI2C=n
CONFIG_CMD_I2C=n
CONFIG_USB=y
CONFIG_CMD_USB=y
CONFIG_DM_USB=n
CONFIG_USB_XHCI_HCD=n
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_XHCI_IMX8=n
CONFIG_USB_TCPC=n
CONFIG_USB_CDNS3=n
CONFIG_USB_CDNS3_GADGET=n
CONFIG_USB_GADGET_DUALSPEED=y
CONFIG_USB_GADGET=y
CONFIG_CI_UDC=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_G_DNL_MANUFACTURER="FSL"
CONFIG_G_DNL_VENDOR_NUM=0x18d1
CONFIG_G_DNL_PRODUCT_NUM=0x0d02
CONFIG_DM_GPIO=n
CONFIG_DM_PCA953X=n
CONFIG_BOOTDELAY=1
CONFIG_CMD_MMC=y
CONFIG_DM_MMC=y
# CONFIG_BLK is not set
# CONFIG_DM_MMC_OPS is not set
CONFIG_FSL_FSPI=n
CONFIG_DM_SPI=n
CONFIG_DM_SPI_FLASH=n
CONFIG_SPI_FLASH=n
CONFIG_SPI_FLASH_4BYTES_ADDR=n
CONFIG_SPI_FLASH_STMICRO=n
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=n
CONFIG_DM_REGULATOR_GPIO=n
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX8=y
CONFIG_CMD_NET=n
CONFIG_CMD_NFS=n
CONFIG_CMD_BDI=n
CONFIG_CMD_CONSOLE=n
CONFIG_CMD_BOOTD=n
CONFIG_CMD_BOOTEFI=n
CONFIG_CMD_BOOTEFI_HELLO_COMPILE=n
CONFIG_CMD_ELF=n
CONFIG_CMD_GO=n
CONFIG_CMD_RUN=n
CONFIG_CMD_IMI=n
CONFIG_CMD_IMLS=n
CONFIG_CMD_XIMG=n
CONFIG_CMD_EXPORTENV=n
CONFIG_CMD_IMPORTENV=n
CONFIG_CMD_EDITENV=n
CONFIG_CMD_ENV_EXISTS=n
CONFIG_CMD_MEMORY=n
CONFIG_CMD_CRC32=n
CONFIG_CMD_DM=n
CONFIG_CMD_LOADB=n
CONFIG_CMD_LOADS=n
CONFIG_CMD_FLASH=n
CONFIG_CMD_GPT=n
CONFIG_CMD_FPGA=n
CONFIG_CMD_ECHO=n
CONFIG_CMD_ITEST=n
CONFIG_CMD_SOURCE=n
CONFIG_CMD_SETEXPR=n
CONFIG_CMD_MISC=n
CONFIG_DISPLAY_CPUINFO=n
CONFIG_DISPLAY_BOARDINFO=n
CONFIG_EFI_LOADER=n
CONFIG_POWER_DOMAIN=y
CONFIG_IMX8_POWER_DOMAIN=y
CONFIG_DM_THERMAL=n
CONFIG_IMX_SC_THERMAL=n
CONFIG_LZ4=y
CONFIG_XEN=y
CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
CONFIG_XEN_DEBUG_SERIAL=y
......@@ -90,4 +90,8 @@
#undef CONFIG_PHY_ATHEROS
#undef CONFIG_USB_FUNCTION_MASS_STORAGE
#if defined(CONFIG_XEN)
#include "imx8qm_mek_android_auto_xen.h"
#endif
#endif /* IMX8QM_MEK_ANDROID_AUTO_H */
/*
* Copyright 2018 NXP
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef IMX8QM_MEK_ANDROID_AUTO_XEN_H
#define IMX8QM_MEK_ANDROID_AUTO_XEN_H
#undef CONFIG_SYS_SDRAM_BASE
#undef CONFIG_NR_DRAM_BANKS
#undef PHYS_SDRAM_1
#undef PHYS_SDRAM_2
#undef PHYS_SDRAM_1_SIZE
#undef PHYS_SDRAM_2_SIZE
#define CONFIG_SYS_SDRAM_BASE 0x40000000
#define CONFIG_NR_DRAM_BANKS 2
#define PHYS_SDRAM_1 0x40000000
#define PHYS_SDRAM_2 0x200000000
#define PHYS_SDRAM_1_SIZE 0xC0000000 /* 3 GB */
#define PHYS_SDRAM_2_SIZE 0x20000000 /* 512 MB */
#undef CONFIG_LOADADDR
#define CONFIG_LOADADDR 0x40280000
#undef CONFIG_SYS_INIT_SP_ADDR
#define CONFIG_SYS_INIT_SP_ADDR 0x40200000
#undef CONFIG_SYS_TEXT_BASE
#define CONFIG_SYS_TEXT_BASE 0x40080000
#undef CONFIG_REQUIRE_SERIAL_CONSOLE
#undef CONFIG_IMX_SMMU
/* This needs to be stay same in iomem in domu.cfg */
#define SC_IPC_CH 0x15d1d0000
#endif /* IMX8QM_MEK_ANDROID_AUTO_XEN_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment