Commit Graph

90310 Commits

Author SHA1 Message Date
Mustafa Homsi e51c47bf43 Bluetooth: Controller: Fix regression in BT_CTLR_USED_PPI_CHANNELS
Fix regression in BT_CTLR_USED_PPI_CHANNELS introduced
in commit e39d98302d ("Bluetooth: Controller: nRF53:
Cleanup dppi and dppi resources file").

Signed-off-by: Mustafa Homsi <mustafa.homsi@rivieh.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-22 14:31:12 +01:00
Fabian Blatz 7cc46e6948 modules: lvgl: Update CMakeLists for 8.3.11
Update CMakeLists to include new files, sort existing ones.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-01-22 14:02:40 +01:00
Fabian Blatz 2a11c64876 manifest: update LVGL to v8.3.11
Related to zephyrproject-rtos/lvgl#47

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-01-22 14:02:40 +01:00
Sandip Dalvi 68bea80111 net: ipv6: Add APIs to check ipv6 address is site local and global
Add APIs to check the IPv6 address is site local or is global.

Signed-off-by: Sandip Dalvi <sandip.dalvi@nxp.com>
2024-01-22 13:09:23 +01:00
Emil Gydesen aef39f6923 Bluetooth: BAP: Fix issue with setting invalid iso data path
BAP would always set up the ISO data path in both directions,
even for unidirectional CIS. This meant that in the
unconfigured direction, the data path configuration data
would all be 0, which causes issues on some controllers.

The new refactored approach implemented by this commit
will always ensure that the data path is setup correctly,
and that we only set the data path in one direction for
unidirectional CIS. The unset path will use the default
ISO path of HCI and transparant format, which should always
be allowed by a controller.

This is building on the requirement in BAP that all streams in
a unicast group shall be QoS configured at the same time. This
ensures that before any streams in the CIG has been connected,
they have all been configured.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-22 13:09:16 +01:00
Henrik Brix Andersen e4c3f30feb doc: releases: migration-guide: 3.6: list removal of can_get_max_bitrate_t
Add a note about the removal of the optional can_get_max_bitrate_t callback
from the CAN controller driver API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00
Henrik Brix Andersen 4340724fd0 drivers: can: use common accessor for getting maximum supported bitrate
Use a common accessor for getting the maximum supported bitrate of a CAN
controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00
Henrik Brix Andersen 0875a752c1 tests: drivers: can: api: fix uninitialized variable warning.
Fix a warning about unitialized variable. The test will be skipped in this
code path.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00
Henrik Brix Andersen 766ce3c1e2 drivers: can: fake: add common configuration and data structures
Add common configuration and data structures to the fake CAN driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00
Henrik Brix Andersen fb639ab81b drivers: can: loopback: add common configuration structure
Add the common configuration structure to the CAN loopback driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00
Bjarki Arge Andreasen 140a510030 tests: build_all: modem: Remove net tag and clean up
Remove the net tag, allowing the modem driver tests to be built
for PRs, and limit the scope of the test suite to only build
for select emulated 32 and 64 bit boards.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-22 12:59:59 +01:00
Yves Vandervennet 441b1b7de8 boards: frdm_kl25z: enable support for linkserver
- adds the definitions in the board.cmake file
- updates documentation

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-01-22 12:59:53 +01:00
Peter Mitsis 5573b20ec6 tests: latency_measure: tweak frdm_k64f config
The FRDM K64F board runs at 120 MHz and has a 24 bit timer.
According to its timer driver, its MAX_TICKS (which comes into
play for a tickless kernel) is calculated as ...
     CYC_PER_TICK = 120 MHz / ticks per second
     MAX_TICKS = (COUNTER_MAX / CYC_PER_TICK) - 1

To achieve a minimum value of MAX_TICKS=1, ticks per second must
be set to at least 15. Experimentation has shown that setting the
number of ticks per second below this threshhold on a tickless
kerenl leads to unreliable timestamps.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-01-22 12:59:45 +01:00
Peter Mitsis 070b07efc1 tests: latency_measure: Remove prj_user.conf
Moves the enablement of userspace from the project configuration
file to testcase.yaml.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-01-22 12:59:45 +01:00
Peter Mitsis d3a3d63afb tests: latency_measure: Increase verbosity of summary lines
Feedback from the previous summary line change has been that it
had become more difficult for people to parse and understand what
is being tested/benchmarked when the description consisted of
just using a terse tag. To improve the situation a more human
oriented description has been added to follow that tag so that
not only can tools still parse on the tag, but people can use
both tag and the extra description to understand the test/benchmark.

Summary lines for each test now consist of the following:
    1. A terse tag (for tools to parse)
    2. A more human oriented description.
    3. Number of cycles.
    4. Number of nanoseconds.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-01-22 12:59:45 +01:00
Rubin Gerritsen db58810492 Bluetooth: ISO: Fix CIS peripheral disconnection during setup
When the central aborts the CIS setup during the CIS Creation
procedure after it has accepted the CIS request, the peripheral
will receive the HCI LE CIS Established event with an error code.
It does not receive a disconnection event.
See the message sequence chart in Core_v5.4, Vol 6, Part D,
Section 6.23.

This commit ensures that the perirpheral disconnected callback gets
called for this particular scenario.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-01-22 12:59:38 +01:00
Sylvio Alves ce1be0e121 boards: esp32xx: decrease Wi-Fi minimum heap size
Decrease total RAM usage when Wi-Fi is enabled, specially after
`config HEAP_MEM_POOL_ADD_SIZE_BOARD` was added. This allows application
to handle additional HEAP as required.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-01-22 12:59:23 +01:00
Emil Gydesen b857ef7f83 Bluetooth: BAP: Add ISO state callbacks
Add callbacks to the stream objects that reflects the
state of the isochronous channel. The connected callback
is called when the isochronous channel is connected, and
similarly the disconnected callback is called when it is
disconnected.

There is a special case for unicast, where if the ACL
disconnects first, then we won't get a ISO disconnect
callback. It should be assumed that the isochronous channel
is no longer valid when the BAP stream enters the idle state,
i.e. when the "released" callback is called.

The purpose of the new callbacks is to provide additional
information to the application. Especially the unicast client
can use this to determine when the stream_start function
can be called again, as there can only ever be 1 outstanding
CIS connection request at a time, but there can be multiple
GATT requests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-22 12:59:11 +01:00
Robert Lubos 8ad0e5763f net: socket_service: Fix iterable section location
The iterable section should be located in ROM and not RAM, this caused
crashes on multiple platforms running socket services.

Fixes #67762

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-01-22 12:53:33 +01:00
Robert Lubos 3111b801d9 net: socket_service: Add underscore in the idx variable name
Nothing critical, but it just looks better if the service name is
separated from the prefix, i.e:
    _z_net_socket_service_idx_udp_service_async
vs current:
    _z_net_socket_service_idxudp_service_async

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-01-22 12:53:33 +01:00
Christopher Friedt 7f57d5d6eb tests: posix: timer: run tests for realtime as well
Ensure that the realtime clock may also be used with
timer_create().

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-22 06:48:55 -05:00
Christopher Friedt 3ff7c04f30 posix: timer: use async pthread cancellation
Previously, Zephyr's POSIX API did not differentiate between
deferred and asynchronous pthread cancellation. In fact all
pthread cancellation was asynchronous. According to the spec,
all pthreads should be created with deferred cancellation by
default.

Note: PTHREAD_CANCEL_ASYNCHRONOUS means cancel asynchronously
with respect to cancellation points (but synchronously with
respect to the thread that callse pthread_cancel(), which is
perhaps unintuitive).

The POSIX timer relied on this non-standard convention.

Oddly, this change prevents what would have otherwise been a
regression that would have been caused by fixing pthread
behaviour (in a separate commit).

We are effectively uncovering bugs which were probably always
present in the pthread.c and timer.c implementations going
back quite a few years.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-22 06:48:55 -05:00
Christopher Friedt 689dc4a45b posix: timer: support other clocks
There is no requirement that says e.g. CLOCK_REALTIME cannot be
used for timer_create(). In fact, the spec explicitly requires
it. It might not be ideal, but users should still be able to
use it.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-22 06:48:55 -05:00
Christopher Friedt 0d6dc0ca53 posix: signal: reduce padding in sigevent sigval
The sigevent struct and sigval union members were previously not
ordered in a way that produces optimal alignment / reduces
padding on 64-bit systems.

Reorder members so that pointers come first.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-22 06:48:55 -05:00
Fabio Baltieri 23714980b0 input: utils: fix kbd_matrix_state_log types
Change row and col static types to unsigned, this should prevent really
bad things from happening if a negative number ends up there for
whatever reasons without having to explicitly check for < 0.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-22 11:20:50 +00:00
Bjarki Arge Andreasen a9779eca40 modem: ppp: Implement TRANSMIT_IDLE event
Implement TRANSMIT_IDLE event for modem_ppp module. This addition
optimizes the sys workque CPU time when performing a throughput
test from 36% to 5%, while only reducing the throughput by 12%.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-22 10:35:37 +00:00
Yves Vandervennet e5fe1c1625 boards: mimxrt1015_evk: enable support for linkserver
- adds the definitions in the board.cmake file
- updates documentation

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-01-22 10:35:04 +00:00
Kamil Piszczek c16d9699a3 tests: bsim: bluetooth: host: gatt: general: improve conn ref handling
Improved the connection reference handling in the BabbleSim test
project in the Bluetooth Host category.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2024-01-22 10:32:41 +00:00
Christopher Friedt 0bed5dd459 tests: posix: semaphore: speed up named semaphore test
Reduce N_LOOPS from 999 to 32 by default and use a Kconfig
to encode it as CONFIG_TEST_SEM_N_LOOPS.

Running TESTSUITE semaphore
===============================================================
START - test_named_semaphore
 PASS - test_named_semaphore in 5.685 seconds
===============================================================
START - test_semaphore
 PASS - test_semaphore in 5.010 seconds
===============================================================
TESTSUITE semaphore succeeded

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-22 09:49:39 +00:00
Attie Grande 003d2090b2 cmake: version: stop using to_hex() in favour of CMake's math()
Since v3.13, CMake has supported math(... OUTPUT_FORMAT <format>), which
will perform the same functionality as to_hex().

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2024-01-22 09:48:33 +00:00
Attie Grande 20e2318b9f cmake: hex: deprecate use of to_hex() and from_hex() utility functions
Since v3.13, CMake has supported math(... OUTPUT_FORMAT <format>) and 0x
prefixes on numbers, which together provides the same functionality as
to_hex() and from_hex() that we've previously maintained.

Users should switch to using math() instead, and our functions are now
marked as deprecated.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2024-01-22 09:48:33 +00:00
Attie Grande 902751a19e cmake: hex: fix conversion of zero to hex
Previously, `to_hex(0 output)` would have placed `0x` into the `output`
variable, which is undesirable... this fix ensures that `0x0` is placed
into this variable if the input is zero.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2024-01-22 09:48:33 +00:00
Tomas Galbicka 554f2ba08e tests: mbox: Add test for mbox with data transfer
This commit adds extended test for mbox driver with
data transfer to verify correct mbox functionality.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2024-01-22 09:48:09 +00:00
Tomas Galbicka e776051cad samples: mbox: Add mbox sample with data transfer
This commits add mbox sample which supports transfering of
4 bytes of data between cores.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2024-01-22 09:48:09 +00:00
Tomas Galbicka a689228eb8 drivers: mbox: fix nxp mbox data read channel
This commit repairs reading of data from other
channels than 0.

Refactors irq handler outside of DT define.

Trigger registered callback only when proper flag is set.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2024-01-22 09:48:09 +00:00
Ian Morris 5fd3f658ff drivers: clock_control: clock_control_ra.c: protect register fix
Protection for clock control and power mode registers was not being
re-enabled.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-01-22 09:47:43 +00:00
Pieter De Gendt 1c190045b3 soc: arm: atmel_sam: samv71: Rework clock_init
Update clock_init for the Atmel SAMV71 SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt 23edb87cab soc: arm: atmel_sam: same70: Rework clock_init
Update clock_init for the Atmel SAME70 SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt 5bba8dd101 soc: arm: atmel_sam: sam4e: Rework clock_init
Update clock_init for the Atmel SAM4E SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt 89f23f7947 soc: arm: atmel_sam: sam3x: Rework clock_init
Update clock_init for the Atmel SAM3X SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt a69d611de8 soc: arm: atmel_sam: sam4s: Rework clock_init
Update clock_init for the Atmel SAM4S SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt 20f1f44120 soc: arm: atmel_sam: common: Add PMC API for clock management
Add functions to Atmel SAM SoC PMC API. This is an effort to hide
most of the internal registers used in different SAM families.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Jakub Rzeszutko 04de43b1a1 shell: Fix shell init procedure when configured as inactive on startup
The previous behavior of the CONFIG_SHELL_AUTOSTART option, where setting
it to 'n' disabled shell interaction at startup but kept the logger
active as a shell backend, was inconsistent.
Now, when CONFIG_SHELL_AUTOSTART is set to 'n', both the shell and the
logger are inactive at startup. Calling the shell_start function will
activate them and print any pending logs. This change ensures a more
consistent and logical behavior regarding shell and logger activity at
startup.

Additionally, now when the shell_stop function is called, both the shell
and the logger are halted. This enhancement ensures that stopping
the shell also effectively stops the associated logger.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2024-01-21 16:01:36 +01:00
Henrik Brix Andersen 53da5f6f87 doc: releases: migration-guide: 3.6: removal of run-time CAN RTR filter
Add a note about the removal of the CAN_FILTER_DATA and CAN_FILTER_RTR
flags from the CAN controller driver API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-21 11:00:31 +01:00
Henrik Brix Andersen 3436c93387 drivers: can: remove run-time RTR filtering, add build-time RTR filter
A growing number of CAN controllers do not have support for individual RX
hardware filters based on the Remote Transmission Request (RTR) bit. This
leads to various work-arounds on the driver level mixing hardware and
software filtering.

As the use of RTR frames is discouraged by CAN in Automation (CiA) - and
not even supported by newer standards, e.g. CAN FD - this often leads to
unnecessary overhead, added complexity, and worst-case to non-portable
behavior between various CAN controller drivers.

Instead, move to a simpler approach where the ability to accept/reject RTR
frames is globally configured via Kconfig. By default, all incoming RTR
frames are rejected at the driver level, a setting which can be supported
in hardware by most in-tree CAN controllers drivers.

Legacy applications or protocol implementations, where RTR reception is
required, can now select CONFIG_CAN_ACCEPT_RTR to accept incoming RTR
frames matching added CAN filters. These applications or protocols will
need to distinguish between RTR and data frames in their respective CAN RX
frame handling routines.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-21 11:00:31 +01:00
Luca Burelli c5b7aabc06 llext: move all flags to compiler specific cmake files
Minimize the amount of flags that are hardcoded in the llext.cmake
module by moving them to the compiler specific cmake files.

The llext.cmake module will now use the new LLEXT_REMOVE_FLAGS and
LLEXT_APPEND_FLAGS global variables to adjust the set of flags used
to compile the llext code. This will make it easier to add support
for new architectures and compilers.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-01-21 10:59:49 +01:00
Luca Burelli feee017767 llext: rework add_llext_target() to use standard compile step
Separate the compilation of the source file from the conversion to an
llext file. This allows to reuse the include directories and macro
definitions of the current Zephyr build while compiling the llext source.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-01-21 10:59:49 +01:00
Luca Burelli 0747cd3358 llext: define add_llext_target() for llext compilation
This patch defines a generic function that encapsulates all the
architecture-specific machinery needed to compile llexts from source
files. Current tests are updated to use this function.

Output and source files must be specified using the OUTPUT and SOURCES
arguments. Only one source file is currently supported.

Arch-specific flags will be added automatically. The C_FLAGS argument
can be used to pass additional compiler flags to the compilation of
the source file.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-01-21 10:59:49 +01:00
Tom Rothamel 3f65552446 boards: arm: atsamd21_xpro: Change sercom0 tx pad and control.
According to the documentation and pinctrl file, sercom0 tx should
be available on PA10C/SERCOM_PAD[2]. However, and somewhat confusingly,
txpo 2 meant SERCOM_PAD[0] with RTS/CTS flow control.

Changing this to txpo 1 uses SERCOM_PAD[2], which allows sercom0
to work as documented.

Signed-off-by: Tom Rothamel <tom@rothamel.us>
2024-01-20 19:14:54 +01:00
Tom Rothamel d1bfea0e4e dts: atmel sam: Document what rxpo and txpo mean.
The meaning of txpo is was a bit confusing, as it's an enumeration
rather than a pad number. This confusion extended to the atsamd21_xpro
board using the wrong pins.

This commit adds ASCII-art tables that explain the meaning of rxpo
and txpo on different platforms.

Signed-off-by: Tom Rothamel <tom@rothamel.us>
2024-01-20 19:14:54 +01:00