diff --git a/boards/arm/mimxrt1020_evk/Kconfig.defconfig b/boards/arm/mimxrt1020_evk/Kconfig.defconfig index 29c0a4cd9eafce..f8f978802190f0 100644 --- a/boards/arm/mimxrt1020_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1020_evk/Kconfig.defconfig @@ -50,4 +50,24 @@ config ETH_MCUX_0 endif # NETWORKING +if CODE_ITCM + +config FLASH_SIZE + default $(dt_int_val,DT_NXP_IMX_ITCM_0_SIZE,K) + +config FLASH_BASE_ADDRESS + default $(dt_hex_val,DT_NXP_IMX_ITCM_0_BASE_ADDRESS) + +endif # CODE_ITCM + +if CODE_QSPI + +config FLASH_SIZE + default $(dt_int_val,DT_NXP_IMX_FLEXSPI_402A8000_SIZE_1,K) + +config FLASH_BASE_ADDRESS + default $(dt_hex_val,DT_NXP_IMX_FLEXSPI_402A8000_BASE_ADDRESS_1) + +endif + endif # BOARD_MIMXRT1020_EVK diff --git a/boards/arm/mimxrt1020_evk/mimxrt1020_evk.dts b/boards/arm/mimxrt1020_evk/mimxrt1020_evk.dts index 3be395bb3c5ddb..cf7018b8173da4 100644 --- a/boards/arm/mimxrt1020_evk/mimxrt1020_evk.dts +++ b/boards/arm/mimxrt1020_evk/mimxrt1020_evk.dts @@ -27,11 +27,6 @@ }; chosen { -#if defined(CONFIG_CODE_ITCM) - zephyr,flash = &itcm0; -#elif defined(CONFIG_CODE_QSPI) - zephyr,flash = &is25wp064; -#endif zephyr,sram = &dtcm0; zephyr,console = &uart1; zephyr,shell-uart = &uart1; diff --git a/boards/arm/mimxrt1050_evk/Kconfig.defconfig b/boards/arm/mimxrt1050_evk/Kconfig.defconfig index 531ff6f2963edc..9e63c308a30fc6 100644 --- a/boards/arm/mimxrt1050_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1050_evk/Kconfig.defconfig @@ -53,6 +53,44 @@ config UART_MCUX_LPUART_3 endif # UART_MCUX_LPUART +if CODE_ITCM + +config FLASH_SIZE + default $(dt_int_val,DT_NXP_IMX_ITCM_0_SIZE,K) + +config FLASH_BASE_ADDRESS + default $(dt_hex_val,DT_NXP_IMX_ITCM_0_BASE_ADDRESS) + +endif # CODE_ITCM + +if CODE_HYPERFLASH || CODE_QSPI + +config FLASH_SIZE + default $(dt_int_val,DT_NXP_IMX_FLEXSPI_402A8000_SIZE_1,K) + +config FLASH_BASE_ADDRESS + default $(dt_hex_val,DT_NXP_IMX_FLEXSPI_402A8000_BASE_ADDRESS_1) + +endif + +if DATA_DTCM + +config SRAM_SIZE + default $(dt_int_val,DT_NXP_IMX_DTCM_0_SIZE,K) + +config SRAM_BASE_ADDRESS + default $(dt_hex_val,DT_NXP_IMX_DTCM_0_BASE_ADDRESS) +endif + +if DATA_SDRAM + +config SRAM_SIZE + default $(dt_int_val,DT_MMIO_SRAM_80000000_SIZE,K) + +config SRAM_BASE_ADDRESS + default $(dt_hex_val,DT_MMIO_SRAM_80000000_BASE_ADDRESS) +endif + if NETWORKING config NET_L2_ETHERNET diff --git a/boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts b/boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts index 07f7a342090cb8..0269471c5927d6 100644 --- a/boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts +++ b/boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts @@ -28,16 +28,6 @@ }; chosen { -#if defined(CONFIG_CODE_ITCM) - zephyr,flash = &itcm0; -#elif defined(CONFIG_CODE_HYPERFLASH) - zephyr,flash = &hyperflash0; -#endif -#if defined(CONFIG_DATA_SDRAM) - zephyr,sram = &sdram0; -#else - zephyr,sram = &dtcm0; -#endif zephyr,console = &uart1; zephyr,shell-uart = &uart1; }; diff --git a/boards/arm/mimxrt1050_evk/mimxrt1050_evk_qspi.dts b/boards/arm/mimxrt1050_evk/mimxrt1050_evk_qspi.dts index c3272de62d20c0..2fc669c5abdea4 100644 --- a/boards/arm/mimxrt1050_evk/mimxrt1050_evk_qspi.dts +++ b/boards/arm/mimxrt1050_evk/mimxrt1050_evk_qspi.dts @@ -6,16 +6,6 @@ #include "mimxrt1050_evk.dts" -/ { - chosen { -#if defined(CONFIG_CODE_ITCM) - zephyr,flash = &itcm0; -#elif defined(CONFIG_CODE_QSPI) - zephyr,flash = &is25wp064; -#endif - }; -}; - /delete-node/ &hyperflash0; &flexspi0 { diff --git a/boards/arm/mimxrt1060_evk/Kconfig.defconfig b/boards/arm/mimxrt1060_evk/Kconfig.defconfig index e334f3c9331b3c..7a74fffd00205d 100644 --- a/boards/arm/mimxrt1060_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1060_evk/Kconfig.defconfig @@ -31,4 +31,24 @@ config UART_MCUX_LPUART_3 endif # UART_MCUX_LPUART +if CODE_ITCM + +config FLASH_SIZE + default $(dt_int_val,DT_NXP_IMX_ITCM_0_SIZE,K) + +config FLASH_BASE_ADDRESS + default $(dt_hex_val,DT_NXP_IMX_ITCM_0_BASE_ADDRESS) + +endif # CODE_ITCM + +if CODE_HYPERFLASH || CODE_QSPI + +config FLASH_SIZE + default $(dt_int_val,DT_NXP_IMX_FLEXSPI_402A8000_SIZE_1,K) + +config FLASH_BASE_ADDRESS + default $(dt_hex_val,DT_NXP_IMX_FLEXSPI_402A8000_BASE_ADDRESS_1) + +endif + endif # BOARD_MIMXRT1060_EVK || BOARD_MIMXRT1060_EVK_HYPERFLASH diff --git a/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts b/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts index 5e869c027d37e9..9b74f470c070ba 100644 --- a/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts +++ b/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts @@ -24,11 +24,6 @@ }; chosen { -#if defined(CONFIG_CODE_ITCM) - zephyr,flash = &itcm0; -#elif defined(CONFIG_CODE_QSPI) - zephyr,flash = &is25wp064; -#endif zephyr,sram = &dtcm0; zephyr,console = &uart1; zephyr,shell-uart = &uart1; diff --git a/boards/arm/mimxrt1060_evk/mimxrt1060_evk_hyperflash.dts b/boards/arm/mimxrt1060_evk/mimxrt1060_evk_hyperflash.dts index c06a5d60db54d6..1d31d3fa2d2ca7 100644 --- a/boards/arm/mimxrt1060_evk/mimxrt1060_evk_hyperflash.dts +++ b/boards/arm/mimxrt1060_evk/mimxrt1060_evk_hyperflash.dts @@ -6,16 +6,6 @@ #include "mimxrt1060_evk.dts" -/ { - chosen { -#if defined(CONFIG_CODE_ITCM) - zephyr,flash = &itcm0; -#elif defined(CONFIG_CODE_HYPERFLASH) - zephyr,flash = &hyperflash0; -#endif - }; -}; - /delete-node/ &is25wp064; &flexspi0 { reg = <0x402a8000 0x4000>, <0x60000000 0x4000000>; diff --git a/boards/arm/mimxrt1064_evk/Kconfig.defconfig b/boards/arm/mimxrt1064_evk/Kconfig.defconfig index 93a8ce01f76a0e..9b2ebd892b3078 100644 --- a/boards/arm/mimxrt1064_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1064_evk/Kconfig.defconfig @@ -10,6 +10,26 @@ if BOARD_MIMXRT1064_EVK config BOARD default "mimxrt1064_evk" +if CODE_ITCM + +config FLASH_SIZE + default $(dt_int_val,DT_NXP_IMX_ITCM_0_SIZE,K) + +config FLASH_BASE_ADDRESS + default $(dt_hex_val,DT_NXP_IMX_ITCM_0_BASE_ADDRESS) + +endif # CODE_ITCM + +if CODE_INTERNAL_QSPI + +config FLASH_SIZE + default $(dt_int_val,DT_NXP_IMX_FLEXSPI_402A8000_SIZE_1,K) + +config FLASH_BASE_ADDRESS + default $(dt_hex_val,DT_NXP_IMX_FLEXSPI_402A8000_BASE_ADDRESS_1) + +endif + if GPIO_MCUX_IGPIO config GPIO_MCUX_IGPIO_1 diff --git a/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts b/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts index e054a445774f97..6351f4efdf24f6 100644 --- a/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts +++ b/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts @@ -24,11 +24,6 @@ }; chosen { -#if defined(CONFIG_CODE_ITCM) - zephyr,flash = &itcm0; -#elif defined(CONFIG_CODE_INTERNAL_QSPI) - zephyr,flash = &w25q32jvwj0; -#endif zephyr,sram = &dtcm0; zephyr,console = &uart1; zephyr,shell-uart = &uart1;