Skip to content

Commit

Permalink
Merge branch 'zephyrproject-rtos:master' into custom
Browse files Browse the repository at this point in the history
  • Loading branch information
lam-borg authored Apr 5, 2024
2 parents 2cc419a + 6b252c3 commit 0da11b1
Show file tree
Hide file tree
Showing 5,892 changed files with 3,645,209 additions and 1,004,998 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1,014 changes: 1,014 additions & 0 deletions dts/nxp/mcx/MCXN947VDF-pinctrl.h

Large diffs are not rendered by default.

740 changes: 740 additions & 0 deletions dts/nxp/mcx/MCXN947VNL-pinctrl.h

Large diffs are not rendered by default.

2,220 changes: 2,220 additions & 0 deletions dts/nxp/rw/RW610-pinctrl.h

Large diffs are not rendered by default.

2,220 changes: 2,220 additions & 0 deletions dts/nxp/rw/RW612-pinctrl.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion imx/devices/device_imx.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#define RDC_SEMAPHORE_MASTER_SELF (5)
#define SEMA4_PROCESSOR_SELF (1)

#elif defined(CONFIG_SOC_MCIMX7_M4)
#elif defined(CONFIG_SOC_MCIMX7D_M4)

/* CMSIS-style register definitions */
#include "MCIMX7D_M4.h"
Expand Down
2 changes: 1 addition & 1 deletion imx/drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
zephyr_include_directories(.)

if(CONFIG_SOC_MCIMX7_M4)
if(CONFIG_SOC_MCIMX7D_M4)
zephyr_library_sources(
ccm_imx7d.c
ccm_analog_imx7d.c
Expand Down
61 changes: 18 additions & 43 deletions mcux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,52 +1,26 @@
set(MCUX_SDK_PROJECT_NAME ${ZEPHYR_CURRENT_LIBRARY})
# Translate the SoC name and part number into the mcux device and cpu
# name respectively.
# When this code completes, the following variables will be defined:
# MCUX_DEVICE: SOC name, suffixed by core name when using a dual core part.
# Example: MIMXRT595S_cm33, or LPC55S36
# MCUX_CPU: "CPU"+ SOC part number, followed by core name when using a dual core part.
# Example: CPU_MIMXRT595SFAWC_cm33, or CPU_LPC55S36JBD100
# MCU_DEVICE_PATH: SOC name without core suffix. Must match the name of the
# folder in MCUX HAL. IE MIMXRT595S, or LPC55S36

# Get MCUX_DEVICE and MCUX_DEVICE_PATH from CONFIG_SOC
# For example, if CONFIG_SOC=mimx8ml8_ca53, then MCUX_DEVICE=MIMX8ML8_ca53
# and MCUX_DEVICE_PATH=MIMX8ML8
string(FIND ${CONFIG_SOC} "_" pos)
if(pos GREATER -1)
string(REPLACE "_" ";" MCUX_DEVICE_TMP ${CONFIG_SOC})
list(GET MCUX_DEVICE_TMP 0 MCUX_DEVICE_SOC)
list(GET MCUX_DEVICE_TMP 1 MCUX_DEVICE_CORE)
string(TOUPPER ${MCUX_DEVICE_SOC} MCUX_DEVICE_PATH)
set(MCUX_DEVICE ${MCUX_DEVICE_PATH}_${MCUX_DEVICE_CORE})
if(NOT HWMv2)
# Include HWMv1 logic for MCUX variables
include(${CMAKE_CURRENT_LIST_DIR}/hwmv1.cmake)
else()
string(TOUPPER ${CONFIG_SOC} MCUX_DEVICE)
string(TOUPPER ${CONFIG_SOC} MCUX_DEVICE_PATH)
endif()

if("${MCUX_DEVICE}" STREQUAL "LPC51U68")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER})
elseif("${MCUX_DEVICE}" STREQUAL "LPC54114")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm4)
elseif("${MCUX_DEVICE}" STREQUAL "LPC54114_m0")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm0plus)
elseif("${MCUX_DEVICE}" STREQUAL "LPC55S16")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER})
elseif("${MCUX_DEVICE}" STREQUAL "LPC55S28")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER})
elseif("${MCUX_DEVICE}" STREQUAL "LPC55S69_cpu0")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm33_core0)
elseif("${MCUX_DEVICE}" STREQUAL "LPC55S69_cpu1")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm33_core1)
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1052")
string(REGEX REPLACE "(.*)[AB]$" "CPU_\\1B" MCUX_CPU ${CONFIG_SOC_PART_NUMBER})
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT595S_cm33")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm33)
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT685S_cm33")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm33)
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1176_cm4")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm4)
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1176_cm7")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm7)
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1166_cm4")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm4)
elseif("${MCUX_DEVICE}" STREQUAL "MIMXRT1166_cm7")
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER}_cm7)
else()
string(TOUPPER ${CONFIG_SOC} MCUX_DEVICE)
set(MCUX_CPU CPU_${CONFIG_SOC_PART_NUMBER})

