armv8: ls1012afrx: Add TFABOOT support
TFABOOT support includes: - ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be loaded by trusted firmware - define BOOTCOMMAND for TFABOOT Signed-off-by: Pankit Garg <pankit.garg@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> [YS: remove unnecessary braces] Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
parent
10c8aa16d4
commit
7f91b65844
@ -1,9 +1,12 @@
|
||||
LS1012AFRDM BOARD
|
||||
M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
|
||||
M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
|
||||
S: Maintained
|
||||
F: board/freescale/ls1012afrdm/
|
||||
F: include/configs/ls1012afrdm.h
|
||||
F: configs/ls1012afrdm_qspi_defconfig
|
||||
F: configs/ls1012afrdm_tfa_defconfig
|
||||
F: configs/ls1012afrwy_tfa_defconfig
|
||||
|
||||
LS1012AFRWY BOARD
|
||||
M: Bhaskar Upadhaya <bhaskar.upadhaya@nxp.com>
|
||||
|
@ -80,6 +80,30 @@ int esdhc_status_fixup(void *blob, const char *compat)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TFABOOT
|
||||
int dram_init(void)
|
||||
{
|
||||
#ifdef CONFIG_TARGET_LS1012AFRWY
|
||||
int board_rev;
|
||||
#endif
|
||||
|
||||
gd->ram_size = tfa_get_dram_size();
|
||||
|
||||
if (!gd->ram_size) {
|
||||
#ifdef CONFIG_TARGET_LS1012AFRWY
|
||||
board_rev = get_board_version();
|
||||
|
||||
if (board_rev & BOARD_REV_C)
|
||||
gd->ram_size = SYS_SDRAM_SIZE_1024;
|
||||
else
|
||||
gd->ram_size = SYS_SDRAM_SIZE_512;
|
||||
#else
|
||||
gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int dram_init(void)
|
||||
{
|
||||
#ifdef CONFIG_TARGET_LS1012AFRWY
|
||||
@ -122,6 +146,7 @@ int dram_init(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
@ -139,7 +164,8 @@ int board_init(void)
|
||||
* Set CCI-400 control override register to enable barrier
|
||||
* transaction
|
||||
*/
|
||||
out_le32(&cci->ctrl_ord, CCI400_CTRLORD_EN_BARRIER);
|
||||
if (current_el() == 3)
|
||||
out_le32(&cci->ctrl_ord, CCI400_CTRLORD_EN_BARRIER);
|
||||
|
||||
#ifdef CONFIG_ENV_IS_NOWHERE
|
||||
gd->env_addr = (ulong)&default_environment[0];
|
||||
|
50
configs/ls1012a2g5rdb_tfa_defconfig
Normal file
50
configs/ls1012a2g5rdb_tfa_defconfig
Normal file
@ -0,0 +1,50 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_TARGET_LS1012A2G5RDB=y
|
||||
CONFIG_SYS_TEXT_BASE=0x82000000
|
||||
CONFIG_QSPI_AHB_INIT=y
|
||||
CONFIG_TFABOOT=y
|
||||
CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
|
||||
CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
|
||||
CONFIG_AHCI=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_NR_DRAM_BANKS=2
|
||||
# CONFIG_SYS_MALLOC_F is not set
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||
CONFIG_BOOTDELAY=10
|
||||
CONFIG_USE_BOOTARGS=y
|
||||
CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 quiet lpj=250000"
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_CMD_GREPENV=y
|
||||
CONFIG_CMD_MEMTEST=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_USB=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1012a-2g5rdb"
|
||||
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_DM=y
|
||||
CONFIG_SATA_CEVA=y
|
||||
CONFIG_DM_MMC=y
|
||||
CONFIG_FSL_ESDHC=y
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH=y
|
||||
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
|
||||
CONFIG_FSL_PFE=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_DM_SCSI=y
|
||||
CONFIG_SYS_NS16550=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_DWC3=y
|
||||
CONFIG_USB_STORAGE=y
|
50
configs/ls1012afrdm_tfa_defconfig
Normal file
50
configs/ls1012afrdm_tfa_defconfig
Normal file
@ -0,0 +1,50 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_TARGET_LS1012AFRDM=y
|
||||
CONFIG_SYS_TEXT_BASE=0x82000000
|
||||
CONFIG_QSPI_AHB_INIT=y
|
||||
CONFIG_TFABOOT=y
|
||||
CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
|
||||
CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_NR_DRAM_BANKS=2
|
||||
# CONFIG_SYS_MALLOC_F is not set
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||
CONFIG_BOOTDELAY=10
|
||||
CONFIG_USE_BOOTARGS=y
|
||||
CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 quiet lpj=250000"
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_CMD_GREPENV=y
|
||||
CONFIG_CMD_MEMTEST=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_USB=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1012a-frdm"
|
||||
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_DM=y
|
||||
# CONFIG_MMC is not set
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH=y
|
||||
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
|
||||
CONFIG_FSL_PFE=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_E1000=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_DM_PCI=y
|
||||
CONFIG_DM_PCI_COMPAT=y
|
||||
CONFIG_PCIE_LAYERSCAPE=y
|
||||
CONFIG_SYS_NS16550=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_DWC3=y
|
||||
CONFIG_USB_STORAGE=y
|
53
configs/ls1012afrwy_tfa_SECURE_BOOT_defconfig
Normal file
53
configs/ls1012afrwy_tfa_SECURE_BOOT_defconfig
Normal file
@ -0,0 +1,53 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_TARGET_LS1012AFRWY=y
|
||||
CONFIG_SYS_TEXT_BASE=0x82000000
|
||||
CONFIG_TFABOOT=y
|
||||
CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
|
||||
CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
|
||||
CONFIG_SECURE_BOOT=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_NR_DRAM_BANKS=2
|
||||
# CONFIG_SYS_MALLOC_F is not set
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||
CONFIG_BOOTDELAY=10
|
||||
CONFIG_USE_BOOTARGS=y
|
||||
CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 quiet lpj=250000"
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_ENV_IS_NOWHERE=y
|
||||
CONFIG_CMD_GREPENV=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_PCI=y
|
||||
CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1012a-frwy"
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_DM=y
|
||||
# CONFIG_BLK is not set
|
||||
CONFIG_DM_MMC=y
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH_WINBOND=y
|
||||
CONFIG_FSL_PFE=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_E1000=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_DM_PCI=y
|
||||
CONFIG_DM_PCI_COMPAT=y
|
||||
CONFIG_PCIE_LAYERSCAPE=y
|
||||
CONFIG_SYS_NS16550=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_DWC3=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_RSA=y
|
||||
CONFIG_RSA_SOFTWARE_EXP=y
|
51
configs/ls1012afrwy_tfa_defconfig
Normal file
51
configs/ls1012afrwy_tfa_defconfig
Normal file
@ -0,0 +1,51 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_TARGET_LS1012AFRWY=y
|
||||
CONFIG_SYS_TEXT_BASE=0x82000000
|
||||
CONFIG_TFABOOT=y
|
||||
CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
|
||||
CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_NR_DRAM_BANKS=2
|
||||
# CONFIG_SYS_MALLOC_F is not set
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||
CONFIG_BOOTDELAY=10
|
||||
CONFIG_USE_BOOTARGS=y
|
||||
CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 quiet lpj=250000"
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_CMD_GREPENV=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_PCI=y
|
||||
CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_USB=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1012a-frwy"
|
||||
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_DM=y
|
||||
# CONFIG_BLK is not set
|
||||
CONFIG_DM_MMC=y
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH_WINBOND=y
|
||||
CONFIG_FSL_PFE=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_E1000=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_DM_PCI=y
|
||||
CONFIG_DM_PCI_COMPAT=y
|
||||
CONFIG_PCIE_LAYERSCAPE=y
|
||||
CONFIG_SYS_NS16550=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_DWC3=y
|
||||
CONFIG_USB_STORAGE=y
|
@ -93,10 +93,16 @@
|
||||
"bootm $load_addr#$board\0"
|
||||
|
||||
#undef CONFIG_BOOTCOMMAND
|
||||
#ifdef CONFIG_TFABOOT
|
||||
#undef QSPI_NOR_BOOTCOMMAND
|
||||
#define QSPI_NOR_BOOTCOMMAND "pfe stop;run distro_bootcmd; run qspi_bootcmd; " \
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#else
|
||||
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
|
||||
#define CONFIG_BOOTCOMMAND "pfe stop;run distro_bootcmd; run qspi_bootcmd; " \
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define DEFAULT_PFE_MDIO_NAME "PFE_MDIO"
|
||||
#define DEFAULT_PFE_MDIO1_NAME "PFE_MDIO1"
|
||||
|
@ -65,7 +65,12 @@
|
||||
"$kernel_addr $kernel_size && bootm $load_addr#$board\0"
|
||||
|
||||
#undef CONFIG_BOOTCOMMAND
|
||||
#ifdef CONFIG_TFABOOT
|
||||
#undef QSPI_NOR_BOOTCOMMAND
|
||||
#define QSPI_NOR_BOOTCOMMAND "pfe stop;run distro_bootcmd;run qspi_bootcmd"
|
||||
#else
|
||||
#define CONFIG_BOOTCOMMAND "pfe stop;run distro_bootcmd;run qspi_bootcmd"
|
||||
#endif
|
||||
|
||||
#define CONFIG_CMD_MEMINFO
|
||||
#define CONFIG_SYS_MEMTEST_START 0x80000000
|
||||
|
@ -119,8 +119,14 @@
|
||||
"bootm $load_addr#$board\0"
|
||||
|
||||
#undef CONFIG_BOOTCOMMAND
|
||||
#ifdef CONFIG_TFABOOT
|
||||
#undef QSPI_NOR_BOOTCOMMAND
|
||||
#define QSPI_NOR_BOOTCOMMAND "pfe stop; run distro_bootcmd; run sd_bootcmd; "\
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#else
|
||||
#define CONFIG_BOOTCOMMAND "pfe stop; run distro_bootcmd; run sd_bootcmd; "\
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#endif
|
||||
#define CONFIG_CMD_MEMINFO
|
||||
#define CONFIG_CMD_MEMTEST
|
||||
#define CONFIG_SYS_MEMTEST_START 0x80000000
|
||||
|
Loading…
Reference in New Issue
Block a user