Commit graph

91428 commits

Author SHA1 Message Date
Celina Sophie Kalus 83192c71e4 drivers: ipm: esp32: Allow doorbell without data transfer
IPM drivers are commonly used to send notifications/cause interrupts
without any transfer of data. To add this use case in the ESP32 IPM
driver, the guard statement is appended so that the pointer to the
data buffer is allowed to be zero only if the size of the data to be
transferred is zero. If size is given as 0 and data is equal to NULL,
we are thus only using the IPM as a doorbell, not to transfer data.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-02-26 11:39:29 +00:00
Emil Gydesen a7ca6e5c17 Bluetooth: Audio: Shell: Add support for setting runtime config data
Using the `bap preset` command it is now possible to set all the
codec configuration data and metadata value at runtime. This will
allow to set specific values for each stream in each direction.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-26 11:39:13 +00:00
Emil Gydesen bfe93a3164 Bluetooth: Audio: Shell: Make the default presets non-pointers
Instead of the default presets being pointers, they are changed to
allocated structs so that they can be modified.

This will allow us to modify the config and metadata in a later patch.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-26 11:39:13 +00:00
Vinayak Kariappa Chettimada c8dbb97170 tests: bsim: hci_uart: Fix execution timeout
Fix execution timeout to be atleast the simulation
length of the tests.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-02-26 11:38:30 +00:00
Vinayak Kariappa Chettimada ff91408385 tests: bsim: hci_uart: Rename to hci_uart test name
Rename uart and uart_async bsim test to reflect
testing of hci_uart sample using UART driver
variants under bsim simulations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-02-26 11:38:30 +00:00
Peter Ujfalusi 6423bc3bc8 drivers: dai: intel: ssp: Improve logging output
The printed logs lack usable information curerntly, for example:
arecord -Dhw:0,0 -fdat | aplay -Dhw:0,0 -fdat

results:
...
[13110.111051] <inf> dai_intel_ssp: dai_ssp_pre_start: dai_ssp_pre_start
[13110.111070] <inf> dai_intel_ssp: dai_ssp_start: dai_ssp_start
[13110.455085] <inf> dai_intel_ssp: dai_ssp_pre_start: dai_ssp_pre_start
[13110.455103] <inf> dai_intel_ssp: dai_ssp_start: dai_ssp_start
[13229.817080] <inf> dai_intel_ssp: dai_ssp_pause: dai_ssp_pause TX
[13229.819111] <inf> dai_intel_ssp: dai_ssp_stop: dai_ssp_stopTX stop
[13229.858060] <inf> dai_intel_ssp: dai_ssp_pause: dai_ssp_pause RX
[13229.858556] <inf> dai_intel_ssp: dai_ssp_stop: dai_ssp_stop RX stop
...

If we use multiple SSPs this gets even harder to understand. Which SSP is
starting exactly?

This patch improves the prints to prefix it with SSP instance and drops the
printing of __func__, resulting:
...
[13444.974460] <inf> dai_intel_ssp: dai_ssp_early_start: SSP0 RX
[13444.974486] <inf> dai_intel_ssp: dai_ssp_start: SSP0 RX
[13445.318453] <inf> dai_intel_ssp: dai_ssp_early_start: SSP0 TX
[13445.318478] <inf> dai_intel_ssp: dai_ssp_start: SSP0 TX
[13446.323438] <inf> dai_intel_ssp: dai_ssp_pause: SSP0 TX
[13446.324141] <inf> dai_intel_ssp: dai_ssp_stop: SSP0 TX
[13446.329403] <inf> dai_intel_ssp: dai_ssp_pause: SSP0 RX
[13446.330931] <inf> dai_intel_ssp: dai_ssp_stop: SSP0 RX
...

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-02-26 11:38:16 +00:00
Aleksander Wasaznik 060dc9ef6d Bluetooth: tests: Switch to default BT_RECV_CONTEXT
The tests `hci_prop_evt` and `host_long_adv_recv` used `bt_recv_prio`,
and so relied on an extra config option `CONFIG_BT_RECV_BLOCKING`. This
patch replaces the use of `bt_recv_prio` with `bt_recv` and restores the
use of the default option for `BT_RECV_CONTEXT`.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-02-26 11:37:14 +00:00
Pavel Vasilyev c601c15863 Bluetooth: Mesh: Remove extra rescheduling and ADV_FLAG_SCHEDULED in adv
This commit removes extra rescheduling in the extended advertiser after
the last advertising has been finished. This commit also removes the
`ADV_FLAG_SCHEDULED` flag as not needed anymore.