if(DEFINED CONFIG_MCUX_CORE_SUFFIX)
string(APPEND MCUX_DEVICE ${CONFIG_MCUX_CORE_SUFFIX})
string(APPEND MCUX_CPU ${CONFIG_MCUX_CORE_SUFFIX})
endif()
endif()

zephyr_include_directories(mcux-sdk/devices/${MCUX_DEVICE_PATH})
Expand All @@ -73,9 +47,10 @@ zephyr_compile_definitions(${MCUX_CPU})
# practice, drilling down like this avoids the need for repetitive
# build scripts for every mcux device.
zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_clock.c)
if (${MCUX_DEVICE} MATCHES "LPC|MIMXRT6|MIMXRT5")
if (${MCUX_DEVICE} MATCHES "LPC|MIMXRT6|MIMXRT5|RW6|MCXN.4.")
zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_power.c)
zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_reset.c)
zephyr_library_sources_ifdef(CONFIG_HWINFO_RW61X mcux-sdk/devices/${MCUX_DEVICE}/drivers/fsl_ocotp.c)
endif()

# RT11xx SOC initialization file requires additional drivers, import them
Expand Down
48 changes: 15 additions & 33 deletions mcux/README
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ MCUXpresso SDK

Origin:
NXP MCUXpresso SDK
https://github.com/NXPmicro/mcux-sdk
https://github.com/nxp-mcuxpresso/mcux-sdk
SHA: acc105f1e6304bf3a16ebbb503f8882a4daa1408

NXP Kinetis Connectivity Software
https://www.nxp.com/webapp/Download?colCode=KW40Z-CONNECTIVITY-SOFTWARE&appType=license&Parent_nodeId=1432854896956716810497&Parent_pageType=product
https://www.nxp.com/webapp/Download?colCode=MKW2XD-MRC20A-CONNECTIVITY-SW&appType=license&Parent_nodeId=1425322332576706617013&Parent_pageType=productI

NXP MCUXpresso SDK USB
https://github.com/NXPmicro/mcux-sdk-middleware-usb

https://github.com/nxp-mcuxpresso/mcux-sdk-middleware-usb
SHA: c8317a37546b18bef2072d6075e061d668b3f1c7

Status:
Some older Kinetis W family SoCs are not supported in MCUXpresso SDK, but
Expand Down Expand Up @@ -58,37 +61,16 @@ License Link:
https://spdx.org/licenses/BSD-3-Clause.html

