Skip to content

KW45 SoC, and KW45B41-EVK board support #82034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions boards/nxp/kw45b41z_evk/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

config BOARD_INIT_PRIORITY
int "Board initialization priority"
default 45
help
Board initialization priority.
11 changes: 11 additions & 0 deletions boards/nxp/kw45b41z_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# KW45B41Z-EVK board

# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

if BOARD_KW45B41Z_EVK

config BT_DIS_MANUF
default "NXP"

endif # BOARD_KW45B41Z_EVK
6 changes: 6 additions & 0 deletions boards/nxp/kw45b41z_evk/Kconfig.kw45b41z_evk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

config BOARD_KW45B41Z_EVK
select SOC_KW45B41Z83
select SOC_PART_NUMBER_KW45B41Z83AFTA
6 changes: 6 additions & 0 deletions boards/nxp/kw45b41z_evk/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

board_runner_args(jlink "--device=kw45b41z83" "--reset-after-load")

include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
8 changes: 8 additions & 0 deletions boards/nxp/kw45b41z_evk/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

board:
name: kw45b41z_evk
vendor: nxp
socs:
- name: kw45b41z83
62 changes: 62 additions & 0 deletions boards/nxp/kw45b41z_evk/kw45b41z_evk-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright 2025 NXP
* SPDX-License-Identifier: Apache-2.0
*/

#include <nxp/mcx/MCXW716CMFTA-pinctrl.h>

