Skip to content

Commit 601e1e5

Browse files
abhinavnxpdleach02
authored andcommitted
Zephyr: Src: Added files for IW416 and IW612 SoCs to work
Adding support for IW416 and IW612 socs. Signed-off-by: Abhinav Kulkarni <abhinav.kulkarni@nxp.com>
1 parent 98db727 commit 601e1e5

File tree

8 files changed

+208
-1
lines changed

8 files changed

+208
-1
lines changed

mcux/middleware/wifi_nxp/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ if(DEFINED CONFIG_SOC_SDKNG_UNSUPPORTED)
201201
zephyr_library_sources(${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/utilities/misc_utilities/fsl_memcpy.S)
202202
zephyr_library_sources(${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/components/lists/fsl_component_generic_list.c)
203203
zephyr_library_sources(${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/components/osa/fsl_os_abstraction_zephyr.c)
204+
else()
205+
zephyr_library_sources(${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/components/misc_utilities/fsl_memcpy.S)
206+
zephyr_library_sources(${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk-ng/components/osa/fsl_os_abstraction_zephyr.c)
207+
zephyr_include_directories(${MCUX_SDK_DIR}/components/osa/config)
204208
endif()
205209

206210
zephyr_include_directories(

zephyr/module.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,55 @@ blobs:
5959
license-path: zephyr/blobs/license/LA_OPT_NXP_Software_License.txt
6060
url: https://github.com/nxp-mcuxpresso/mcux-sdk-middleware-ieee_802.15.4/raw/MCUX_2.16.100/bin/mcxw71/mcxw71_nbu_ble_15_4_dyn_1_0_17_2.sb3
6161
description: "BLE Controller and IEEE 802.15.4 PHY combo firmware for MCXW71 boards"
62+
63+
#For NW61x
64+
- path: nw61x/sd_nw61x.bin.se
65+
sha256: A0AA4A6761B1105C1F3CCB58EAB2A52D010ED8E228E55BFE5C090DDC33395DBB
66+
type: img
67+
version: '1.0'
68+
license-path: zephyr/blobs/license/LA_OPT_NXP_Software_License.txt
69+
url: https://github.com/NXP/wifi_nb_fw/raw/refs/tags/nxp-v4.1.0/nw61x/sd_nw61x.bin.se
70+
description: "Wi-Fi firmware for NW61x A1 boards"
71+
doc-url: https://github.com/NXP/wifi_nb_fw/blob/nxp-v4.1.0/readme.txt
72+
- path: nw61x/uart_nw61x.bin.se
73+
sha256: A47E5DE79CBC4D1838D13414A6854C8F2F664CB61F9287546BF3776FC9205B21
74+
type: img
75+
version: '1.0'
76+
license-path: zephyr/blobs/license/LA_OPT_NXP_Software_License.txt
77+
url: https://github.com/NXP/wifi_nb_fw/raw/refs/tags/nxp-v4.1.0/nw61x/uart_nw61x.bin.se
78+
description: "BT firmware for NW61x A1 boards"
79+
doc-url: https://github.com/NXP/wifi_nb_fw/blob/nxp-v4.1.0/readme.txt
80+
- path: nw61x/sduart_nw61x.bin.se
81+
sha256: D8B33EE84C0F411D296FC20CBD8823EBEBAA4703379AECB5ACB5579B66F719A0
82+
type: img
83+
version: '1.0'
84+
license-path: zephyr/blobs/license/LA_OPT_NXP_Software_License.txt
85+
url: https://github.com/NXP/wifi_nb_fw/raw/refs/tags/nxp-v4.1.0/nw61x/sduart_nw61x.bin.se
86+
description: "Combo firmware for NW61x A1 boards"
87+
doc-url: https://github.com/NXP/wifi_nb_fw/blob/nxp-v4.1.0/readme.txt
88+
89+
#For IW416
90+
- path: IW416/sdIW416_wlan.bin
91+
sha256: 8D451D19237D25B6EE5976CC0793D66B801A1FEAF191A43B5F314B61F40ACCEE
92+
type: img
93+
version: '1.0'
94+
license-path: zephyr/blobs/license/LA_OPT_NXP_Software_License.txt
95+
url: https://github.com/NXP/wifi_nb_fw/raw/refs/tags/nxp-v4.1.0/IW416/sdIW416_wlan.bin
96+
description: "Wi-Fi firmware for IW416 boards"
97+
doc-url: https://github.com/NXP/wifi_nb_fw/blob/nxp-v4.1.0/readme.txt
98+
- path: IW416/uartIW416_bt.bin
99+
sha256: 8EF68C3E7AC879D35605D784317936C2D9AEA279EDC4D66729AB1973FBE701C3
100+
type: img
101+
version: '1.0'
102+
license-path: zephyr/blobs/license/LA_OPT_NXP_Software_License.txt
103+
url: https://github.com/NXP/wifi_nb_fw/raw/refs/tags/nxp-v4.1.0/IW416/uartIW416_bt.bin
104+
description: "BT firmware for IW416 boards"
105+
doc-url: https://github.com/NXP/wifi_nb_fw/blob/nxp-v4.1.0/readme.txt
106+
- path: IW416/sduartIW416_wlan_bt.bin
107+
sha256: B06206ABBAFC08D6E8F883A7D4A975AE19E0AB3CF7E3FE794284F5C6A2FA0E41
108+
type: img
109+
version: '1.0'
110+
license-path: zephyr/blobs/license/LA_OPT_NXP_Software_License.txt
111+
url: https://github.com/NXP/wifi_nb_fw/raw/refs/tags/nxp-v4.1.0/IW416/sduartIW416_wlan_bt.bin
112+
description: "Combo firmware for IW416 boards"
113+
doc-url: https://github.com/NXP/wifi_nb_fw/blob/nxp-v4.1.0/readme.txt

zephyr/src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
add_subdirectory_ifdef(CONFIG_SOC_SERIES_RW6XX rw61x)
1+
add_subdirectory_ifdef(CONFIG_SOC_FAMILY_NXP_IMXRT rt)
2+
add_subdirectory_ifdef(CONFIG_SOC_SERIES_RW6XX rw61x)

zephyr/src/rt/CMakeLists.txt

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
if(CONFIG_NXP_MONOLITHIC_WIFI OR CONFIG_BT_H4_NXP_CTLR)
2+
set(hal_blobs_dir ${ZEPHYR_HAL_NXP_MODULE_DIR}/zephyr/blobs)
3+
set(wifi_bt_binary_blobs_list)
4+
set(binary_blobs_list)
5+
set(output_includes_list)
6+
7+
if(CONFIG_WIFI_NXP)
8+
if(CONFIG_NXP_IW61X)
9+
list(APPEND output_includes_list ${ZEPHYR_BINARY_DIR}/include/generated/nw61x_wifi_fw.bin.se.inc)
10+
set(wifi_binary_blob_name sduart_nw61x.bin.se)
11+
zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/nw61x/nw61x_cpu1.c)
12+
list(APPEND wifi_bt_binary_blobs_list ${hal_blobs_dir}/nw61x/${wifi_binary_blob_name})
13+
elseif(CONFIG_NXP_88W8987)
14+
list(APPEND output_includes_list ${ZEPHYR_BINARY_DIR}/include/generated/8987_wifi_fw.bin.inc)
15+
set(wifi_binary_blob_name sd8987_wlan.bin)
16+
zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/8987/8987_cpu1.c)
17+
list(APPEND wifi_bt_binary_blobs_list ${hal_blobs_dir}/8987/${wifi_binary_blob_name})
18+
elseif(CONFIG_NXP_IW416)
19+
list(APPEND output_includes_list ${ZEPHYR_BINARY_DIR}/include/generated/iw416_wifi_fw.bin.inc)
20+
set(wifi_binary_blob_name sdIW416_wlan.bin)
21+
zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/IW416/IW416_cpu1.c)
22+
list(APPEND wifi_bt_binary_blobs_list ${hal_blobs_dir}/IW416/${wifi_binary_blob_name})
23+
elseif(CONFIG_NXP_88W8801)
24+
list(APPEND output_includes_list ${ZEPHYR_BINARY_DIR}/include/generated/8801_wifi_fw.bin.inc)
25+
set(wifi_binary_blob_name sd8801_wlan.bin)
26+
zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/8801/8801_cpu1.c)
27+
list(APPEND wifi_bt_binary_blobs_list ${hal_blobs_dir}/8801/${wifi_binary_blob_name})
28+
else()
29+
message(FATAL_ERROR "Couldn't determine soc revision")
30+
endif()
31+
endif()
32+
33+
if (CONFIG_BT_H4_NXP_CTLR)
34+
if(CONFIG_BT_NXP_NW612)
35+
list(APPEND output_includes_list ${ZEPHYR_BINARY_DIR}/include/generated/nw61x_bt_fw.bin.inc)
36+
set(bt_binary_blob_name uart_nw61x.bin.se)
37+
zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/nw61x/nw61x_cpu2.c)
38+
list(APPEND wifi_bt_binary_blobs_list ${hal_blobs_dir}/nw61x/${bt_binary_blob_name})
39+
elseif(CONFIG_BT_NXP_IW416)
40+
list(APPEND output_includes_list ${ZEPHYR_BINARY_DIR}/include/generated/iw416_bt_fw.bin.inc)
41+
set(bt_binary_blob_name uartIW416_bt.bin)
42+
zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/IW416/IW416_cpu2.c)
43+
list(APPEND wifi_bt_binary_blobs_list ${hal_blobs_dir}/IW416/${bt_binary_blob_name})
44+
else()
45+
message(FATAL_ERROR "Unsupported controller. Please select a BT conntroller, refer to ./driver/bluetooth/hci/Kconfig.nxp")
46+
endif()
47+
endif()
48+
49+
if(NOT CONFIG_BUILD_ONLY_NO_BLOBS)
50+
list(LENGTH wifi_bt_binary_blobs_list count)
51+
math(EXPR count "${count}-1")
52+
foreach(i RANGE ${count})
53+
list(GET wifi_bt_binary_blobs_list ${i} wifi_bt_binary_blob)
54+
if(EXISTS ${wifi_bt_binary_blob})
55+
set(binary_blob ${wifi_bt_binary_blob})
56+
else()
57+
message(FATAL_ERROR "Couldn't find wifi/bt firmware ! ${wifi_bt_binary_blob}")
58+
endif()
59+
60+
list(APPEND binary_blobs_list ${binary_blob})
61+
endforeach()
62+
63+
list(LENGTH binary_blobs_list count)
64+
math(EXPR count "${count}-1")
65+
foreach(i RANGE ${count})
66+
list(GET binary_blobs_list ${i} binary_blob)
67+
list(GET output_includes_list ${i} output_include)
68+
zephyr_blobs_verify(FILES ${binary_blob} REQUIRED)
69+
message(STATUS " generate include of binary blob: ${binary_blob}")
70+
generate_inc_file_for_target(app ${binary_blob} ${output_include})
71+
endforeach()
72+
endif()
73+
74+
endif()