Patch List:
1. Delete the .a binary archive files after an SDK update before committing the changes. These files are still present in the SDK github repo but have been
deleted from the Zephyr HAL
2. mcux-sdk/drivers/caam/fsl_caam.c: Move used job descriptors in the CAAM driver from the stack to noncacheable section. At time of writing, there should
1. mcux-sdk/drivers/caam/fsl_caam.c: Move used job descriptors in the CAAM driver from the stack to noncacheable section. At time of writing, there should
be four being used for entropy in zephyr.
3. fsl_common.h: add #ifdef ZEPHYR #endif to include Zephyr's sys utils
4. mcux-sdk/drivers/pit/fsl_pit.c: add guards to avoid compilation warnings when building
with SDK clock control driver disabled.
5. devices: MIMX8QM6: Add header files for QM's DSP core
6. devices: MIMX8QM6_dsp.h: Adjust DSP core interrupts
7. devices: MIMX8QM6_dsp.h: Add missing LPUART IRQ macro
8. MIMX8QM6: drivers: fsl_clock.c: Report NULL frequency for unsupported core
9. devices: MIMX8QX6: Add header files for QXP's DSP core
10. MIMX8QX6: scfw_api: Switch to including generic fsl_device_registers.h
11. mcux-sdk/drivers/i3c/fsl_i3c.c: add guards to avoid compilation warnings when building
with SDK clock control driver disabled for SoC has no reset driver.
12. MCUXGH-1081[IRQSTEER] Improve for portability
13. drivers: irqsteer: Add function for querying the master interrupts status
14. devices: MIMX8ML8: Fix naming inconsistency
15. devices: MIMX8ML8: Add missing FSL_FEATURE_* macros
16. devices: MIMX8ML8: fsl_clock: Add missing definitions for IRQ_STEER
17. devices: MIMX9352: Add new SAI-related FSL_FEATURE_* macros
18. drivers: fsl_sai: Allow enabling/disabling implicit channel configuration
19. drivers: fsl_sai: Allow NULL FIFO watermark
20. drivers: fsl_sai: Fix compilation warnings when asserts are disabled
21. mcux-sdk/drivers/ftm/fsl_ftm.c: make public FTM_GetInstance() function (mcux-sdk#155)
22. mcux-sdk-middleware-usb: fix ip control return value for ip3511
23. drivers: edma: Introduce revision 2 of eDMA driver
24. devices: MIMX9352: Add SoC layer definitions required for using edma rev2
25. exclude the following directories and files from mcux-sdk update to reduce HAL size:
2. Patched middleware_usb_common_header.cmake file to address build issue. PR submitted to upstream
3. exclude the following directories and files from mcux-sdk update to reduce HAL size:
- All *.a binary archive files. Files are still present in the SDK github repo but are not allowed in Zephyr Project
- mcux-sdk\manifests
- mcux-sdk\middleware\issdk\docs
- mcux-sdk\docs
26. mcux: mcux-sdk: Fix "loop" labels in inline assembly to use unique identifiers.
27. mcux-sdk-middleware-usb: Fix build issues with the code from github
4. Add RW61X device_system.cmake
5. devices: MCXN947: Update system file to remove SDK sepecific defines
6. devices: MIMX8UD7: add header and source files for HIFI4 DSP core
7. devices: MIMX8UD7: fsl_device_registers.h: add support for HIFI4 DSP
8. devices: MIMX8UD7: add cmake file for reset driver
9. drivers: lpflexcomm: lpi2c: Fixed an error in the driver when interacting with the lpflexcomm driver
78 changes: 61 additions & 17 deletions mcux/hal_nxp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/common
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/flexcomm
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/lpflexcomm
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/flexio
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/dmamux
)
Expand Down Expand Up @@ -79,20 +80,20 @@ zephyr_library_compile_definitions_ifdef(
)

# Required by all SCFW-based SoCs
if (CONFIG_SOC_MIMX8QM_A53 OR CONFIG_SOC_MIMX8QM_ADSP OR CONFIG_SOC_MIMX8QXP_ADSP)
if (CONFIG_SOC_MIMX8QM6_ADSP OR CONFIG_SOC_MIMX8QX6_ADSP)
list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/devices/${MCUX_DEVICE}/scfw_api
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/devices/${MCUX_DEVICE_PATH}/scfw_api
)
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/devices/${MCUX_DEVICE}/scfw_api)
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/devices/${MCUX_DEVICE_PATH}/scfw_api)
include(driver_scfw_api)
endif()

include(driver_common)