This extra rescheduling and the flag were needed to delay the next
advertisement by 20ms. Now, when the delay is removed the advertiser can
pick the next advertisement from the pool and push to the host right
away.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-02-26 11:37:00 +00:00
Aleksander Wasaznik 6f077be959 Bluetooth: tests: init: CONFIG_BT_RECV_WORKQ_BT=y
Add a test case to the init test to cover `CONFIG_BT_RECV_WORKQ_BT=y`.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-02-26 11:36:48 +00:00
Aleksander Wasaznik 433833d9ef Bluetooth: Support BT_RECV_WORKQ_BT with Zephyr LL
This patch allows selecting the combination of `CONFIG_BT_RECV_WORKQ_BT`
and `BT_LL_SW_SPLIT`. The implementation of `bt_recv_prio` is copied
from `hci_raw.c`. This ensures the order of packets is the same as when
the controller's `hci_driver.c` is off-chip and sends HCI over UART.

Without this patch, the Zephyr LL driver will duplicate some events on
behalf of `hci_core`. This duplication is not wanted when
`CONFIG_BT_RECV_WORKQ_BT=y`.

The above mentioned duplication is not sound and is evidenced in logged
warnings, e.g. in `tests/bsim/bluetooth/host/l2cap/stress` with
`CONFIG_BT_RECV_WORKQ_BT=y` logging "no transition".

This patch is a step towards the deprecation of
`CONFIG_BT_RECV_BLOCKING`. `CONFIG_BT_RECV_BLOCKING` is complicated and
tightly coupled to `hci_core`. In the future, removing
`CONFIG_BT_RECV_BLOCKING` will give a cleaner separation between
`hci_core` and the drivers and allow `hci_core` to evolve without
changes spilling out into the drivers.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-02-26 11:36:48 +00:00
Gaetan Perrot a4ea4e294f posix: Implement test for fdetach and fattach
Add tests for `fdetach()` and `fattach()`

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-02-26 11:36:04 +00:00
Gaetan Perrot 6a5af7b5e1 doc: posix: mark fdetach and fattach as supported
`fdetach()` and `fattach()` are now implemented, mark it so.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-02-26 11:36:04 +00:00
Gaetan Perrot cd060f6cd3 posix: Implement fdetach and fattach
`fdetach()` and `fattach()` are required
as part of _XOPEN_STREAMS Option Group.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-02-26 11:36:04 +00:00
Aleksander Wasaznik dd7caf667c Bluetooth: Host: Set conn->err in prio
The goal is to not access `buf` in the non-prio `hci_disconn_complete`
so that the buffer does not need to be retained.

This commit moves the copy of `conn->err` to the prio handler.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-02-26 11:35:50 +00:00
Vinayak Kariappa Chettimada f36ddf0423 Bluetooth: Controller: Fix BT_CTLR_TIFS_HW conditional compile
Fix CONFIG_BT_CTLR_TIFS_HW conditional compile by replacing
DPPI_PRESENT with CONFIG_BT_CTLR_TIFS_HW.

HAL_SW_SWITCH_TIMER_CLEAR_PPI can be same as
HAL_RADIO_END_TIME_CAPTURE_PPI, and this is ok as same
bit will be used to disable PPI/DPPI.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-02-26 11:35:39 +00:00
Chen Xingyu eaa492ab3e tests: drivers: build_all: input: Add adc-keys
* so that it'll be built by the CI

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-02-26 11:35:19 +00:00
Chen Xingyu d181607f4e drivers: input: Implement driver for ADC keys
This commit introduces a driver for ADC keys, a common circuit design where
keys are connected to an ADC input via a resistor ladder.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-02-26 11:35:19 +00:00
Jonathan Rico d79b99a979 Bluetooth: conn: call tx_notify from a single exec context
Always execute tx_notify from a single context. For sanity and ease of
debugging / observability.

The previous behavior was calling from BT_RX thread + system workqueue.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-02-26 11:34:49 +00:00
Tomi Fontanilles 825b676568 modem: small improvements
Changes include:
- Improving handling of frames for unconfigured DLCIs.
- Adding logs and outputting error codes in failure cases.
- Adding warnings to not reuse buffers.
- Fixing comments.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-02-26 11:34:32 +00:00
Mykola Kvach 448466a970 drivers: serial: add support of hscif driver for RCar boards
Add support of HSCIF UART driver for Renesas boards.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-02-26 11:34:16 +00:00
Piotr Narajowski 69381b1ba7 bluetooth: tester: Add TBS server tests
Adding support for TBS server tests.

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2024-02-26 11:34:00 +00:00
Lyle Zhu e9a5834944 Bluetooth: Host: Update BR L2CAP channel state
In the function bt_l2cap_chan_set_state, BR
channel is treated as LE Chan.
The BR L2CAP channel state is updated
incorrectly.

