Commit 1f86ee60 authored by Bai Ping's avatar Bai Ping

MLK-17082-01 imx: add optee support for imx6sll

  Add different defconfig for optee;
  Enable the TZASC support;
  Add env config for tee support.
Signed-off-by: 's avatarBai Ping <ping.bai@nxp.com>
Reviewed-by: 's avatarPeng Fan <peng.fan@nxp.com>
parent df899488
/* /*
* Copyright (C) 2016 Freescale Semiconductor, Inc. * Copyright (C) 2016 Freescale Semiconductor, Inc.
* Copyright 2017 NXP
* *
* SPDX-License-Identifier: GPL-2.0+ * SPDX-License-Identifier: GPL-2.0+
* *
...@@ -53,6 +54,11 @@ DATA 4 0x020c4078 0xffffffff ...@@ -53,6 +54,11 @@ DATA 4 0x020c4078 0xffffffff
DATA 4 0x020c407c 0xffffffff DATA 4 0x020c407c 0xffffffff
DATA 4 0x020c4080 0xffffffff DATA 4 0x020c4080 0xffffffff
#ifdef CONFIG_IMX_OPTEE
DATA 4 0x20e4024 0x00000001
CHECK_BITS_SET 4 0x20e4024 0x1
#endif
DATA 4 0x020E0550 0x00080000 DATA 4 0x020E0550 0x00080000
DATA 4 0x020E0534 0x00000000 DATA 4 0x020E0534 0x00000000
DATA 4 0x020E02AC 0x00000030 DATA 4 0x020E02AC 0x00000030
......
/* /*
* Copyright (C) 2016 Freescale Semiconductor, Inc. * Copyright (C) 2016 Freescale Semiconductor, Inc.
* Copyright 2017 NXP
* *
* SPDX-License-Identifier: GPL-2.0+ * SPDX-License-Identifier: GPL-2.0+
*/ */
...@@ -426,6 +427,12 @@ int board_init(void) ...@@ -426,6 +427,12 @@ int board_init(void)
int board_late_init(void) int board_late_init(void)
{ {
setenv("tee", "no");
#ifdef CONFIG_IMX_OPTEE
setenv("tee", "yes");
#endif
#ifdef CONFIG_ENV_IS_IN_MMC #ifdef CONFIG_ENV_IS_IN_MMC
board_late_mmc_env_init(); board_late_mmc_env_init();
#endif #endif
......
CONFIG_ARM=y
CONFIG_ARCH_MX6=y
CONFIG_TARGET_MX6SLLEVK=y
CONFIG_VIDEO=y
CONFIG_DEFAULT_DEVICE_TREE="imx6sll-evk"
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sllevk/imximage.cfg"
CONFIG_IMX_OPTEE=y
CONFIG_BOOTDELAY=3
CONFIG_BOARD_EARLY_INIT_F=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_MMC=y
CONFIG_CMD_I2C=y
CONFIG_CMD_USB=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_REGULATOR=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_OF_CONTROL=y
# CONFIG_BLK is not set
CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
# CONFIG_DM_MMC_OPS is not set
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_DM_PMIC=y
CONFIG_DM_PMIC_PFUZE100=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PFUZE100=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
...@@ -36,7 +36,11 @@ ...@@ -36,7 +36,11 @@
"\0" \ "\0" \
"initrd_addr=0x83800000\0" \ "initrd_addr=0x83800000\0" \
"initrd_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
"bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\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};\0" \
#define CONFIG_EXTRA_ENV_SETTINGS \ #define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_MFG_ENV_SETTINGS \ CONFIG_MFG_ENV_SETTINGS \
...@@ -48,6 +52,8 @@ ...@@ -48,6 +52,8 @@
"initrd_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
"fdt_file=imx6sll-evk.dtb\0" \ "fdt_file=imx6sll-evk.dtb\0" \
"fdt_addr=0x83000000\0" \ "fdt_addr=0x83000000\0" \
"tee_addr=0x84000000\0" \
"tee_file=undefined\0" \
"boot_fdt=try\0" \ "boot_fdt=try\0" \
"ip_dyn=yes\0" \ "ip_dyn=yes\0" \
"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
...@@ -62,20 +68,25 @@ ...@@ -62,20 +68,25 @@
"source\0" \ "source\0" \
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"loadtee=fatload mmc ${mmcdev}:${mmcpart} ${tee_addr} ${tee_file}\0" \
"mmcboot=echo Booting from mmc ...; " \ "mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \ "run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ "if test ${tee} = yes; then " \
"if run loadfdt; then " \ "run loadfdt; run loadtee; bootm ${tee_addr} - ${fdt_addr}; " \
"bootz ${loadaddr} - ${fdt_addr}; " \ "else " \
"else " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if test ${boot_fdt} = try; then " \ "if run loadfdt; then " \
"bootz; " \ "bootz ${loadaddr} - ${fdt_addr}; " \
"else " \ "else " \
"echo WARN: Cannot load the DT; " \ "if test ${boot_fdt} = try; then " \
"bootz; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \ "fi; " \
"else " \
"bootz; " \
"fi; " \ "fi; " \
"else " \
"bootz; " \
"fi;\0" \ "fi;\0" \
"netargs=setenv bootargs console=${console},${baudrate} " \ "netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \ "root=/dev/nfs " \
...@@ -89,18 +100,24 @@ ...@@ -89,18 +100,24 @@
"setenv get_cmd tftp; " \ "setenv get_cmd tftp; " \
"fi; " \ "fi; " \
"${get_cmd} ${image}; " \ "${get_cmd} ${image}; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ "if test ${tee} = yes; then " \
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ "${get_cmd} ${tee_addr} ${tee_file}; " \
"bootz ${loadaddr} - ${fdt_addr}; " \ "${get_cmd} ${fdt_addr} ${fdt_file}; " \
"else " \ "bootm ${tee_addr} - ${fdt_addr}; " \
"if test ${boot_fdt} = try; then " \ "else " \
"bootz; " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
"bootz ${loadaddr} - ${fdt_addr}; " \
"else " \ "else " \
"echo WARN: Cannot load the DT; " \ "if test ${boot_fdt} = try; then " \
"bootz; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \ "fi; " \
"else " \
"bootz; " \
"fi; " \ "fi; " \
"else " \
"bootz; " \
"fi;\0" "fi;\0"
#define CONFIG_BOOTCOMMAND \ #define CONFIG_BOOTCOMMAND \
......
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