Commit graph

83129 commits

Author SHA1 Message Date
Martin Kiepfer
bda6656eca bugfix: esp32: spi: correct idle polarity and mode configuration
Possible fix for incorrection spi mode configuration
on esp32 (#61866)

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2023-08-29 10:25:45 +02:00
Guillaume Gautier
8a9b33729b tests: drivers: watchdog: wdt_basic_api: add nucleo_wba52cg board
Add Nucleo WBA52CG board in the allowed platform for STM32 watchdog tests

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 10:25:23 +02:00
Guillaume Gautier
79cad968e0 boards: arm: nucleo_wba52cg: enable watchdog for nucleo wba52cg
Enable watchdog for Nucleo WBA52CG

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 10:25:23 +02:00
Guillaume Gautier
33e072be01 dts: arm: st: wba: add watchdog for stm32wba
Add watchdog for STM32WBA

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 10:25:23 +02:00
Dominik Ermel
5b1df1936c west.yaml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  11ecbf639d826c084973beed709a63d51d9b684e

Brings following Zephyr relevant changes and fixes:
 - 11ecbf63 zephyr: use cmsis_core.h header
 - da65db00 zephyr: Provide slot definitions for three images
 - 2c61caf6 bootutil: Move flash_area_id_to_image under ifdef
 - 904d0c46 bootutil: Add DirectXIP version of boot_set_next
 - 2a874b6e zephyr: Do not build in debug mode
 - 258a6c7d bootutil: Fix support for more than 2 flash areas

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-08-29 10:25:14 +02:00
Anisetti Avinash Krishna
88f0613686 tests: drivers: gpio: gpio_basic_api: Added intel_adl_crb overlay
Added overlay to enable GPIO tests on intel_adl_crb board.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-08-29 10:24:03 +02:00
Anisetti Avinash Krishna
0f796a4b2a soc: x86: alder_lake: soc_gpio: Modified instance count
Updated GPIO instance count of ADL

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-08-29 10:24:03 +02:00
Anisetti Avinash Krishna
2e219f3697 dts: x86: intel: alder_lake: Added GPIO instances
Added GPIO instances supported on Alderlake platform

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-08-29 10:24:03 +02:00
Andrei Emeltchenko
ee6e8d1015 boards: intel_ish5: Cleanup dtsi
Remove empty chosen statement.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-29 10:22:59 +02:00
Andrei Emeltchenko
346d3836f5 boards: intel_ish5: Correct register window
Use the same register window as all other Intel boards working with
ioapic.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-29 10:22:59 +02:00
Emil Gydesen
71b1591337 Bluetooth: CAP: Remove qos from start_stream_param
Remove the qos field from
bt_cap_unicast_audio_start_stream_param as it was not used.

The QOS values are set when creating the unicast group,
and not when starting the streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-29 10:22:43 +02:00
Daniel DeGrasse
3926134f8e arch: arm: mpu: Make XN bit conditional on CONFIG_XIP for RAM region
Make the execute never (XN) bit conditonal on CONFIG_XIP for the RAM MPU
region attribute. This is required because when CONFIG_XIP is not set,
the entire image will be linked into SRAM. In this case, SRAM must be
executable.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-08-29 10:22:33 +02:00
Rodrigo Peixoto
654aa9baa1 doc: zbus: adjust documentation to comply with iterable section observers
Add details of the new VDED sequence;
Change the function iterators documentation considering `user_data`;
Adjust the runtime observers' allocation information. Now it uses heap
instead of memory slabs;
Adjust the configuration list and details of it.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-29 10:18:55 +02:00
Rodrigo Peixoto
4d80338132 samples: zbus: fix samples to work with iterable sections observers
Replace the `CONFIG_ZBUS_RUNTIME_OBSERVERS_POOL_SIZE` with the
`CONFIG_ZBUS_RUNTIME_OBSERVERS` and add the heap. Add user_data to hello
world sample iterator functions.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-29 10:18:55 +02:00
Rodrigo Peixoto
6880b8501d tests: zbus: fix tests to work with iterable sections observers
Adjust the `runtime_observers_registration` and `unittests` tests to work
with iterable sections channel observation. Add a sequence check for the
runtime observers. Add a tests for iterator functions for channels and
observer to work with `user_data` pointer.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-29 10:18:55 +02:00
Rodrigo Peixoto
7e44469dcc zbus: improve the way of storing observers
ZBus stores observers in two ways: statically using a list and dynamically
using a memory slab. Both present limitations. Static observers work only
for channel definition. The dynamic observers rely on a memory slab that
forces the user to manage its size to avoid issues with adding
observers. This commit fixes the static allocation problem by using the
iterable sections for allocating observation data and replacing the VDED
execution sequence since now it is possible to prioritize static observer
execution. All the runtime observers are dynamically allocated on the heap
instead of a specific memory pool.

BREAK changes (only internal, not APIs):

* ZBus channel metadata changed. Remove the observers' static array
pointer. Rename the `runtime_observers` pointer to `observers`. Add
`observer_start_idx` and `observer_end_idx`;
* Change the VDED execution sequence. The position (on definition time),
the priority in conjunction with the lexical order, is considered for
static post-definition time observers. At last, the runtime observer
follows the adding sequence;
* Replace the `CONFIG_ZBUS_RUNTIME_OBSERVERS_POOL_SIZE` with
`CONFIG_ZBUS_RUNTIME_OBSERVERS`.

New APIs:

* New iterable section iterators (for channels and observers) can now
receive a user_data pointer to keep context between the function calls;
* New `ZBUS_LISTENER_DEFINE_WITH_ENABLE(_name, _cb, _enable)` and
`ZBUS_SUBSCRIBER_DEFINE_WITH_ENABLE(_name, _queue_size, enable)` that
enable developers define disabled observers. They need to be enabled
during runtime to receive notifications from the bus;
* `ZBUS_CHAN_ADD_OBS` macro for adding post-definition static observers of
a channel.

Important changes:

* Move the ZBus LD file content to the `common-ram.ld` LD file. That was
necessary to make ZBus compatible with some Xtensa and RISCV boards.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-29 10:18:55 +02:00
Fabian Blatz
6a0de9bb7c samples: subsys: display: lvgl: add lvgl-button-input to native_posix
Adds a lvgl-button-input pseudo device to the lvgl sample. Triggering the
SDL gpio (pressing 'b') on the keyboard should trigger a click event at the
center of the screen.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz
b296d1152f input: add zephyr,lvgl-button-input device binding
Add a pseudo device which can be used to hook into gpio-keys input_events
and relay the events to a lv_indev.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz
116ec2c41c samples: subsys: display: lvgl: Use input-lvgl for touch input
Changes all board specific configurations to use the new
zephyr,lvgl-pointer-input compatible. The kscan_input node in the boards
remains to have downstream backwards compatibility.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz
170faaf0e4 boards: posix: native_posix: Rename input-sdl-touch node
Rename the input-sdl-touch node to be able to have phandle references to
it.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz
5e5d9f481c modules: lvgl: Move lvgl kscan pointer handling to separate file
Moves lvgl pointer driver handling based on kscan to its own file, to ease
deletion when the usage of kscan for display touch input has been
deprecated.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz
c536bd3845 modules: lvgl: add zephyr,lvgl-pointer-input pseudo device
Add the scaffolding to create input lvgl pseudo devices which route zephyr
input_event to their lvgl `indev` equivalent. As a first cut also add a
`zephyr,lvgl-pointer-input compatible which can be a drop-in replacement
for the existing kscan solution.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabio Baltieri
5e01466d97 drivers: gpio: xlnx_ps: fix up initialization priorities
Current setup tries to initialize the bank driver before the parent one,
which is the inverse of what the devicetree hierarchy implies and
causes a bunch of:

ERROR: /soc/gpio@e000a000/psgpio_bank@3 PRE_KERNEL_1 40 32 <
/soc/gpio@e000a000 PRE_KERNEL_2 40 10

Change the bank driver to initialize at PRE_KERNEL_1 as the parent
drivers so that ordinals take care of priority between these two.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-28 15:43:06 -04:00
Carles Cufi
ca537cf147 MAINTAINERS: Remove usage of manifest-<module> GitHub labels
The manifest-<module> GitHub labels are automatically added by the
manifest workflow whenever a PR modifies the revision of a project in
the manifest file. This allows users to filter by PRs that modify
revisions of particular projects, which is a useful feature.

The MAINTAINERS.yml file had assigned manifest-<module> labels to the
areas corresponding to west projects, which means that Pull Requests
that modify glue code or otherwise code in the main repository that is
assigned to that entry (mostly code in modules/) currently get labeled
with the manifest-<module> label. Fix this by not using those labels in
the MAINTAINERS file anymore.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-08-28 14:06:01 -05:00
Fabio Baltieri
323ebef2de drivers: crypto: it8xxx2_evb: fix a shadow variable error
Fix a build error:

crypto_it8xxx2_sha.c:99:26: warning: declaration of 'i' shadows a
previous local [-Wshadow]
   99 |                 for (int i = 0; i < ARRAY_SIZE(sha256_k); i++) {
      |                          ^ crypto_it8xxx2_sha.c:88:13: note:
shadowed declaration is here
   88 |         int i;

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-28 19:17:46 +01:00
Florian Grandel
cc4d1bd374 kernel: sched: optimize for Meta IRQs == coop prios
Combining Meta IRQs with cooperative threads requires extra care to
return to pre-empted cooperative threads when returning from a Meta IRQ.
This is only needed when there are cooperative threads that are not also
Meta IRQs. This PR saves some space & time when the number of Meta IRQs
is equal to the number of available cooperative threads.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-28 20:15:44 +02:00
Benjamin Cabé
0bfd20567f sensor: doc: add missing doc for decode() retvals
Added missing documentaiton for the return values of the decode() API

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-08-28 13:43:55 -04:00
Benjamin Cabé
db21a6786a sensor: doc: clean bad doxygen references.
:c:func:, :c:macro: etc shoud not be used in Doxygen comments, as they
are Sphinx roles.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-08-28 13:43:55 -04:00
Benjamin Cabé
f59dbb39d5 fs: littlefs: doc: clean bad doxygen references.
:c:func:, :c:macro: etc shoud not be used in Doxygen comments, as they
are Sphinx roles.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-08-28 13:43:55 -04:00
Benjamin Cabé
f9e17b815f rtio: doc: clean bad doxygen references.
:c:func:, :c:macro: etc shoud not be used in Doxygen comments, as they
are Sphinx roles.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-08-28 13:43:55 -04:00
Benjamin Cabé
355be46639 net: doc: clean bad doxygen references.
:c:func:, :c:macro: etc shoud not be used in Doxygen comments, as they
are Sphinx roles.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-08-28 13:43:55 -04:00
Benjamin Cabé
56a2137813 bbram: doc: clean bad doxygen references.
:c:func: shoud not be used in Doxygen comments.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-08-28 13:43:55 -04:00
Anas Nashif
b818ca43b7 tests: uoscore-uedhoc: add tag to match module name
Add tag to be able to runs the tests whenever the module sha changes in
the manifest.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-28 13:37:39 -04:00
Anas Nashif
5f7b22f094 tests: uoscore: prepend test cases with test_
Tests were missing the test_ prefix.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-28 13:37:39 -04:00
Anas Nashif
7741a9baf8 tests: move uoscore-uedhoc tests into tests/modules
Those are tests for a module, so put them under tests/modules.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-28 13:37:39 -04:00
Anas Nashif
7fc40ee9fb tests: uoscore: depend on third party module
Tests should depend on the the module, so if we do not have the module,
we should not be building the test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-28 13:37:39 -04:00
Anas Nashif
98fc52f754 tests: uoscore: listify tags in testcase.yaml
Move tags to a yaml list instead of cramming them in one string field
the old-fashioned way.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-28 13:37:39 -04:00
Dat Nguyen Duy
b70c5deb04 tests: ztest: zexpect: include source file directly in main.cpp
The main.cpp was introduced as a symbolic link of main.c
but this makes the test build failure on Windows, so just
remove the symlink and include directly the source

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-08-28 13:36:08 -04:00
Anas Nashif
d4b0c48892 west: build: fail early if path to test item is not valid
Fail early in case the path to the test item (--test-item) is not valid
or does not exist.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-28 09:17:42 -07:00
Iuliana Prodan
4cf9d67432 west: sign: do not make rimage configuration and platform name mandatory
Now, if the rimage target (meaning rimage configuration and platform name)
is not defined in board.cmake the sign script returns fatal error.
Change this to a warning since there are configurations that are
not using 'west sign' or is used just to glue the headers of the
final image.

Also, update the documentation accordingly.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-08-28 09:17:02 -07:00
Fabio Baltieri
7b59e34a22 mgmt: mcumgr: drop few redeclared/shadowed variables
Drop few redeclared variables, fixes some:

settings_mgmt.c:454:30: error: declaration of ok shadows a previous
local [-Werror=shadow]
  454 |                         bool ok;
      |                              ^~
settings_mgmt.c:436:14: note: shadowed declaration is here
  436 |         bool ok = true;
      |              ^~

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-28 17:17:24 +02:00
Fabio Baltieri
755bdf80c6 drivers: flash: spi_nor: fix build when a reset gpio is present
Fix a few issues with the reset-gpio functionality in spi_nor, missing
header, missing semicolon, unnecessary and not working condition on a
struct field that is not a pointer.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-28 16:01:23 +02:00
Martin Jäger
0fbbe02f07 drivers: serial: esp32_usb: don't use k_usleep in poll_out function
The previous implementation called k_usleep to wait if the fifo was not
empty. This leads to an exception if called from an ISR (e.g. for
for logging).

In addition to that, the k_usleep leads to noticeable interruptions
when printing strings longer than the 64 bytes of the fifo.

With this commit, the function will busy-wait until all characters are
sent or if the timeout is reached. The timeout will only be reached if
no USB host is connected to the port. After the timeout is reached
once, the function will return immediately for subsequent calls
(dropping the characters to be sent) until the USB host is connected
again.

Fixes #60825

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-08-28 16:00:20 +02:00
Fabio Baltieri
529798a1b2 drivers: watchdog: atcwdt200: fix shadow variable build error
Fix a shadow variable build error:

wdt_andes_atcwdt200.c:112:49: warning: declaration of 'counter_dev'
shadows a global declaration [-Wshadow]
  112 | static void wdt_counter_cb(const struct device *counter_dev,
      uint8_t chan_id, |
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ wdt_andes_atcwdt200.c:95:35: note:
shadowed declaration is here
   95 | static const struct device *const counter_dev = |
      ^~~~~~~~~~~

Make the outer variable more specific rather than the local one.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-28 16:00:00 +02:00
Chad Karaginides
f5ff62f35a arch: arm64: Reserved Cores
Enhanced arch_start_cpu so if a core is not available based on pm_cpu_on
return value, booting does not halt.  Instead the next core in
cpu_node_list will be tried.  If the number of CPU nodes described in the
device tree is greater than CONFIG_MP_MAX_NUM_CPUS then the extra cores
will be reserved and used if any previous cores in the cpu_node_list fail
to power on.  If the number of cores described in the device tree matches
CONFIG_MP_MAX_NUM_CPUS then no cores are in reserve and booting will
behave as previous, it will halt.

Signed-off-by: Chad Karaginides <quic_chadk@quicinc.com>
2023-08-28 15:57:19 +02:00
Lukasz Mrugala
4d467af7f4 scripts: tests: twister: Black box testing
In addition to the white-box testing and unit tests,
we would like to have some black-box testing for the
console commands of twister.

This serves as a Proof of Concept for future expansion.

Special dummy tests are made for blackbox testing.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-08-28 15:57:06 +02:00
Lukasz Mrugala
217980aa88 MAINTAINERS: Updated Twister paths
With the new segment of tests having its own directory, it needed to
be added to the Twister segment of MAINTAINERS.yml.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-08-28 15:57:06 +02:00
Emil Gydesen
6ccd112c56 Bluetooth: Audio: Refactor bt_audio_codec_cfg to flat arrays
Refactor the bt_audio_codec_cfg to use flat arrays to store
metadata and codec specific configurations.

The purpose of this is to make it easier to copy the data
between layers, but also to support non-LTV data for non-LC3
codec configurations.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-28 15:56:53 +02:00
Fredrik Danebjer
32b00dd6f4 Bluetooth: Audio: Make BSIM tests for PACS notify functionality
Added a BSIM tests for PACS notification functionality. This test
tests that all optional notifies are working, as well as verifying
that a disconnected subscribed client will be notified on reconnect.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2023-08-28 15:56:26 +02:00
Fredrik Danebjer
2ebbc7b130 Bluetooth: Audio: Make PACS notify bonded clients on reconnect
This fix allows PACS to notify bonded clients, that were disconnected
when a characteristic with notify property was changed, are being
reconnected.

This fix also implements a defer work so to not block the bt rx
thread during auth callbacks. All other notify calls are for
consistency and style also moved to use the defer work.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2023-08-28 15:56:26 +02:00