Commit graph

91387 commits

Author SHA1 Message Date
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
Julien Panis 30b6cd2647 drivers: spi_dw: Manage MMIO and 64 bit platforms
This patch manages DW SPI driver MMIO region. As a result, the driver now
runs properly on 64 bit platforms.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
2024-02-26 11:49:10 +01:00
Francois Ramu 62e7b788aa drivers: timer: stm32 lptimer when sleeping for -1
When CONFIG_SYSTEM_SLOPPY_IDLE is not set, then system
can sleep for -1 means waking Up at the max possible
counter value (INT_MAX)
When CONFIG_SYSTEM_SLOPPY_IDLE is set sleeping K_TICKS_FOREVER
means never wakingUp

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-02-26 11:48:22 +01:00
Ali Hozhabri 88369606e2 drivers: bluetooth: hci: Multiple write transaction support for BlueNRG-MS
Provide multiple write transaction support for BlueNRG-MS, st_hci_spi_v1
protocol. Since by default, BlueNRG-MS write buffer supports up to 127
bytes; however, it is possible to have consecutive write transactions
so as to send data more than 127 bytes.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-02-26 11:47:32 +01:00
Yonatan Schachter 4ef0e1221d sys/util.h: Add IS_ALIGNED macro
Added IS_ALIGNED macro to check if a pointer is aligned to
a given alignment. Additionally, removed a macro with a
conflicting name in drivers/crypto_intel.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-02-26 11:46:30 +01:00
Fin Maaß 7206737450 net: dhcpv4: request options from server
If a option callback is enabled, this option
should also be requested from the DHCPv4 server.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-02-26 11:44:45 +01:00
Chaitanya Tata 6c3b0ee5ff wifi: shell: Fix the case for acronym
DFS is an acronym, so, should be capitalized.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-02-26 11:41:40 +01:00
Chaitanya Tata 92fe088629 wifi: shell: Fix the header for passive transmission only
This flag indicates that only passive transmissions are allowed in that
channel for that regulatory domain.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-02-26 11:41:40 +01:00
Alberto Escolar Piedras 65d49cd434 tests/bsim/bt/host: Split build script in 6
There are quite many BT host test images being built.
Today these are all built in parallel, causing a quite
high load.

Let's split them in their separate sub-scripts,
so we don't parallelize too many builds,
and users have more granularity if they only
want to build a subset.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-02-26 11:40:47 +01:00
Alberto Escolar Piedras 940d53e839 tests bsim/bt/ll: Split build script in 2
The CIS tests are building quite many
apps on their own.
Let's split them in their separate sub-script,
so we don't parallelize too many builds,
and users have more granularity if they only
want to build a subset.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-02-26 11:40:47 +01:00
Jukka Rissanen c5b0f542f0 net: socket: Start socket service earlier
Make sure that socket service is started earlier than
config library. This is enforced in config libs init.c
but set the default value here too.
The reason for this is that the config library might need
to start dhcpv4 server which needs socket service to work,
so the ordering is important here.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-26 11:40:15 +01:00
Jukka Rissanen 3de1f1b5d0 net: if: Check IPv6 pointers properly in hop limit setters/getters
We must make sure that IPv6 configuration pointer is valid
so that the hop limit can be set for a given interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-26 11:39:50 +01:00
Jukka Rissanen e7b1d6d8aa net: if: Check IPv4 pointers properly in TTL setters/getters
We must make sure that IPv4 configuration pointer is valid
so that the TTL can be set for a given interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-26 11:39:50 +01:00
Jukka Rissanen dceff4a98f net: if: Init must be called before setting the name
As the interface init function might configure the system
such a way that would affect the naming of the network
interface, we need to call the init before setting the name.
This is mostly needed by Wifi where the Wifi driver needs
to mark its network interface as Wifi interface as by default
the Wifi interface will look like Ethernet one.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-26 11:39:25 +01:00
Maochen Wang 11a5904760 net: arp: Fix dead lock caused by arp_mutex
Fix the dead lock between rx_q and tx_q thread.
When tx_q thread prepares to send ARP packet, it might get
the net_if_tx_lock in net_if_tx(), then in net_arp_prepare(),
it will try to get the arp_mutex.
At the same time, if the rx_q thread receives an ARP reply
packet, in arp_update(), it will get the arp_mutex first,
and flush the packets in arp pending_queue and try to get
the net_if_tx_lock. Then the dead lock occurs, two threads
stuck and all the packcets can't be freed.
In arp_update(), taking the net_if_tx_lock first then taking
the arp_mutex can fix this issue.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-02-26 11:38:47 +01:00
Marcin Niestroj f9dddc387e native_simulator: constify 'buffer' argument in nsi_host_write()
'buffer' argument is read only, so it can be 'const'. This makes it
compatible with POSIX specification of write(3) syscall.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-02-26 11:36:21 +01:00
Helmut Lord bd1f6cc6d7 doc: zbus: fix work item typo
Small change to zbus docs to fix work item typo.

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2024-02-26 11:36:02 +01:00
Bernt Johan Damslora 73d56dea66 drivers: mfd: npm6001: set SWREADY
Sets SWREADY in MFD initialization, so that hysteresis mode can be used.

