Commit graph

83144 commits

Author SHA1 Message Date
Gerard Marull-Paretas
12b2ee54e3 drivers: timer: s/device.h/init.h
Timer "drivers" do not use the device model infrastructure, they are
singletons with a SYS_INIT call. This means they do not have to include
device.h but init.h. Things worked because device.h includes init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 11:29:18 +01:00
Guillaume Gautier
7f8831aa7e drivers: adc: stm32: add support for kernel source clock
Add support for ADC kernel source clock, similar to other STM32 drivers.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 11:27:07 +01:00
Guillaume Gautier
484028306d drivers: adc: stm32: use dts to set the clock prescaler
Now that everything is in place, the prescaler value picked from dts is
used to properly configure the clock.
The code is moved into its own function.
There are four main cases:
- F1 and F37x don't have prescaler (in ADC register) so nothing is done.
- F0 only has individual registers.
- C0, G0, L0, WB1x and WL have both invidual and common registers. The
  individual one is used to define either synchronous mode with its
  prescaler, or asynchronous mode. The common one is only used to store
  the value of the asynchronous prescaler.
- All others only have a common register where both the mode and the
  prescaler is stored.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 11:27:07 +01:00
Guillaume Gautier
e8c4990639 drivers: adc: stm32: get prescaler value from dts
Get the STM32 ADC prescaler data from dts to create the appropriate LL
macro to use for the ADC clock.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 11:27:07 +01:00
Guillaume Gautier
eaabe204d7 boards: arm: add adc clock properties for all stm32 boards
Add ADC clock source and prescaler properties to all STM32 boards.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 11:27:07 +01:00
Guillaume Gautier
910188994e dts: arm: st: set adc clock source for stm32f2, f4, f7, l1, u5 and wba
STM32L1, U5 and WBA can only have an asynchronous clock source for ADC.
STM32F2, F4 and F7 can only have a synchronous clock source for ADC.
For all these series, it can be defined directly in the dtsi files.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 11:27:07 +01:00
Guillaume Gautier
702e469e18 include: zephyr: dt-bindings: adc: add macros for stm32 adc clock source
Add macros to help defining the STM32 ADC clock source in device tree.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 11:27:07 +01:00
Guillaume Gautier
8f197adc30 dts: bindings: adc: add properties for stm32 adc clock source
Add two properties to define the STM32 ADC clock source:
- Clock source: synchronous or asynchronous
- Clock prescaler
By combining these two parameters, it will be possible to set the desired
ADC clock for most series.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 11:27:07 +01:00
Anders Storrø
3183ff3ff5 Bluetooth: Mesh: Add buf size check in comp p1 get
According to mesh 1.1 spec (4.4.1.2.2 Composition Data state):
“If the complete list of models does not fit in the Data field, the
element shall not be reported.“

The implementation of bt_mesh_comp_data_get_page_1 does
not consider this, and further it will assert the device if the passed
buffer is to small.

This commit adds a check that prevents populating passed buffer
if the full element entry wont fit in the buffer.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-08-29 12:17:42 +02:00
Jeremy Bettis
1e471eb2a7 twister: Switch to a non-greedy regex
When parsing test names from symbol names, use a non-greedy match to
avoid parsing test names with __ in them.

The symbol looks like z_ztest_unit_test__SUITE__TEST. It is more likely
that a test name will contain __ than a suite name, so now something
z_ztest_unit_test__a_b__c_d__e_f will be parsed as suite:a_b
test:c_d__e_f, whereas it used to be parsed as suite:a_b__c_d test:e_f

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2023-08-29 10:27:17 +02:00
Jeremy Bettis
1d9ce862a7 twister: Don't require test_ prefix to set status
If a test doesn't start with test_, twister currently emits an error:
suite_name.test_name: Unknown status 'started'

Following the suggestion by Maksim Masalski on PR#21191, change the
regex to exclude spaces in the test name, and remove the check that the
test_ prefix exists.

See also #21162

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2023-08-29 10:27:17 +02:00
Jeremy Bettis
cd265fd603 twister: Use raw string and remove pylint disable
Avoid the pylint anomalous-backslash-in-string warning by using a raw
string.

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2023-08-29 10:27:17 +02:00
Carlo Caione
6ae34c9176 ipc_service: static_vrings: Fix buffer sizing
We are returning an off-by-one number of buffers in some circumstances,
fix the calculation.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-08-29 10:26:59 +02:00
Nikolay Agishev
7c025d330d ARC: Fix STR macro for ST* asm instructions
For case of 64-bit arc_v3 architecture "str" macro handles large
offsets in incorrrect way. For stl instruction limm swhoud not exceed 255.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2023-08-29 10:26:15 +02:00
Laczen JMS
95bdfb5c33 bbram: add support from user threads
Provide the necessary handlers to support bbram access from userthreads
solves #61868.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2023-08-29 10:26:07 +02:00
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