Commit graph

91627 commits

Author SHA1 Message Date
Henrik Brix Andersen
418b0a1e65 docs: release: migration-guide: 3.7: list CAN bus-off recovery changes
List the changes to the CAN bus-off recovery functionality.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-02 18:26:48 +01:00
Henrik Brix Andersen
a57db0ddcb drivers: can: rework support for manual bus-off recovery
Since all CAN controllers drivers seem to support automatic recovery (for
any future drivers for hardware without this hardware capability this can
easily be implemented in the driver), change the Zephyr CAN controller API
policy to:

- Always enable automatic bus recovery upon driver initialization,
  regardless of Kconfig options. Since CAN controllers are initialized in
  "stopped" state, no unwanted bus-off recovery will be started at this
  point.

- Invert and rename the Kconfig CONFIG_CAN_AUTO_BUS_OFF_RECOVERY, which is
  enabled by default, to CONFIG_CAN_MANUAL_RECOVERY_MODE, which is disabled
  by default. Enabling CONFIG_CAN_MANUAL_RECOVERY_MODE=y enables support
  for the can_recover() API function and a new manual recovery mode (see
  next bullet). Keeping this guarded by Kconfig allows keeping the flash
  footprint down for applications not using manual bus-off recovery.

- Introduce a new CAN controller operational mode
  CAN_MODE_MANUAL_RECOVERY. Support for this is only enabled if
  CONFIG_CAN_MANUAL_RECOVERY_MODE=y. Having this as a mode allows
  applications to inquire whether the CAN controller supports manual
  recovery mode via the can_get_capabilities() API function and either fail
  or rely on automatic recovery - and it allows CAN controller drivers not
  supporting manual recovery mode to fail early in can_set_mode() during
  application startup instead of failing when can_recover() is called at a
  later point in time.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-02 18:26:48 +01:00
Radoslaw Koppel
118f1592ff buildsystem: Enable LTO also for the application
It turns out that currently LTO is enabled only for the kernel.
This commit updates it to enable it for the whole application
and adds additional LTO exclusions required for the standard
C libraries to build and link properly.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-03-02 15:39:36 +01:00
Anas Nashif
46484da502 kernel: move priority queue handling to own file/header
clean up headers under include/ and move handling of priority queue to
own file/header.
No need for the header  include/zephyr/kernel/internal/sched_priq.h
anymore. Move the relevant structures where they are being used in
kernel_structs.h.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-02 15:06:45 +01:00
Emil Gydesen
9553347080 Bluetooth: ISO: Add CONFIG_BT_ISO_{RX/TX}
Add 2 new Kconfig promptless options that are shorthand
for whether the ISO configuration can support RX and TX.

This also applies these new options as guards for existing
and missing code pieces.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-02 15:05:39 +01:00
Andrzej Kuros
0703a3532d modules: hal_nordic: remove weak nrf_802154_clock_hfclk_ready
The __WEAK-tagged function `nrf_802154_clock_hfclk_ready` is removed.
The implementation is provided by the nRF 802.15.4 Radio Driver.
Existence of __WEAK-tagged version causes incorrect behavior when
Link Time Optimization is used.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-03-02 15:04:16 +01:00
Florian La Roche
d835772f38 net: conn_mgr: set a thread name
Set a thread name for net conn_mgr, so that e.g. thread listings
within the shell are easier to look at.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2024-03-02 15:03:27 +01:00
Stephanos Ioannidis
1493271cf7 ci: doc-publish: Publish API coverage docs only when available
The API coverage documentation support was (relatively) recently introduced
in bad87f1684 and is not available in older
release branches.

Since doc-publish workflows always run in the default (main) branch
context, it is necessary to make the API coverage documentation handling
optional for the workflow runs that are triggered from older release
branches.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-02 06:26:00 -05:00
Christopher Friedt
b14f7d00ca doc: lts: update conf.py to point at 2.7.6 (LTS)
Point the configuration at 2.7.6 (LTS).

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-03-02 06:21:25 -05:00
Christopher Friedt
9e9d18d945 doc: release: update eol for ltsv2 to 2025-01-26
Update the documentation page to reflect the latest LTSv2
release and tentative end-of-life (EOL) date.