#Include system_xxx file
#This can be extended to other SoC series if needed
if (DEFINED CONFIG_PLATFORM_SPECIFIC_INIT OR DEFINED CONFIG_SOC_SERIES_IMX_RT6XX
OR DEFINED CONFIG_SOC_SERIES_LPC55XXX)
if (DEFINED CONFIG_PLATFORM_SPECIFIC_INIT OR DEFINED CONFIG_SOC_SERIES_IMXRT6XX
OR DEFINED CONFIG_SOC_SERIES_LPC55XXX OR DEFINED CONFIG_SOC_SERIES_MCXNX4X)
if (CONFIG_SOC_MIMXRT1166_CM4)
include(device_system_MIMXRT1166_cm4)
elseif (CONFIG_SOC_MIMXRT1166_CM7)
Expand All @@ -109,6 +110,10 @@ elseif (CONFIG_SOC_LPC54114_M4)
include(device_system_LPC54114_cm4)
elseif (CONFIG_SOC_LPC54114_M0)
include(device_system_LPC54114_cm0plus)
elseif (CONFIG_SOC_MCXN947_CPU0)
include(device_system_MCXN947_cm33_core0)
elseif (CONFIG_SOC_MCXN947_CPU1)
include(device_system_MCXN947_cm33_core1)
else()
include(device_system)
endif()
Expand Down Expand Up @@ -142,52 +147,68 @@ include_driver_ifdef(CONFIG_IPM_IMX mu driver_mu)
include_driver_ifdef(CONFIG_MBOX_NXP_IMX_MU mu driver_mu)
include_driver_ifdef(CONFIG_CAN_MCUX_FLEXCAN flexcan driver_flexcan)
include_driver_ifdef(CONFIG_CAN_MCUX_FLEXCAN_FD flexcan driver_flexcan)
include_driver_ifdef(CONFIG_COUNTER_MCUX_PIT pit driver_pit)
include_driver_ifdef(CONFIG_COUNTER_NXP_PIT pit driver_pit)
include_driver_ifdef(CONFIG_COUNTER_MCUX_RTC rtc driver_rtc)
include_driver_ifdef(CONFIG_DAC_MCUX_DAC dac driver_dac)
include_driver_ifdef(CONFIG_DAC_MCUX_DAC32 dac32 driver_dac32)
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA dmamux driver_dmamux)
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA_V3 dmamux driver_dmamux)
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA edma driver_edma)
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA_V3 dma3 driver_dma3)
include_driver_ifdef(CONFIG_DMA_MCUX_EDMA_V4 edma4 driver_edma4)
include_driver_ifdef(CONFIG_ENTROPY_MCUX_RNGA rnga driver_rnga)
include_driver_ifdef(CONFIG_ENTROPY_MCUX_TRNG trng driver_trng)
include_driver_ifdef(CONFIG_ENTROPY_MCUX_CAAM caam driver_caam)
include_driver_ifdef(CONFIG_ETH_NXP_ENET enet driver_enet)
include_driver_ifdef(CONFIG_HAS_MCUX_SMC smc driver_smc)
include_driver_ifdef(CONFIG_I2C_MCUX i2c driver_i2c)
if (CONFIG_NXP_LP_FLEXCOMM)
include_driver_ifdef(CONFIG_I2C_MCUX_LPI2C lpflexcomm driver_lpflexcomm)
include_driver_ifdef(CONFIG_I2C_MCUX_LPI2C lpflexcomm/lpi2c driver_lpi2c)
else()
include_driver_ifdef(CONFIG_I2C_MCUX_LPI2C lpi2c driver_lpi2c)
endif()
include_driver_ifdef(CONFIG_I3C_MCUX i3c driver_i3c)
include_driver_ifdef(CONFIG_MCUX_ACMP acmp driver_acmp)
include_driver_ifdef(CONFIG_PWM_MCUX_FTM ftm driver_ftm)
include_driver_ifdef(CONFIG_PWM_MCUX_TPM tpm driver_tpm)
include_driver_ifdef(CONFIG_PWM_MCUX_PWT pwt driver_pwt)
include_driver_ifdef(CONFIG_RTC_MCUX rtc driver_rtc)
include_driver_ifdef(CONFIG_SPI_MCUX_DSPI dspi driver_dspi)
include_driver_ifdef(CONFIG_SPI_MCUX_ECSPI ecspi driver_ecspi)
if (CONFIG_NXP_LP_FLEXCOMM)
include_driver_ifdef(CONFIG_SPI_MCUX_LPSPI lpflexcomm driver_lpflexcomm)
include_driver_ifdef(CONFIG_SPI_MCUX_LPSPI lpflexcomm/lpspi driver_lpspi)
else()
include_driver_ifdef(CONFIG_SPI_MCUX_LPSPI lpspi driver_lpspi)
endif()
include_driver_ifdef(CONFIG_MCUX_FLEXIO flexio driver_flexio)
include_driver_ifdef(CONFIG_SPI_MCUX_FLEXIO flexio/spi driver_flexio_spi)
include_driver_ifdef(CONFIG_UART_MCUX uart driver_uart)
include_driver_ifdef(CONFIG_UART_MCUX_LPSCI lpsci driver_lpsci)
if (CONFIG_NXP_LP_FLEXCOMM)
include_driver_ifdef(CONFIG_UART_MCUX_LPUART lpflexcomm driver_lpflexcomm)
include_driver_ifdef(CONFIG_UART_MCUX_LPUART lpflexcomm/lpuart driver_lpuart)
else()
include_driver_ifdef(CONFIG_UART_MCUX_LPUART lpuart driver_lpuart)
endif()
include_driver_ifdef(CONFIG_WDT_MCUX_WDOG wdog driver_wdog)
include_driver_ifdef(CONFIG_WDT_MCUX_WDOG32 wdog32 driver_wdog32)
include_driver_ifdef(CONFIG_COUNTER_MCUX_GPT gpt driver_gpt)
include_driver_ifdef(CONFIG_MCUX_GPT_TIMER gpt driver_gpt)
include_driver_ifdef(CONFIG_COUNTER_MCUX_PIT pit driver_pit)
include_driver_ifdef(CONFIG_COUNTER_MCUX_QTMR qtmr_1 driver_qtmr_1)
include_driver_ifdef(CONFIG_DISPLAY_MCUX_ELCDIF elcdif driver_elcdif)
include_driver_ifdef(CONFIG_DISPLAY_MCUX_DCNANO_LCDIF lcdif driver_lcdif)
include_driver_ifdef(CONFIG_MCUX_PXP pxp driver_pxp)
include_driver_ifdef(CONFIG_ETH_MCUX enet driver_enet)
include_driver_ifdef(CONFIG_GPIO_MCUX_IGPIO igpio driver_igpio)
include_driver_ifdef(CONFIG_GPIO_MCUX_RGPIO rgpio driver_rgpio)
include_driver_ifdef(CONFIG_I2C_MCUX_LPI2C lpi2c driver_lpi2c)
include_driver_ifdef(CONFIG_I2S_MCUX_SAI sai driver_sai)
include_driver_ifdef(CONFIG_DAI_NXP_SAI sai driver_sai)
include_driver_ifdef(CONFIG_MEMC_MCUX_FLEXSPI flexspi driver_flexspi)
include_driver_ifdef(CONFIG_PWM_MCUX pwm driver_pwm)
include_driver_ifdef(CONFIG_SPI_MCUX_LPSPI lpspi driver_lpspi)
include_driver_ifdef(CONFIG_UART_MCUX_LPUART lpuart driver_lpuart)
include_driver_ifdef(CONFIG_VIDEO_MCUX_CSI csi driver_csi)
include_driver_ifdef(CONFIG_VIDEO_MCUX_MIPI_CSI2RX mipi_csi2rx driver_mipi_csi2rx)
include_driver_ifdef(CONFIG_WDT_MCUX_IMX_WDOG wdog01 driver_wdog01)
include_driver_ifdef(CONFIG_DMA_MCUX_LPC lpc_dma driver_lpc_dma)
include_driver_ifdef(CONFIG_MEMC_MCUX_FLEXSPI flexspi driver_flexspi)
Expand All @@ -198,7 +219,7 @@ include_driver_ifdef(CONFIG_HWINFO_MCUX_SRC src driver_src)
include_driver_ifdef(CONFIG_HWINFO_MCUX_SIM sim driver_sim)
include_driver_ifdef(CONFIG_HWINFO_MCUX_RCM rcm driver_rcm)
include_driver_ifdef(CONFIG_IPM_MCUX mailbox driver_mailbox)
include_driver_ifdef(CONFIG_MBOX_NXP_MAILBOX mailbox driver_mailbox)
include_driver_ifdef(CONFIG_MBOX_NXP_MAILBOX mailbox driver_mailbox)
include_driver_ifdef(CONFIG_COUNTER_MCUX_SNVS snvs_hp driver_snvs_hp)
include_driver_ifdef(CONFIG_COUNTER_MCUX_SNVS_SRTC snvs_lp driver_snvs_lp)
include_driver_ifdef(CONFIG_COUNTER_MCUX_LPTMR lptmr driver_lptmr)
Expand All @@ -212,16 +233,20 @@ include_driver_ifdef(CONFIG_ADC_MCUX_ETC adc_etc driver_adc_etc)
include_driver_ifdef(CONFIG_MCUX_XBARA xbara driver_xbara)
include_driver_ifdef(CONFIG_MCUX_XBARB xbarb driver_xbarb)
include_driver_ifdef(CONFIG_QDEC_MCUX enc driver_enc)
include_driver_ifdef(CONFIG_CRYPTO_MCUX_DCP dcp driver_dcp)
include_driver_ifdef(CONFIG_CRYPTO_MCUX_DCP dcp driver_dcp)
include_driver_ifdef(CONFIG_DMA_MCUX_SMARTDMA smartdma driver_lpc_smartdma)
include_driver_ifdef(CONFIG_DAC_MCUX_LPDAC dac_1 driver_dac_1)
include_driver_ifdef(CONFIG_NXP_IRQSTEER irqsteer driver_irqsteer)
include_driver_ifdef(CONFIG_DAC_MCUX_LPDAC dac_1 driver_dac_1)
include_driver_ifdef(CONFIG_NXP_IRQSTEER irqsteer driver_irqsteer)
include_driver_ifdef(CONFIG_AUDIO_DMIC_MCUX dmic driver_dmic)
include_driver_ifdef(CONFIG_DMA_NXP_EDMA edma_rev2 driver_edma_rev2)
include_driver_ifdef(CONFIG_DMA_NXP_EDMA edma_rev2 driver_edma_rev2)
include_driver_ifdef(CONFIG_SOC_FAMILY_NXP_MCX mcx_spc driver_mcx_spc)
include_driver_ifdef(CONFIG_ADC_MCUX_GAU cns_adc driver_cns_adc)
include_driver_ifdef(CONFIG_DAC_MCUX_GAU cns_dac driver_cns_dac)
include_driver_ifdef(CONFIG_DAI_NXP_ESAI esai driver_esai)

