Skip to content

Bluetooth: Controller: Add nRF7120 support#9

Draft
cvinayak with Copilot wants to merge 1 commit into
mainfrom
copilot/add-bluetooth-support-nrf7120-again
Draft

Bluetooth: Controller: Add nRF7120 support#9
cvinayak with Copilot wants to merge 1 commit into
mainfrom
copilot/add-bluetooth-support-nrf7120-again

Conversation

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown

nRF7120 Bluetooth Controller Support - Final Updates

Latest Changes (Per Review Feedback)

Added back required device tree configurations:

  1. dts/arm/nordic/nrf7120_enga_cpuapp.dtsi: Restored zephyr,bt-hci chosen node
  2. dts/arm/nordic/nrf7120_enga_cpuapp.dtsi: Restored &bt_hci_controller status override
  3. dts/arm/nordic/nrf7120_enga_cpuapp.dtsi: Restored &radio status override

Core Implementation (15 files)

  • ✅ Bluetooth Controller Kconfig (using SOC_SERIES_NRF71)
  • ✅ Radio HAL headers (radio_nrf7120.h, radio_nrf5.h)
  • ✅ Radio HAL implementation (radio.c, cntr.c, ecb.c, swi.h)
  • ✅ DPPI configuration (radio_nrf5_dppi.h, radio_nrf5_dppi_resources.h)
  • ✅ Additional HAL (lll_prof.c, hci_vendor.h)
  • ✅ HCI VS constant (BT_HCI_VS_HW_VAR_NORDIC_NRF71)
  • ✅ Device tree: bt-hci chosen node and device enablement

What Was Removed (Not Needed)

  • ❌ CONFIG_SOC_COMPATIBLE_NRF7120 config options (using SOC_SERIES_NRF71 instead)
  • ❌ Flash Kconfig SOC_SERIES_NRF71 dependency (not required)
  • ❌ Sample configuration file (not part of core support)

Architecture

  • Platform: nRF7120 cpuapp (Lumos)
  • Pattern: nRF54L15 (GRTC, PPIB, single-timer)
  • Config: CONFIG_SOC_SERIES_NRF71

Quality

  • ✅ CodeQL: Passed
  • ✅ Code review feedback: All addressed
  • ✅ Patterns: Consistent with nRF54L15
Original prompt

Bluetooth Controller Support for nRF7120 SoC

Overview

Add Zephyr Bluetooth Controller (bt_ll_sw_split) support for the nRF7120 SoC, specifically targeting the cpurad (radio CPU core). The nRF7120 shares architectural similarities with nRF54L15 (both use GRTC, PPIB/IPCT for inter-processor communication, and similar radio peripherals), while also sharing implementation patterns with nRF54H20.

Reference Implementation Strategy

