1 /*
2  * Copyright 2024 NXP
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief System/hardware module for nxp_mcxn94x platform
10  *
11  * This module provides routines to initialize and support board-level
12  * hardware for the nxp_mcxn94x platform.
13  */
14 
15 #include <zephyr/kernel.h>
16 #include <zephyr/device.h>
17 #include <zephyr/init.h>
18 #include <soc.h>
19 
20 #ifdef CONFIG_SOC_RESET_HOOK
21 
soc_reset_hook(void)22 void soc_reset_hook(void)
23 {
24 	SystemInit();
25 }
26 
27 #endif
28 
29 #define FLEXCOMM_CHECK_2(n)	\
30 	BUILD_ASSERT((DT_NODE_HAS_COMPAT(n, nxp_lpuart) == 0) &&		\
31 		     (DT_NODE_HAS_COMPAT(n, nxp_lpi2c) == 0),			\
32 		     "Do not enable SPI and UART/I2C on the same Flexcomm node");
33 
34 /* For SPI node enabled, check if UART or I2C is also enabled on the same parent Flexcomm node */
35 #define FLEXCOMM_CHECK(n) DT_FOREACH_CHILD_STATUS_OKAY(DT_PARENT(n), FLEXCOMM_CHECK_2)
36 
37 /* SPI cannot be exist with UART or I2C on the same FlexComm Interface
38  * Throw a build error if user is enabling SPI and UART/I2C on a Flexcomm node.
39  */
40 DT_FOREACH_STATUS_OKAY(nxp_lpspi, FLEXCOMM_CHECK)
41