if ((${MCUX_DEVICE} MATCHES "MIMXRT1[0-9][0-9][0-9]") AND (NOT (CONFIG_SOC_MIMXRT1166_CM4 OR CONFIG_SOC_MIMXRT1176_CM4)))
include_driver_ifdef(CONFIG_HAS_MCUX_CACHE cache/armv7-m7 driver_cache_armv7_m7)
elseif(${MCUX_DEVICE} MATCHES "MIMXRT(5|6)")
elseif((${MCUX_DEVICE} MATCHES "MIMXRT(5|6)") OR (${MCUX_DEVICE} MATCHES "RW61") OR (${MCUX_DEVICE} MATCHES "MCXN.4."))
include_driver_ifdef(CONFIG_HAS_MCUX_CACHE cache/cache64 driver_cache_cache64)
elseif((${MCUX_DEVICE} MATCHES "MK(28|66)") OR (${MCUX_DEVICE} MATCHES "MKE(14|16|18)") OR (CONFIG_SOC_MIMXRT1166_CM4) OR (CONFIG_SOC_MIMXRT1176_CM4))
include_driver_ifdef(CONFIG_HAS_MCUX_CACHE cache/lmem driver_cache_lmem)
Expand All @@ -236,6 +261,14 @@ elseif (${MCUX_DEVICE} MATCHES "MIMXRT10[0-9][0-9]")
include_driver_ifdef(CONFIG_PM_MCUX_PMU pmu driver_pmu)
endif()

