soc: nxp_imx: Add support for device configuration data (DCD)
Adds support for the device configuration data (DCD), which provides a sequence of commands to the imx rt boot ROM to initialize components such as an SDRAM. It is now possible to use the external SDRAM instead of the internal DTCM on the mimxrt1020_evk, mimxrt1050_evk, and mimxrt1060_evk. Note, however, that the default board configurations still link data into internal DTCM, therefore you must use a device tree overlay to override "zephyr,sram = &sdram0" Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
37379478bf
commit
a9389da038
8 changed files with 21 additions and 0 deletions
|
@ -5,5 +5,7 @@
|
|||
#
|
||||
|
||||
zephyr_compile_definitions_ifdef(CONFIG_NXP_IMX_RT_BOOT_HEADER XIP_BOOT_HEADER_ENABLE=1)
|
||||
zephyr_compile_definitions_ifdef(CONFIG_DEVICE_CONFIGURATION_DATA XIP_BOOT_HEADER_DCD_ENABLE=1)
|
||||
|
||||
zephyr_sources_ifdef(CONFIG_BOOT_FLEXSPI_NOR evkbimxrt1050_flexspi_nor_config.c)
|
||||
zephyr_sources_ifdef(CONFIG_DEVICE_CONFIGURATION_DATA evkbimxrt1050_sdram_ini_dcd.c)
|
||||
|
|
|
@ -5,5 +5,7 @@
|
|||
#
|
||||
|
||||
zephyr_compile_definitions_ifdef(CONFIG_NXP_IMX_RT_BOOT_HEADER XIP_BOOT_HEADER_ENABLE=1)
|
||||
zephyr_compile_definitions_ifdef(CONFIG_DEVICE_CONFIGURATION_DATA XIP_BOOT_HEADER_DCD_ENABLE=1)
|
||||
|
||||
zephyr_sources_ifdef(CONFIG_BOOT_FLEXSPI_NOR evkmimxrt1020_flexspi_nor_config.c)
|
||||
zephyr_sources_ifdef(CONFIG_DEVICE_CONFIGURATION_DATA evkmimxrt1020_sdram_ini_dcd.c)
|
||||
|
|
|
@ -5,5 +5,7 @@
|
|||
#
|
||||
|
||||
zephyr_compile_definitions_ifdef(CONFIG_NXP_IMX_RT_BOOT_HEADER XIP_BOOT_HEADER_ENABLE=1)
|
||||
zephyr_compile_definitions_ifdef(CONFIG_DEVICE_CONFIGURATION_DATA XIP_BOOT_HEADER_DCD_ENABLE=1)
|
||||
|
||||
zephyr_sources_ifdef(CONFIG_BOOT_FLEXSPI_NOR evkmimxrt1060_flexspi_nor_config.c)
|
||||
zephyr_sources_ifdef(CONFIG_DEVICE_CONFIGURATION_DATA evkmimxrt1060_sdram_ini_dcd.c)
|
||||
|
|
|
@ -141,6 +141,9 @@ SECTIONS
|
|||
. = CONFIG_IMAGE_VECTOR_TABLE_OFFSET;
|
||||
KEEP(*(.boot_hdr.ivt))
|
||||
KEEP(*(.boot_hdr.data))
|
||||
#ifdef CONFIG_DEVICE_CONFIGURATION_DATA
|
||||
KEEP(*(.boot_hdr.dcd_data))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
. = CONFIG_TEXT_SECTION_OFFSET;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#define __imx_boot_conf_section _GENERIC_SECTION(IMX_BOOT_CONF)
|
||||
#define __imx_boot_data_section _GENERIC_SECTION(IMX_BOOT_DATA)
|
||||
#define __imx_boot_ivt_section _GENERIC_SECTION(IMX_BOOT_IVT)
|
||||
#define __imx_boot_dcd_section _GENERIC_SECTION(IMX_BOOT_DCD)
|
||||
#endif /* CONFIG_ARM */
|
||||
|
||||
#if defined(CONFIG_NOCACHE_MEMORY)
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#define IMX_BOOT_CONF .boot_hdr.conf
|
||||
#define IMX_BOOT_DATA .boot_hdr.data
|
||||
#define IMX_BOOT_IVT .boot_hdr.ivt
|
||||
#define IMX_BOOT_DCD .boot_hdr.dcd_data
|
||||
|
||||
#ifdef CONFIG_NOCACHE_MEMORY
|
||||
#define _NOCACHE_SECTION_NAME nocache
|
||||
|
|
|
@ -187,6 +187,12 @@ config IMAGE_VECTOR_TABLE_OFFSET
|
|||
the application entry point and device configuration data. The boot
|
||||
ROM reqiures a fixed IVT offset for each type of boot device.
|
||||
|
||||
config DEVICE_CONFIGURATION_DATA
|
||||
bool "Enable device configuration data"
|
||||
help
|
||||
Device configuration data (DCD) provides a sequence of commmands to
|
||||
the boot ROM to initialize components such as an SDRAM.
|
||||
|
||||
endif # NXP_IMX_RT_BOOT_HEADER
|
||||
|
||||
endif # SOC_SERIES_IMX_RT
|
||||
|
|
|
@ -60,7 +60,11 @@ const __imx_boot_ivt_section ivt image_vector_table = {
|
|||
.hdr = IVT_HEADER,
|
||||
.entry = CONFIG_FLASH_BASE_ADDRESS + CONFIG_TEXT_SECTION_OFFSET,
|
||||
.reserved1 = IVT_RSVD,
|
||||
#ifdef CONFIG_DEVICE_CONFIGURATION_DATA
|
||||
.dcd = (uint32_t) dcd_data,
|
||||
#else
|
||||
.dcd = (uint32_t) NULL,
|
||||
#endif
|
||||
.boot_data = (uint32_t) &boot_data,
|
||||
.self = (uint32_t) &image_vector_table,
|
||||
.csf = (uint32_t)CSF_ADDRESS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue