Skip to content

COEX (WIFI+BT) Enablement NXP IW416 SoC with RT1060EVKC Platform #86719

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 5 commits into
base: main
Choose a base branch
from

Conversation

nirav-agrawal
Copy link
Contributor

This PR enabled support for COEX WIFI + BT scenario where WIFI and BT CPU of IW416 NXP controller works together in COEX mode. The support is enabled with NXP RT1060EVKC platform. Below are the changes made to bring up COEX in Zephyr for NXP IW416/NW612 SoCs.

  1. Added "BT_NXP_CTRL_BSP_TRIGGER" config to enable boot-sleep-patch trigger to wakeup BT controller to wake up and send signature byte.

This feature is enabled in Coex scenario (WIFI + BT).
BT Controller uses HCI UART CTS line as a wakeup trigger source. Hence, uses driver control api to provide pulse on host-UART-RTS line.

  1. Added function to hard-reset WIFI+BT NXP controller to reset both WIFI and BT CPU. This is required for coex scenario when BT CPU firmware load happens after WIFI CPU FW load.
  2. Added board overlay to remove properties from NXP BT HCI UART driver's binding yml to avoid controller reset during firmware load procedure.
  3. Added NXP WIFI driver binding property to allow controller reset during WIFI firmware load procedure for coex scenario.
  4. Added config coex file to enable WIFI configs as part of BT shell sample configuration.

This PR is dependent on below PRs,

  1. NXP Iw416 and nw61x wifi and bt soc support hal_nxp#512
  2. Add Support for uart_line_ctrl_set() for UART RTS Line in NXP MCUX LPUART Driver #86710
  3. Enabling IW416 and IW612 BT HCI controller with MIMXRT1060EVKC platform for Bluetooth apps to work #85639
  4. Added support for IW416 and IW612 socs for WI-Fi shell application #85749

@dleach02, @DerekSnell, please review this PR.

Regards,
Nirav

@zephyrbot zephyrbot added area: Wi-Fi Wi-Fi area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth HCI Bluetooth HCI Driver platform: NXP Drivers NXP Semiconductors, drivers area: Bluetooth labels Mar 6, 2025
- Added "BT_NXP_CTRL_BSP_TRIGGER" config to enable boot-sleep-patch
  trigger to wakeup BT controller to wakeup and send signature byte.
- This feature is enabled for Coex scenario (WIFI + BT).
- BT Controller uses HCI UART CTS line as a wakeup trigger source.
  Hence, uses driver control api to provide pulse on host-uart-rts
  line.

Signed-off-by: Nirav Agrawal <[email protected]>
- added function to hard-reset WIFI+BT NXP controller to reset both
  WIFI and BT CPUs. This is required for Coex tests when BT CPU
  firmware load happens after WIFI CPU firmware load.
- added driver binding properties to configure required GPIO to
  reset the CPU. This property sets in coex specific board overlay
  to allow controller reset at begining and avoid resets during bt-
  init procedure.

Signed-off-by: Nirav Agrawal <[email protected]>
- added board overlay to remove properties from bt-hci-uart to avoid
  controller reset during firmware load procedure.
- added nxp-wifi binding property to allow controller reset during
  wifi firmware load procedure for coex scenario.
- updated bt-hci binding file to remove required mark for controller
  reset specific properties.

Signed-off-by: Nirav Agrawal <[email protected]>
@nirav-agrawal nirav-agrawal force-pushed the coex_enablement_iw416_nw612_soc branch from b91d82c to 39d85cd Compare March 6, 2025 12:05
@Thalley Thalley removed their request for review March 6, 2025 12:26
@@ -385,7 +452,9 @@ static int nxp_wifi_wlan_init(void)
k_event_init(&s_nxp_wifi_SyncEvent);
}

