Skip to content

Commit 1604108

Browse files
nirav-agrawaldleach02
authored andcommitted
boards: shields: add nxp_m2_wifi_bt shield
- Added new shield to add support for WIFI and BT interface. - Added board overlay for MIMXRT1060EVKC. - Removed mimxrt1062 overlay from shell example to avoid conflicts. - Added seperate shield overlay for supported M.2 module to enable BT or WIFI or Both. - Added default kconfigs for each BT and WIFI which enables supported modules and SoC as part of enabled shield through build param. - Added shield document. Signed-off-by: Nirav Agrawal <[email protected]>
1 parent f9a2b6e commit 1604108

10 files changed

+342
-45
lines changed

boards/nxp/mimxrt1060_evk/doc/index.rst

+12
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ The MIMXRT1060 SoC has five pairs of pinmux/gpio controllers.
137137
+---------------+-----------------+---------------------------+
138138
| GPIO_AD_B1_01 | LPI2C1_SDA | I2C |
139139
+---------------+-----------------+---------------------------+
140+
| GPIO_AD_B1_04 | LPUART3_CTS | UART BT HCI |
141+
+---------------+-----------------+---------------------------+
142+
| GPIO_AD_B1_05 | LPUART3_RTS | UART BT HCI |
143+
+---------------+-----------------+---------------------------+
140144
| GPIO_AD_B1_06 | LPUART3_TX | UART BT HCI |
141145
+---------------+-----------------+---------------------------+
142146
| GPIO_AD_B1_07 | LPUART3_RX | UART BT HCI |
@@ -428,6 +432,14 @@ should see the following message in the terminal:
428432
***** Booting Zephyr OS v1.14.0-rc1 *****
429433
Hello World! mimxrt1060_evk//qspi
430434
435+
Shield for M.2 Wi-Fi and BT Interface
436+
=====================================
437+
438+
Rev C version is tested with :ref:`nxp_m2_wifi_bt` shield to attach any M.2 module
439+
with BT HCI UART interface and Wi-Fi SDIO interface. The shield binds the required NXP
440+
HCI driver or SDIO driver to perform firmware-load and other setup configurations
441+
for NXP SoC IW416/IW612.
442+
431443
Troubleshooting
432444
===============
433445

