From a375c95404ba6764ceed033ac87ee36b3a7d7e61 Mon Sep 17 00:00:00 2001 From: Axel Le Bourhis Date: Thu, 15 Jan 2026 12:22:43 +0100 Subject: [PATCH] hal_nxp: integrate mcuxsdk ble controller ng Move ble-controller integration to mcux-sdk-ng to make future release integration easier. Based on 25.09.00 release, same as the existing version. Signed-off-by: Axel Le Bourhis --- modules/hal_nxp/mcux/Kconfig.mcux | 8 ++++- .../middleware/bluetooth_controller.cmake | 31 +++++++++++++++++++ .../mcux-sdk-ng/middleware/middleware.cmake | 3 +- soc/nxp/mcx/mcxw/mcxw2xx/Kconfig | 3 +- west.yml | 2 +- 5 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 modules/hal_nxp/mcux/mcux-sdk-ng/middleware/bluetooth_controller.cmake diff --git a/modules/hal_nxp/mcux/Kconfig.mcux b/modules/hal_nxp/mcux/Kconfig.mcux index c12ffb7e8dd88..cf3249a759869 100644 --- a/modules/hal_nxp/mcux/Kconfig.mcux +++ b/modules/hal_nxp/mcux/Kconfig.mcux @@ -1,7 +1,7 @@ # MCUXpresso SDK # Copyright (c) 2016, Freescale Semiconductor, Inc. -# Copyright 2024-2025 NXP +# Copyright 2024-2026 NXP # SPDX-License-Identifier: Apache-2.0 config HAS_MCUX @@ -86,6 +86,12 @@ config NXP_MULTICORE help Includes NXP Multicore Manager support. +config NXP_SNPS_BLE_CTRL + bool "Include NXP SNPS BLE Controller" + depends on BT + help + If enabled, the NXP SNPS BLE Controller will be included. + endif # HAS_MCUX config BT_NXP_PCM_PINS_DIR_REVERSE diff --git a/modules/hal_nxp/mcux/mcux-sdk-ng/middleware/bluetooth_controller.cmake b/modules/hal_nxp/mcux/mcux-sdk-ng/middleware/bluetooth_controller.cmake new file mode 100644 index 0000000000000..107c8e9521e49 --- /dev/null +++ b/modules/hal_nxp/mcux/mcux-sdk-ng/middleware/bluetooth_controller.cmake @@ -0,0 +1,31 @@ +# Copyright 2026 NXP +# +# SPDX-License-Identifier: Apache-2.0 + +if(CONFIG_NXP_SNPS_BLE_CTRL) + set(CONFIG_MCUX_COMPONENT_middleware.wireless.snps_ll ON) + set(CONFIG_MCUX_COMPONENT_middleware.wireless.snps_ll_os ON) + + if(CONFIG_SOC_SERIES_MCXW2XX) + set(BLE_LIBS_PATH ${ZEPHYR_HAL_NXP_MODULE_DIR}/zephyr/blobs/mcxw23) + endif() + + set(BLELIBOS_PATH ${BLE_LIBS_PATH}/libble_ll_os.a) + set(BLELIBUTILS_PATH ${BLE_LIBS_PATH}/libble_ll_utils_os.a) + + zephyr_compile_definitions( + gUseHciTransportDownward_d=1 + OSA_USED + ) + + zephyr_blobs_verify(FILES + ${BLELIBOS_PATH} + ${BLELIBUTILS_PATH} + ) + zephyr_library_import(ble_lib_os ${BLELIBOS_PATH}) + zephyr_library_import(ble_lib_utils ${BLELIBUTILS_PATH}) + + add_subdirectory(${MCUX_SDK_NG_DIR}/middleware/mcuxsdk-middleware-bluetooth-controller + ${CMAKE_CURRENT_BINARY_DIR}/mcuxsdk-middleware-bluetooth-controller + ) +endif() diff --git a/modules/hal_nxp/mcux/mcux-sdk-ng/middleware/middleware.cmake b/modules/hal_nxp/mcux/mcux-sdk-ng/middleware/middleware.cmake index 31d094b7be059..618411fa9b20e 100644 --- a/modules/hal_nxp/mcux/mcux-sdk-ng/middleware/middleware.cmake +++ b/modules/hal_nxp/mcux/mcux-sdk-ng/middleware/middleware.cmake @@ -1,4 +1,4 @@ -# Copyright 2025 NXP +# Copyright 2025-2026 NXP # # SPDX-License-Identifier: Apache-2.0 @@ -57,4 +57,5 @@ add_subdirectory(${MCUX_SDK_NG_DIR}/middleware/usb ) include(${CMAKE_CURRENT_LIST_DIR}/connectivity_framework.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/bluetooth_controller.cmake) include(${CMAKE_CURRENT_LIST_DIR}/multicore.cmake) diff --git a/soc/nxp/mcx/mcxw/mcxw2xx/Kconfig b/soc/nxp/mcx/mcxw/mcxw2xx/Kconfig index 210dbc43eb2e0..96d24b3dfb84a 100644 --- a/soc/nxp/mcx/mcxw/mcxw2xx/Kconfig +++ b/soc/nxp/mcx/mcxw/mcxw2xx/Kconfig @@ -1,6 +1,7 @@ -# Copyright 2025 NXP +# Copyright 2025-2026 NXP # # SPDX-License-Identifier: Apache-2.0 config SOC_SERIES_MCXW2XX select HAS_POWEROFF + select NXP_SNPS_BLE_CTRL if BT diff --git a/west.yml b/west.yml index 815d474d51443..faf4227fdae38 100644 --- a/west.yml +++ b/west.yml @@ -210,7 +210,7 @@ manifest: groups: - hal - name: hal_nxp - revision: af5d95d3e6be13f1b993d2c466595e7cc71ba57b + revision: 796e242aabb37f50de0d90c44249e36d8de4268d path: modules/hal/nxp groups: - hal