Commit graph

84721 commits

Author SHA1 Message Date
Jukka Rissanen 31a25da8c2 net: icmp: Introduce new API to send ICMP messages
Allow user to send ICMP Echo Request message a.k.a pings.
The same ICMP API and framework is used for network stack
internal needs in later commits. One benefit for this new
API is that it allows sending Echo Requests to offlined
network devices.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-09-28 09:34:20 +02:00
Jakub Rzeszutko c631bc7757 shell: modules: kernel: add human readable uptime
Added options: -p and --pretty to the kernel updtime command.

Fixes: #62543

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2023-09-28 09:34:00 +02:00
Jakub Rzeszutko dccc575767 include: add new time macros to sys_clock.h
New defines added: SEC_PER_MIN, MIN_PER_HOUR, HOUR_PER_DAY.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2023-09-28 09:34:00 +02:00
Pavel Vasilyev b2c163e108 doc: Bluetooth: Mesh: Fix line width to 100 in mesh docs
From Codying Style guideline:
https://docs.zephyrproject.org/latest/contribute/guidelines.html#coding-style

`The line length is 100 columns or fewer. In the documentation, longer
lines for URL references are an allowed exception.`

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-28 09:33:37 +02:00
Manuel Argüelles 977ad483b4 mdio: shell: add Clause 45 commands
Add MDIO shell commands for Clause 45 read/write operations.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-28 09:33:10 +02:00
Manuel Argüelles 280ddaef4a mdio: introduce Clause 45 APIs
Add `mdio_read_c45()`/`mdio_write_c45()` APIs for Clause 45 access
and remove the `protocol` MDIO binding property so that MDIO bus
controller can support more than one protocol.

A new MDIO header is introduced with generic opcodes, MMD and
registers addresses, to be used by MDIO and PHY drivers.

Existing MDIO drivers that support both Clause 22 and Clause 45
access are migrated to the new APIs.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-28 09:33:10 +02:00
Manuel Argüelles 62b28cb443 mdio: rename argument devad to regad
Rename argument `devad` to `regad` to indicate this is the register
address in a given PHY device and to not be confused with the
Clause 45 device address within a port.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-28 09:33:10 +02:00
Dat Nguyen Duy 9f9aaf83f4 tests: spi_loopback: enable lpspi + dma testing for mr_canhubk3
This enables lpspi + dma testing by default for mr_canhubk3

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-28 09:31:52 +02:00
Robert Lubos d9f4c1cff0 tests: net: dhcpv6: Add tests
Add tests for the DHCPv6 library. The tests verify that:
* message format is valid for the outgoing messages
* incoming messages are only processed in respective states
* processing through standard DHCPv6 transactions is correct
  (Solicit/Confirm/Renew/Rebind)

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-28 09:31:20 +02:00
Robert Lubos 6fb19bc7f0 net: shell: Add DHCPv6 support
Print DHCPv6 status in net shell (with "net iface" command).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-28 09:31:20 +02:00
Robert Lubos 72cf06ada4 net: config: Add DHCPv6 support
Add DHCPv6 support to the net config library. In case DHCPv6 is enabled,
net config will attempt to acquire IPv6 address and/or prefix when used.
The user can select with Kconfig whether to request address or prefix
(or both).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-28 09:31:20 +02:00
Robert Lubos afa5887b70 net: dhcpv6: Introduce net events for DHCPv6
Add net events for DHCPv6, in similar fashion as it's done for
DHCPv4.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-28 09:31:20 +02:00
Robert Lubos e73e78a550 net: dhcpv6: Add Zephyr DHCPv6 client
Add a DHCPv6 client implementation for Zephyr (RFC 8415).

The implementation allows to request IPv6 address and/or prefix from the
DHCPv6 server, and for now supports only the mandatory set of DHCPv6
options needed to achieve this. Currently the implementation supports
the following scenarios:
 * Requesting new IPv6 address/prefix with Solicit/Request exchange
 * Refreshing existing leases with Confirm, Renew or Rebind (depending
   on the context).

For now, no Information Request (the case where neither IPv6 address or
prefix are requested) is supported. No support for Reconfigure was added
either, as this is optional (the client manifests clearly to the server
that it does not support Reconfigure). Support for these can be added
later if needed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-28 09:31:20 +02:00
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