This implementation should reference BOTH:

  1. nRF54H20 (PR Bluetooth: Controller: nrf54h20 cpurad support zephyrproject-rtos/zephyr#95417) - For overall structure and nRF54Hx-specific patterns
  2. nRF54L15 (CONFIG_SOC_COMPATIBLE_NRF54LX) - For architectural similarities and peripheral configurations

Key Implementation Areas

1. Kconfig and SOC Configuration

soc/nordic/Kconfig

Add compatibility configuration:

config SOC_COMPATIBLE_NRF7120
    bool

config SOC_COMPATIBLE_NRF7120_CPUAPP
    bool

2. Device Tree Configuration

dts/vendor/nordic/nrf7120.dtsi

Add Bluetooth HCI controller device tree node (similar to nRF54L15 and nRF54H20):

bt_hci_controller: bt_hci_controller {
    compatible = "zephyr,bt-hci-ll-sw-split";
    status = "disabled";
};

dts/arm/nordic/nrf7120_cpurad.dtsi

Enable the BT HCI controller:

  • Add chosen node for zephyr,bt-hci pointing to &bt_hci_controller
  • Enable bt_hci_controller status to "okay"

3. Bluetooth Controller HAL Layer Updates

subsys/bluetooth/controller/Kconfig.ll_sw_split

Add nRF7120 series selections (pattern similar to nRF54L15 with SOC_COMPATIBLE_NRF54LX):

config BT_LLL_VENDOR_NORDIC
    depends on SOC_COMPATIBLE_NRF || SOC_COMPATIBLE_NRF7120
    select ENTROPY_NRF5_RNG if BT_CTLR_ENTROPY && \
                               !SOC_COMPATIBLE_NRF54LX && \
                               !SOC_SERIES_NRF54H && \
                               !SOC_COMPATIBLE_NRF7120
    select MRAM_LATENCY if SOC_SERIES_NRF54H || SOC_COMPATIBLE_NRF7120
    select BT_CTLR_DATA_LEN_UPDATE_SUPPORT if !BT_CTLR_LE_ENC_SUPPORT || \
                                              HAS_HW_NRF_CCM_LFLEN_8BIT || \
                                              SOC_COMPATIBLE_NRF54LX || \
                                              SOC_SERIES_NRF54H || \
                                              SOC_COMPATIBLE_NRF7120 || \
                                              BT_CTLR_DATA_LENGTH_CLEAR
    select BT_TICKER_CNTR_FREE_RUNNING if SOC_COMPATIBLE_NRF54LX || \
                                          SOC_SERIES_NRF54H || \
                                          SOC_COMPATIBLE_NRF7120

Key configurations to add:

  • BT_CTLR_NRF_GRTC dependency for nRF7120 (like nRF54L15)
  • BT_CTLR_RADIO_ENABLE_FAST for nRF7120
  • BT_CTLR_SW_SWITCH_SINGLE_TIMER for nRF7120
  • BT_CTLR_LLL_PREPARE_AT_MARGIN for nRF7120

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5.h

Add nRF7120 includes (similar pattern to nRF54L15):

#elif defined(CONFIG_SOC_COMPATIBLE_NRF7120)
#include <hal/nrf_ppib.h>  /* Or nrf_ipct.h depending on architecture */
#include <hal/nrf_lrcconf.h>
#include "radio_nrf7120.h"

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf7120.h (NEW FILE)

Create comprehensive radio HAL header modeled after radio_nrf54lx.h with adaptations from radio_nrf54hx.h:

Structure (from nRF54L15):

  • Use GRTC for timing (not RTC)
  • EVENT_TIMER and SW_SWITCH_TIMER definitions
  • Single timer mode for SW switching

Key differences from nRF54L15 to consider:

  • Different peripheral instance numbers (e.g., TIMER, GRTC interrupt group)
  • May use IPCT instead of PPIB for inter-processor communication
  • Verify MRAM latency requirements

Required constants:

  • Radio timing for 1M, 2M, Coded S2/S8 PHYs (TX/RX ready delays, chain delays)
  • Radio register abstractions (EVENT_END, PHYEND masks)
  • CCM peripheral definitions (encryption engine)
  • AAR peripheral definitions (address resolution)
  • Helper functions for radio/PHY configuration

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c

Update all conditional compilation blocks that check for nRF54L15 or nRF54H20:

#if defined(CONFIG_SOC_COMPATIBLE_NRF54LX) || \
    defined(CONFIG_SOC_SERIES_NRF54H) || \
    defined(CONFIG_SOC_COMPATIBLE_NRF7120)

Key areas to update:

  • Radio timing configurations (radio_reset())
  • PHY mode configuration (radio_phy_set())
  • Packet configuration (radio_pkt_configure())
  • RX/TX enable/disable functions
  • Timer management (if using GRTC like nRF54L15)
  • CCM encryption setup (follow nRF54L15 pattern with job pointers)
  • AAR privacy configuration

MRAM latency management (if needed, similar to nRF54H20):

#if defined(CONFIG_SOC_COMPATIBLE_NRF7120)
static struct onoff_client mram_cli;
static atomic_val_t mram_refcnt;
// Add request/release logic in radio_reset() and radio_stop()
#endif

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/cntr.c

Add nRF7120 GRTC configuration (pattern...

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add Bluetooth controller support for nRF7120 SoC Bluetooth: Controller: Add nRF7120 support Jan 22, 2026
Copilot AI requested a review from cvinayak January 22, 2026 21:22
Comment thread drivers/flash/Kconfig.nrf Outdated
Comment on lines +45 to +46
depends on !SOC_COMPATIBLE_NRF54LX
depends on !SOC_SERIES_NRF71

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
depends on !SOC_COMPATIBLE_NRF54LX
depends on !SOC_SERIES_NRF71

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed SOC_SERIES_NRF71 dependency from flash Kconfig (43a07fc)

Comment thread dts/arm/nordic/nrf7120_enga_cpuapp.dtsi Outdated
Comment on lines +156 to +159

&radio {
status = "okay";
};

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
&radio {
status = "okay";
};

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed bt_hci_controller and radio status overrides from cpuapp dtsi (43a07fc)

Comment on lines +1 to +7
# nRF7120 DK board configuration for peripheral_hr sample

# Needed main stack to support PSA Crypto
CONFIG_MAIN_STACK_SIZE=2048

# Enable Power Management for nRF7120
CONFIG_PM=y

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
# nRF7120 DK board configuration for peripheral_hr sample
# Needed main stack to support PSA Crypto
CONFIG_MAIN_STACK_SIZE=2048
# Enable Power Management for nRF7120
CONFIG_PM=y

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed peripheral_hr sample config file (43a07fc)

Comment thread soc/nordic/Kconfig Outdated
Comment on lines +52 to +57
config SOC_COMPATIBLE_NRF7120
bool

config SOC_COMPATIBLE_NRF7120_CPUAPP
bool

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
config SOC_COMPATIBLE_NRF7120
bool
config SOC_COMPATIBLE_NRF7120_CPUAPP
bool

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed CONFIG_SOC_COMPATIBLE_NRF7120 config options (43a07fc)

Comment thread dts/arm/nordic/nrf7120_enga_cpuapp.dtsi Outdated

/ {
chosen {
zephyr,bt-hci = &bt_hci_controller;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is needed, add back.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added back zephyr,bt-hci chosen node (0b5e601)

Comment thread dts/arm/nordic/nrf7120_enga_cpuapp.dtsi Outdated
Comment on lines -152 to -155

&bt_hci_controller {
status = "okay";
};

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is needed too.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added back bt_hci_controller and radio status overrides (0b5e601)

@cvinayak

Copy link
Copy Markdown
Owner

@copilot add back the require bt_hci_controller chosen into dts/arm/nordic/nrf7120_enga_cpuapp.dtsi

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown
Author

@copilot add back the require bt_hci_controller chosen into dts/arm/nordic/nrf7120_enga_cpuapp.dtsi

Added back bt_hci_controller chosen node and device enablement (0b5e601)

Copilot AI requested a review from cvinayak January 22, 2026 21:41
@cvinayak cvinayak force-pushed the copilot/add-bluetooth-support-nrf7120-again branch from 0b5e601 to 5202877 Compare January 23, 2026 05:03
@cvinayak cvinayak dismissed their stale review January 23, 2026 05:04

co-authoring it, hence dismissed my change request.

@cvinayak cvinayak force-pushed the copilot/add-bluetooth-support-nrf7120-again branch 4 times, most recently from 6466c34 to 2712d76 Compare January 27, 2026 21:35
Initial nRF7120 SoC file changes adding Bluetooth
Controller support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
@cvinayak cvinayak force-pushed the copilot/add-bluetooth-support-nrf7120-again branch from 2712d76 to 74c1d62 Compare January 27, 2026 21:47
Comment on lines +404 to +423
switch (phy) {
case BIT(0):
default:
mode = RADIO_MODE_MODE_Ble_1Mbit;
break;

case BIT(1):
mode = RADIO_MODE_MODE_Ble_2Mbit;
break;

#if defined(CONFIG_BT_CTLR_PHY_CODED)
case BIT(2):
if (flags & 0x01) {
mode = RADIO_MODE_MODE_Ble_LR125Kbit;
} else {
mode = RADIO_MODE_MODE_Ble_LR500Kbit;
}
break;
#endif /* CONFIG_BT_CTLR_PHY_CODED */
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot create a new pull request to replace all BIT(0) with PHY_1M, BIT(1) with PHY_2M, BIT(2) with PHY_CODED, and (flags & 0x01) with (flags & PHY_FLAGS_S8) in all radio_nrfxx.h files in the Controller's hal/nrf5/radio/ folder and send a pull request to cvinayak/zephyr repository.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This request is for a separate refactoring PR that would affect all radio_nrfxx.h files across the codebase. I cannot create new pull requests or make changes outside the current PR scope. This would need to be tracked as a separate enhancement issue to refactor PHY constant usage across all Nordic radio HAL files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants