Commit graph

83164 commits

Author SHA1 Message Date
Georges Oates_Larsen 2e762836d5 net: conn_mgr: binding get/set flag
Add a helper allowing connectivity implementations to more easily access
connectivity flags on connectivity bindings.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-08-29 16:13:37 +02:00
Georges Oates_Larsen 49a7798c30 net: conn_mgr: binding lock/unlock
Adds conn_mgr_binding_lock/conn_mgr_binding_unlock, which connectivity
implementations can call to lock or unlock the passed in connectivity
binding.

This allows connectivity implementations to safely make direct accesses
to binding data from outside conn_mgr_conn_api callbacks, and should
allow cleaner, more robust connectivity implementations to be written.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-08-29 16:13:37 +02:00
Georges Oates_Larsen 6d2ce0b30b net: conn_mgr: Create separate connectivity implementation API.
Splits many definitions from conn_mgr_connectivity.h off into their own
header, conn_mgr_connectivity_impl.h

conn_mgr_connectivity.h now focuses solely on user/application-facing
APIs, and conn_mgr_connectivity_impl now contains all functions, utils,
definitions intended for use by connectivity implementations, including
conn_mgr_if_get_binding, which is now available for use by connectivity
implementations.

This lays the foundation for allowing connectivity implementations
easier and safer access to their internal state through internal APIs.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-08-29 16:13:37 +02:00
Georges Oates_Larsen 3b3f95223c net: conn_mgr: Mark as experimental in the API table
Mark conn_mgr as experimental in the API table, since it is currently
experimental.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-08-29 16:13:37 +02:00
Troels Nilsson 8a2a2bd613 Bluetooth: Controller: Add trpa cache for BT_CTLR_SW_DEFERRED_PRIVACY
Adds a target RPA known unknown cache; it fulfills a similar function
to the existing peer RPA cache, used for scanning of directed
advertisements

Signed-off-by: Troels Nilsson <trnn@demant.com>
2023-08-29 16:13:22 +02:00
Gerard Marull-Paretas f88d21cdb9 soc: arm: nordic_nrf: nrf53: sync_rtc: add missing init.h
File was using SYS_INIT, from init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 14:35:45 +01:00
Gerard Marull-Paretas 0aac6cfb75 usb: device_next: add missing init.h
Some files were using SYS_INIT, from init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 14:35:29 +01:00
Guillaume Gautier 5c42588a48 boards: arm: add missing stm32 adc properties
Clock source and prescaler properties were missing for Nucleo H563ZI,
L552ZE and U575ZI

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 14:35:10 +01:00
Gerard Marull-Paretas e80f71a14d drivers: usb: device: nrfx: add missing init.h
File was using SYS_INIT, from init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 12:28:04 +01:00
Gerard Marull-Paretas 0b8a7c0930 drivers: pinctrl: imx: add missing init.h
File used SYS_INIT API from init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 12:21:00 +01:00
Gerard Marull-Paretas 1b361f9832 drivers: pcie: host: add missing init.h
File was using SYS_INIT from init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 12:20:31 +01:00
Gerard Marull-Paretas cdb36fdbd6 drivers: pinctrl: pfc_rcar: add missing init.h
File uses SYS_INIT API, from init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 12:17:38 +01:00
Gerard Marull-Paretas 3970694674 sensing: sensor_mgmt: s/device.h/init.h
File was not using any device.h API, but init.h (SYS_INIT).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 12:17:24 +01:00
Gerard Marull-Paretas 8cf63ff367 net: lib: zperf: add missing init.h
File was using SYS_INIT without including init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 12:17:15 +01:00
Gerard Marull-Paretas 561efe5557 drivers: intc: gicv3: add missing init.h
File was using SYS_INIT, from init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 12:16:21 +01:00
Florian Grandel 0b3991cda1 CODEOWNERS/MAINTAINERS: introduce gPTP maintenance area
Adds a new gPTP maintenance area and proposes to add @fgrandel as a
collaborator thereof as proposed by @jukkar.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-29 06:56:50 -04:00
Gerard Marull-Paretas 59946f16ca bluetooth: audio: s/device.h/init.h
File was not using any device.h API, but init.h (SYS_INIT).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 11:54:36 +01:00
Gerard Marull-Paretas aa4ebc1f63 mgmt: ec_host_cmd: simulator: s/device.h/init.h
File is not using any device.h API, but init.h (SYS_INIT).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 11:54:19 +01:00
Kai Vehmanen c6284d4afe soc: adsp: clk: use WAIT_FOR() to wait on clk power-up
Use WAIT_FOR to wait for clock source to be enabled. If clock does
not come up in 10ms, raise k_panic().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-29 06:54:02 -04:00
Gerard Marull-Paretas fc45b3f2dd rtio: add missing init.h include
File was using init.h API without directly including the header.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 11:29:37 +01:00
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