if((${MCUX_DEVICE} MATCHES "RW61") AND (NOT DEFINED CONFIG_MINIMAL_LIBC))
# Whenever building for RW61x without minimal LIBC, use optimized memcpy.
# This will avoid issues with unaligned access to peripheral RAM regions
# caused by the memcpy implmentation in newlib
zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/utilities/misc_utilities/fsl_memcpy.S)
endif()


if("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_kinetis")

include_driver_ifdef(CONFIG_SOC_FLASH_MCUX flash driver_flash)
Expand All @@ -250,7 +283,18 @@ if("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_kinetis")

endif()

if("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_lpc")
if("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_mcx")

include_driver_ifdef(CONFIG_SOC_FLASH_MCUX mcx_romapi driver_flashiap)
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/mcx_romapi/flash)

include(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/port/driver_port.cmake)
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/port)

endif()

# Temporary change to handle LPC SOC family name change between HWMv1 and HWMv2
if(("${CONFIG_SOC_FAMILY}" STREQUAL "lpc") OR ("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_lpc"))

if ((${MCUX_DEVICE} MATCHES "LPC8[0-9][0-9]") OR (${MCUX_DEVICE} MATCHES "LPC5(1|4)"))
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX iap driver_iap)
Expand Down
Loading

0 comments on commit 0da11b1

Please sign in to comment.