diff --git a/soc/nxp/imx/imx9/imx93/CMakeLists.txt b/soc/nxp/imx/imx9/imx93/CMakeLists.txt index 59bd50b2d3ee..1d511e7d5ff0 100644 --- a/soc/nxp/imx/imx9/imx93/CMakeLists.txt +++ b/soc/nxp/imx/imx9/imx93/CMakeLists.txt @@ -10,5 +10,6 @@ if(CONFIG_SOC_MIMX9352_A55) elseif(CONFIG_SOC_MIMX9352_M33) zephyr_include_directories(.) zephyr_include_directories(m33) + zephyr_sources(m33/soc.c) set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "") endif() diff --git a/soc/nxp/imx/imx9/imx93/Kconfig b/soc/nxp/imx/imx9/imx93/Kconfig index 87de1fbcf92d..f17c13789118 100644 --- a/soc/nxp/imx/imx9/imx93/Kconfig +++ b/soc/nxp/imx/imx9/imx93/Kconfig @@ -21,6 +21,7 @@ config SOC_MIMX9352_M33 select HAS_MCUX select HAS_MCUX_IOMUXC if PINCTRL select HAS_MCUX_CACHE + select SOC_EARLY_INIT_HOOK config MCUX_CORE_SUFFIX default "_ca55" if SOC_MIMX9352_A55 diff --git a/soc/nxp/imx/imx9/imx93/m33/soc.c b/soc/nxp/imx/imx9/imx93/m33/soc.c new file mode 100644 index 000000000000..ef61a7cb7fbb --- /dev/null +++ b/soc/nxp/imx/imx9/imx93/m33/soc.c @@ -0,0 +1,21 @@ +/* + * Copyright 2025 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include + +#ifdef CONFIG_SOC_EARLY_INIT_HOOK +void soc_early_init_hook(void) +{ + /* Configure secure access to pin registers */ + GPIO1->PCNS = 0x0; + GPIO2->PCNS = 0x0; + GPIO3->PCNS = 0x0; + GPIO4->PCNS = 0x0; +} +#endif