Skip to content
Merged
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
1 change: 1 addition & 0 deletions MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4251,6 +4251,7 @@ Secure storage:
- tomi-font
files:
- subsys/secure_storage/
- include/zephyr/psa/
- samples/psa/
- doc/services/secure_storage.rst
- tests/subsys/secure_storage/
Expand Down
4 changes: 2 additions & 2 deletions drivers/bluetooth/hci/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static int bt_spi_open(const struct device *dev, bt_hci_recv_t recv)
struct bt_spi_data *hci = dev->data;
int err;

/* Configure RST pin and hold BLE in Reset */
/* Configure RST pin and hold Bluetooth LE in Reset */
err = gpio_pin_configure_dt(&rst_gpio, GPIO_OUTPUT_ACTIVE);
if (err) {
return err;
Expand All @@ -403,7 +403,7 @@ static int bt_spi_open(const struct device *dev, bt_hci_recv_t recv)

hci->recv = recv;

/* Take BLE out of reset */
/* Take Bluetooth LE out of reset */
k_sleep(K_MSEC(DT_INST_PROP_OR(0, reset_assert_duration_ms, 0)));
gpio_pin_set_dt(&rst_gpio, 0);

Expand Down
2 changes: 1 addition & 1 deletion drivers/flash/Kconfig.nrf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ config SOC_FLASH_NRF_RADIO_SYNC_TICKER
depends on BT_LL_SW_SPLIT
help
Enable synchronization between flash memory driver and radio using
BLE LL controller ticker API.
Bluetooth LE LL controller ticker API.

config SOC_FLASH_NRF_RADIO_SYNC_NONE
bool "none"
Expand Down
2 changes: 1 addition & 1 deletion drivers/flash/Kconfig.nrf_rram
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ config SOC_FLASH_NRF_RADIO_SYNC_TICKER
depends on BT_LL_SW_SPLIT
help
Enable synchronization between flash memory driver and radio using
BLE LL controller ticker API.
Bluetooth LE LL controller ticker API.

config SOC_FLASH_NRF_RADIO_SYNC_NONE
bool "none"
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwinfo/hwinfo_nrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ssize_t z_impl_hwinfo_get_device_id(uint8_t *buffer, size_t length)
buf[1] = nrf_ficr_deviceid_get(NRF_FICR, 1);
#endif
#elif NRF_FICR_HAS_DEVICE_ADDR || NRF_FICR_HAS_BLE_ADDR
/* DEVICEID is not accessible, use device/ble address instead.
/* DEVICEID is not accessible, use device/Bluetooth LE address instead.
* Assume that it is always accessible from the non-secure image.
*/
buf[0] = nrf_ficr_deviceaddr_get(NRF_FICR, 0);
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/bluetooth/hci_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ struct bt_hci_rp_read_encryption_key_size {
uint8_t key_size;
} __packed;

/* BLE */
/* Bluetooth LE */

#define BT_HCI_OP_LE_SET_EVENT_MASK BT_OP(BT_OGF_LE, 0x0001) /* 0x2001 */
struct bt_hci_cp_le_set_event_mask {
Expand Down
4 changes: 2 additions & 2 deletions include/zephyr/bluetooth/mesh/statistic.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
* @brief BLE mesh statistic APIs.
* @brief Bluetooth Mesh statistic APIs.
*/

/*
Expand Down Expand Up @@ -51,7 +51,7 @@ struct bt_mesh_statistic {

/** @brief Get mesh frame handling statistic.
*
* @param st BLE mesh statistic.
* @param st Bluetooh Mesh statistic.
*/
void bt_mesh_stat_get(struct bt_mesh_statistic *st);

Expand Down
10 changes: 5 additions & 5 deletions include/zephyr/logging/log_backend_ble.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <stdbool.h>
/**
* @brief Raw adv UUID data to add the ble backend for the use with apps
* @brief Raw adv UUID data to add the Bluetooth backend for the use with apps
* such as the NRF Toolbox
*
*/
Expand All @@ -19,7 +19,7 @@
0x6E

/**
* @brief Hook for application to know when the ble backend
* @brief Hook for application to know when the Bluetooth backend
* is enabled or disabled.
* @param backend_status True if the backend is enabled or false if disabled
* @param ctx User context
Expand All @@ -28,10 +28,10 @@
typedef void (*logger_backend_ble_hook)(bool backend_status, void *ctx);

/**
* @brief Allows application to add a hook for the status of the BLE
* @brief Allows application to add a hook for the status of the Bluetooth
* logger backend.
* @details The BLE logger backend is enabled or disabled auomatically by
* the subscription of the notification characteristic of this BLE
* @details The Bluetooth logger backend is enabled or disabled auomatically by
* the subscription of the notification characteristic of this Bluetooth
* Logger backend service.
*
* @param hook The hook that will be called when the status of the backend changes
Expand Down
6 changes: 3 additions & 3 deletions include/zephyr/mgmt/mcumgr/transport/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef int (*smp_transport_out_fn)(struct net_buf *nb);
* The supplied net_buf should contain a request received from the peer whose
* MTU is being queried. This function takes a net_buf parameter because some
* transports store connection-specific information in the net_buf user header
* (e.g., the BLE transport stores the peer address).
* (e.g., the Bluetooth transport stores the peer address).
*
* @param nb Contains a request from the relevant peer.
*
Expand All @@ -55,7 +55,7 @@ typedef uint16_t (*smp_transport_get_mtu_fn)(const struct net_buf *nb);
* @brief SMP copy user_data callback
*
* The supplied src net_buf should contain a user_data that cannot be copied
* using regular memcpy function (e.g., the BLE transport net_buf user_data
* using regular memcpy function (e.g., the Bluetooth transport net_buf user_data
* stores the connection reference that has to be incremented when is going
* to be used by another buffer).
*
Expand All @@ -71,7 +71,7 @@ typedef int (*smp_transport_ud_copy_fn)(struct net_buf *dst,
* @brief SMP free user_data callback
*
* This function frees net_buf user data, because some transports store
* connection-specific information in the net_buf user data (e.g., the BLE
* connection-specific information in the net_buf user data (e.g., the Bluetooth
* transport stores the connection reference that has to be decreased).
*
* @param ud Contains a user_data pointer to be freed.
Expand Down
51 changes: 51 additions & 0 deletions include/zephyr/psa/key_ids.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Copyright (c) 2025 Nordic Semiconductor
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_PSA_KEY_IDS_H_
#define ZEPHYR_PSA_KEY_IDS_H_

/**
* @file zephyr/psa/key_ids.h
*
* @brief This file defines the key ID ranges of the existing users of the PSA Crypto API.
*
* In addition to the application, different subsystems store and use persistent keys through the
* PSA Crypto API. Because they are not aware of each other, collisions are avoided by having them
* use different ID ranges.
* This file acts as the registry of all the allocated PSA key ID ranges within Zephyr.
*
* The end-user application also has a dedicated range, `ZEPHYR_PSA_APPLICATION_KEY_ID_RANGE_BEGIN`.
*
* Some of the IDs below are based on previously existing and used values, while others
* are chosen to be somewhere in the PSA user key ID range to try to avoid collisions
* (avoiding, for example, the very beginning of the range).
*/

#include <stdint.h>
typedef uint32_t psa_key_id_t;

/** PSA key ID range to be used by OpenThread. The base ID is equal to the default value upstream:
* https://github.com/openthread/openthread/blob/thread-reference-20230706/src/core/config/platform.h#L138
*/
#define ZEPHYR_PSA_OPENTHREAD_KEY_ID_RANGE_BEGIN (psa_key_id_t)0x20000
#define ZEPHYR_PSA_OPENTHREAD_KEY_ID_RANGE_SIZE 0x10000 /* 64 Ki */

/** PSA key ID range to be used by Matter. The base ID is equal to the default value upstream:
* https://github.com/project-chip/connectedhomeip/blob/v1.4.0.0/src/crypto/CHIPCryptoPALPSA.h#L55
*/
#define ZEPHYR_PSA_MATTER_KEY_ID_RANGE_BEGIN (psa_key_id_t)0x30000
#define ZEPHYR_PSA_MATTER_KEY_ID_RANGE_SIZE 0x10000 /* 64 Ki */

/** PSA key ID range to be used by Bluetooth Mesh. */
#define ZEPHYR_PSA_BT_MESH_KEY_ID_RANGE_BEGIN (psa_key_id_t)0x20000000
#define ZEPHYR_PSA_BT_MESH_KEY_ID_RANGE_SIZE 0xC000 /* 48 Ki */

/** PSA key ID range to be used by Wi-Fi credentials management. */
#define ZEPHYR_PSA_WIFI_CREDENTIALS_KEY_ID_RANGE_BEGIN (psa_key_id_t)0x20010000
#define ZEPHYR_PSA_WIFI_CREDENTIALS_KEY_ID_RANGE_SIZE 0x100 /* 256 */

/** PSA key ID range to be used by the end-user application. */
#define ZEPHYR_PSA_APPLICATION_KEY_ID_RANGE_BEGIN (psa_key_id_t)0x30000000
#define ZEPHYR_PSA_APPLICATION_KEY_ID_RANGE_SIZE 0x100000 /* 1 Mi */

#endif /* ZEPHYR_PSA_KEY_IDS_H_ */
9 changes: 9 additions & 0 deletions modules/openthread/platform/openthread-core-zephyr-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define OPENTHREAD_CORE_ZEPHYR_CONFIG_H_

#include <zephyr/devicetree.h>
#include <zephyr/psa/key_ids.h>
#include <zephyr/toolchain.h>

/**
Expand Down Expand Up @@ -510,4 +511,12 @@
#define OPENTHREAD_CONFIG_MLE_CHILD_TIMEOUT_DEFAULT CONFIG_OPENTHREAD_MLE_CHILD_TIMEOUT
#endif

/**
* @def OPENTHREAD_CONFIG_PSA_ITS_NVM_OFFSET
*
* NVM offset while using key refs.
*
*/
#define OPENTHREAD_CONFIG_PSA_ITS_NVM_OFFSET ZEPHYR_PSA_OPENTHREAD_KEY_ID_RANGE_BEGIN

#endif /* OPENTHREAD_CORE_ZEPHYR_CONFIG_H_ */
3 changes: 2 additions & 1 deletion samples/psa/persistent_key/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
*/
#include <psa/crypto.h>
#include <zephyr/logging/log.h>
#include <zephyr/psa/key_ids.h>

LOG_MODULE_REGISTER(persistent_key);

#define SAMPLE_KEY_ID PSA_KEY_ID_USER_MIN
#define SAMPLE_KEY_ID ZEPHYR_PSA_APPLICATION_KEY_ID_RANGE_BEGIN
#define SAMPLE_KEY_TYPE PSA_KEY_TYPE_AES
#define SAMPLE_ALG PSA_ALG_CTR
#define SAMPLE_KEY_BITS 256
Expand Down
14 changes: 7 additions & 7 deletions subsys/bluetooth/controller/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ config BT_CTLR
the HAS_BT_CTLR option.

config BT_LL_SW_SPLIT
bool "Software-based BLE Link Layer [EXPERIMENTAL]"
bool "Software-based Bluetooth LE Link Layer [EXPERIMENTAL]"
default y
depends on DT_HAS_ZEPHYR_BT_HCI_LL_SW_SPLIT_ENABLED
select HAS_BT_CTLR
select EXPERIMENTAL
select ENTROPY_GENERATOR
help
Use Zephyr software BLE Link Layer ULL LLL split implementation.
Use Zephyr software Bluetooth LE Link Layer ULL LLL split implementation.

config BT_CTLR_HCI
bool "Host Controller Interface (HCI)"
Expand All @@ -163,7 +163,7 @@ config BT_CTLR_HCI

if HAS_BT_CTLR

comment "BLE Controller configuration"
comment "Bluetooth Controller configuration"

config BT_CTLR_ENTROPY
bool "Random number generation in Controller"
Expand Down Expand Up @@ -218,7 +218,7 @@ config BT_CTLR_DUP_FILTER_LEN
depends on BT_LL_SW_SPLIT
default 16
help
Set the number of unique BLE addresses that can be filtered as
Set the number of unique Bluetooth LE addresses that can be filtered as
duplicates while scanning.

config BT_CTLR_DUP_FILTER_ADV_SET_MAX
Expand Down Expand Up @@ -324,7 +324,7 @@ choice BT_CTLR_TX_PWR
default BT_CTLR_TX_PWR_0
depends on BT_CTLR_TX_PWR_ANTENNA = 0 || BT_LL_SW_SPLIT
help
Select a supported BLE Radio transmit power level in dBm.
Select a supported Bluetooth LE Radio transmit power level in dBm.
Only values supported natively by the SoC are available.
The value set here represents the actual default power level fed
to the antenna.
Expand Down Expand Up @@ -501,7 +501,7 @@ config BT_CTLR_TX_PWR_DYNAMIC_CONTROL
Provides HCI VS commands to set and get the current Tx
power on an individual role/connection basis.

comment "BLE Controller features"
comment "Bluetooth Controller features"

if BT_CONN

Expand Down Expand Up @@ -1127,6 +1127,6 @@ config BT_CTLR_DEBUG_PINS_CPUAPP
bool "Bluetooth Controller Debug Pins"
depends on BOARD_NRF5340DK_NRF5340_CPUAPP
help
Route debug GPIO toggling for the BLE Controller. Enable this when
Route debug GPIO toggling for the Bluetooth Controller. Enable this when
using Bluetooth Controller Debug Pins in co-processor and the main
processor needs to setup and/or route the signals.
10 changes: 5 additions & 5 deletions subsys/bluetooth/controller/Kconfig.ll_sw_split
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ config BT_LLL_VENDOR_OPENISA
Use OpenISA Lower Link Layer implementation.

# BT_CTLR_DF_SUPPORT is a wrapper for all DF features. Here we select features that are supported by
# Zephyr's BLE Controller.
# Zephyr's Bluetooth LE Controller.
config BT_CTLR_DF_SUPPORT
depends on BT_LL_SW_SPLIT && !BT_CTLR_TIFS_HW
select BT_CTLR_DF_CTE_TX_SUPPORT
Expand Down Expand Up @@ -973,11 +973,11 @@ config BT_CTLR_SW_SWITCH_SINGLE_TIMER
SOC_COMPATIBLE_NRF54LX)
help
Implement the tIFS Trx SW switch with the same TIMER
instance, as the one used for BLE event timing. Requires
instance, as the one used for Bluetooth event timing. Requires
SW switching be enabled. Using a single TIMER:
(+) frees up one TIMER instance
(+) removes jitter for HCTO implementation
(-) introduces drifting to the absolute time inside BLE
(-) introduces drifting to the absolute time inside Bluetooth
events, that increases linearly with the number of
packets exchanged in the event
(-) makes it impossible to use most of the pre-programmed
Expand Down Expand Up @@ -1413,7 +1413,7 @@ endchoice

source "subsys/bluetooth/controller/coex/Kconfig"

comment "BLE Controller debug configuration"
comment "Bluetooth LE Controller debug configuration"

config BT_CTLR_PROFILE_ISR
bool "Profile radio ISR"
Expand All @@ -1427,7 +1427,7 @@ config BT_CTLR_DEBUG_PINS
bool "Bluetooth Controller Debug Pins"
depends on BOARD_NRF51DK_NRF51822 || BOARD_NRF52DK_NRF52832 || BOARD_NRF52DK_NRF52810 || BOARD_NRF52840DK_NRF52840 || BOARD_NRF52833DK_NRF52833 || BOARD_NRF5340DK_NRF5340_CPUNET || BOARD_RV32M1_VEGA
help
Turn on debug GPIO toggling for the BLE Controller. This is useful
Turn on debug GPIO toggling for the Bluetooth LE Controller. This is useful
when debugging with a logic analyzer or profiling certain sections of
the code.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,7 @@ static void *radio_ccm_ext_rx_pkt_set(struct ccm *cnf, uint8_t phy, uint8_t pdu_
CCM_MODE_MODE_Msk;

#if defined(CONFIG_SOC_COMPATIBLE_NRF54LX)
/* Enable CCM Protocol Mode BLE */
/* Enable CCM Protocol Mode Bluetooth LE */
mode |= (CCM_MODE_PROTOCOL_Ble << CCM_MODE_PROTOCOL_Pos) &
CCM_MODE_PROTOCOL_Msk;

Expand Down Expand Up @@ -2342,7 +2342,7 @@ static void *radio_ccm_ext_tx_pkt_set(struct ccm *cnf, uint8_t pdu_type, void *p
CCM_MODE_DATARATE_Msk;

#elif defined(CONFIG_SOC_COMPATIBLE_NRF54LX)
/* Enable CCM Protocol Mode BLE */
/* Enable CCM Protocol Mode Bluetooth LE */
mode |= (CCM_MODE_PROTOCOL_Ble << CCM_MODE_PROTOCOL_Pos) &
CCM_MODE_PROTOCOL_Msk;

Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ config BT_FILTER_ACCEPT_LIST
bool "Filter accept list support"
help
This option enables the filter accept list API. This takes advantage of the
filtering feature of a BLE controller.
filtering feature of a Bluetooth LE controller.
The filter accept list is a global list and the same list is used
by both scanner and advertiser. The filter accept list cannot be modified while
it is in use.
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/uuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#define UUID_16_BASE_OFFSET 12

/* TODO: Decide whether to continue using BLE format or switch to RFC 4122 */
/* TODO: Decide whether to continue using Bluetooth LE format or switch to RFC 4122 */

/* Base UUID : 0000[0000]-0000-1000-8000-00805F9B34FB
* 0x2800 : 0000[2800]-0000-1000-8000-00805F9B34FB
Expand Down
16 changes: 0 additions & 16 deletions subsys/bluetooth/mesh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1548,22 +1548,6 @@ config BT_MESH_USES_TFM_PSA

endchoice

if BT_MESH_USES_MBEDTLS_PSA || BT_MESH_USES_TFM_PSA

config BT_MESH_PSA_KEY_ID_USER_MIN_OFFSET
int "Offset of BLE Mesh key id range regarding PSA_KEY_ID_USER_MIN"
default 0
help
The PSA specification mandates to set key identifiers for keys
with persistent lifetime. The users of the PSA API is responsible
(BLE Mesh is user of PSA API) to provide correct and unique identifiers.
The BLE Mesh identifier range should be between PSA_KEY_ID_USER_MIN and
PSA_KEY_ID_USER_MAX. BLE Mesh requires two ids for each subnetwork, two ids
for each application key, and two ids for the device key and device key candidate.
It should consider the Mesh Configuration Database instances if database enabled.

endif # BT_MESH_USES_MBEDTLS_PSA || BT_MESH_USES_TFM_PSA

menu "Beacons"

config BT_MESH_BEACON_ENABLED
Expand Down
1 change: 1 addition & 0 deletions subsys/bluetooth/mesh/cfg_srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,7 @@ static int mod_sub_va_add(const struct bt_mesh_model *model,
/* Tried to add existing subscription */
status = STATUS_SUCCESS;
(void)bt_mesh_va_del(va->uuid);
sub_addr = va->addr;
goto send_status;
}

Expand Down
Loading