Note: the actual EOL date is still dependant on the
official LTSv3 release date and may be subject to change.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-03-01 18:00:17 -05:00
Martin Jäger
aef6588820 tests: subsys: lorawan: add clock_sync test
Checks all commands of the application-layer clock sync service in CI.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-03-01 17:35:04 +01:00
Martin Jäger
52da66ab00 west.yml: update loramac-node to fix double promotion warning
Fixes implicit double promotion in RegionCommon.c.

The calculation is done with float variables. However, the floor
function is meant for double variables. floorf should be used instead.

The implicit double promotion leads to a warning/error if compiled with
LLVM in CI.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-03-01 17:35:04 +01:00
Martin Jäger
bfcd887903 lorawan: services: clock_sync: apply changed periodicity immediately
The work item for re-synchronization should be rescheduled immediately
after the periodicity is changed.

Calculation of the periodicity incl. jitter is moved to a dedicated
function so that it can be re-used.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-03-01 17:35:04 +01:00
Martin Jäger
776c850896 lorawan: services: clock_sync: fix resync with multiple transmissions
Only the first resync transmission was sent out immediately because
the work item was rescheduled to the usual periodicity in the work
handler immediately after sending out the first transmission.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-03-01 17:35:04 +01:00
Martin Jäger
8bb9bb67db lorawan: add emulator for unit testing
The emulator can be used for unit testing of LoRaWAN services.

It provides interfaces to send arbitrary messages to the LoRaWAN
stack and receive the response through callbacks without using
actual LoRa hardware.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-03-01 17:35:04 +01:00
Emil Gydesen
248bee9b17 Bluetooth: BAP: Broadcast Source: Remove unused variable
Remove an unused variable in bt_bap_broadcast_source_reconfig
that causes compiler warnings.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-01 16:04:19 +01:00
Emil Gydesen
a7fe853436 tests: bsim: Bluetooth: Add broadcast sink cfg data validation
Add additional validation of the config data in the broadcast
sink test, both ensuring that the BASE is properly parsed,
that the BASE contains mandatory information and that the
stream get the right values copied.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-01 16:04:19 +01:00
Emil Gydesen
8a6c1d9bfa Bluetooth: BAP: Broadcast source: Add LTV validation for LC3 data
When using the LC3 codec, all codec configuration are LTV encoded.
The broadcast source did not properly validate this, and it also
uncovered a bug in the bsim test for broadcast sources.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-01 16:04:19 +01:00
Emil Gydesen
e08301b3df Bluetooth: BAP: Fix missing cfg data in stream->codec_cfg for BIS
The codec configuration data from the BIS in the BASE was not
properly copied to the stream->codec_cfg, and thus it only
contained the subgroup codec configuration values.

This commit fixes that by first copying the subgroup codec
configuration to the stream, and then setting or overwriting
any fields (if they exist).

This requires that each stream have their own codec configuration
struct allocated, so this will slightly increase memory usage.

This also adds verification of the SDU size from the BIGInfo
in the ISO receive callback.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-01 16:04:19 +01:00
Tomasz Bursztyka
a4af2ac8dc net/ip: Removing useless extra data capability in neighbors
This is not used by anyone, and is unlikely to be useful actually.
Helps to save 4 bytes for each instance of struct net_nbr also (removing
a 2 bytes attributes, which was anyway generating a 4bytes loss due to
structure misalignment).

Removing relevant useless functions related to it as well.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-01 15:33:53 +01:00
Tomasz Bursztyka
a3d7278588 net/ipv6: Enforce MLD to be selected if ND is enabled
As noted in net_if.c:net_if_ipv6_addr_add() IPv6 ND needs MLD.

It is not selected during test, as the combination of ND without DAD/MLD
breaks (something to study/fix further it seems).

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-01 15:33:53 +01:00
Tomasz Bursztyka
20ccc30273 net/if: Trivial comment fix about all-nodes
s/net_ipv6_mcast_join/net_ipv6_mld_join

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-01 15:33:53 +01:00
Tomasz Bursztyka
6d718ed480 net/mgmt: Trivial debug output fix about layer
Net MGMT uses layer identifiers that are meaningful only for itself, but
for users it requires a trivial operation to show the real layer value.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-01 15:33:53 +01:00
Tomasz Bursztyka
48216eff76 net/config: Initialize and add the net mgmt callback at the right time
Net MGMT mask should be fully configured first, prior to be used to
initialize and add the callback.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-01 15:33:53 +01:00
Tomasz Bursztyka
4d48f066a1 net/shell: Fixing a trivial error code
As for adding an ipv6 address, removing one should return the same error
code when the network interface is not found.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-01 15:33:53 +01:00
Tomasz Bursztyka
366402a0c7 net/shell: Net shell has no mandatory support for IPv6 MLD
It's an optional support, and it should not select it by default.
Improving information message in case such support is disabled.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-01 15:33:53 +01:00
Tomasz Bursztyka
af85c8a11d drivers/ieee802154: Use net_pkt API for reading data on upipe driver
Some legacy left overs.
Just simplifying how to read data into a net_pkt.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-01 15:33:53 +01:00
Tomasz Bursztyka
f2a1a519b4 net/trickle: Rearrange net_trickle structure for better alignement
Prior to this, 8 bytes were implicitely used for alignement. Which could
be fully avoided. Now no bytes are lost.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-01 15:33:53 +01:00
Mads Winther-Jensen
7310a42f92 Blutooth: controller: Implement ISO test mode for sync receiver
* Implement LL/IST/SNC/BV-01-C ISO Test Receive
* Refactor data structure for common code between CIS and BIS

Signed-off-by: Mads Winther-Jensen <mdwt@demant.com>
2024-03-01 15:29:36 +01:00
Emil Gydesen
0051731a41 samples: Bluetooth: Few fixups for USB data for broadcast audio sink
This commit does several but minor changes to the USB handling of
the broadcast audio sink, such as improving logging, removing a few
unncessary pieces of code and some minor performance improvements.

It removes some uses of the ring buffers, which effectively clears
up around 30KB of RAM, while also reducing how much memory is being
copied, improving performance.

Some of this removes the existing code for partial support for
stereo, but that code did not work in the first place. Proper stereo
support will be added in a later commit.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-01 14:12:10 +01:00
Pieter De Gendt
d2aaa65c14 samples: ipc: openamp_rsc_table: Add shell backend
Add an ipc shell to the open-amp resource table sample.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-01 14:10:24 +01:00
Pieter De Gendt
df7750f63a shell: backends: Add RPMsg shell backend
Introduce a backend for the Shell subsystem using a RPMsg endpoint.

This is useful for tooling & testing a remote processor from linux.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-01 14:10:24 +01:00
Carlo Caione
afa65e4bbe tests: kernel/cache: Do not invd the whole cache
That is dangerous and a big no-no. Remove it.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2024-03-01 14:08:34 +01:00
Pieter De Gendt
6c273f598f doc: services: serialization: Add Nanopb entry
Move part of the Nanopb sample documentation to a serialization entry
and add information on how to configure proto files.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-01 10:21:34 +00:00
Pieter De Gendt
44e8123da3 samples: modules: nanopb: Demonstrate skipping fields with Kconfig
Extend the nanopb sample with a Kconfig option to optionally include
a field in a protobuf message.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-01 10:21:34 +00:00
Pieter De Gendt
ad242b9db8 samples: modules: nanopb: Showcase configuring options
The latest version of nanopb allows for using kconfig symbols in files
with an "options.in" extension.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-01 10:21:34 +00:00
Pieter De Gendt
a3c430a01d manifest: optional: Update nanopb
Upmerge to latest nanopb revision

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-01 10:21:34 +00:00
Krzysztof Chruściński
466084bd8c dts: bindings: spi: Add memory-region to nrf-spis
Add memory-region to nordic,nrf-spis binding. This commit aligns SPIS
shim to utilize memory-region property. This optional property enables
user to specify placement of dma buffers in memory region. It is done
by assigning to memory-region property, phandle to node with
zephyr,memory-region and mimo-sram compatible.