zephyr/src/rt/IW416/IW416_cpu1.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright 2023-2025 NXP
3+
* All rights reserved.
4+
*
5+
* SPDX-License-Identifier: BSD-3-Clause
6+
*
7+
*/
8+
9+
10+
#include <stdint.h>
11+
12+
const uint8_t fw_cpu1[] = {
13+
#ifndef CONFIG_BUILD_ONLY_NO_BLOBS
14+
#include <iw416_wifi_fw.bin.inc>
15+
#endif /*CONFIG_BUILD_ONLY_NO_BLOBS*/
16+
};
17+
18+
const unsigned char *wlan_fw_bin = (const unsigned char *)(void *)&fw_cpu1[0];
19+
const unsigned int wlan_fw_bin_len = sizeof(fw_cpu1);

zephyr/src/rt/IW416/IW416_cpu2.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright 2023-2025 NXP
3+
* All rights reserved.
4+
*
5+
* SPDX-License-Identifier: BSD-3-Clause
6+
*
7+
*/
8+
9+
10+
#include <stdint.h>
11+
12+
const uint8_t fw_cpu2_bt[] = {
13+
#ifndef CONFIG_BUILD_ONLY_NO_BLOBS
14+
#include <iw416_bt_fw.bin.inc>
15+
#endif /*CONFIG_BUILD_ONLY_NO_BLOBS*/
16+
};
17+
18+
const unsigned char *bt_fw_bin = (const unsigned char *)(void *)&fw_cpu2_bt[0];
19+
const unsigned int bt_fw_bin_len = sizeof(fw_cpu2_bt);

