1# Copyright 2024 NXP
2# SPDX-License-Identifier: Apache-2.0
3
4if(CONFIG_SOC_MIMX8ML8_ADSP)
5  zephyr_include_directories(adsp)
6  add_subdirectory(adsp)
7
8  zephyr_sources(
9    adsp/pinctrl_soc.h
10  )
11
12  #  west sign
13
14  # See detailed comments in soc/intel/intel_adsp/common/CMakeLists.txt
15  add_custom_target(zephyr.ri ALL
16    DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
17  )
18
19  add_custom_command(
20    OUTPUT ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
21    COMMENT "west sign --if-tool-available --tool rimage ..."
22    COMMAND  west sign --if-tool-available --tool rimage --build-dir ${CMAKE_BINARY_DIR} ${WEST_SIGN_OPTS}
23    DEPENDS ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}
24  )
25
26  set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/adsp/linker.ld CACHE INTERNAL "")
27endif()
28
29if(CONFIG_SOC_MIMX8ML8_A53 OR CONFIG_SOC_MIMX8MM6_A53 OR CONFIG_SOC_MIMX8MN6_A53)
30  zephyr_include_directories(.)
31  zephyr_include_directories(a53)
32
33  zephyr_sources(
34    a53/pinctrl_soc.h
35    a53/soc.c
36  )
37
38  zephyr_sources_ifdef(CONFIG_ARM_MMU a53/mmu_regions.c)
39
40  set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm64/scripts/linker.ld CACHE INTERNAL "")
41endif()
42
43if(CONFIG_SOC_MIMX8MM6_M4)
44  add_subdirectory(m4_mini)
45endif()
46
47if(CONFIG_SOC_MIMX8MQ6_M4)
48  add_subdirectory(m4_quad)
49endif()
50
51if(CONFIG_SOC_MIMX8ML8_M7)
52  add_subdirectory(m7)
53endif()
54