&pinctrl {
pinmux_lpuart0: pinmux_lpuart0 {
group0 {
pinmux = <LPUART0_RX_PTA16>, <LPUART0_TX_PTA17>;
drive-strength = "low";
slew-rate = "fast";
};
};

pinmux_lpuart1: pinmux_lpuart1 {
group0 {
pinmux = <LPUART1_RX_PTC2>, <LPUART1_TX_PTC3>;
drive-strength = "low";
slew-rate = "fast";
};
};

pinmux_tpm0: pinmux_tpm0 {
group0 {
pinmux = <TPM0_CH0_PTA21>,
<TPM0_CH1_PTA20>,
<TPM0_CH2_PTA19>;
drive-strength = "low";
slew-rate = "fast";
};
};

pinmux_lpi2c1: pinmux_lpi2c1 {
group0 {
pinmux = <LPI2C1_SCL_PTC0>,
<LPI2C1_SDA_PTC1>;
drive-strength = "low";
slew-rate = "fast";
bias-pull-up;
};
};

pinmux_lpspi1: pinmux_lpspi1 {
group0 {
pinmux = <LPSPI1_SIN_PTB1>,
<LPSPI1_SOUT_PTB3>;
slew-rate = "fast";
drive-strength = "low";
};
};

pinmux_flexcan: pinmux_flexcan {
group0 {
pinmux = <CAN0_RX_PTC5>, <CAN0_TX_PTC4>;
slew-rate = "slow";
drive-strength = "low";
};
};

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

};
150 changes: 150 additions & 0 deletions boards/nxp/kw45b41z_evk/kw45b41z_evk.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
/*
* Copyright 2025 NXP
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <nxp/nxp_mcxw71.dtsi>
#include "kw45b41z_evk-pinctrl.dtsi"

/ {
model = "NXP KW45B41Z83-EVK board";
compatible = "nxp,kw45";

aliases {
led0 = &blue_led;
blue-pwm-led = &blue_pwm_led;
green-pwm-led = &green_pwm_led;
red-pwm-led = &red_pwm_led;
};

chosen {
zephyr,flash = &flash;
zephyr,flash-controller = &fmu;
zephyr,code-partition = &slot0_partition;
zephyr,sram = &stcm0;
zephyr,console = &lpuart1;
zephyr,shell-uart = &lpuart1;
zephyr,uart-pipe = &lpuart0;
zephyr,canbus = &flexcan0;
};

leds {
compatible = "gpio-leds";
blue_led: led {
gpios = <&gpiob 0 GPIO_ACTIVE_LOW>;
};
};

pwmleds {
compatible = "pwm-leds";
blue_pwm_led: pwm_led_0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file has inconsistent spacing

pwms = <&tpm0 1 PWM_USEC(200) PWM_POLARITY_NORMAL>;
};
green_pwm_led: pwm_led_1 {
pwms = <&tpm0 2 PWM_USEC(200) PWM_POLARITY_NORMAL>;
};
red_pwm_led: pwm_led_2 {
pwms = <&tpm0 0 PWM_USEC(200) PWM_POLARITY_NORMAL>;
};
};
};

&vref {
status = "okay";
};

&gpiob {
status = "okay";
};

&lpuart0 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&pinmux_lpuart0>;
pinctrl-names = "default";
};

&lpuart1 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&pinmux_lpuart1>;
pinctrl-names = "default";
};

&lpi2c1 {
status = "okay";
pinctrl-0 = <&pinmux_lpi2c1>;
pinctrl-names = "default";
};

&lpspi1 {
status = "okay";
pinctrl-0 = <&pinmux_lpspi1>;
pinctrl-names = "default";
};

&flexcan0 {
status = "okay";
bitrate = <125000>;
pinctrl-0 = <&pinmux_flexcan>;
pinctrl-names = "default";

can-transceiver {
max-bitrate = <420000000>;
};
};

&flash {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
reg = <0x0 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
reg = <0x10000 DT_SIZE_K(416)>;
};

slot1_partition: partition@78000 {
reg = <0x78000 DT_SIZE_K(416)>;
};

storage_partition: partition@e0000 {
reg = <0xe0000 DT_SIZE_K(128)>;
};
};
};

&fmu {
status = "okay";
};

&tpm0 {
status = "okay";
pinctrl-0 = <&pinmux_tpm0>;
pinctrl-names = "default";
};

&lptmr0 {
status = "okay";
};

&flexcan0 {
status = "okay";
pinctrl-0 = <&pinmux_flexcan>;
pinctrl-names = "default";

can-transceiver {
max-bitrate = <5000000>;
};
};

&nbu {
status = "okay";
wakeup-source;
};
20 changes: 20 additions & 0 deletions boards/nxp/kw45b41z_evk/kw45b41z_evk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

identifier: kw45b41z_evk
name: NXP KW45B41Z-EVK
type: mcu
arch: arm
ram: 64
flash: 1024
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- can
- gpio
- spi
- watchdog
- i2c
vendor: nxp
10 changes: 10 additions & 0 deletions boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

CONFIG_ARM_MPU=y
CONFIG_TRUSTED_EXECUTION_SECURE=y
CONFIG_PINCTRL=y

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.

Check failure on line 6 in boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

BoardDisallowedKconfigs

boards/nxp/kw45b41z_evk/kw45b41z_evk_defconfig:6 Found disallowed Kconfig symbol in board Kconfig files: CONFIG_PINCTRL Drivers requiring PINCTRL must SELECT it instead.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not allowed

CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if(CONFIG_NXP_RF_IMU)
set(CONFIG_MCUX_COMPONENT_driver.gdma ON)
set(CONFIG_MCUX_COMPONENT_component.wireless_imu_adapter ON)
set(CONFIG_MCUX_PRJSEG_component.osa_interface.osa_macro_used ON)
elseif(CONFIG_SOC_SERIES_MCXW)
elseif(CONFIG_SOC_SERIES_MCXW OR CONFIG_SOC_SERIES_KINETIS_KW45)
set(CONFIG_MCUX_COMPONENT_component.lists ON)
set(CONFIG_MCUX_COMPONENT_component.rpmsg_adapter ON)
zephyr_compile_definitions(HAL_RPMSG_SELECT_ROLE=0U)
Expand Down
10 changes: 8 additions & 2 deletions modules/hal_nxp/mcux/mcux-sdk-ng/drivers/drivers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ set_variable_ifdef(CONFIG_SOC_SERIES_IMXRT10XX CONFIG_MCUX_COMPONENT_driver.o
set_variable_ifdef(CONFIG_SOC_SERIES_IMXRT11XX CONFIG_MCUX_COMPONENT_driver.ocotp)
set_variable_ifdef(CONFIG_SOC_FAMILY_KINETIS CONFIG_MCUX_COMPONENT_driver.port)
set_variable_ifdef(CONFIG_SOC_SERIES_MCXW CONFIG_MCUX_COMPONENT_driver.ccm32k)
set_variable_ifdef(CONFIG_SOC_SERIES_KINETIS_KW45 CONFIG_MCUX_COMPONENT_driver.ccm32k)
set_variable_ifdef(CONFIG_SOC_SERIES_IMXRT5XX CONFIG_MCUX_COMPONENT_driver.iap3)

if(CONFIG_SOC_MIMXRT1189)
Expand All @@ -162,7 +163,8 @@ if(CONFIG_SOC_SERIES_MCXN OR CONFIG_SOC_SERIES_MCXA)
set(CONFIG_MCUX_COMPONENT_driver.mcx_spc ON)
endif()

if(CONFIG_BT_NXP AND CONFIG_SOC_SERIES_MCXW OR CONFIG_IEEE802154_MCXW)
if(CONFIG_BT_NXP AND CONFIG_SOC_SERIES_MCXW OR CONFIG_IEEE802154_MCXW OR
CONFIG_SOC_SERIES_KINETIS_KW45)
set(CONFIG_MCUX_COMPONENT_driver.spc ON)
endif()

Expand All @@ -185,7 +187,11 @@ else()
endif()

if(CONFIG_SOC_FAMILY_KINETIS OR CONFIG_SOC_SERIES_MCXC)
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.flash)
if(CONFIG_SOC_SERIES_KINETIS_KW45)
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.flash_k4)
else()
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.flash)
endif()
endif()

if(CONFIG_SOC_MK82F25615 OR CONFIG_SOC_MK64F12 OR CONFIG_SOC_MK66F18 OR
Expand Down
1 change: 1 addition & 0 deletions samples/bluetooth/beacon/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tests:
- nrf52dk/nrf52832
- nrf54l15dk/nrf54l15/cpuapp
- ophelia4ev/nrf54l15/cpuapp
- kw45b41z_evk
tags: bluetooth
integration_platforms:
- qemu_cortex_m3
Expand Down
22 changes: 22 additions & 0 deletions soc/nxp/kinetis/kw45/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2025 NXP
#
# SPDX-License-Identifier: Apache-2.0

zephyr_sources(../../mcx/mcxw/soc.c ../../mcx/mcxw/mcxw71_platform_init.S)

zephyr_include_directories(../../mcx/mcxw/)

zephyr_sources_ifdef(CONFIG_NXP_NBU
../../common/nxp_nbu.c
)

zephyr_include_directories(.)

zephyr_sources_ifdef(
CONFIG_PM
power.c
)

set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/../../mcx/mcxw/linker.ld CACHE INTERNAL "")

zephyr_linker_sources_ifdef(CONFIG_BT RAM_SECTIONS ../../mcx/mcxw/sections.ld)
23 changes: 23 additions & 0 deletions soc/nxp/kinetis/kw45/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# KW45 Series

# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

config SOC_SERIES_KINETIS_KW45
select ARM
select CPU_CORTEX_M33
select CPU_CORTEX_M_HAS_DWT
select HAS_MCUX
select CLOCK_CONTROL
select SOC_RESET_HOOK
select SOC_EARLY_INIT_HOOK

config SOC_KW45B41Z83
select ARM_TRUSTZONE_M
select CPU_CORTEX_M_HAS_SYSTICK
select CPU_HAS_FPU
select CPU_HAS_ARM_SAU
select CPU_HAS_ARM_MPU
select ARMV8_M_DSP

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually why is a driver even here? Driver should be a driver in driver folder, it has no place being in SoC Kconfig tree

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soc/nxp/imxrt/Kconfig also refers to rsource "../common/Kconfig.xspi_xip"
Also, If we are talking about nbu driver then -
nxp_nbu.c is present in soc/nxp/common

rsource "../../common/Kconfig.nbu"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no indent

Loading
Loading