Add a function bt_l2cap_br_chan_set_state
for BR L2CAP channel. For BR/EDR channel,
call bt_l2cap_br_chan_set_state directly.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-02-26 11:33:40 +00:00
Lyle Zhu 08f8278666 Bluetooth: Host: Add bt_l2cap_br_chan_del
Add bt_l2cap_br_chan_del for BR/EDR channel.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-02-26 11:33:40 +00:00
Lyle Zhu 47d0280834 Bluetooth: Host: Add bt_l2cap_br_disconnected
Handle BR/EDR L2CAP disconnection notification
separately.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-02-26 11:33:40 +00:00
Ricardo Rivera-Matos 5868c701ef samples: charger: Demos new output limit properties
Adds use of CHARGER_PROP_DISCHARGE_CURRENT_NOTIFICATION and
CHARGER_PROP_SYSTEM_VOLTAGE_NOTIFICATION_UV to the charger
sample application.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Ricardo Rivera-Matos 83997a3ca7 MAINTAINERS: Adds sample path to the charger area
Adds the path to the sample application in the charger API
area of the MAINTAINERS file.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Ricardo Rivera-Matos c85c12da40 samples: charger: Documents charger sample app
Creates basic documentation for the chagrer sample application.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Ricardo Rivera-Matos 587b3c9001 samples: charger: Moves sample charger app under samples/drivers/
Moves the charger API sample app from samples/charger/ to
samples/drivers/chargers/ as mentioned in issue #65032.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Ricardo Rivera-Matos 942595879e drivers: charger: Adds CHARGER_PROP_SYSTEM_VOLTAGE_NOTIFICATION_UV
Adds a CHARGER_PROP_SYSTEM_VOLTAGE_NOTIFICATION_UV property to
issue a notification to the system when the system voltage falls.

This system voltage is provided by the charger to the system and can
suddenly dip during peak loads.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Ricardo Rivera-Matos 2f5328fd2b drivers: charger: Adds CHARGER_PROP_DISCHARGE_CURRENT_NOTIFICATION
Adds CHARGER_PROP_DISCHARGE_CURRENT_NOTIFICATION property
to notify the system of a excess battery discharge event.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Ricardo Rivera-Matos c58dbcd9cc drivers: charger: Corrects typo in property documentation
Corrects expected type mentioned in the documentation of the
CHARGER_PROP_INPUT_CURRENT_NOTIFICATION.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-02-26 11:33:24 +00:00
Jonathan Rico 1c73528a10 tests: Bluetooth: add host flow-control test
Verifies that there is no host RX buffer leak due to disconnections.

That is, not actual host buffer objects but rather the number of buffers
that the controller thinks the host has.

If there is a desynchronization between those two, the result would be that
the controller stops forwarding ACL data to the host, leading to an
eventual application timeout.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-02-26 11:32:36 +00:00
Dmitrii Golovanov 94e4addd07 ci: scripts: Add run_id and run_attempt context on upload to ES
Optionally record run-id and run-attempt github context variables
as additional test suite environment properties on upload into
ElasticSearch to track re-runs of CI workflows.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-02-26 11:32:17 +00:00
Emil Gydesen 5f7ecf4def Bluetooth: BAP: SD: Fix missing support for API calls in callbacks
In the scan delegator when adding a source, the state was not
marked as active before calling the PA sync callback, which
would prevent applications from requesting PAST in that callback.

This commit also adds and fixes a few log statements.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-26 12:31:11 +01:00
Mulin Chao cc3bfb67d3 drivers: espi: npcx: add ESPI_OOB_CHANNEL_RX_ASYNC support
Add CONFIG_ESPI_OOB_CHANNEL_RX_ASYNC support in npcx espi driver.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2024-02-26 12:27:22 +01:00
John Johnson dbf3d6e911 drivers: esp_at: implement bind() and recvfrom() for UDP sockets
Implement bind() and recvfrom() for UDP sockets. This is achived by
setting remote field in net_pkt which in return makes recvfrom() fill
in *src_addr. This is only implemented for passiv mode and CIPDINFO needs
to be enabled. Also set net_if to non-dormant when enabling AP mode to
make binding to a port and address possible.

