mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
armv8: ls1043ardb: Add TFABOOT support
TFABOOT support includes: - ls1043ardb_tfa_defconfig to be loaded by trusted firmware - environment address and size changes for TFABOOT - FMAN and QE address changes for TFABOOT - define BOOTCOMMAND for TFABOOT Signed-off-by: Pankit Garg <pankit.garg@nxp.com> Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
@@ -33,7 +33,11 @@
|
||||
#include <asm/arch/config.h>
|
||||
|
||||
/* Link Definitions */
|
||||
#ifdef CONFIG_TFABOOT
|
||||
#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE
|
||||
#else
|
||||
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_FSL_OCRAM_BASE + 0xfff0)
|
||||
#endif
|
||||
|
||||
#define CONFIG_SKIP_LOWLEVEL_INIT
|
||||
|
||||
@@ -119,7 +123,8 @@
|
||||
|
||||
/* IFC */
|
||||
#ifndef SPL_NO_IFC
|
||||
#if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI)
|
||||
#if defined(CONFIG_TFABOOT) || \
|
||||
(!defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI))
|
||||
#define CONFIG_FSL_IFC
|
||||
/*
|
||||
* CONFIG_SYS_FLASH_BASE has the final address (core view)
|
||||
@@ -182,6 +187,16 @@
|
||||
#ifdef CONFIG_SYS_DPAA_FMAN
|
||||
#define CONFIG_SYS_FM_MURAM_SIZE 0x60000
|
||||
|
||||
#ifdef CONFIG_TFABOOT
|
||||
#define CONFIG_SYS_FMAN_FW_ADDR 0x900000
|
||||
#define CONFIG_SYS_QE_FW_ADDR 0x940000
|
||||
|
||||
#define CONFIG_ENV_SPI_BUS 0
|
||||
#define CONFIG_ENV_SPI_CS 0
|
||||
#define CONFIG_ENV_SPI_MAX_HZ 1000000
|
||||
#define CONFIG_ENV_SPI_MODE 0x03
|
||||
|
||||
#else
|
||||
#ifdef CONFIG_NAND_BOOT
|
||||
/* Store Fman ucode at offeset 0x900000(72 blocks). */
|
||||
#define CONFIG_SYS_QE_FMAN_FW_IN_NAND
|
||||
@@ -208,6 +223,7 @@
|
||||
#define CONFIG_SYS_FMAN_FW_ADDR 0x60900000
|
||||
#define CONFIG_SYS_QE_FW_ADDR 0x60940000
|
||||
#endif
|
||||
#endif
|
||||
#define CONFIG_SYS_QE_FMAN_FW_LENGTH 0x10000
|
||||
#define CONFIG_SYS_FDT_PAD (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
|
||||
#endif
|
||||
@@ -300,6 +316,14 @@
|
||||
|
||||
|
||||
#undef CONFIG_BOOTCOMMAND
|
||||
#ifdef CONFIG_TFABOOT
|
||||
#define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#define SD_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; " \
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#define IFC_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd; " \
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#else
|
||||
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
|
||||
#define CONFIG_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \
|
||||
"env exists secureboot && esbc_halt;"
|
||||
@@ -311,6 +335,7 @@
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Monitor Command Prompt */
|
||||
#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
|
||||
|
||||
@@ -162,6 +162,25 @@
|
||||
#define CONFIG_SYS_CPLD_FTIM3 0x0
|
||||
|
||||
/* IFC Timing Params */
|
||||
#ifdef CONFIG_TFABOOT
|
||||
#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR_CSPR_EXT
|
||||
#define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR_CSPR
|
||||
#define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK
|
||||
#define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR
|
||||
#define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0
|
||||
#define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1
|
||||
#define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2
|
||||
#define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3
|
||||
|
||||
#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NAND_CSPR_EXT
|
||||
#define CONFIG_SYS_CSPR1 CONFIG_SYS_NAND_CSPR
|
||||
#define CONFIG_SYS_AMASK1 CONFIG_SYS_NAND_AMASK
|
||||
#define CONFIG_SYS_CSOR1 CONFIG_SYS_NAND_CSOR
|
||||
#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NAND_FTIM0
|
||||
#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NAND_FTIM1
|
||||
#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NAND_FTIM2
|
||||
#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NAND_FTIM3
|
||||
#else
|
||||
#ifdef CONFIG_NAND_BOOT
|
||||
#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
|
||||
#define CONFIG_SYS_CSPR0 CONFIG_SYS_NAND_CSPR
|
||||
@@ -199,6 +218,7 @@
|
||||
#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NAND_FTIM2
|
||||
#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NAND_FTIM3
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_CPLD_CSPR_EXT
|
||||
#define CONFIG_SYS_CSPR2 CONFIG_SYS_CPLD_CSPR
|
||||
@@ -227,6 +247,14 @@
|
||||
#define CONFIG_ENV_OVERWRITE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TFABOOT
|
||||
#define CONFIG_SYS_MMC_ENV_DEV 0
|
||||
|
||||
#define CONFIG_ENV_SIZE 0x2000
|
||||
#define CONFIG_ENV_OFFSET 0x500000
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x500000)
|
||||
#define CONFIG_ENV_SECT_SIZE 0x20000
|
||||
#else
|
||||
#if defined(CONFIG_NAND_BOOT)
|
||||
#define CONFIG_ENV_SIZE 0x2000
|
||||
#define CONFIG_ENV_OFFSET (24 * CONFIG_SYS_NAND_BLOCK_SIZE)
|
||||
@@ -239,6 +267,7 @@
|
||||
#define CONFIG_ENV_SECT_SIZE 0x20000
|
||||
#define CONFIG_ENV_SIZE 0x20000
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* FMan */
|
||||
#ifndef SPL_NO_FMAN
|
||||
|
||||
Reference in New Issue
Block a user