soc: nxp: imx93: m33 early init for GPIO

M33 early init for GPIO for secure access configuration,
so that driver can operate pins.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Chunlei Xu <chunlei.xu@nxp.com>
This commit is contained in:
Yangbo Lu 2025-01-06 17:45:01 +08:00 committed by Benjamin Cabé
commit 314686ea03
3 changed files with 23 additions and 0 deletions

View file

@ -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()

View file

@ -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

View file

@ -0,0 +1,21 @@
/*
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <soc.h>
#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