Commit graph

106995 commits

Author SHA1 Message Date
Neil Chen
8ed26c6b39 dts: arm/nxp: Add lpcmp nodes to NXP MCXA156 dtsi file
Add lpcmp nodes to NXP MCXA156 dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-10 16:22:55 +01:00
Kyra Lengfeld
519f888942 Bluetooth: Mesh: Fix gatt advertiser start in bt_mesh_resume
To signal to the mesh extended advertiser that a proxy advertisement is
started, `bt_mesh_adv_gatt_send()` is called in combination with
setting the `ADV_FLAG_PROXY` flag in adv_ext.c. This ensures that it
won't try to start the advertiser again, which would result in the
controller rejecting it.

Setting this flag outside adv_ext.c is not viable, and as such calling
`bt_mesh_adv_gatt_send()` should also be limited to the advertising
source code.

As it stand now, once we utilize the new commit priority for `h_commit`
calls such a recall of `bt_mesh_adv_gatt_send()` with following
rejection by the controller will happen.

Within the `bt_mesh_resume()` function we can confidently assume the
extended advertiser has already been started. As such we can call
`bt_mesh_adv_gatt_update()` instead of `bt_mesh_adv_gatt_send()`.

This change has been tested with both running relevant bsim tests after
rearranging in which order the settings of the subsystems are loaded via
`h_commit`, as well as a modified light switch sample, adding
`bt_mesh_resume/suspend` calls on buttons.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2024-12-10 16:22:45 +01:00
Emil Gydesen
6a03778309 tests: Bluetooth: CAP: Only advertise for tests that use connections
Move test_start_adv out from init and only call it for the
tests that require a connection.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-10 16:22:34 +01:00
Ioannis Damigos
29430e68c6 samples: susbsys: tracing: Fix harness configuration
Fix harness configuration for sample.tracing.gpio

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-12-10 16:22:27 +01:00
Krzysztof Chruściński
74d2735dc0 logging: frontend_stmesp: Fix compilation
Casting an argument was missing parenthesis so if argument was an
expression then casting was applied only to the first element and
that could lead to compilation warnings.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-10 16:21:25 +01:00
Axel Le Bourhis
5dfd41e51a nxp: combine MONOLITHIC_BT and MONOLITHIC_IEEE802154
Combine BLE and 802.15.4 monolithic build under a single config to make
it less error prone.
The choice between a BLE/802.15.4 combo firmware and a BLE only firmware
is done depending on the Soc (like RW610 vs RW612).

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-12-10 11:11:38 +01:00
Mario Paja
03b936f279 tests: drivers: build_all: ethernet: add lan9250 build test
Add build test for microchip lan9250

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2024-12-10 11:10:34 +01:00
Mario Paja
7abe775129 drivers: ethernet: add support for microchip lan9250
This PR adds support for LAN9250 spi ethernet controller.
This driver is tested on the Mikroe ETH Click 3
https://www.mikroe.com/eth-3-click

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2024-12-10 11:10:34 +01:00
Krzysztof Chruściński
ce6f5294fc drivers: misc: coresight: nrf_etr: Add support for turbo logs
Add support for optimized short log messages (aka turbo logs). They are
supported on cpuapp and co-processors owned by cpuapp (FLPR and PPR).
In general, it can be supported if cpuapp has access to logging strings
used for the log message. Currently mode is supported only in standalone
logging. When it is extended for dictionary logging then it will also
be supported on other cores (e.g. cpurad).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-10 11:09:55 +01:00
Krzysztof Chruściński
9d478d7675 logging: frontends: stmesp_demux: Add support for turbo logs
Add support for handling optimized short log messages (aka turbo logs).
There are 2 types of turbo log messages:
- No arguments. D16MTS is used for that on channel > 32768
- One numeric argument. DM16 followed by D32MTS is used.

Additionally, in order to be able to get source name for log messages
coming from owned by cpuapp co-processors (PPR and FLPR) there must
be a way of passing location of constant source data from PPR/FLPR to
cpuapp which handles ETR data. This method is added in the commit as
well. PPR/FLPR sends D32M during the boot with address of constant
source data section. Demultiplexer stores those addresses and it is
able to retrieve source name for log messages from PPR/FLPR.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-10 11:09:55 +01:00
Krzysztof Chruściński
752f8b0176 logging: frontends: stmesp: Add optimized short logs
Add 'turbo' logging feature. When enabled, short logs (no argument
or one numeric, 32 bit argument) are handled in a special way that
is much faster than the default one (5-10x faster). Additionally,
there is an option to remove all other logs from the system which
allows to not include almost any logging framework code in the
binary (~170 bytes of code is needed). It may be especially
valueable for memory constraint targets (ppr, flpr) where with
only 170 byte of code (+code for each log message) we can provide
limited formatted string logging support.

