diff --git a/boards/nxp/s32z2xxdc2/Kconfig.defconfig b/boards/nxp/s32z2xxdc2/Kconfig.defconfig index 2b5dffc89335a..fd0c94e308f1e 100644 --- a/boards/nxp/s32z2xxdc2/Kconfig.defconfig +++ b/boards/nxp/s32z2xxdc2/Kconfig.defconfig @@ -6,6 +6,9 @@ if BOARD_S32Z2XXDC2_S32Z270_RTU0 || BOARD_S32Z2XXDC2_S32Z270_RTU1 config BUILD_OUTPUT_BIN default n +config XIP + default y + if SERIAL config UART_INTERRUPT_DRIVEN diff --git a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.dts b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.dts index 3db4df08388ff..e945f51ca209b 100644 --- a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.dts +++ b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.dts @@ -14,6 +14,7 @@ chosen { zephyr,sram = &sram0; + zephyr,flash = &sram_code0; zephyr,canbus = &canxl0; }; diff --git a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0_defconfig b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0_defconfig index c9a84cc2dfebd..e498ea9854305 100644 --- a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0_defconfig +++ b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0_defconfig @@ -1,7 +1,7 @@ # Copyright 2022,2024 NXP # SPDX-License-Identifier: Apache-2.0 -CONFIG_XIP=n +CONFIG_XIP=y CONFIG_ISR_STACK_SIZE=512 CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=8000000 diff --git a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts index 4aadfbebb1d60..c956b86a4bb68 100644 --- a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts +++ b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts @@ -14,6 +14,7 @@ chosen { zephyr,sram = &sram1; + zephyr,flash = &sram_code1; zephyr,console = &uart0; zephyr,shell-uart = &uart0; zephyr,canbus = &flexcan0; diff --git a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1_defconfig b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1_defconfig index c9a84cc2dfebd..e498ea9854305 100644 --- a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1_defconfig +++ b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1_defconfig @@ -1,7 +1,7 @@ # Copyright 2022,2024 NXP # SPDX-License-Identifier: Apache-2.0 -CONFIG_XIP=n +CONFIG_XIP=y CONFIG_ISR_STACK_SIZE=512 CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=8000000 diff --git a/dts/arm/nxp/nxp_s32z27x_r52.dtsi b/dts/arm/nxp/nxp_s32z27x_r52.dtsi index a04d5a01022d1..f8de2955170fc 100644 --- a/dts/arm/nxp/nxp_s32z27x_r52.dtsi +++ b/dts/arm/nxp/nxp_s32z27x_r52.dtsi @@ -120,6 +120,16 @@ reg = <0x35780000 DT_SIZE_M(1)>; }; + sram_code0: memory@32100000 { + compatible = "mmio-sram"; + reg = <0x32100000 DT_SIZE_M(7)>; + }; + + sram_code1: memory@36100000 { + compatible = "mmio-sram"; + reg = <0x36100000 DT_SIZE_M(7)>; + }; + uart0: uart@40170000 { compatible = "nxp,s32-linflexd"; reg = <0x40170000 0x1000>; diff --git a/soc/nxp/s32/s32ze/mpu_regions.c b/soc/nxp/s32/s32ze/mpu_regions.c index 33c41d362b5da..9cebc1269aa27 100644 --- a/soc/nxp/s32/s32ze/mpu_regions.c +++ b/soc/nxp/s32/s32ze/mpu_regions.c @@ -24,7 +24,7 @@ static const struct arm_mpu_region mpu_regions[] = { REGION_RAM_RO_ATTR((uintptr_t)__rodata_region_end)), MPU_REGION_ENTRY("SRAM_DATA", - (uintptr_t)__rom_region_end, + (uintptr_t)_image_ram_start, REGION_RAM_ATTR((uintptr_t)__kernel_ram_end)), MPU_REGION_ENTRY("DEVICE",