From 84da7dcccd8404a976d31c5af40362a24fb6b591 Mon Sep 17 00:00:00 2001 From: Vit Stanicek Date: Mon, 11 Aug 2025 11:00:14 +0200 Subject: [PATCH 1/4] samples: rtxxx-amp: amp_blinky: Disable for mimxrt700_evk/hifi4 Add a build error conditional for mimxrt700_evk/mimxrt798s/cm33_cpu0, thus disabling build for the hifi4 domain. Remove that target from platform_allow in sample.yaml. Signed-off-by: Vit Stanicek --- samples/boards/nxp/adsp/rtxxx/amp_blinky/CMakeLists.txt | 4 ++++ samples/boards/nxp/adsp/rtxxx/amp_blinky/sample.yaml | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/boards/nxp/adsp/rtxxx/amp_blinky/CMakeLists.txt b/samples/boards/nxp/adsp/rtxxx/amp_blinky/CMakeLists.txt index 0f5e0c7aace42..4a1aed6b6eb93 100644 --- a/samples/boards/nxp/adsp/rtxxx/amp_blinky/CMakeLists.txt +++ b/samples/boards/nxp/adsp/rtxxx/amp_blinky/CMakeLists.txt @@ -9,3 +9,7 @@ project(amp_blinky) target_sources(app PRIVATE src/main.c) include("${CMAKE_CURRENT_LIST_DIR}/../common/dsp-load.cmake") + +if(CONFIG_BOARD_MIMXRT700_EVK_MIMXRT798S_CM33_CPU0) + message(FATAL_ERROR "This example is not supported on the selected board.") +endif() diff --git a/samples/boards/nxp/adsp/rtxxx/amp_blinky/sample.yaml b/samples/boards/nxp/adsp/rtxxx/amp_blinky/sample.yaml index 360d7112dde11..9d593c5fa97e5 100644 --- a/samples/boards/nxp/adsp/rtxxx/amp_blinky/sample.yaml +++ b/samples/boards/nxp/adsp/rtxxx/amp_blinky/sample.yaml @@ -8,7 +8,6 @@ common: min_flash: 1024 platform_allow: - mimxrt685_evk/mimxrt685s/cm33 - - mimxrt700_evk/mimxrt798s/cm33_cpu0 harness: console harness_config: type: one_line From f3d6be6cf3537b30c05c218046a5d007483d9ba5 Mon Sep 17 00:00:00 2001 From: Vit Stanicek Date: Mon, 11 Aug 2025 10:59:16 +0200 Subject: [PATCH 2/4] dt: mimxrt700_evk/hifi4: Remove GPIO0 nodes Remove overlay of gpio0 node. Remove dependent nodes (LEDs, keys). Remove alias bindings of those. Signed-off-by: Vit Stanicek --- .../mimxrt700_evk_mimxrt798s_hifi4.dts | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_hifi4.dts b/boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_hifi4.dts index 10e948d7bb4e3..2c44fb7c76157 100644 --- a/boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_hifi4.dts +++ b/boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_hifi4.dts @@ -19,8 +19,6 @@ compatible = "nxp,mimxrt798s"; aliases { - led1 = &blue_led; - sw0 = &user_button_1; i2s-codec-tx = &sai0; i2s-tx = &sai0; }; @@ -30,27 +28,6 @@ zephyr,console = &flexcomm0_lpuart0; zephyr,shell-uart = &flexcomm0_lpuart0; }; - - leds { - compatible = "gpio-leds"; - blue_led: led_1 { - gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; - label = "User LED_BLUE"; - }; - }; - - gpio_keys { - compatible = "gpio-keys"; - user_button_1: button_0 { - label = "User SW5"; - gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; - zephyr,code = ; - }; - }; -}; - -&gpio0 { - status = "okay"; }; &flexcomm0 { From 32db67a7734eadc63b93cf6bc95a2360f8a6ae26 Mon Sep 17 00:00:00 2001 From: Vit Stanicek Date: Mon, 11 Aug 2025 09:29:41 +0200 Subject: [PATCH 3/4] soc: mimxrt798s/hifi4: Disable GPIO support Remove INPUTMUX interrupt assignments for PINT and GPIO peripherals. Remove gpio0 DT node. As the GPIO peripherals can be secured on the mimxrt798s, accesses from the cm33_cpu0 and hifi4 are mutually exclusive, so the GPIO0 will stay enabled in the cm33_cpu0 domain. Signed-off-by: Vit Stanicek --- dts/xtensa/nxp/nxp_imxrt700_hifi4.dtsi | 14 -------------- soc/nxp/imxrt/imxrt7xx/hifi4/soc.c | 26 ++++++++------------------ 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/dts/xtensa/nxp/nxp_imxrt700_hifi4.dtsi b/dts/xtensa/nxp/nxp_imxrt700_hifi4.dtsi index 6467dcc676c3e..474faac305ff5 100644 --- a/dts/xtensa/nxp/nxp_imxrt700_hifi4.dtsi +++ b/dts/xtensa/nxp/nxp_imxrt700_hifi4.dtsi @@ -124,20 +124,6 @@ reg = <0xa5000 0x1000>; }; - gpio0: gpio@100000 { - #gpio-cells = <2>; - - reg = <0x100000 0x1000>; - - interrupts = <9 0 0>, <10 0 0>; - - nxp,kinetis-port = <&gpio0>; - gpio-controller; - - compatible = "nxp,kinetis-gpio"; - status = "disabled"; - }; - flexcomm0: flexcomm@110000 { #address-cells = <1>; #size-cells = <1>; diff --git a/soc/nxp/imxrt/imxrt7xx/hifi4/soc.c b/soc/nxp/imxrt/imxrt7xx/hifi4/soc.c index a26a18891adb6..a5a0654c596db 100644 --- a/soc/nxp/imxrt/imxrt7xx/hifi4/soc.c +++ b/soc/nxp/imxrt/imxrt7xx/hifi4/soc.c @@ -49,16 +49,16 @@ __weak void mimxrt798s_hifi4_irq_init(void) * - IRQ 6 (SEL 1): FLEXCOMM0 * - IRQ 7 (SEL 2): FLEXCOMM2 * - IRQ 8 (SEL 3): WWDT1 - * - IRQ 9 (SEL 4): PINT0 - * - IRQ 10 (SEL 5): PINT1 - * - IRQ 11 (SEL 6): PINT2 - * - IRQ 12 (SEL 7): PINT3 - * - IRQ 13 (SEL 8): PINT4 - * - IRQ 14 (SEL 9): PINT5 - * - IRQ 15 (SEL 10): PINT6 + * - IRQ 9 (SEL 4): Unmapped + * - IRQ 10 (SEL 5): Unmapped + * - IRQ 11 (SEL 6): Unmapped + * - IRQ 12 (SEL 7): Unmapped + * - IRQ 13 (SEL 8): Unmapped + * - IRQ 14 (SEL 9): Unmapped + * - IRQ 15 (SEL 10): Unmapped * * L2: - * - IRQ 16 (SEL 11): PINT7 + * - IRQ 16 (SEL 11): Unmapped * - IRQ 17 (SEL 12): LPSPI14 * - IRQ 18 (SEL 13): MU2 * - IRQ 19 (SEL 14): MU4 @@ -83,16 +83,6 @@ __weak void mimxrt798s_hifi4_irq_init(void) INPUTMUX_AttachSignal(INPUTMUX0, 2, kINPUTMUX_Flexcomm2ToDspInterrupt); INPUTMUX_AttachSignal(INPUTMUX0, 3, kINPUTMUX_Wdt1ToDspInterrupt); - INPUTMUX_AttachSignal(INPUTMUX0, 4, kINPUTMUX_Gpio0Irq0ToDspInterrupt); - INPUTMUX_AttachSignal(INPUTMUX0, 5, kINPUTMUX_Gpio0Irq1ToDspInterrupt); - - INPUTMUX_AttachSignal(INPUTMUX0, 6, kINPUTMUX_GpioInt2ToDspInterrupt); - INPUTMUX_AttachSignal(INPUTMUX0, 7, kINPUTMUX_GpioInt3ToDspInterrupt); - INPUTMUX_AttachSignal(INPUTMUX0, 8, kINPUTMUX_GpioInt4ToDspInterrupt); - INPUTMUX_AttachSignal(INPUTMUX0, 9, kINPUTMUX_GpioInt5ToDspInterrupt); - INPUTMUX_AttachSignal(INPUTMUX0, 10, kINPUTMUX_GpioInt6ToDspInterrupt); - - INPUTMUX_AttachSignal(INPUTMUX0, 11, kINPUTMUX_GpioInt7ToDspInterrupt); INPUTMUX_AttachSignal(INPUTMUX0, 12, kINPUTMUX_Spi14ToDspInterrupt); INPUTMUX_AttachSignal(INPUTMUX0, 13, kINPUTMUX_Mu2AToDspInterrupt); INPUTMUX_AttachSignal(INPUTMUX0, 14, kINPUTMUX_Mu4BToDspInterrupt); From 06fb8ca2e23779bd8bde3061105dbe2020fc36f9 Mon Sep 17 00:00:00 2001 From: Vit Stanicek Date: Mon, 11 Aug 2025 09:22:06 +0200 Subject: [PATCH 4/4] Revert "boards: mimxrt700_evk: Enable NS & NP GPIO0 access" This reverts commit 40f08428d3e1991d8b0e78fd35bb4daa1cc96653. The PCNS and ICNS registers of the mimxrt798s's GPIO0 peripheral allow accesses to be set up only with mutual exclusivity (either the cm33_cpu0 or the hifi4), thus the access is reverted to the cm33_cpu0 domain. Signed-off-by: Vit Stanicek --- boards/nxp/mimxrt700_evk/board.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/boards/nxp/mimxrt700_evk/board.c b/boards/nxp/mimxrt700_evk/board.c index bef4ba1de3fee..d3e24ed9b483e 100644 --- a/boards/nxp/mimxrt700_evk/board.c +++ b/boards/nxp/mimxrt700_evk/board.c @@ -308,14 +308,9 @@ void board_early_init_hook(void) CLOCK_SetClkDiv(kCLOCK_DivFlexioClk, 1U); #endif -#if CONFIG_BOARD_MIMXRT700_EVK_MIMXRT798S_CM33_CPU0 +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) CLOCK_EnableClock(kCLOCK_Gpio0); RESET_ClearPeripheralReset(kGPIO0_RST_SHIFT_RSTn); - - GPIO0->PCNS = 0xFFFFFFFFU; - GPIO0->PCNP = 0xFFFFFFFFU; - GPIO0->ICNP = 0xFFFFFFFFU; - GPIO0->ICNS = 0xFFFFFFFFU; #endif #if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) @@ -459,9 +454,7 @@ void board_early_init_hook(void) CLOCK_AttachClk(kLPOSC_to_WWDT0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sai0), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(sai1), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(sai2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(sai0), okay) /* SAI clock 368.64 / 15 = 24.576MHz */ CLOCK_AttachClk(kAUDIO_PLL_PFD3_to_AUDIO_VDD2); CLOCK_AttachClk(kAUDIO_VDD2_to_SAI012); @@ -561,12 +554,10 @@ static void GlikeyClearConfig(GLIKEY_Type *base) static void BOARD_InitAHBSC(void) { #if defined(CONFIG_SOC_MIMXRT798S_CM33_CPU0) - GlikeyWriteEnable(GLIKEY0, 0U); GlikeyWriteEnable(GLIKEY0, 1U); - GlikeyWriteEnable(GLIKEY0, 2U); + AHBSC0->MISC_CTRL_DP_REG = 0x000086aa; /* AHBSC0 MISC_CTRL_REG, disable Privilege & Secure checking. */ AHBSC0->MISC_CTRL_REG = 0x000086aa; - AHBSC0->MISC_CTRL_DP_REG = 0x000086aa; GlikeyWriteEnable(GLIKEY0, 7U); /* Enable arbiter0 accessing SRAM */ @@ -575,14 +566,6 @@ static void BOARD_InitAHBSC(void) AHBSC0->MEDIA_ARB0RAM_ACCESS_ENABLE = 0x3FFFFFFF; AHBSC0->NPU_ARB0RAM_ACCESS_ENABLE = 0x3FFFFFFF; AHBSC0->HIFI4_ARB0RAM_ACCESS_ENABLE = 0x3FFFFFFF; - - GlikeyWriteEnable(GLIKEY0, 6U); - AHBSC0->MASTER_SEC_LEVEL = 0x3; - AHBSC0->MASTER_SEC_ANTI_POL_REG = 0xFFC; - - AHBSC0->APB_SLAVE_GROUP0_RULE0 = 0x00000000; - AHBSC0->AHB_PERIPHERAL0_SLAVE_RULE1 = 0x00000000; - AHBSC0->AIPS1_BRIDGE_GROUP0_MEM_RULE2 = 0x00000000; #endif GlikeyWriteEnable(GLIKEY1, 1U);