Signed-off-by: Bernt Johan Damslora <bernt.damslora@nordicsemi.no>
2024-02-26 10:42:38 +01:00
Mateusz Michalek 517d5ce2e3 drivers: flash: rram singlethreading support
Adds conditional usage of locking mechanisms to allow building
without multithreading.

Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
2024-02-26 10:27:23 +01:00
Jakub Zymelka 5e313608fe drivers: flash: rram: minor driver code changes
Minor changes to standardize the driver code.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-02-26 10:27:23 +01:00
Pierce Lowe 609b864537 drivers: flash: rram: Make rram flash timeout multiplier user selectable
Make flash timeout multiplier user selectable for rram flash driver

Signed-off-by: Pierce Lowe <pierce.lowe@nordicsemi.no>
2024-02-26 10:27:23 +01:00
Andrzej Puzdrowski e40dc3879d drivers/flash/rram: set to use up to 512 B burst writes by default
Now RRAMC is set to use up to 512 B burst writes by default as most
time effective.
Requested slot time was changed to 8000 us for that case, as this is
required in order to hold the longest write operation.
Drivers differs slot duration depending on configured RRAMC buffers count
(CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE).

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2024-02-26 10:27:23 +01:00
Andrzej Puzdrowski 06c68caec5 drivers/flash: fix nRF RRAM write-length issue while MPSL in use
When radio-synchronization was on
(CONFIG_SOC_FLASH_NRF_RADIO_SYNC_NONE=n) context of writing was shifted
by 4 instead of write-length (this caused redundant, self-shortening
writes to the same block.)

write-len was unset when requested write len was less than
RRAM_MAX_WRITE_BUFFER.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-02-26 10:27:23 +01:00
Andrzej Puzdrowski fdac87738b drivers/flash: add radio synchronization to RRAM
Added synchronization with BLE radio operation to the RRAM flash
driver. The implementation is using framework which is already
provided for nrf52's flash driver.

Additional added resource locking mechanism while driver does writing
which solves mutual exclusion write access problem.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-02-26 10:27:23 +01:00
Jakub Zymelka 3a8ee7df91 drivers: Add flash driver for RRAM
Added a simple driver for RRAM. It is implemented as a flash driver,
because the "RRAM eFlash" macro obeys flash-like constraints.
Although users are not required to erase before write.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-02-26 10:27:23 +01:00
Christopher Friedt f60ef4dea9 tests: posix: mqueue: increase sleep ms to reduce failures
The test_mqueue_notify_thread testcase had a relatively high
failure rate because sleeping only 10ms was in some cases not
sufficiently long enough for the spawned thread to update
notification_executed.