'Turbo' logging is using following to achieve that:
- logging strings are put into a memory section and additional
memory section is created which holds addresses of those strings.
Index in that array is used to identify a string (32 bit address
is encoded into a smaller number, 15 bits is more than enough).
This index is used for a STMESP register set (there are 2^16
available). So STMESP channel encodes string.
- Logging level is stringified and prepended to a string
- Source ID is encoded by using DM16 (so far not used).
- Log without arguments is written as DMTS16
- Log with one argumetn is written as DM16+DMTS32

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-10 11:09:55 +01:00
Krzysztof Chruściński
3f4739834f logging: Set frontend filters only when filtering enabled
Set initial filtering settings in the log core init only if
runtime filtering is enabled. It saves few bytes when runtime
filtering is off.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-10 11:09:55 +01:00
Pavel Vasilyev
0d0669167b tests: bluetooth: buf: Test the freed buf callback
This commit adds a unit test that checks the freed buffer callback of
the bluetooth data buffer API.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-12-10 11:09:36 +01:00
Pavel Vasilyev
c2488fdd30 bluetooth: buf: Add a callback for freed buffer in rx pool
The Bluetooth data buffer API currently lacks a mechanism to notify when
a buffer is freed in the RX pool. This limitation forces HCI drivers to
adopt inefficient workarounds to manage buffer allocation.

HCI drivers face two suboptimal options:

- Blocking calls: Use bt_buf_get_rx with K_FOREVER, which blocks the
  execution context until a buffer becomes available.
- Polling: Repeatedly call bt_buf_get_rx with K_NO_WAIT, which increases
  CPU load and reduces efficiency.

This commit introduces a callback mechanism that is triggered each time
a buffer is freed in the RX pool. With this feature, HCI drivers can:

- Call bt_buf_get_rx with K_NO_WAIT.
- Wait for the callback notification if a NULL buffer is returned,
  avoiding unnecessary polling.

The new callback improves efficiency by enabling event-driven behavior
for buffer management, reducing CPU overhead while maintaining
responsiveness.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-12-10 11:09:36 +01:00
Pavel Vasilyev
bd9a1cea84 bluetooth: buf: Convert bt_buf_type enum to bitmask
This allows to combine several types in a single value.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-12-10 11:09:36 +01:00
Jukka Rissanen
027760b6d4 net: if: Replace asserts by proper runtime checks
The asserts were not proper here, replace those by runtime
checks as the functions can be called from applications and
asserts are not meant for error checking.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-10 11:09:25 +01:00
Jukka Rissanen
692310d68c net: websocket: Remove assert call
Remove the useless assert as it is not needed at all here.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-10 11:09:25 +01:00
Jukka Rissanen
1e15eec64f net: vlan: Remove useless assert
The assert is not needed and it was in wrong place anyway.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-10 11:09:25 +01:00
Jukka Rissanen
2416cde90e net: trickle: Remove useless asserts
Replace asserts by runtime checks as the APIs can be used
from applications.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-10 11:09:25 +01:00
Gang Li
79fdf4a254 drivers: wifi: nxp: set the maximum number of stations
Add support for setting the maximum number of stations.
Add support for setting AP bandwidth.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-12-10 11:09:09 +01:00
Gang Li
5dcb3a0f6a hostap: fix VHT channel center segment0
1) Unless ACS is being used, both "channel" and
"vht_oper_centr_freq_seg0_idx" parameters must be set.
Fixed "channel center segment 0" not being set in VHT Operation IE.
2) Set HT capabilities and VHT capabilities via the wifi ap config command.
3) Set AP bandwidth to wifi driver via the wifi_mgmt_api->ap_config_params.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-12-10 11:09:09 +01:00
Gang Li
e73bc712cc net: wifi: add "bandwidth" parameter to "wifi ap enable" command
Add "bandwidth" parameter to "wifi ap enable" command.
Add "ht_capab" and "vht_capab" parameters to "wifi ap config" command.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-12-10 11:09:09 +01:00
Simon Guinot
c650720a83 samples: led_strip: fix bbc_microbit.conf location
Commit 55d9d1c6ba
("samples: led: consolidate LED samples under same directory")
moved the led_strip sample from samples/drivers to samples/drivers/led.

