From 69514b8e04f32dd4273cf7a86e2a723f8f0c1460 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Sat, 25 Aug 2018 16:42:23 -0500 Subject: [PATCH] MLK-19336-2 mx6qsabreauto nand config add fastboot support Correct nand partition informatition Signed-off-by: Frank Li --- configs/mx6dlsabreauto_nand_defconfig | 21 +++++++++++++++++++++ configs/mx6qpsabreauto_nand_defconfig | 21 +++++++++++++++++++++ configs/mx6qsabreauto_nand_defconfig | 21 +++++++++++++++++++++ configs/mx6solosabreauto_nand_defconfig | 21 +++++++++++++++++++++ configs/mx6sxsabreauto_nand_defconfig | 21 +++++++++++++++++++++ include/configs/mx6sabre_common.h | 13 ++++++++----- include/configs/mx6sxsabreauto.h | 25 +++++++++---------------- 7 files changed, 122 insertions(+), 21 deletions(-) diff --git a/configs/mx6dlsabreauto_nand_defconfig b/configs/mx6dlsabreauto_nand_defconfig index 628056e693..6a9c87a840 100644 --- a/configs/mx6dlsabreauto_nand_defconfig +++ b/configs/mx6dlsabreauto_nand_defconfig @@ -44,3 +44,24 @@ CONFIG_DM_REGULATOR_PFUZE100=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_ETH=y + +CONFIG_DM_USB=y +CONFIG_USB=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_CMD_USB=y +CONFIG_CI_UDC=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 + +CONFIG_CMD_FASTBOOT=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FSL_FASTBOOT=y +CONFIG_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x12C00000 +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_EFI_PARTITION=y diff --git a/configs/mx6qpsabreauto_nand_defconfig b/configs/mx6qpsabreauto_nand_defconfig index fba5613bec..d13f90226e 100644 --- a/configs/mx6qpsabreauto_nand_defconfig +++ b/configs/mx6qpsabreauto_nand_defconfig @@ -44,3 +44,24 @@ CONFIG_DM_REGULATOR_PFUZE100=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_ETH=y + +CONFIG_DM_USB=y +CONFIG_USB=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_CMD_USB=y +CONFIG_CI_UDC=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 + +CONFIG_CMD_FASTBOOT=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FSL_FASTBOOT=y +CONFIG_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x12C00000 +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_EFI_PARTITION=y diff --git a/configs/mx6qsabreauto_nand_defconfig b/configs/mx6qsabreauto_nand_defconfig index c324d79902..9453a99207 100644 --- a/configs/mx6qsabreauto_nand_defconfig +++ b/configs/mx6qsabreauto_nand_defconfig @@ -44,3 +44,24 @@ CONFIG_DM_REGULATOR_PFUZE100=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_ETH=y + +CONFIG_DM_USB=y +CONFIG_USB=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_CMD_USB=y +CONFIG_CI_UDC=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 + +CONFIG_CMD_FASTBOOT=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FSL_FASTBOOT=y +CONFIG_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x12C00000 +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_EFI_PARTITION=y diff --git a/configs/mx6solosabreauto_nand_defconfig b/configs/mx6solosabreauto_nand_defconfig index 783c15fa61..e3745ec0fe 100644 --- a/configs/mx6solosabreauto_nand_defconfig +++ b/configs/mx6solosabreauto_nand_defconfig @@ -44,3 +44,24 @@ CONFIG_DM_REGULATOR_PFUZE100=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_ETH=y + +CONFIG_DM_USB=y +CONFIG_USB=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_CMD_USB=y +CONFIG_CI_UDC=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 + +CONFIG_CMD_FASTBOOT=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FSL_FASTBOOT=y +CONFIG_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x12C00000 +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_EFI_PARTITION=y diff --git a/configs/mx6sxsabreauto_nand_defconfig b/configs/mx6sxsabreauto_nand_defconfig index 82dea47e31..c34c451de8 100644 --- a/configs/mx6sxsabreauto_nand_defconfig +++ b/configs/mx6sxsabreauto_nand_defconfig @@ -64,3 +64,24 @@ CONFIG_IMX_BOOTAUX=y CONFIG_VIDEO=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y + +CONFIG_DM_USB=y +CONFIG_USB=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_CMD_USB=y +CONFIG_CI_UDC=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 + +CONFIG_CMD_FASTBOOT=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FSL_FASTBOOT=y +CONFIG_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x12C00000 +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_EFI_PARTITION=y diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 6d13a61700..ebddff6637 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -44,7 +44,7 @@ #endif #ifdef CONFIG_NAND_BOOT -#define MFG_NAND_PARTITION "mtdparts=8000000.nor:1m(boot),-(rootfs)\\\\;gpmi-nand:64m(boot),16m(kernel),16m(dtb),16m(tee),-(rootfs) " +#define MFG_NAND_PARTITION "mtdparts=8000000.nor:1m(boot),-(rootfs)\\;gpmi-nand:64m(nandboot),16m(nandkernel),16m(nanddtb),16m(nandtee),-(nandrootfs) " #else #define MFG_NAND_PARTITION "" #endif @@ -62,7 +62,9 @@ "weim_uboot=0x08001000\0"\ "weim_base=0x08000000\0"\ "spi_bus=1\0"\ - "spi_uboot=0x400\0" + "spi_uboot=0x400\0" \ + "mtdparts=" MFG_NAND_PARTITION \ + "\0"\ #ifdef CONFIG_SUPPORT_EMMC_BOOT #define EMMC_ENV \ @@ -100,12 +102,13 @@ TEE_ENV \ "fdt_addr=0x18000000\0" \ "fdt_high=0xffffffff\0" \ + "console=" CONSOLE_DEV "\0" \ "bootargs=console=" CONSOLE_DEV ",115200 ubi.mtd=6 " \ - "root=ubi0:rootfs rootfstype=ubifs " \ + "root=ubi0:nandrootfs rootfstype=ubifs " \ MFG_NAND_PARTITION \ "\0" \ - "bootcmd=nand read ${loadaddr} 0x5000000 0x800000;"\ - "nand read ${fdt_addr} 0x6000000 0x100000;"\ + "bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\ + "nand read ${fdt_addr} 0x5000000 0x100000;"\ "if test ${tee} = yes; then " \ "nand read ${tee_addr} 0x4000000 0x400000;"\ "bootm ${teeaddr} - ${fdt_addr};" \ diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h index 2fa7f51f0d..750bc77dee 100644 --- a/include/configs/mx6sxsabreauto.h +++ b/include/configs/mx6sxsabreauto.h @@ -10,6 +10,7 @@ #define __CONFIG_H #include "mx6_common.h" +#include "imx_env.h" #define CONFIG_DBG_MONITOR @@ -20,7 +21,7 @@ #define CONFIG_MXC_UART_BASE UART1_BASE #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 @@ -58,22 +59,12 @@ #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.file=/fat g_mass_storage.ro=1 " \ - "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ - "g_mass_storage.iSerialNumber=\"\" "\ - MFG_NAND_PARTITION \ - "\0" \ + CONFIG_MFG_ENV_SETTINGS_DEFAULT \ "initrd_addr=0x83800000\0" \ "initrd_high=0xffffffff\0" \ - "bootcmd_mfg=run mfgtool_args; " \ - "if test ${tee} = yes; then " \ - "bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; " \ - "else " \ - "bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; " \ - "fi;\0" + "sd_dev=2\0" \ + "mtdparts=" MFG_NAND_PARTITION \ + "\0"\ #if defined(CONFIG_NAND_BOOT) #define CONFIG_EXTRA_ENV_SETTINGS \ @@ -84,7 +75,7 @@ "fdt_high=0xffffffff\0" \ "console=ttymxc0\0" \ "bootargs=console=ttymxc0,115200 ubi.mtd=6 " \ - "root=ubi0:rootfs rootfstype=ubifs " \ + "root=ubi0:nandrootfs rootfstype=ubifs " \ MFG_NAND_PARTITION \ "\0" \ "bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\ @@ -259,6 +250,8 @@ #define CONFIG_PHY_ATHEROS #define CONFIG_FEC_MXC_MDIO_BASE ENET_BASE_ADDR +#define CONFIG_SERIAL_TAG + #ifdef CONFIG_CMD_USB #define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)