Commit graph

84708 commits

Author SHA1 Message Date
Francois Ramu
1d29a8c3c2 drivers: i2c: stm32 i2c driver supports 10-bit addressing
When slave_address is 10 bits, data type should be
uint16_t instead of uint8_t,
like the data typeof data->slave_cfg->address.
https://github.com/zephyrproject-rtos/zephyr/issues/55987

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-09-28 09:27:09 +02:00
Théo Battrel
2e13802a38 Bluetooth: Test: Update security/ccc_update
Previous commit reverted the `link_encrypted` filed of CCC config.
Update the test to match the new expected behavior.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-09-28 09:21:57 +02:00
Théo Battrel
c2b99c0123 Revert "Bluetooth: Host: Fix GATT server handling of CCC"
This reverts commit cfd368fef1.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-09-28 09:21:57 +02:00
Théo Battrel
888a8c644c Bluetooth: Test: SC Indication
Test that SC Indication is correctly sent when the client reconnect and
the server updated the GATT database since last connection. Test that
the indication is sent even if the bond is not restored.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-09-28 09:21:57 +02:00
Daniel Leung
b4da11f929 gdbstub: xtensa: add support for dc233c core
This adds support for using coredump with Xtensa DC233C core,
which are being used by qemu_xtensa and qemu_xtensa_mmu.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-27 19:30:15 -05:00
Daniel Leung
1c0178ae6e boards: xtensa: rename qemu_xtensa_dc233c to qemu_xtensa_mmu
This renames the board from qemu_xtensa_dc233c to
qemu_xtensa_mmu to better signal that it is for testing with
MMU on QEMU Xtensa. Also turn on testing by default to make
sure future changes will not break Xtensa MMU support.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-27 19:30:15 -05:00
Ederson de Souza
5c65a60eab tests/kernel/timer/timer_behavior: Add support for Saleae Logic 2
This patch shows an example of how to use the timer behavior external
tool testing, using the Saleae Logic 2 application.

Also, some board overlays were added as examples.

Finally, testcase.yaml updated with parameters for the Saleae sample.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2023-09-27 20:25:09 -04:00
Ederson de Souza
22ba9456de tests/kernel/timer/timer_behavior: Add support for external tool
This patch adds a way to simplify using an external tool to measure
timer behaviour on Zephyr. It modifies the timer behaviour
jitter_drift.c tests to toggle a GPIO pin (defined via a new DTS
compatible, "test-kernel-timer-behavior-external") that can be connected
to an external tool, such as a logic analyzer, to measure timer
behaviour.

This GPIO pin toggle is behind a new CONFIG_TIMER_EXTERNAL_TEST Kconfig.

A new pytest test is added so that it can collect the statistics from
the external tool and assert some measurements. To collect statistics
from the external tool, one needs to provide a Python module which
provides a `run(seconds, config)` method, that will perform the test and
return the statistics. Check the README file for more information about
this interface.

Finally, this on twister, this new test is behind a new fixture,
"gpio-timerout".

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-09-27 20:25:09 -04:00
Jamie McCrae
14fe04dbf3 doc: release: 3.5: Add note on new blinfo subsystem
Adds a note that a new retention module, bootloader information
(blinfo) has been added

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-27 20:18:31 -04:00
Jamie McCrae
3205a5865d doc: api: Add blinfo as experimental
Adds blinfo as an experimental API

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-27 20:18:31 -04:00
Jamie McCrae
4fe6f52175 doc: retention: Add blinfo subsystem documentation
Adds some documentation on how to use the new subsystem

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-27 20:18:31 -04:00
Jamie McCrae
ce65806cd4 tests: boot: Add MCUboot data sharing test
Adds a test for the data sharing retention feature of MCUboot
configuration to an application.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-27 20:18:31 -04:00
Jamie McCrae
db4febc584 retention: Add bootloader configuration interface
Adds a bootloader configuration interface which allows for a
bootloader (e.g. MCUboot) to set configuration in a shared data
area which is then read by the application.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-27 20:18:31 -04:00
Flavio Ceolin
59c501c6df doc: security: Add information about backports
Clarify about how to proceed with backports for vulnerabilities.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 20:15:56 -04:00
Anas Nashif
79aaa9061c doc: release: update merge criteria
Document 4 eye principal for reviews and merges.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 20:13:04 -04:00
Anas Nashif
6dc15abb85 doc: roles: remove reference to slide
Reference to slide that does not exist.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 20:13:04 -04:00
Ryan McClelland
8d5ed530d7 modules: remove uncessary source for external cmsis kconfig
CMSIS uses an external KConfig so sourcing the KConfig is uncessary. This
also adds a comment if it is not available.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-27 18:33:40 -04:00
Ryan McClelland
90c6465f1f modules: fix naming of cmsis-nn,cmsis-dsp folder
The names have underscores within them. Somehow it was still being found
within the build but not with building documents. This renames them to
the correct name.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-27 18:33:40 -04:00
Anas Nashif
d885048637 tests: pm: power_domains: rename testcase, demo is ambigous
Rename testcase and use native_posix for coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 15:11:18 -04:00
Anas Nashif
c532595519 tests: pm: driver_init: rename testcase, demo is ambigous
Use a more descriptive testcase name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 15:11:18 -04:00
Anas Nashif
eb956d0853 tests: pm: driver_init: use native_posix for testing
Use native_posix, this is a better platform for getting test coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 15:11:18 -04:00
Benjamin Cabé
9b1e8cd3c2 doc: boards: Fix typo in Arduino Giga R1 note directive
Fix a minor typo causing Sphinx note to not render.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-27 15:10:59 -04:00
Dat Nguyen Duy
11f5eb5913 tests: drivers: dma: enable dma test for mr_canhubk3
Add devicetree overlay for enabling dma test for mr_canhubk3 board

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy
b4f390e880 boards: arm: mr_canhubk3: enable dma support
Enable dma support for mr_canhubk3 board

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy
8185faa0cb drivers: dma_mcux_edma: add support dma driver for s32k344
On S32K344, the offset in memory map between each channel
is 0x4000 for most channels, but there is specific case is
between channel 11 and 12 which is 0x1D4000 instead. As a
consequence, 32 channels are divided to two parts: one
starts from channel 0 -> 11. The other is from channel 128
to 145. The channel gap is from 12 -> 127.

For user and data structures in shim driver, the channel's
value comes from 0 --> 31. Above constraint will be counted
when interact with the mcux sdk

Beside that, the DMAMUX register in this platform is very
specific, not in identical with DMAMUX channel, so shim
driver is updated to cover this case

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy
d4a2b2244f drivers: dma_mcux_edma: add support for edma version 3
Add new dt binding for edma v3 that inherits whole dt
properties from current version. One more property is
added for SoCs that don't have separate error interrupt
id, use same id with channel interrupt

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy
a5cf757c9e drivers: dma_mcux_edma: improve interrupt handling
The current implementation iterates over all channels
even if only several channels share the same irq. This
introduces one more dt property to describe an offset
between two channels share the same interrupt id.

Beside that, the error interrupt must be put as last
element of "interrupt" dt property.

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy
03b5ba5990 drivers: dma_mcux_edma: add support for multiple DMAMuxes
This adds support for platforms that have multiple DMAMUXes
per DMA instance

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy
f27815d645 dts: bindings: correct information in mcux edma bindings
With the current implementation, the 1st cell is not DMAMUX id
as mentioned in the bindings (0 for DMAMUX0 and 1 for DMAMUX1).

