summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan Xu <han.xu@nxp.com>2018-09-07 16:41:21 -0500
committerHan Xu <han.xu@nxp.com>2018-09-10 15:51:58 -0500
commit225fa189faa518a334729d01176bc966e0259b8d (patch)
tree5380017755a843dd988f70c354be15e14fd36782
parentfa0d072b593e5e3bf49427e978de4fa5fd689023 (diff)
MLK-19524: configs: add fastboot support for nand u-boot
add fastboot support for nand u-boot. 1. Add fastboot related configs 2. enlarge the SPL size for i.MX8MQ DDR4 NAND config 3. include the imx_env for boot command settings Signed-off-by: Han Xu <han.xu@nxp.com>
-rw-r--r--configs/imx8mq_ddr3l_arm2_defconfig24
-rw-r--r--configs/imx8mq_ddr4_arm2_defconfig24
-rw-r--r--configs/imx8mq_ddr4_arm2_nand_defconfig24
-rw-r--r--configs/imx8qxp_lpddr4_arm2_nand_defconfig13
-rw-r--r--configs/mx7dsabresd_nand_defconfig9
-rw-r--r--include/configs/imx8mq_arm2.h17
-rw-r--r--include/configs/imx8qxp_arm2.h25
-rw-r--r--include/configs/mx7dsabresd.h6
8 files changed, 113 insertions, 29 deletions
diff --git a/configs/imx8mq_ddr3l_arm2_defconfig b/configs/imx8mq_ddr3l_arm2_defconfig
index 0fa49895e0..837df2587e 100644
--- a/configs/imx8mq_ddr3l_arm2_defconfig
+++ b/configs/imx8mq_ddr3l_arm2_defconfig
@@ -45,3 +45,27 @@ CONFIG_SPL_LOAD_FIT=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_FSL_QSPI=y
+
+CONFIG_USB_GADGET=y
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x42800000
+CONFIG_FASTBOOT_BUF_SIZE=0x40000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_EFI_PARTITION=y
+CONFIG_SDP_LOADADDR=0x40400000
+CONFIG_USB_GADGET_VENDOR_NUM=0x0525
+CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_IMX8M=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
diff --git a/configs/imx8mq_ddr4_arm2_defconfig b/configs/imx8mq_ddr4_arm2_defconfig
index b885d4b7e2..2098f102b3 100644
--- a/configs/imx8mq_ddr4_arm2_defconfig
+++ b/configs/imx8mq_ddr4_arm2_defconfig
@@ -46,3 +46,27 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_CMD_NAND=y
CONFIG_CMD_UBI=y
+
+CONFIG_USB_GADGET=y
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x42800000
+CONFIG_FASTBOOT_BUF_SIZE=0x40000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_EFI_PARTITION=y
+CONFIG_SDP_LOADADDR=0x40400000
+CONFIG_USB_GADGET_VENDOR_NUM=0x0525
+CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_IMX8M=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
diff --git a/configs/imx8mq_ddr4_arm2_nand_defconfig b/configs/imx8mq_ddr4_arm2_nand_defconfig
index d2a4e40190..e7abb6ae4f 100644
--- a/configs/imx8mq_ddr4_arm2_nand_defconfig
+++ b/configs/imx8mq_ddr4_arm2_nand_defconfig
@@ -47,3 +47,27 @@ CONFIG_CMD_NAND=y
CONFIG_NAND_BOOT=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_CMD_UBI=y
+
+CONFIG_USB_GADGET=y
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x42800000
+CONFIG_FASTBOOT_BUF_SIZE=0x40000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_EFI_PARTITION=y
+CONFIG_SDP_LOADADDR=0x40400000
+CONFIG_USB_GADGET_VENDOR_NUM=0x0525
+CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_IMX8M=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
diff --git a/configs/imx8qxp_lpddr4_arm2_nand_defconfig b/configs/imx8qxp_lpddr4_arm2_nand_defconfig
index 2927995919..96b5928882 100644
--- a/configs/imx8qxp_lpddr4_arm2_nand_defconfig
+++ b/configs/imx8qxp_lpddr4_arm2_nand_defconfig
@@ -1,3 +1,4 @@
+
CONFIG_ARM=y
CONFIG_ARCH_IMX8=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-lpddr4-arm2"
@@ -81,3 +82,15 @@ CONFIG_DM_DEVICE_REMOVE=n
CONFIG_SMC_FUSE=y
CONFIG_CMD_MEMTEST=y
+
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x82800000
+CONFIG_FASTBOOT_BUF_SIZE=0x40000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_USB_DEV=1
+CONFIG_EFI_PARTITION=y
diff --git a/configs/mx7dsabresd_nand_defconfig b/configs/mx7dsabresd_nand_defconfig
index b71c7d284c..1e5fdaf54c 100644
--- a/configs/mx7dsabresd_nand_defconfig
+++ b/configs/mx7dsabresd_nand_defconfig
@@ -79,3 +79,12 @@ CONFIG_USB_ETHER_ASIX=y
CONFIG_VIDEO=y
CONFIG_ERRNO_STR=y
CONFIG_DM_ETH=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x83800000
+CONFIG_FASTBOOT_BUF_SIZE=0x40000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=1
+CONFIG_EFI_PARTITION=y
diff --git a/include/configs/imx8mq_arm2.h b/include/configs/imx8mq_arm2.h
index 2c224f679d..678cd5bd1d 100644
--- a/include/configs/imx8mq_arm2.h
+++ b/include/configs/imx8mq_arm2.h
@@ -15,7 +15,7 @@
#endif
#define CONFIG_SPL_TEXT_BASE 0x7E1000
-#define CONFIG_SPL_MAX_SIZE (124 * 1024)
+#define CONFIG_SPL_MAX_SIZE (148 * 1024)
#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300
@@ -328,32 +328,23 @@
/* USB configs */
#ifndef CONFIG_SPL_BUILD
-#define CONFIG_USB_XHCI_IMX8M
-#define CONFIG_USB_XHCI_DWC3
-#define CONFIG_USB_XHCI_HCD
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
-#define CONFIG_USB_DWC3
-#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USBD_HS
-#define CONFIG_USB_GADGET
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_GADGET_MASS_STORAGE
-#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_USB_GADGET_VBUS_DRAW 2
-#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USB_FUNCTION_MASS_STORAGE
-#define CONFIG_USB_GADGET_VENDOR_NUM 0x0525
-#define CONFIG_USB_GADGET_PRODUCT_NUM 0xa4a5
-#define CONFIG_USB_GADGET_MANUFACTURER "FSL"
-
#endif
+#define CONFIG_SERIAL_TAG
+#define CONFIG_FASTBOOT_USB_DEV 0
+
#define CONFIG_OF_SYSTEM_SETUP
#endif
diff --git a/include/configs/imx8qxp_arm2.h b/include/configs/imx8qxp_arm2.h
index 5fda6e8baf..33308cf061 100644
--- a/include/configs/imx8qxp_arm2.h
+++ b/include/configs/imx8qxp_arm2.h
@@ -10,6 +10,8 @@
#include <linux/sizes.h>
#include <asm/arch/imx-regs.h>
+#include "imx_env.h"
+
#define CONFIG_REMAKE_ELF
#define CONFIG_BOARD_EARLY_INIT_F
@@ -102,33 +104,28 @@
"m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
#ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:128m(boot),32m(kernel),16m(dtb),8m(misc),-(rootfs) "
+#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:128m(nandboot),32m(nandkernel),16m(nanddtb),8m(nandtee),-(nandrootfs) "
#else
#define MFG_NAND_PARTITION ""
#endif
#define CONFIG_MFG_ENV_SETTINGS \
- "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
- "rdinit=/linuxrc " \
- "g_mass_storage.stall=0 g_mass_storage.removable=1 " \
- "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\
- "g_mass_storage.iSerialNumber=\"\" "\
- MFG_NAND_PARTITION \
- "clk_ignore_unused "\
- "\0" \
+ CONFIG_MFG_ENV_SETTINGS_DEFAULT \
+ "clk_ignore_unused "\
+ "\0" \
"initrd_addr=0x83100000\0" \
"initrd_high=0xffffffffffffffff\0" \
- "bootcmd_mfg=run mfgtool_args; if iminfo ${initrd_addr}; then "\
- "booti ${loadaddr} ${initrd_addr} ${fdt_addr};"\
- "else fastboot 1; fi\0" \
+ "mtdparts=" MFG_NAND_PARTITION \
+ "\0"\
/* Initial environment variables */
#ifdef CONFIG_NAND_BOOT
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_MFG_ENV_SETTINGS \
"bootargs=console=ttyLP0,115200 ubi.mtd=5 " \
- "root=ubi0:rootfs rootfstype=ubifs " \
- "mtdparts=gpmi-nand:128m(boot),32m(kernel),16m(dtb),8m(misc),-(rootfs)\0"\
+ "root=ubi0:nandrootfs rootfstype=ubifs " \
+ MFG_NAND_PARTITION \
+ "\0"\
"console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200\0" \
"fdt_addr=0x83000000\0"
#else
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index 0099e96d22..dc45ceaff1 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -85,7 +85,7 @@
#endif
#ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),16m(tee),-(rootfs) "
+#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(nandboot),16m(nandkernel),16m(nanddtb),16m(nandtee),-(nandrootfs) "
#else
#define MFG_NAND_PARTITION ""
#endif
@@ -100,6 +100,8 @@
"initrd_high=0xffffffff\0" \
"emmc_dev=1\0"\
"sd_dev=0\0" \
+ "mtdparts=" MFG_NAND_PARTITION \
+ "\0"\
#define CONFIG_DFU_ENV_SETTINGS \
"dfu_alt_info=image raw 0 0x800000;"\
@@ -116,7 +118,7 @@
"fdt_high=0xffffffff\0" \
"console=ttymxc0\0" \
"bootargs=console=ttymxc0,115200 ubi.mtd=4 " \
- "root=ubi0:rootfs rootfstype=ubifs " \
+ "root=ubi0:nandrootfs rootfstype=ubifs " \
MFG_NAND_PARTITION \
"\0" \
"bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\