Sleep 100 ms instead of 10 ms to reduce the failure rate.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-26 02:09:42 -05:00
Peter Mitsis ee9c44fee6 linker: Round TLS sizes up in linker script
Instead of rounding up both __tdata_size and __tbss_size at runtime,
perform the calculation when the image is built.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-02-25 22:28:56 -05:00
Emil Gydesen 28276ce982 Bluetooth: CSIP: Fix typo from cm_csip to cmd_csip
The CSIP commands had a typo in the prefix of the shell
functions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:28:26 -05:00
Emil Gydesen 25416b86e9 Bluetooth: CSIP: remove print_sirk
The print_sirk function that simply logs the SIRK has been removed,
as the SIRK is now directly accessible to the application via the
get_sirk function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:28:26 -05:00
Emil Gydesen 41a589c5fa Bluetooth: CSIP: Add support for dynamic SIRKs
Add support for dynamically change the SIRK in a CSIS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:28:26 -05:00
Gustavo Silva 3850f4ca64 drivers: sensor: add ScioSense ENS160 driver
Add driver for ScioSense ENS160 multi-gas sensor. The driver includes
support for I2C and SPI, attributes for setting temperature and
humidity compensation and data ready trigger.
Also add ScioSense to the list of vendor prefixes.

Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
2024-02-25 22:27:22 -05:00
Emil Gydesen 05f9440347 Bluetooth: BAP: use BT_AUDIO_CODEC_QOS_FRAMED for framed presets
The presets used BT_AUDIO_CODEC_QOS directly, but since all the
unframed presets use BT_AUDIO_CODEC_QOS_UNFRAMED, it makes sense
that the framed ones used the corresponding macro.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:26:57 -05:00
Emil Gydesen f4d82cedb9 Bluetooth: Audio: Remove the BT_AUDIO_CODEC_LC3_QOS macros
The LC3 framed macros were unused.
The LC3 unframe macros only added the 7500/10000
parameter, but since the the 7500/10000 requirement is also
defined by BAP, it makes equally much sense to simply use the BAP
presets.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:26:57 -05:00
Emil Gydesen d78604e690 Bluetooth: Audio: Remove the BT_AUDIO_CODEC_LC3_CONFIG_X_Y
LC3 does not define any such configurations, and they are in
fact defined by the BAP. The LC3 header file should thus not
pretend that there are these specific configurations for LC3.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:26:57 -05:00
Mahesh Mahadevan 94540a9dee drivers: gpio: Update NXP LPC GPIO driver to enable wakeup
Process the GPIO_INT_WAKEUP flag and set appropraite bits
in the SoC to wakeup the system from deep sleep mode.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-02-25 22:26:00 -05:00
Mahesh Mahadevan 21e9918260 include: gpio: Add GPIO_INT_WAKEUP flag
Add a flag to configure the GPIO pin interrupt as a
wakeup source for the system.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-02-25 22:26:00 -05:00
Mahesh Mahadevan e17045a02d drivers: gpio: Add default for switch statement
This causes a warning when making changes to add
support for GPIO_INT_WAKEUP flag.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-02-25 22:26:00 -05:00
Emil Gydesen e0dbd3fd39 Bluetooth: Audio: Shell: CAP change volume mute command
Adds the change volume mute command to the CAP commander shell.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:25:26 -05:00
Emil Gydesen ede68ad5c0 tests: Bluetooth: CAP Commander Change Volume mute unittests
Adds unittests for the CAP COmmander Change Volume mute
procedure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:25:26 -05:00
Emil Gydesen 341906a0fd tests: bsim: Bluetooth: CAP Commander Change Volume mute
Adds bsim test of the CAP Commander Change Volume mute
procedure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:25:26 -05:00
Emil Gydesen b9360488f7 Bluetooth: CAP: Commander change volume mute procedure
Adds the CAP Commander Change Volume mute procedure.
This procedure changes the volume mute on one or more
CAP Acceptors.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-25 22:25:26 -05:00
Benjamin Cabé 074152a03d doc: Bump to Sphinx 7.1 and RTD theme 2.0
This moves to more recent versions of Sphinx and Read the Docs theme.
FWIW Sphinx 7.2.0 dropped support for Python 3.8 so we're stuck with 7.1
for now.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-02-25 20:56:40 -05:00