boards/nxp/mimxrt1060_evk/mimxrt1060_evk.dtsi

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018,2024 NXP
2+
* Copyright 2018,2024-2025 NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -308,3 +308,7 @@ arduino_spi: &lpspi1 {
308308
dvp_fpc24_i2c: &lpi2c1 {};
309309

310310
dvp_fpc24_interface: &csi {};
311+
312+
m2_hci_bt_uart: &lpuart3 {};
313+
314+
m2_wifi_sdio: &usdhc1 {};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SHIELD_NXP_M2_1XK_WIFI_BT
5+
6+
if BT
7+
8+
choice BT_NXP_MODULE
9+
default BT_NXP_IW416
10+
endchoice
11+
12+
endif # BT
13+
14+
if WIFI
15+
16+
config WIFI_NXP
17+
default y
18+
19+
choice NXP_WIFI_PART
20+
default NXP_IW416
21+
endchoice
22+
23+
choice NXP_IW416_MODULE
24+
default NXP_IW416_MURATA_1XK_M2
25+
endchoice
26+
27+
endif # WIFI
28+
29+
endif # SHIELD_NXP_M2_1XK_WIFI_BT
30+
31+
if SHIELD_NXP_M2_2EL_WIFI_BT
32+
33+
if BT
34+
35+
choice BT_NXP_MODULE
36+
default BT_NXP_NW612
37+
endchoice
38+
39+
endif # BT
40+
41+
if WIFI
42+
43+
config WIFI_NXP
44+
default y
45+
46+
choice NXP_WIFI_PART
47+
default NXP_IW61X
48+
endchoice
49+
50+
choice NXP_IW61X_MODULE
51+
default NXP_IW612_MURATA_2EL_M2
52+
endchoice
53+
54+
endif # WIFI
55+
56+
endif # SHIELD_NXP_M2_2EL_WIFI_BT
57+
58+
if (BT_NXP_IW416) || (BT_NXP_NW612) || (NXP_IW416) || (NXP_IW61X)
59+
60+
if BT
61+
62+
config SYSTEM_WORKQUEUE_STACK_SIZE
63+
default 2048
64+
65+
config BT_LONG_WQ_STACK_SIZE
66+
default 2560
67+
68+
config MAIN_STACK_SIZE
69+
default 2560
70+
71+
if SHELL
72+
73+
config SHELL_STACK_SIZE
74+
default 4096
75+
76+
endif # SHELL
77+
78+
endif # BT
79+
80+
if WIFI_NXP
81+
82+
if SHELL
83+
84+
config NXP_WIFI_SHELL
85+
default y
86+
87+
endif # SHELL
88+
89+
endif # WIFI_NXP
90+
91+
endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_NXP_M2_1XK_WIFI_BT
5+
def_bool $(shields_list_contains,nxp_m2_1xk_wifi_bt)
6+
7+
config SHIELD_NXP_M2_2EL_WIFI_BT
8+
def_bool $(shields_list_contains,nxp_m2_2el_wifi_bt)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,uart-pipe = &lpuart1;
10+
};
11+
};
12+
13+
&m2_hci_bt_uart {
14+
/delete-property/ pinctrl-0;
15+
/delete-property/ pinctrl-1;
16+
/delete-property/ pinctrl-2;
17+
/delete-property/ pinctrl-names;
18+
pinctrl-0 = <&pinmux_lpuart3_flow_control>;
19+
pinctrl-1 = <&pinmux_lpuart3_sleep>;
20+
pinctrl-names = "default", "sleep";
21+
22+
bt_hci_uart: bt_hci_uart {
23+
m2_bt_module: m2_bt_module {
24+
sdio-reset-gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
25+
w-disable-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
26+
};
27+
};
28+
};
29+
30+
&m2_wifi_sdio {
31+
/* Use dat3 detection method */
32+
detect-dat3;
33+
pinctrl-4 = <&pinmux_usdhc1_dat3_nopull>;
34+
pinctrl-names = "default", "slow", "med", "fast", "nopull";
35+
};
36+
37+
&pinctrl {
38+
/* removes pull on dat3 for card detect */
39+
pinmux_usdhc1_dat3_nopull: pinmux_usdhc1_dat3_nopull {
40+
41+
group0 {
42+
pinmux = <&iomuxc_gpio_sd_b0_01_usdhc1_clk>;
43+
bias-disable;
44+
drive-strength = "r0";
45+
input-schmitt-enable;
46+
slew-rate = "fast";
47+
nxp,speed = "100-mhz";
48+
};
49+
50+
group1 {
51+
pinmux = <&iomuxc_gpio_b1_12_gpio2_io28>,
52+
<&iomuxc_gpio_sd_b0_00_usdhc1_cmd>,
53+
<&iomuxc_gpio_sd_b0_02_usdhc1_data0>,
54+
<&iomuxc_gpio_sd_b0_03_usdhc1_data1>,
55+
<&iomuxc_gpio_sd_b0_04_usdhc1_data2>;
56+
drive-strength = "r0";
57+
input-schmitt-enable;
58+
bias-pull-up;
59+
bias-pull-up-value = "47k";
60+
slew-rate = "fast";
61+
nxp,speed = "100-mhz";
62+
};
63+
64+
group2 {
65+
pinmux = <&iomuxc_gpio_b1_14_usdhc1_vselect>;
66+
drive-strength = "r0-4";
67+
input-schmitt-enable;
68+
bias-pull-up;
69+
bias-pull-up-value = "47k";
70+
slew-rate = "fast";
71+
nxp,speed = "100-mhz";
72+
};
73+
74+
group3 {
75+
pinmux = <&iomuxc_gpio_ad_b0_05_gpio1_io05>;
76+
drive-strength = "r0-6";
77+
slew-rate = "slow";
78+
nxp,speed = "100-mhz";
79+
};
80+
81+
group4 {
82+
pinmux = <&iomuxc_gpio_sd_b0_05_usdhc1_data3>;
83+
bias-disable;
84+
drive-strength = "r0";
85+
slew-rate = "fast";
86+
nxp,speed = "100-mhz";
87+
input-schmitt-enable;
88+
};
89+
};
90+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
.. _nxp_m2_wifi_bt:
2+
3+
NXP M.2 Wi-Fi and BT Shield
4+
###########################
5+
6+
Overview
7+
********
8+
9+
This Zephyr shield is tested with the following M.2 modules and hardware for Wi-Fi and Bluetooth applications:
10+
11+
- Embedded Artist 1XK module - uses Murata 1XK radio module with NXP IW416 chipset
12+
- Embedded Artist 2EL module - uses Murata 2EL radio module with NXP IW612 chipset
13+
14+
More information about supported chipsets, radio modules and M.2 modules can be found in below links,
15+
16+
- `IW612 NXP Chipset <https://www.nxp.com/products/IW612>`_
17+
- `IW416 NXP Chipset <https://www.nxp.com/products/IW416>`_
18+
- `2EL Murata Radio Module <https://www.murata.com/en-us/products/connectivitymodule/wi-fi-bluetooth/overview/lineup/type2el>`_
19+
- `1XK Murata Radio Module <https://www.murata.com/en-us/products/connectivitymodule/wi-fi-bluetooth/overview/lineup/type1xk>`_
20+
- `1XK Embedded Artist Module <https://www.embeddedartists.com/products/1xk-m-2-module>`_
21+
- `2EL Embedded Artist Module <https://www.embeddedartists.com/products/2el-m-2-module>`_
22+
23+
Requirements
24+
************
25+
26+
To use the shield, below requirements needs to be satisfied.
27+
28+
- M.2 module with BT HCI UART and SDIO Interface with NXP IW416 or IW612 SoC support.
29+
- Host platform shall have compatible M.2 interface slot.
30+
- For Coex (Wi-Fi + BT), UART driver that supports UART RTS line control to wakeup BT CPU from sleep.
31+
- To use default Bluetooth-Shell app it needs ~490KB flash & ~130KB RAM memory.
32+
- To use default Wi-Fi-Shell app it needs ~1MB flash & ~1.2MB RAM memory.
33+
34+
Integration Platform
35+
********************
36+
37+
This shield works with below host platform,
38+
39+
- :zephyr:board:`mimxrt1060_evk` Rev-C.
40+
41+
Programming
42+
***********
43+
44+
Below are the supported shields to be used with ``--shield <option>`` when you invoke
45+
``west build``.
46+
47+
- ``nxp_m2_1xk_wifi_bt``: For Wi-Fi/Bluetooth samples to work with NXP IW416 SoC
48+
- ``nxp_m2_2el_wifi_bt``: For Wi-Fi/Bluetooth samples to work with NXP IW612 SoC
49+
50+
For example:
51+
52+
.. zephyr-app-commands::
53+
:zephyr-app: samples/bluetooth/handsfree
54+
:board: mimxrt1060_evk@C//qspi
55+
:shield: nxp_m2_1xk_wifi_bt
56+
:goals: build
57+
58+
.. zephyr-app-commands::
59+
:zephyr-app: samples/net/wifi/shell
60+
:board: mimxrt1060_evk@C//qspi
61+
:shield: nxp_m2_2el_wifi_bt
62+
:goals: build
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,bt-hci = &bt_hci_uart;
10+
};
11+
};
12+
13+
&m2_hci_bt_uart {
14+
current-speed = <115200>;
15+
status = "okay";
16+
17+
bt_hci_uart: bt_hci_uart {
18+
compatible = "zephyr,bt-hci-uart";
19+
status = "okay";
20+
21+
m2_bt_module {
22+
compatible = "nxp,bt-hci-uart";
23+
hci-operation-speed = <3000000>;
24+
hw-flow-control;
25+
fw-download-primary-speed = <115200>;
26+
fw-download-secondary-speed = <3000000>;
27+
fw-download-secondary-flowcontrol;
28+
};
29+
};
30+
};
31+
32+
&m2_wifi_sdio {
33+
nxp_wifi {
34+
compatible = "nxp,wifi";
35+
status = "okay";
36+
};
37+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,bt-hci = &bt_hci_uart;
10+
};
11+
};
12+
13+
&m2_hci_bt_uart {
14+
current-speed = <115200>;
15+
status = "okay";
16+
17+
bt_hci_uart: bt_hci_uart {
18+
compatible = "zephyr,bt-hci-uart";
19+
status = "okay";
20+
21+
m2_bt_module {
22+
compatible = "nxp,bt-hci-uart";
23+
hci-operation-speed = <3000000>;
24+
hw-flow-control;
25+
fw-download-primary-speed = <115200>;
26+
fw-download-secondary-speed = <3000000>;
27+
fw-download-secondary-flowcontrol;
28+
};
29+
};
30+
};
31+
32+
&m2_wifi_sdio {
33+
nxp_wifi {
34+
compatible = "nxp,wifi";
35+
status = "okay";
36+
};
37+
};

tests/bluetooth/shell/boards/mimxrt1060_evk_mimxrt1062_qspi.overlay

-22
This file was deleted.

0 commit comments

Comments
 (0)