if (status == NXP_WIFI_RET_SUCCESS) {
ret = nxp_wifi_cpu_reset(true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

why need to add this reset for all the NXP wifi case?

Copy link
Contributor Author

@nirav-agrawal nirav-agrawal Mar 10, 2025

Choose a reason for hiding this comment

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

Hi @MaochenWang, this is with respect to enabling COEX (WIFI + BT) for IW416 and IW612 SoC where Controller Reset is must so that BT CPU goes in reset state and starts sending signature bytes to allow firmware load post WIFI Init.

In all other case where controller reset properties are not set by board overlay, the api nxp_wifi_cpu_reset() returns success as per below code in API definitions. You can see new coex overlay to work with iw416/iw612, the wifi properties are added here, https://github.com/zephyrproject-rtos/zephyr/pull/86719/files#diff-d4cf5dd6dea2a990e904c0ab6ffbf822b8cf81a0d14c12dc696db59a77fcb85c

static int nxp_wifi_cpu_reset(uint8_t enable) { int err = 0; #if DT_NODE_HAS_PROP(DT_DRV_INST(0), sd_gpios) && \ DT_NODE_HAS_PROP(DT_DRV_INST(0), pwr_gpios)

Regards,
Nirav

@nirav-agrawal
Copy link
Contributor Author

Hi @dleach02, there is a compliance check failure on this PR because it has dependencies on other PRs mentioned in description.

Compliance check fails to find kconfig for new symbol, which is added in another PR,

image

Above symbol is added in below PR which is not merged yet,
https://github.com/zephyrproject-rtos/zephyr/pull/85639/files#diff-2f154c5aa564dfd65ddbf62553fbe5d8f10f69fa16168cd94988e4452c60bcd9R86

This PR should be merged once all dependent PR gets merged.

Regards,
Nirav

- added config coex file to enable WIFI configs as part of BT shell.
- added config works for IW416 WIFI + BT Coex test scenario.

Signed-off-by: Nirav Agrawal <[email protected]>
@nirav-agrawal nirav-agrawal force-pushed the coex_enablement_iw416_nw612_soc branch from 39d85cd to 7bcf092 Compare March 11, 2025 10:37
Copy link
Collaborator

@DerekSnell DerekSnell left a comment

Choose a reason for hiding this comment

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

needs work

Copy link
Collaborator

Choose a reason for hiding this comment

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

The MIMXRT1060-EVKC does not include Bluetooth or Wi-Fi by default. They are added with a module. You have already enabled a bluetooth shield for these IW416 and IW612 in another PR. We should move the devicetree changes in this file to those shield files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @DerekSnell,
This is an extra overlay file on the top of shield we added in other PR.
To enable coex, here we use same node which we took in shield (m2_hci_bt_uart ) and removed few properties from it. At the same time, we need to add some properties to WIFI specific DT node (which is not part of any shield for now).

When we run bt-shell example with this extra overlay inclusion, it will override both WIFI specific node and BT specific node to make app working for coex. There is only shell example which is being used for coex testing hence overlay added to this folder.

Please suggest if you need any other way to add this overlay.

Regards,
Nirav

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @nirav-agrawal ,
This makes no sense to me. You created a shield for these modules for the BT functionality, but are not leveraging that shield for Wi-Fi. The IW41x and IW61x SOCs integrate BT and Wi-Fi, and there is 1 physical M.2 module attached to the base board to connect these SOCs. So there should be a single shield for these modules, and enable both BT and Wi-Fi. This will also make it easier to connect those modules to other boards in Zephyr, not just the RT1060 EVKC.

@@ -0,0 +1,118 @@
##Optimized to support IW416, IW612 with RT1060EVKC
Copy link
Collaborator

Choose a reason for hiding this comment

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

As you state here, most of these Kconfigs are specifc to the combination of R1060 with either IW416 or IW612. We should move HW-specific Kconfigs to those shield files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The configurations here are very specific to platform and middleware which includes fine tuning middleware component configuration to let COEX works on RT platform with IW416 and NW612 SoC. The configs are not specific to hardware, but it enables/disables/configure various configurations to make wifi-shell works with bt-shell for coex support.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Kconfigs like these listed below are dependent on the HW, and specifically on the HW module that is added to the EVK board. These should be configured in the shield files since they are specific to the shield connected for the build.

CONFIG_NXP_IW416=y
#CONFIG_NXP_IW61X=y
CONFIG_NXP_IW416_MURATA_1XK_M2=y
#CONFIG_NXP_IW612_MURATA_2EL_M2=y

Copy link
Collaborator

Choose a reason for hiding this comment

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

need to update copyright year

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will be updated by dependent BT enablement PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

need to update copyright year

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will be updated by dependent BT enablement PR.

- current PR is dependent on hal_nxp PR.

Signed-off-by: Nirav Agrawal <[email protected]>
@zephyrbot
Copy link
Collaborator

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@9dc7449 (master) zephyrproject-rtos/hal_nxp#512 zephyrproject-rtos/hal_nxp#512/files

Additional metadata changed:

Name URL Submodules West cmds module.yml
hal_nxp

DNM label due to: 1 project with PR revision and 1 project with metadata changes

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_nxp DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Mar 12, 2025
@nirav-agrawal
Copy link
Contributor Author

Hi @DerekSnell, hal_nxp PR is added in manifest file. It adds DNM label too. I would suggest to complete review on this PR, and once all dependent PR gets merged, I will initiate merge for this PR later.

Copy link
Collaborator

@DerekSnell DerekSnell left a comment

Choose a reason for hiding this comment

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

Hi @nirav-agrawal ,

I am continuing to block to get proper shield support for these modules.

Similar to comment #85639 (review), this commit sequence does not look ideal.

@MaochenWang1 MaochenWang1 self-requested a review April 9, 2025 07:07
@alwa-nordic alwa-nordic removed their assignment Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth HCI Bluetooth HCI Driver area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth area: Wi-Fi Wi-Fi DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-hal_nxp platform: NXP Drivers NXP Semiconductors, drivers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants