From fd1c057f18400d4376d4939f2f473c0886d50e5b Mon Sep 17 00:00:00 2001 From: Lucien Zhao Date: Fri, 9 Aug 2024 17:48:47 +0800 Subject: [PATCH] boards: nxp: mimxrt1180_evk: change to use hyperram as RAM region Change to use hyperram as RAM region Enable external mem kconfig Signed-off-by: Lucien Zhao --- boards/nxp/mimxrt1180_evk/CMakeLists.txt | 3 +++ boards/nxp/mimxrt1180_evk/Kconfig.defconfig | 7 +++++++ .../mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33.dts | 10 +++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/boards/nxp/mimxrt1180_evk/CMakeLists.txt b/boards/nxp/mimxrt1180_evk/CMakeLists.txt index 8c36a2597c9..beb30185675 100644 --- a/boards/nxp/mimxrt1180_evk/CMakeLists.txt +++ b/boards/nxp/mimxrt1180_evk/CMakeLists.txt @@ -20,6 +20,9 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER) # used on your custom board. zephyr_compile_definitions(XIP_EXTERNAL_FLASH=1) zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1) + if(CONFIG_EXTERNAL_MEM_CONFIG_DATA AND CONFIG_NXP_IMX_EXTERNAL_HYPERRAM) + zephyr_compile_definitions(USE_HYPERRAM) + endif() zephyr_library_sources(${RT1180_BOARD_DIR}/xip/evkmimxrt1180_flexspi_nor_config.c) zephyr_library_include_directories(${RT1180_BOARD_DIR}/xip) zephyr_library_include_directories(${RT1180_BOARD_DIR}) diff --git a/boards/nxp/mimxrt1180_evk/Kconfig.defconfig b/boards/nxp/mimxrt1180_evk/Kconfig.defconfig index d514be196e2..3b62e522d2d 100644 --- a/boards/nxp/mimxrt1180_evk/Kconfig.defconfig +++ b/boards/nxp/mimxrt1180_evk/Kconfig.defconfig @@ -5,4 +5,11 @@ if BOARD_MIMXRT1180_EVK +# Use External Memory Configuration Data (XMCD) by default when booting primary core (M33) +config EXTERNAL_MEM_CONFIG_DATA + default y if CPU_CORTEX_M33 + +config NXP_IMX_EXTERNAL_HYPERRAM + default y if CPU_CORTEX_M33 + endif # BOARD_MIMXRT1180_EVK diff --git a/boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33.dts b/boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33.dts index e721ddd2ab8..73b6df2f5ed 100644 --- a/boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33.dts +++ b/boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33.dts @@ -14,12 +14,20 @@ compatible = "nxp,mimxrt1189"; chosen { - zephyr,sram = &dtcm; + zephyr,sram = &hyperram0; + zephyr,dtcm = &dtcm; + zephyr,itcm = &itcm; zephyr,flash-controller = &w25q128jw; zephyr,flash = &w25q128jw; zephyr,console = &lpuart1; zephyr,shell-uart = &lpuart1; }; + + hyperram0: memory@14000000 { + /* Winbond W957A8MFYA5K */ + device_type = "memory"; + reg = <0x14000000 DT_SIZE_M(8)>; + }; }; &lpuart1 {