zephyr/src/rt/nw61x/nw61x_cpu1.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright 2023-2025 NXP
3+
* All rights reserved.
4+
*
5+
* SPDX-License-Identifier: BSD-3-Clause
6+
*
7+
*/
8+
9+
10+
#include <stdint.h>
11+
12+
const uint8_t fw_cpu1[] = {
13+
#ifndef CONFIG_BUILD_ONLY_NO_BLOBS
14+
#include <nw61x_wifi_fw.bin.se.inc>
15+
#endif /*CONFIG_BUILD_ONLY_NO_BLOBS*/
16+
};
17+
18+
const unsigned char *wlan_fw_bin = (const unsigned char *)(void *)&fw_cpu1[0];
19+
const unsigned int wlan_fw_bin_len = sizeof(fw_cpu1);

zephyr/src/rt/nw61x/nw61x_cpu2.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright 2023-2025 NXP
3+
* All rights reserved.
4+
*
5+
* SPDX-License-Identifier: BSD-3-Clause
6+
*
7+
*/
8+
9+
10+
#include <stdint.h>
11+
12+
const uint8_t fw_cpu2_bt[] = {
13+
#ifndef CONFIG_BUILD_ONLY_NO_BLOBS
14+
#include <nw61x_bt_fw.bin.inc>
15+
#endif /*CONFIG_BUILD_ONLY_NO_BLOBS*/
16+
};
17+
18+
const unsigned char *bt_fw_bin = (const unsigned char *)(void *)&fw_cpu2_bt[0];
19+
const unsigned int bt_fw_bin_len = sizeof(fw_cpu2_bt);

0 commit comments

Comments
 (0)