Signed-off-by: John Johnson <john.filip.johnson@gmail.com>
2024-02-26 12:21:47 +01:00
Adrian Warecki 9cf3e08429 mm: tlb: mtl: Fix memory page unmapping
The sys_mm_drv_unmap_page function first replaced the tlb entry with
the default one and then read the physical address that was mapped.
However, it was already overwritten, so it always release the default
physical address instead of the truly mapped one.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-02-26 12:19:32 +01:00
Adrian Warecki 46f3d78983 mm: tlb: mtl: Add support for changing mapped region flags
Added sys_mm_drv_update_page_flags function that allows to change access
flags to a already mapped memory region.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-02-26 12:19:32 +01:00
Fengming Ye ac8920e342 net: ip: Allow traffic class thread priority customization
Add traffic class priority custom option to customize traffic class
priority base for throughput performace.

Wi-Fi traffic performance depends on cooperation between net threads
and Wi-Fi driver threads. So we want traffic class threads priority
to be more flexible to fit more vendors.

Eg: when traffic class tx thread priority is higher than driver tx
thread, it will consume much more cpu time and send packets until driver
queue full.
When traffic class tx thread priority is lower than driver tx thread,
it will become serial transmition, also affecting throughput.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-02-26 12:11:19 +01:00
Pisit Sawangvonganan bd94e199e5 net: wifi_utils: fix typo and whitespace adjustment
Corrected 'subsytem' to 'subsystem' and made minor whitespace formatting.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-02-26 12:10:36 +01:00
Pisit Sawangvonganan 0d4961b8d4 net: wifi_utils: reduce valid_5g_chans_20mhz memory footprint
This change reduces the memory footprint by changing the data type of
`valid_5g_chans_20mhz` from `uint16_t` to `uint8_t`.

Additionally, since the maximum channel number for 5GHz Wi-Fi is 177,
it can fit within the `uint8_t` range.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-02-26 12:10:36 +01:00
Jeppe Odgaard 398d297519 drivers: dac: stm32: add dac value range check
Compare value and DAC resolution in `dac_write_value` and return -EINVAL
if the value is above supported resolution.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-02-26 12:07:22 +01:00
Benedikt Schmidt 004b307206 doc: kconfig: add exemption for busses in select recommended practices
Add the exemption for busses to the recommended practices
for select.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-02-26 12:06:06 +01:00
Fin Maaß 652c2ae1f5 net: dhcpv4: Add vendor class identifier option
Adds the funktion to set the DHCPv4 option 60
(Vendor class identifier) via Kconfig.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-02-26 12:05:03 +01:00
Lars Knudsen da62258add samples: Bluetooth: Fix UUID compare
Check for BASS and PACS, while scanning for
Broadcast Audio Sinks was wrong in the
Broadcast Audio Assistant sample.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-02-26 12:01:15 +01:00
Mateusz Karlic bdd09558bb net: shell: ipv4: Add command to set gateway
Add a command `net ipv4 gateway` that allows
setting IPv4 gateway for an interface from net shell.

Signed-off-by: Mateusz Karlic <mkarlic@antmicro.com>
2024-02-26 11:53:56 +01:00
Markus Lassila f033cd5601 net: sockets: tls: Add config for DTLS max fragment length
Add CONFIG_NET_SOCKETS_DTLS_MAX_FRAGMENT_LENGTH for limiting
the Maximum Fragment Length (MFL) for DTLS with Mbed TLS.

This is needed when MBEDTLS_SSL_OUT_CONTENT_LEN and
MBEDTLS_SSL_IN_CONTENT_LEN are set to larger values than the MTU
of the network and IP fragmentation is not supported.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
2024-02-26 11:51:25 +01:00
Lyle Zhu f5cab9debc Bluetooth: Host: Clang-format host/br.c
Clang-format file host/br.c

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-02-26 11:50:55 +01:00
Lyle Zhu b938428d58 Bluetooth: Host: Notify upper layer if the BR ACL is established
In current implementation, the upper is not notified when BR ACL
connection is established.
L2CAP does not know that ACL connection has been established.
All fixed channels will not be notified. Then The SDP server
cannot work properly.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-02-26 11:50:55 +01:00
Julien Panis 29e24948f8 drivers: spi_dw: Handle multiple interrupt lines for errors
This patch handles multiple interrupt lines for errors. Each of the
4 DW SPI error interrupts (txo_err, rxo_err, rxu_err, mst_err) can
use a different line of the GIC, instead of using a single line of
the GIC for all error interrupts (err_int).

Signed-off-by: Julien Panis <jpanis@baylibre.com>
2024-02-26 11:49:10 +01:00