But commit f54a53b4b3
("drivers: ws2812_gpio: Make timing configurable and less hardware
dependend") was merged at the same time and added the bbc_microbit.conf
file to the old location.

This patch moves bbc_microbit.conf to its correct location.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-12-10 11:09:00 +01:00
Nikodem Kastelik
a1152cd9fb modules: nordic: nrfx: workaround MDK erratas symbol for nRF54L05 & L10
MDK 8.68.1 uses nRF54L15_XXAA symbol for determining whether
given errata is applicable or not for nRF54L Series SoCs.
This causes all erratas to be disabled for nRF54L05 and nRF54L10.
To mitigate this DEVELOP_IN_NRF54L15 symbol needs to be defined,
and removed once new MDK is integrated.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-10 11:08:49 +01:00
Nikodem Kastelik
a96b3e3d5d soc: nordic: nrf54l: add preliminary workaround for nRF54L anomaly 31
This workaround will be replaced with a variant
executed at SystemInit() level, once MDK implements it.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-10 11:08:49 +01:00
Nikodem Kastelik
2d378a19fe soc: nordic: nrf54l: remove configuration of DCDC regulator
Since nrfx 3.9 integration, configuration is executed
in MDK SystemInit().

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-10 11:08:49 +01:00
Dawid Niedzwiecki
9b3fe8cb88 clock: stm32_ll_h7: add missing STM32_SRC_HSI_KER entry
Add a missing case for STM32_SRC_HSI_KER in the
stm32_clock_control_get_subsys_rate function.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-12-10 11:08:39 +01:00
Francois Ramu
cdba98219d include: binding defines MCO division factor for stm32U5
On the stm32U5 serie the MCO prescaler is a value
set in the CFGR1 register to divide the MCO output clock.
See the RefMan for accepted values for this stm32U5 serie

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-10 11:08:30 +01:00
Henrik Brix Andersen
ea8bd5a09a doc: releases: remove v3.6.0 from the list of supported releases
remove Zephyr v3.6.0 from the list of supported releases. Zephyr v3.6.0
reached end-of-life on 2024-11-29.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-12-10 11:08:20 +01:00
Pisit Sawangvonganan
0156a322b1 bluetooth: host: hci_core: fix num_handles assignment
Replaced `sys_cpu_to_le16(1)` with a direct `1` assignment to the
`cp->num_handles` (uint8_t) field to avoid truncation to `0x00` on
big-endian architectures.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-10 11:08:15 +01:00
Fin Maaß
5d2068f491 logging: log_output: move partly unused code
move code, that is only needed for one case
to that case.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-10 08:06:25 +01:00
Fin Maaß
a9a475e525 lib: libc: newlib: Don't replace newlib libc time _r functions
Select TC_PROVIDES_POSIX_C_LANG_SUPPORT_R to keep Zephyr from
including the common libc implementation of the various _r APIs.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-10 08:06:25 +01:00
Fin Maaß
1d4249dea6 logging: remove part for when gmtime_r is not available
now that CONFIG_POSIX_C_LANG_SUPPORT_R will
add a custom implementation for gmtime_r() if that
is not provided by the toolchain, we can simply depend on
that, instead of using out own.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-10 08:06:25 +01:00
Fin Maaß
c221496f14 lib: libc: select POSIX_C_LANG_SUPPORT_R
also select POSIX_C_LANG_SUPPORT_R, so we can check
that, to see if gmtime_r() is available.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-10 08:06:25 +01:00
Fin Maaß
0418771902 lib: posix: set default of POSIX_C_LANG_SUPPORT_R
enable POSIX_C_LANG_SUPPORT_R by default if
the functions are already provided by the toolchain.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-10 08:06:25 +01:00
Fin Maaß
fc50427f3e logging: backend: net: add missing dependency
add missing dependency of NET_SOCKETS to LOG_BACKEND_NET.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-10 08:06:25 +01:00
Fin Maaß
048e7dc502 tests: logging: log_output: net: add test for syslog output
add test for syslog log output.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-10 08:06:25 +01:00
Khoa Nguyen
d95f82c36a boards: renesas: Add support CAN-FD for Renesas RA6, RA4
- Add support CAN-FD for EK-RA6E2, EK-RA4E2
- Enable ioport for can-transceiver on EK-RA6E2, EK-RA4E2

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-12-10 08:05:58 +01:00
Khoa Nguyen
f8325413dc dts: arm: renesas: Add dts node to support canfd for RA4E2, RA6E2
Add dts node for R7FA6E2Bx and R7FA4E2B93CFM MCU to support canfd

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-12-10 08:05:58 +01:00
Valerio Setti
35324319b9 doc: updates concerning ENTROPY_GENRATOR auto-enabling
Update the migration-guide to inform the users that now
CONFIG_ENTROPY_GENERATOR is automatically enabled as soon as
devicetree property "zephyr,entropy" is set.

Update also the "General recommendations" section of the Board Porting
Guide on the same topic.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
22e30e04f5 tests: disable NRF5 entropy driver on some bsim/qemu tests
CONFIG_ENTROPY_GENERATOR is now enabled by default as soon as
"zephyr,entropy" is set in the device-tree. Since the sub-Kconfig
CONFIG_ENTROPY_NRF5_RNG is also enabled by default on nrf boards,
this means that the driver is pulled in the build and intialized
at boot. This might cause runtime issues during some IRQ/kernel
tests, so it's better to remove "zephyr,entropy" on these tests.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
e3817d0ffc test: misc|shell: disable "zephyr,entropy" chosen property
When "zephyr,entropy" is enabled the corresponding entropy driver is
pulled in the build and initialized during boot. This

- changes the initialization sequence expected by "check_init_priorities";
- add one extra device to the expected list in "shell_device_filter".

Therefore this commit removes the "zephyr,entropy" propery to return the
test to the original state.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
4c43e3b756 samples: mcumgr: smp_svr: disable "zephyr,entropy" in mcuboot
If/when "zephry,entropy" is enabled CONFIG_ENTROPY_GENRATOR is
automatically enabled, therefore enabling the corresponding
platform entropy driver. On some platform this is a problem
because the entropy driver is not used directly as random
source, but only to seed the ctr-drbg algorithm provided
by Mbed TLS. Unfortunately CONFIG_MBEDTLS_CIPHER_MODE_CTR_ENABLED
cannot be directly enabled because CONFIG_MBEDTLS_CFG_FILE used
in mcuboot is different from the "config-tls-generic.h" which
is required to use Kconfig symbols defined in
"zephyr/modules/mbedtls/Kconfig.tls-generic".
Moreover entropy and random number generators are not required
in mcuboot because signature verification is a
deterministic operation.
In conclusion this commit disables "zephyr,entropy" in
mcuboot DTS overlay file.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
daab04857f drivers: entropy: nrf5: add "depends on MULTITHREADING"
entropy_nrf5 modules uses k_sem_xxx() functions in several
places, but these functions are only functional when
CONFIG_MULTITHREADING is set, otherwise they just fallback to
the empty weak implementation provided in
zephyr/lib/libc/armstdc/src/threading_weak.c.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
62581570a7 drivers: entropy: mcux_rnga: add "depends on SYS_CLOCK_EXISTS"
mcux_rnga driver calls k_cycle_get_32() which is not available
if CONFIG_SYS_CLOCK_EXISTS is not defined. Therefore we add
this depedendency to CONFIG_ENTROPY_MCUX_RNGA.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
8564df571a samples/tests: bluetooth: remove ENTROPY_GENERATOR selection
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
e05518146b boards: remove ENTROPY_GENERATOR selection if BT
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
2d959d96fb drivers: entropy: enable ENTROPY_GENERATOR if "zephyr,entropy" is set in DT
Automatically enable ENTROPY_GENERATOR if the device-tree has
any "zephyr,entropy" chosen property specified. This helps
in having CONFIG_ENTROPY_HAS_DRIVER set if the platform support
an entropy driver and this then enables CONFIG_CSPRNG_ENABLED.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Lyle Zhu
69d415c9ce Bluetooth: SSP: Improve BR SC only mode
Actively disconnect the connection with error code `BT_HCI_ERR_AUTH_FAIL`
when the notified link key type is not `BT_LK_AUTH_COMBINATION_P256` in
BR SC only mode.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-12-10 05:39:10 +01:00
Johan Hedberg
bc086f53e2 drivers: bluetooth: silabs_efr32: Declare supported features in Kconfig
Now that we enable `HAS_BT_CTLR` we should also declare which optional
features are supported. For now, we only add the features that are
available through the current driver init routine and found on all
supported platforms.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-10 05:38:39 +01:00