Skip to content

Commit e3a100f

Browse files
mcux: kw45 Soc and Board Support
Added KW45 SOC and Board Support for BLE function. Co-developed-by: Sumit Batra <sumit.batra@nxp.com> Signed-off-by: Sumit Batra <sumit.batra@nxp.com> Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
1 parent c42d70d commit e3a100f

21 files changed

+317548
-14
lines changed

dts/nxp/mcx/MCXW716CMFTA-pinctrl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define KINETIS_MUX(port, pin, mux) \
1313
(((((port) - 'A') & 0xF) << 28) | \
1414
(((pin) & 0x3F) << 22) | \
15-
(((mux) & 0x7) << 8))
15+
(((mux) & 0xF) << 8))
1616

1717
#define PTA0 KINETIS_MUX('A',0,1) /* PTA_0 */
1818
#define WUU0_P0_PTA0 KINETIS_MUX('A',0,1) /* PTA_0 */

mcux/CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ else()
2424
endif()
2525

2626
zephyr_include_directories(mcux-sdk/devices/${MCUX_DEVICE_PATH})
27-
zephyr_include_directories(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers)
27+
28+
if("${CONFIG_SOC_SERIES}" STREQUAL "kw45")
29+
zephyr_include_directories(mcux-sdk/devices/MCXW716C/drivers)
30+
else()
31+
zephyr_include_directories(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers)
32+
endif()
2833

2934
#include device specific drivers
3035
if (${MCUX_DEVICE} MATCHES "MIMXRT1[0-9][0-9][0-9]")
@@ -46,7 +51,12 @@ zephyr_compile_definitions(${MCUX_CPU})
4651
# Build mcux device-specific objects. Although it is not normal
4752
# practice, drilling down like this avoids the need for repetitive
4853
# build scripts for every mcux device.
49-
zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_clock.c)
54+
if("${CONFIG_SOC_SERIES}" STREQUAL "kw45")
55+
zephyr_library_sources(mcux-sdk/devices/MCXW716C/drivers/fsl_clock.c)
56+
else()
57+
zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_clock.c)
58+
endif()
59+
5060
if (${MCUX_DEVICE} MATCHES "LPC|MIMXRT6|MIMXRT5|RW6|MCXN.4.")
5161
zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_power.c)
5262
zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_reset.c)

mcux/hal_nxp.cmake

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ list(APPEND CMAKE_MODULE_PATH
1010
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/components/lists
1111
)
1212

13+
if("${CONFIG_SOC_SERIES}" STREQUAL "kw45")
14+
list(APPEND CMAKE_MODULE_PATH
15+
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/devices/MCXW716C/drivers)
16+
endif()
17+
1318
if(CONFIG_CPU_CORTEX_A)
1419
list(APPEND CMAKE_MODULE_PATH
1520
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/CMSIS/Core_AArch64/Include
@@ -267,6 +272,7 @@ include_driver_ifdef(CONFIG_S3MU_MCUX_S3MU s3mu driver_s
267272
include_driver_ifdef(CONFIG_PINCTRL_NXP_PORT port driver_port)
268273
if(CONFIG_BT_NXP)
269274
include_driver_ifdef(CONFIG_SOC_SERIES_MCXW spc driver_spc)
275+
include_driver_ifdef(CONFIG_SOC_SERIES_KINETIS_KW45 spc driver_spc)
270276
endif()
271277

272278
if (${MCUX_DEVICE} MATCHES "MIMXRT1189")
@@ -315,7 +321,11 @@ endif()
315321

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

318-
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX flash driver_flash)
324+
if("${CONFIG_SOC_SERIES}" STREQUAL "kw45")
325+
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX flash_k4 driver_flash_k4)
326+
else()
327+
include_driver_ifdef(CONFIG_SOC_FLASH_MCUX flash driver_flash)
328+
endif()
319329

320330
include(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/port/driver_port.cmake)
321331
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/port)
@@ -473,15 +483,15 @@ if(CONFIG_NXP_RF_IMU)
473483
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/gdma
474484
)
475485
include(component_wireless_imu_adapter)
476-
elseif(CONFIG_SOC_SERIES_MCXW)
486+
elseif(CONFIG_SOC_SERIES_MCXW OR CONFIG_SOC_SERIES_KINETIS_KW45)
477487
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/components/rpmsg)
478488
zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/components/rpmsg/fsl_adapter_rpmsg.c)
479489
include(component_lists)
480490
zephyr_compile_definitions(HAL_RPMSG_SELECT_ROLE=0U)
481491
endif()
482492
endif()
483493

484-
if(${MCUX_DEVICE} MATCHES "MCXW")
494+
if(${MCUX_DEVICE} MATCHES "MCXW" OR ${MCUX_DEVICE} MATCHES "KW45")
485495
list(APPEND CMAKE_MODULE_PATH
486496
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/drivers/ccm32k
487497
)

mcux/mcux-sdk/boards/kw45b41zevk/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 NXP
2+
* Copyright 2024 NXP
33
* All rights reserved.
44
*
55
* SPDX-License-Identifier: BSD-3-Clause

mcux/mcux-sdk/boards/kw45b41zevk/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021-2022 NXP
2+
* Copyright 2024 NXP
33
* All rights reserved.
44
*
55
* SPDX-License-Identifier: BSD-3-Clause

mcux/mcux-sdk/boards/kw45b41zevk/clock_config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021-2023 NXP
2+
* Copyright 2024 NXP
33
* All rights reserved.
44
*
55
* SPDX-License-Identifier: BSD-3-Clause

mcux/mcux-sdk/boards/kw45b41zevk/clock_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021-2023 NXP
2+
* Copyright 2024 NXP
33
* All rights reserved.
44
*
55
* SPDX-License-Identifier: BSD-3-Clause

mcux/mcux-sdk/devices/KW45B41Z83/KW45B41Z83.h

Lines changed: 60032 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)