When memory-region property is not specified for given device, buffer
is placed in default RAM region with other data.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-01 09:04:03 +01:00
Greter Raffael
1109027c55 drivers: display: ssd1306: Cleanup
- Removed unused variables from the data struct
- Set all members of capability struct in `ssd1306_get_capabilities`
  instead of zeroing it. This has the same effect but saves some bytes.
- Removed empty log

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-03-01 09:02:22 +01:00
Greter Raffael
cbec4753e1 drivers: display: ssd1306: Invert colors at runtime
This allows to invert the display at runtime using the function
`ssd1306_set_pixel_format`. The current format is stored in the data
struct.

Also adjusted `ssd1306_get_capabilities` to return both supported
formats and the current one.

From the ssd1306 doc: 'In normal display a RAM data of 1 indicates an
"ON" pixel while in inverse display a RAM data of 0 indicates an "ON"
pixel.' Thus `PIXEL_FORMAT_MONO01 == SSD1306_SET_NORMAL_DISPLAY`.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-03-01 09:02:22 +01:00
Agata Figiel
19610233e2 Bluetooth: Tester: Add TMAP tests support
Adding support for TMAP tests.

Signed-off-by: Agata Figiel <agata.figiel@codecoup.pl>
2024-03-01 09:01:37 +01:00
Henrik Brix Andersen
ff61a38436 doc: releases: migration guide: 3.7: removal of deprecated CAN DTS props
Mention removal of deprecated CAN controller devicetree properties.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-01 09:00:49 +01:00
Henrik Brix Andersen
0c13f3888d dts: bindings: can: remove deprecated properties for initial timing
Remove the deprecated properties for setting the initial timing parameters
of a CAN controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-01 09:00:49 +01:00
Volodymyr Shymanskyy
77fc3eaf06 drivers: ethernet: w5500: Add link status detection
Implemented link status detection using the W5500 built-in registers.
Added periodic link status polling, configurable via Kconfig.
Speeds up DHCPv4 from 9 seconds at best, to ~2 seconds after power-up.

Signed-off-by: Volodymyr Shymanskyy <vshymanskyi@gmail.com>
2024-03-01 08:59:31 +01:00
Maximilian Deubel
487a14c046 drivers: sensor: adxl367: fix trigger support
The adxl367_trigger.c file was missing a DT_COMPAT definition,
which resulted in the driver config structs being misaligned
between the driver source files. This is fixed here.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-03-01 08:58:50 +01:00
Dawid Niedzwiecki
424dffaf3b ec_host_cmd: shi_ite: add missing include
Add a missing include with ITE registers definitions.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-03-01 08:56:09 +01:00
Ioannis Karachalios
0abba58953 drivers: sensor: HS300x DF Command Update
By default, the sensor should be factory-programmed to operate
in Sleep Mode. A Measurement Request (MR) command is required
to exit the sensor from its sleep state. An MR command should
consist of the 7-bit address followed by an eighth bit set to
0 (write). However, many I2C controllers cannot generate merely
the address byte with no data. To overcome this limitation the
MR command should be followed by a dummy byte (zero value).

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-02-29 11:54:21 +00:00
Maochen Wang
eda7dd1460 net: zperf: Fix wrong throughput in long-duration traffic test
The zperf received or sent bytes length and duration are in 32bits,
if running long-duration zperf test more than 20min, the value will
overflow, and the test result is wrong. Change it to 64bits can fix
this issue.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-02-29 11:54:07 +00:00
Maochen Wang
e7444dcf42 net: zperf: Fix TOS option not working in zperf
When the zperf command is called with '-S' option which means IP_TOS
for IPv4 and IPV6_TCLASS for IPv6, an error is printed and the
setting does not work. The socket option handling was changed by
commit 77e522a5a243('net: context: Refactor option setters'), but the
callers of option setters were not changed. This causes the IP_TOS
or IPV6_TCLASS option failed to set. The fix is to use uint8_t to
store the value of the -S option.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-02-29 11:53:57 +00:00
Ruibin Chang
19a23d5190 bbram: fix bbram dead code issue
Clear the whole 192 bytes of bbram, before writing the magic value to it.
test pass "west twister -cviG -T tests/drivers/bbram/".

Fixes #69119

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2024-02-29 11:53:45 +00:00