Moreover, the referenced Linux bindings is obsoleted, it was
migrated to use yaml syntax

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy
ad08d71efa drivers: dma_mcux_edma: correct valid values for dma channel/slot
The dma-channels devicetree value - 1 = maximum valid channel
The dma-requests devicetree value - 1 = maximum valid request

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Benjamin Cabé
f5efa59fc3 boards: riscv: doc: Fix link to getting started guide
Do not use hardcoded http link to the getting started guide but a
proper ref instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-27 13:19:52 -05:00
Benjamin Cabé
3055401607 boards: riscv: doc: Use https for links to Telink wiki
Update URLs to Telink wiki to use https instead of http.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-27 13:19:52 -05:00
Benjamin Cabé
90c3547479 boards: riscv: doc: Fix dead link in Telink TLSR9518ADK80D documentation
Updated a link to a Telink wiki page that was an HTTP 404.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-27 13:19:52 -05:00
Andrei Emeltchenko
1dc6a8aa13 boards: x86: Detect SMBus IRQ instead of hardcoding
Detect IRQ for SMBus instead of hardcoding.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-27 20:35:06 +03:00
Andrei Emeltchenko
d7fd3db32e drivers: smbus: pch: Simplify IRQ flags
Use COND_CODE_1() macro instead of macro trampoline.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-27 20:35:06 +03:00
Rodrigo Peixoto
43c8df7893 test: zbus: Add tests for MSG_SUBSCRIBERS
Add specification-based and integration tests for `MSG_SUBSCRIBERS`.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-09-27 20:03:43 +03:00
Rodrigo Peixoto
94f98b6cf0 samples: zbus: add Message subscriber sample
This sample illustrates how to use message subscribers with ZBus.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-09-27 20:03:43 +03:00
Rodrigo Peixoto
0b0aa435af zbus: Add Message subscriber
Besides the changed channel reference, the message subscribers receive a
copy of the message during the VDED execution. ZBus guarantees message
delivery for `MSG_SUBSCRIBERS`.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-09-27 20:03:43 +03:00
Marc Desvaux
a49720ab08 west.yml: use latest STM32 HAL to get PTP to work
In the HAL_ETH_ReadData function where it checks for the last
descriptor, I added a checked if the TSA bit was set in DESC1
If the TSA bit is set then have a peak at the context descriptor
which should be the one after the last descriptor
If the CTXT bit is set in the context descriptor then extract
the timestamps


Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-09-27 11:57:59 -05:00
Flavio Ceolin
5d505c7b28 random: Fix feature dependency usage
Code using sys_csrand_get should depend on CONFIG_CSPRNG_ENABLED symbol
and not in ENTROPY_HAS_DRIVER since they are not using the entropy
device directly.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:55:10 -05:00
Flavio Ceolin
646a06c9fe random: Fix kconfig symbol name
s/CSPRING_ENABLED/CSPRNG_ENABLED/g

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:55:10 -05:00
Flavio Ceolin
23106b81c8 random: Remove deprecated Kconfig symbol
XOROSHIRO_RANDOM_GENERATOR has been deprecated in
Zephyr 1.12 (???), time to remove it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:55:10 -05:00
Flavio Ceolin
8be60b40b6 drivers: entropy: Add thread safeness note
Add a note in entropy_get_entropy about thread safeness,
since this is used by the random subsystem in its CSPRNG.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:55:10 -05:00
Flavio Ceolin
37be80ddbe random: ctr_drbg: Thread safe in SMP
irq_lock() does not make this this csprng api thread safe
in SMP systems. Change it to use a mutex.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:55:10 -05:00
Flavio Ceolin
eba567cf18 random: ctr_drbg: Remove unused variable
state_sem was statically defined but never used.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:55:10 -05:00
Flavio Ceolin
eeea26d206 ipm: cavs: Fix possible buffer overflow
A buffer overflow happens in send() when size is negative because
it is promoted to signed when used in memcpy.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:51:34 -05:00
Flavio Ceolin
98857c267d ipm: imx: Initialize variable before using it
Since the driver is passing the whole buffer, let's zero it to avoid
pass garbage in case of size != buffer's size.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:51:34 -05:00
Flavio Ceolin
0a12a05e63 ipm: imx: Fix possible buffer overflow
It is possible to happen a buffer overflow in ipm_send due the lack
of a checking for negative value.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:51:34 -05:00
Flavio Ceolin
4ff32d9290 ipm: mcux: Initialize variable before using it
Since the driver is passing the whole buffer, let's zero it to avoid
pass garbage in case of size != buffer's size.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:51:34 -05:00
Flavio Ceolin
6654d18596 ipm: mcux: Fix possible buffer overflow
It is possible to happen a buffer overflow in ipm_send callback
due a wrong comparison between signed/unsigned types.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:51:34 -05:00