Compare commits

...

2718 commits

Author SHA1 Message Date
Benjamin Cabé
f9e3b65d3a doc: porting_guide: fix ReStructuredText in Kconfig.plank
Using <  > in the kconfig:option role was causing the <_board> section
to be omitted from the rendered docs, and using the role was useless
anyway as the option name was not a real one.
Use the fancy :samp: role instead to achieve the same goal.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-21 08:20:10 +02:00
Benjamin Cabé
52a9e7014a doc: release-notes-3.7: misc typo/spelling fixes
Minor fixups (spelling mistakes, formatting issues, ...)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Benjamin Cabé
6fb55e1417 doc: release-notes-3.7: Improve release highlights section
Added links to relevant doc pages when appropriate
Added a mention about PTP
Added a mention about PSA Crypto

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Benjamin Cabé
d8ed0be0f7 doc: migration-guide-3.7: misc typo/spelling fixes
Cleaned up migration guide, mostly fixing single quotes being used
instead of double quotes plus some other minor spelling mistakes.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Benjamin Cabé
2f8cfc670a doc: migration-guide-3.7: fix rendering of Bluetooth HCI section
some bullet points had incorrect indent causing
the list to render as "definition list"

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Benjamin Cabé
68ec34cd2b llext: doc: add EDK acronym to header section
Add "EDK" acronym to help discoverability of EDK for folks
searching for that keyword

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Krzysztof Chruściński
452700b2f0 doc: releases: Add logging release notes
Add release notes for 3.7 for logging subsystem.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-20 10:26:01 +02:00
Chris Friedt
ccadcef020 doc: release-notes-3.7: add fpga release notes
Add fpga release notes for v3.7.0

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-20 10:25:44 +02:00
Chris Friedt
35a1fedb5d doc: release-notes-3.7: add posix api release notes
Add release notes outlining features added for v3.7.0 and bugs
fixed from prior releases.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-20 10:25:36 +02:00
Chris Friedt
9398092d53 doc: release-notes-3.7: fix indentation in posix deprecations
Fix indendtation in posix deprecations.

The top-level bullet was indented by an extra space, so remove
the space.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-20 10:25:36 +02:00
Flavio Ceolin
ec656ba492 doc: relnotes/3.7: Add info about CVE-2024-6137
Information about CVE-2024-6137 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-20 10:19:05 +02:00
Benjamin Cabé
84a04d1ef4 doc: release-notes-3.7: Add shields release notes
Contribute shields changelog for 3.7 release

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 10:18:54 +02:00
Benjamin Cabé
c25ee8bb38 doc: shields: make section IDs consistent with shield name
Convention is to name RST section the same as the shield

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 10:18:54 +02:00
Simon Guinot
5747cc5fbd doc: release-notes-3.7: fix LED release notes
This patch fixes two broken links in the LED strip release note.
:kconfig:option: cannot be used with removed Kconfig options. This
results in broken links. Let's use the code's inline markup delimiter
instead.

It also adds a missing link to the DT compatible of the IS31FL3194
controller.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-07-20 10:18:42 +02:00
Tom Burdick
5ef925aa6b doc: Fix typo in SPSC lockfree queue docs
SPSC was typoed as MPSC in the SPSC queue docs.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-20 10:18:28 +02:00
Benjamin Cabé
f0b901085e Revert "doc: develop: tools: Exclude webp images from PDF"
This reverts commit a156b619d4.
Now that Sphinx 7.4 is out, it is possible to use webp images
in the PDF documentation (they're converted to png).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 10:17:55 +02:00
Siddharth Chandrasekaran
d06e95c49b docs: release-notes: Add release entry for OSDP
Patch adds release notes for mgmt/osdp

Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2024-07-19 13:22:12 +02:00
Filip Kokosinski
fd970d4979 doc/releases/release-note-3.7: add notes for LiteX and Microchip RISC-V
This commits adds release notes for the 3.7 release for the following
maintenance areas:
* Microchip RISC-V Platforms
* LiteX Platforms

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-19 13:21:51 +02:00
Chris Friedt
ac52bd629d posix: deprecated: remove new options without deprecation
A few previously deprecated Kconfig options have not yet been
present for 1 release cycle and can (theoretically) just be
removed, without deprecation (see next commit).

* GETENTROPY
* POSIX_CONFSTR
* POSIX_ENV
* POSIX_SYSLOG

For dependency information, please see
https://docs.zephyrproject.org/3.6.0/kconfig.html#kconfig-search

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-18 16:28:02 -04:00
Declan Snyder
139a1cb803 doc: Make PR description a contributor expectation
Make a PR description an expectation/requirement for
pull requests submitted to the zephyr project.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 16:27:23 -04:00
Alberto Escolar Piedras
9831c69afa licensing: mention GPL licensed openocd file
Let's mention this GPL licensed file, even that it
is just a configuration file.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-18 12:37:55 -04:00
Piotr Kosycarz
b8ae3a416b scripts: ci: test_plan: use find_modules only when commits are provided
Current implementation will not work if comits were not provided.
ie. use case with list of changed files will fail as args.commits is None.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-07-18 12:34:10 -04:00
Simon Guinot
8d5a7ac141 doc: release-notes-3.7: complete LED release notes
This patch completes the release notes for LED and LED strip subsystems.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-07-18 12:32:46 -04:00
Dominik Ermel
65e679214e storage/stream_flash: Fix write_block_size too small
Fix for platforms with write-block-size >= 256 bytes.

Fixes #76029

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-07-18 12:32:35 -04:00
Emil Gydesen
9207def7da MAINTAINERS: Exclude BT classic from BT host
Treat Bluetooth Classic similar to Bluetooth Mesh and Audio by
not including it in the BT host, as most of the BT Host people
are LE-only.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-18 09:29:26 -04:00
Gerard Marull-Paretas
5bf395ba70 doc: doxygen: use full path for USE_MDFFILE_AS_MAINPAGE
Otherwise some recent Doxygen versions (1.11.0) generate a warning.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
941cc6d744 doc: doxygen: remove non-existing INPUT entry
sys/arch_interface.h does no longer exist.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
ce8b99b9f0 net: dns_sd: fix incorrect usage of code/endcode
`@code` needs file extension
`@endcode` doesn't take any arguments

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
bd921a1ca9 debug: symtab: move to os_services doxygen group
Instead of being a top-level group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
8a7fd88ed3 bindesc: add to os_services doxygen group
Instead of being a top-level group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
cf66fc2f2a modem: move to connectivity doxygen group
Instead of being a top-level group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
284bf28169 dt-bindings: sensor: icm42688: move to sensor_interface doxygen group
Instead of showing up as a top-level Doxygen group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
b792e63b0f debug: mipi_stp_decoder: move to os_services doxygen group
The API was placed under a non-existing group: coresight_apis. Place it
under os_services, as other debug/ APIs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
398dd4e505 drivers: tee: move interface to io_interfaces doxygen group
The TEE driver interface was put under a non-existing group: security.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
28a515982c lib: libc: errno: remove non-existing c_std_lib doxygen group
Some groups were being added to a non-existing group: c_std_lib

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Bjarki Arge Andreasen
0779712b40 docs: release-notes: Added GNSS release notes
Added GNSS release notes

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-18 09:23:19 -04:00
Andrzej Głąbek
31a6ac49a8 dts: bindings: Fix license identifiers in a few files provided by Nordic
Correct license identifiers in two files copied from internal Nordic
repositories that were not properly adjusted for Zephyr:
- dts/bindings/flash_controller/nordic,rram-controller.yaml (added in
  commit 3a8ee7df91)
- dts/bindings/misc/nordic,nrf-dppic-local.yaml (added in commit
  796d09d2a6)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-07-18 09:23:03 -04:00
Sylvio Alves
0a82c65d7b doc: release: add v3.7 notes for Espressif
Add notes for Espressif related changes.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-18 09:22:39 -04:00
cyliang tw
d8183d8e2d doc: release: Add Nuvoton Numaker notes for v3.7.0
Adds release notes for Nuvoton Numaker M2L31X SoC, drivers and board
introduced since the last release.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-07-18 06:48:45 -04:00
Anas Nashif
569dbd8e0f tests: cmake: fix test identifier
cmake is part of the build system area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-18 06:47:57 -04:00
Anas Nashif
84221f5219 tests: display: fix test identifier
Fixed test identifiers and places in correct area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-18 06:47:57 -04:00
Anas Nashif
366ddac79e tests: sensing: fix identifier
Fix identifier of test and add to MAINTAINERS file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-18 06:47:57 -04:00
Tom Burdick
6530c8914e docs: DMA Release Notes 3.7
Notable changes for DMA API in 3.7

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-18 09:32:44 +02:00
Swift Tian
45d39f3b7c samples: drivers: mspi: Update readme doc
Update mspi samples readme to match with code and release doc.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-07-18 09:32:29 +02:00
Swift Tian
86da7c31df doc: release-notes-3.7: Add MSPI API release notes
Add description for all the good work done to add the new MSPI API.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-07-18 09:32:29 +02:00
Swift Tian
fe3b65e33e drivers: mspi: Mark MSPI API version 0.1.0
Mark MSPI API as experimental with version 0.1.0 for release 3.7

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-07-18 09:32:29 +02:00
Aaron Massey
e7c8e932c3 doc: release-notes-3.7: fuel gauge notes
Add release notes for fuel gauge drivers.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2024-07-18 09:30:25 +02:00
Ryan Erickson
db256f9c3e doc: release-notes-3.7: Add Ezurio release notes
Laird Connectivity boards were rebranded to Ezurio.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-07-18 09:28:53 +02:00
Andy Ross
ea2f771b25 doc: release-notes-3.7: Kernel and mt8195 notes
Describe some stray changes of mine, two fixes and one new board/soc.

Signed-off-by: Andy Ross <andyross@google.com>
2024-07-18 09:28:44 +02:00
Johann Fischer
6a512e55a8 doc: release-notes-3.7: add release notes for USB
Add release notes for USB support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-18 09:25:30 +02:00
Declan Snyder
7936c20366 doc: migration-guide-3.7: NXP ENET MDIO change
Add migration guide info about the unit of
MDIO_NXP_ENET_TIMEOUT config changing.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 09:24:55 +02:00
Declan Snyder
a44fa0d827 doc: release-notes-3.7: Add MDIO release notes
Add release notes for MDIO drivers.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 09:24:55 +02:00
Declan Snyder
40607c362c doc: migration-guide-3.7: Add KSZ8081 DT changes
Add migration guide info for the DT property names of the
microchip,ksz8081 binding being changed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 09:24:55 +02:00
Declan Snyder
0c7a0162e8 doc: release-notes-3.7: Add ethernet release notes
Add ethernet driver release notes for 3.7 release.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 09:24:55 +02:00
Declan Snyder
4bc3fd272d doc: release-notes-3.7: Add ADC release notes
Add release notes for ADC driver class for 3.7 release.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-17 16:28:09 -04:00
Jamie McCrae
21ec7a1e64 doc: release: 3.7: Add notes on various changes
Adds notes on various changes that have been made to LED strip
and sensors

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-07-17 16:26:38 -04:00
Dominik Ermel
96adef1bf5 doc: release-notes-3.7: Add FS related notes
Notes on changes and improvements in FS and storage.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-07-17 16:26:15 -04:00
Tom Burdick
7f85b64ad6 docs: RTIO Release Notes for 3.7
Adds relevant release notes for RTIO subsystem for 3.7

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-17 16:25:55 -04:00
Dominik Ermel
1d6ada1182 doc: release-notes-3.7: Update DFU/MCUmgr release notes
Notes on additions and deprecations.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-07-17 16:25:32 -04:00
Jordan Yates
3e059e7292 sd: sd_spec: update trailing doxygen comments
While doxygen comments on subsequent lines with the `/*<` is technically
valid, it is not standard. It also confuses at a minimum the `vscode`
intellisense provider, which assigns the comments to the wrong enum
values.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-17 16:19:07 -04:00
Jordan Yates
3615e69428 sd: sd_spec: fix voltage enum docs
Fix voltage enum docs as there was a repeated comment at
`SD_OCR_VDD30_31FLAG`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-17 16:19:07 -04:00
Evgeniy Paltsev
5869926063 arc: nsim: vpx5: fix SoC config issue which leads to cmake error
After recent nsim SoCs & boards reorganization the SOC_SERIES_*
config is missing for vpx5 SoC which leads to cmake errors
when building against nsim/nsim_vpx5 configuration.

Fix that and align soc series name in soc.yml

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-17 16:18:40 -04:00
Anas Nashif
52e8b1058c doc: project: clarify WG member eligibility
clarify membership eligibility and need to be a project collaborator,
add references and link to them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-17 16:18:27 -04:00
Flavio Ceolin
90c50401ad doc: release-notes-3.7: Additional crypto note
This add some additional information about crypto TinyCrypt and
PSA Crypto.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-17 16:18:15 -04:00
Andrzej Głąbek
4250309cda doc: release: Add v3.7 notes for I2S, PWM and Nordic related stuff
Add notes for Nordic HAL and a few more entries for I2S and PWM drivers,
as well as for Nordic SoCs and boards.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-07-17 16:17:48 -04:00
Krzysztof Chruściński
e36357ccfe doc: releases: Add cbprintf release notes
Add release notes for 3.7 for cbprintf.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-17 16:17:31 -04:00
HaiLong Yang
cb17f5f5a4 doc: release-notes-3.7: gd32 notes
Some incorrect gd32 implement is fixed in this release.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2024-07-17 13:18:36 +02:00
Fyall Ian (CSS ICW SW MTO INT)
02acb4bc65 docs : Infineon Release Notes for Zephyr 3.7.
Add Infineon CYW20829 SoC and board information to release notes for
Zephry 3.7.

Signed-off-by: Fyall Ian (CSS ICW SW MTO INT) <ian.fyall@infineon.com>
2024-07-17 13:17:55 +02:00
Andries Kruithof
3828c8b86a Documentation: Bluetooth: audio: add table for profile dependencies
Added tables for showing the dependencies of profiles on other
profiles and services

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-07-17 08:25:51 +02:00
Daniel Leung
f7f1e222d2 doc: release-notes/3.7: bits about Intel Audio DSP
There is one externally visible change which affects
the process of booting the audio DSP from the host,
where dedicated registers are now used to communicate
the boot status instead of using arbitrary memory
locations. This affects the ACE family of audio DSP.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-17 08:25:15 +02:00
Daniel Leung
37adf88b2d doc: release-notes/3.7: a word about thread stack size
The declaration of statically allocation stacks have been
updated to use another macro, which also unifies both
single stack declaration and array stack declaration.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-17 08:25:15 +02:00
Daniel Leung
e547d356b0 doc: release-notes/3.7: on demand paging
Adds some bits on demand paging and eviction algorithm as
the logic of NRU has changed, and LRU introduced.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-17 08:25:15 +02:00
Wilfried Chauveau
2418d229e9 doc: releases: add some Arm entries to v3.7 notes
This adds a few noticeable entries for Arm architectures.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-07-16 16:52:25 -04:00
TOKITA Hiroshi
7243ea9f4b doc: release-notes-3.7: Update LED Strip notes
Add an explanation for the ``CONFIG_WS2812_STRIP_DRIVER`` deletion.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-16 16:51:23 -04:00
Jason Kridner
b8c1881416 doc: release-notes-3.7: Beagle notes
Add notes on updates to support for BeagleBoard.org boards.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
2024-07-16 16:49:42 -04:00
Tom Burdick
9f85a70a04 doc: Revamp sensor docs
Docs now start at a high level, discussing sensors, attributes,
channels, and reading data from them.

Followed by more detailed usage guides in how to solve common problems
sensor users may run into.

Additionally renames the sensor_api sphinx tag to sensor

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-16 16:49:24 -04:00
Tom Burdick
2979cf5efb doc: Relabel sensing doc
The sensing_api label wasn't really connected as a whole guide to
sensing. Relabel sensing.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-16 16:49:24 -04:00
Tom Burdick
3a1865ebeb doc: Relabel rtio section
It's more than just an API doc and the label was longer than needed,
shorten to rtio as a doc label.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-16 16:49:24 -04:00
Alberto Escolar Piedras
c346c77a2a soc/espressif/esp32c6: Do not set HAS_PM or HAS_POWEROFF
The source files required for this features are not present
in the tree for this SOC.
So if CONFIG_PM or CONFIG_POWEROFF are enabled, there would
be a cmake failure.

Let's just indicate these features are not supported in
kconfig.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-16 12:53:09 -04:00
Declan Snyder
64b2c263f2 MAINTAINERS: Add kconfig preprocessor doc to DT
Since the kconfig preprocessor functions are under the devicetree
maintainance area, the documentation for them probably should be too.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-16 18:17:34 +02:00
Declan Snyder
42f77ef836 doc: kconfig: Add missing preprocessor functions
Add preprocessor functions missing from the documentation list.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-16 18:17:34 +02:00
Jamie McCrae
3418b53173 doc: release: 3.7: Add notes on build system changes
Adds details of fixes in the build system area

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-16 18:17:08 +02:00
Rodrigo Peixoto
78e10ddb92 doc: release-notes-3.7: additions for zbus
Add zbus changes on release notes for Zephyr v3.7.0.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-07-16 18:16:37 +02:00
Flavio Ceolin
596ef0a519 doc: release-notes-3.7: Power management notes
This adds some bits about additions and improvements on Power
Management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-16 10:22:12 +02:00
Andy Sinclair
7f5d2d7617 doc: release-notes: mfd and regulator release notes
Added release notes for mfd and regulators

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-07-16 10:19:26 +02:00
Maureen Helm
49d0382016 doc: release: Add sensor notes for v3.7.0
Adds release notes for notable changes and new sensor drivers introduced
since the last release. Organizes changes by sensor vendor to reflect
similar changes made in the tree.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-07-16 10:19:16 +02:00
Maureen Helm
e1f5b6a51f doc: release: Add ADI notes for v3.7.0
Adds release notes for new ADI SoCs, drivers, and boards introduced
since the last release.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-07-16 10:19:16 +02:00
Yannis Damigos
d2a4522250 tests: uart_elementary: Correct typos
Correct typos in uart_elementary test

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-07-15 15:15:36 -04:00
Gerard Marull-Paretas
0cfb8a4d10 doc: toolchains: zephyr: remove mentions to M1
Apple has released other processors, e.g. M2 or M3, so Apple Silicon is no
longer a synonym of M1.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-15 15:12:48 -04:00
Yves Vandervennet
79caaee2c7 doc: release: 3.7: NXP's contributions
updated release notes and migration guide

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-07-15 15:12:32 -04:00
Tomi Fontanilles
50c03e9bbe modules: mbedtls: fix MBEDTLS_PSA_P256M_DRIVER_RAW Kconfig option
Make it depend on MBEDTLS_PSA_P256M_DRIVER_ENABLED instead of
selecting it.

This fixes the build of
tests/crypto/secp256r1/crypto.secp256r1.p256-m_raw on filtered-out
platforms since PR #75441 (83cd9f5a01).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-15 10:36:58 -04:00
Alberto Escolar Piedras
fd0e46506f release: Zephyr v3.7.0-rc3
Set the version to v3.7.0-rc3

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-13 14:07:16 -04:00
Anas Nashif
74a7502fa2 west: update altera hal
Do not build HAL uart driver, use in-tree driver instead.

Fixes #75837

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-13 10:47:22 -04:00
Luis Ubieda
7d9ff8bcb4 rtio: workq: Initialize Work item before using it
As the items come from the memory slab, their initialization state
can't be guaranteed. This is causing some devices triggering an assert
in p4wq where the item's thread is not null (not zero).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-13 10:27:58 -04:00
Jonathan Rico
792ae68165 Bluetooth: host: Use correct user_data size for hci_rx_pool
`struct acl_data` is used even when Host flow control is not enabled.
It is written to through the `acl(buf)` accessor in `conn.c:hci_acl()`.

Hopefully no netbufs were harmed by that :/

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-13 10:25:31 -04:00
Tomi Fontanilles
2e012668e9 modules: tf-m: nordic: fix unused CMake variable warning
Follow-up to d830446c91 that removed
the use of ${ZEPHYR_BASE}.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-12 20:39:26 -04:00
Tomi Fontanilles
fe69a406cd modules: tf-m: fix innocuous build warning
This removes the TF-M CMake warning "Actual TF-M version is not
available from Git repository.  Settled to v2.1.0" which always
got triggered because Zephyr's TF-M repo does not have the upstream
Git tags.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-12 20:39:26 -04:00
Jordan Yates
46167e3234 samples: tfm: add build_config sample
Add a sample that can test various TF-M build options. For now we only
test `CONFIG_TFM_BL2=n` and `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-12 20:38:49 -04:00
Jordan Yates
1bbfbef88d modules: tfm: fix TFM_MCUBOOT_IMAGE_NUMBER == 1
Fix builds with `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`. The merged binary
should be signed with the same argumements as a secure build, not a
non-secure build, except with a different layout file generated by the
TF-M build system.

Fixes #68345.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-12 20:38:49 -04:00
Yong Cong Sin
0155c6f87f lib/libc: minimal: remove deprecated headers
This headers have been deprecated for > 2 releases,
remove them.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-12 20:38:20 -04:00
Erik Tamlin
c2e0c43559 manifest: update percepio
Update the percepio module to use TraceRecorder v4.9.2

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
2024-07-12 20:37:52 -04:00
Stefan Schwendeler
5feb028512 modules: hal_nordic: defines NRF_CONFIG_NFCT_PINS_AS_GPIOS for nRF54L15
Currently, the NFCT pins cannot be used as GPIOs on the nRF54L15 MCU
because the Nordic HAL for this MCU uses the new upcoming `NRF_CONFIG_`
style configuration settings for this MCU.
To support all nRF5x MCUs, the old configuration is still required
because Nordic didn't update their MDK entirely to the new style.

Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
2024-07-12 16:11:44 -04:00
Gerard Marull-Paretas
092fc2c706 doc: release-notes: add device model changes
Most notable changes are DT metadata and deferred initialization.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Gerard Marull-Paretas
57b08634bc doc: release-notes: add pinctrl relevant changes
List new drivers and relevant updates.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Gerard Marull-Paretas
5e082fe855 doc: release-notes: add nRF54H20 changes
- PDK to DK migration
- PPR now runs from RAM, there's a xip variant.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Gerard Marull-Paretas
1c8e46bb23 doc: release-notes: group all board additions/changes
Since the introduction of HWMv2, boards can have multi-arch SoCs (e.g.
nRF54), so changes to these kind of boards do not have a clear place
now. Simply group all of them together.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Gerard Marull-Paretas
ac618678c7 boards: nrf54h20: extend and fix documentation
- Add PPR core information
- Fix flash/debugging information (nrfutil required now, debugging
  limited to app/radio core using JLink)

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Anas Nashif
4139f2ed60 MAINTAINERS: add bugs scripts to CI
Add script to an area and ignore in twister CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-12 16:10:13 -04:00
Anas Nashif
47aa08026f ci: scripts: do not count PRs labeled as bug in snapshot
Doing duplicates count of bugs, a PR fixing a bug is not a bug report.
Many PRs fixing an open bug are labeled with 'bug' and thuse are being
counted twice.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-12 16:10:13 -04:00
Tavish Naruka
ca02651f01 toolchain: gcc: fix SECTION_DATA_PROLOGUE for XIP
Current if CONFIG_XIP is enabled, then ALIGN_WITH_INPUT and the align
argument to SECTION_DATA_PROLOGUE are set together, and that is not a
valid option combination; if ALIGN_WITH_INPUT is present, then the
section's LMA alignment is inherited from the previous section, and that
cannot be combined with another alignment option.

The background for this line is in the following commit:
6b3c5e8bb2

Additionally, this is the documentation from ld:

(from https://sourceware.org/binutils/docs/ld/Forced-Output-Alignment.html)

> 3.6.8.3 Forced Output Alignment
>
> You can increase an output section’s alignment by using ALIGN. As an
> alternative you can enforce that the difference between the VMA and
> LMA remains intact throughout this output section with the
> ALIGN_WITH_INPUT attribute.

Signed-off-by: Tavish Naruka <t-naruka@ispace-inc.com>
2024-07-12 16:09:36 -04:00
Jimmy Zheng
7802fffc7f drivers: interrupt_controller: nuclei_eclic: do not modifiy trap entry
RISC-V trap entry is handled in soc/common/riscv-privileged/vector.S.
Remove the redundant modification in CLIC driver.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-12 16:09:22 -04:00
Jimmy Zheng
f989ed949a driver: interrupt_controller: nuclei_eclic: fixed interrupt level
CLIC should be the first level interrupt controller because it replaces
the basic RISC-V local interrupt.
The interrupt level in CLIC controls preemption between IRQs, rather than
specifying the number of nested interrupt controllers.
Removed CONFIG_MULTI_LEVEL_INTERRUPTS and the incorrect interrupt level.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-12 16:09:22 -04:00
Bjarki Arge Andreasen
ee69e9fadf drivers: sensor: voltage_divider: revert patch
A patch was added to the voltage divider to handle an erroneous
negative voltage reading for the nrfx_saadc which could return
negative voltages even though the ADC mode was single ended.

This has now been patched in the ADC driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-12 19:50:27 +02:00
Bjarki Arge Andreasen
940daa615a doc: release notes: add adc_nrfx_saadc patch note.
Add note describing patch which fixes issue which allowed negative
readings in single-ended mode.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-12 19:50:27 +02:00
Bjarki Arge Andreasen
bb2f49fb51 drivers: adc: adc_nrfx_saadc: remove redundant code
Remove redundant copy of error code and 0 initialization of static
m_data struct.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-12 19:50:27 +02:00
Bjarki Arge Andreasen
13658a6687 drivers: adc: adc_nrfx_saadc: Patch neg single ended readings
The NRF SAADC produces negative values in single ended mode if the
positive input is below 0V (ground). This behavior does not match
the ADC device driver API, which states that in single ended mode,
the readings must be positive [0 .. 2^resolution - 1].

This commit extends the adc_nrfx_saadc device driver to track which
channels in a sequence are configured to be single ended, to then
corrects negative readings for these channels to 0.

This patch only works if the ADC resolution is lower than the sample
bit size. This is the case for 8, 10, 12 and 14 bit resolutions for
the nRF 52, 53 and 91 series which store readings in a int16_t.

The nRF 54H and 54L series store 8-bit resolution readings in a 8-bit
sample size. A check has been added to start_read() to prevent single
ended mode readings if the resolution is 8-bit for these platforms.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-12 19:50:27 +02:00
Jamie McCrae
7f4200494c doc: release: 3.7: Add additional notes on MCUmgr changes
Adds a note about a fix for unaligned memory access

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-12 19:49:54 +02:00
Dat Nguyen Duy
4884262088 drivers: intc: eirq_nxp_s32: allow the same callback to be set
Allow setting the same callback as long as the same data is used

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-07-12 09:39:12 -04:00
Johann Fischer
c5b93effe1 drivers: usb_dc_rpi_pico: set AVAILABLE bit separately
The DPSRAM ports can run at different clocks, this is the default
configuration, follow the advice in the datasheet and wait 3 nop
instructions before setting the AVAILABLE bit.

It can be observed that when the controller is continuously sending data
to the host, it rarely has a 0-byte transaction instead of a short
packet. The reason for this is not easy to find, it also seems to depend
on the runtime of individual components. This may fix the problem, but
there is no sure proof that this is the solution.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-12 09:38:30 -04:00
Evgeniy Paltsev
c2c5f108e9 toolchain: arcmwdt: don't set STDC_LIB_EXT1 macro in case of minimal libc
Don't provide __STDC_LIB_EXT1__ macro (Extensions to the C Library,
Part 1: Bounds-checking interfaces) if we use minimal libc - as we don't
have functions from this extension implemented in minimal libc.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-12 09:34:58 -04:00
Pisit Sawangvonganan
10f495e0fd net: lib: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/lib` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-12 09:33:20 -04:00
Pisit Sawangvonganan
d2af60687e net: l2: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/l2` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-12 09:33:20 -04:00
Pisit Sawangvonganan
d1781da2ba net: lwm2m: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/lib/lwm2m` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-12 09:33:20 -04:00
Anas Nashif
ec71e04cdb samples: env_posix: fix regex in sample test
ALERT is empty, so do not try to match any content.

Fixes #72858

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-12 09:18:56 -04:00
Gerard Marull-Paretas
b5e5aa3335 samples: ipc: icmsg: fix unbalanced nRF53 cpunet enable calls
It looks like sample called nrf53_cpunet_enable(false) before any
nrf53_cpunet_enable(true), resulting in asserts due to unbalanced calls
(error propagated from onoff service).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 09:15:06 -04:00
Johann Fischer
108c52c244 usb: device_next: fix typo in property name
Use rx-fifo-size to set RX ringbuffer size.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-12 09:13:13 -04:00
Yong Cong Sin
269729a5db net: socket: fix sys/_timespec.h not found error
When building `native_sim` with CPP & POSIX enabled, the
POSIX's `unistd.h` header causes a compilation error as
`sys/_timespec.h` doesn't exist in host gcc lib.

Remove the 'zephyr/posix' prefix, and rely on
`CMakeLists.txt`s to do the routing accordingly:
- zephyr/lib/CMakeLists.txt:L11
- zephyr/lib/posix/options/CMakeLists.txt:L8

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-12 09:12:58 -04:00
Liam Beguin
67544a6d2d spi: shell: add missing newline character
Add missing newline in help string.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2024-07-12 09:12:47 -04:00
Krzysztof Chruściński
60911a6d5e tests: drivers: spi: spi_controller_peripheral: Fix nrf54h20_cpurad
Add more memory to dma region for cpurad as otherwise it fails
during initialization due to not enough memory for dmm heap.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-12 09:12:35 -04:00
Lukasz Stepnicki
f71d848c14 modules: hal_nordic: nrfs: fix buffer used in nrfs send
In function nrfs_backend_send_work tx_data buffer was
used in function ipc_service_send instead of
data_to_send. This is fixed and also tx_data and rx_data
are moved to coresponding functions preventing such
issues in future.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-07-12 09:12:25 -04:00
Simon Hein
2479fdcac1 kernel: timer: Add missing parameter description
Add the missing parameter description for the timer API
function k_timer_remaining_ticks.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-07-12 09:12:03 -04:00
Simon Guinot
740d7f735e drivers: serial: lpc11u6x: allow to configure data polarity
This patch adds support for the rx-invert and tx-invert device-tree
properties to the uart_lpc11u6x driver for USARTs 1, 2, 3 and 4.

Note that this feature is not supported by USART 0.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-07-12 06:29:56 -04:00
Marcio Ribeiro
3416f9ab47 drivers: adc: esp32: fix invalid width mask and calibration
Fixed WIDTH_MASK invalid values and use HW calibration.

Fixes #72983
Fixes #73798
Fixes #73400

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-07-12 06:25:53 -04:00
Emil Gydesen
eaa2bf0ab7 Bluetooth: VOCS: Add missing documentation in vocs.h
Add missing documentation for some defintions in vocs.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
e647773d01 Bluetooth: VCP: Add missing documentation in vcp.h
Add missing documentation for some defintions in vcp.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
14caa79c45 Bluetooth: TMAP: Add missing documentation in tmap.h
Add missing documentation for some defintions in tmap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
1751a7f190 Bluetooth: TBS: Add missing documentation in tbs.h
Add missing documentation for some defintions in tbs.h
Moved some internal definitions to tbs_internal.h

Removed invalid TBS technology BT_TBS_TECHNOLOGY_IP that
doesn't exist.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
e99d7a0002 Bluetooth: PBP: Add missing documentation in pbp.h
Add missing documentation for some defintions in pbp.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
5023c374e3 Bluetooth: PACS: Add missing documentation in pacs.h
Add missing documentation for some defintions in pacs.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
f711fd7f12 Bluetooth: MICP: Add missing documentation in micp.h
Add missing documentation for some defintions in micp.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
d2e6ed8e5c Bluetooth: Media Proxy: Add missing documentation in media_proxy.h
Add missing documentation for some defintions in media_proxy.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
b0f2d04743 Bluetooth: MCS: Add missing documentation in mcs.h
Add missing documentation for some defintions in mcs.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
8679dcd5ba Bluetooth: MCC: Add missing documentation in mcc.h
Add missing documentation for some defintions in mcc.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
909cb25c88 Bluetooth: LC3: Format documentation in lc3.h
Format documentation for some defintions in lc3.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
2f1d0529d0 Bluetooth: HAS: Add missing documentation in has.h
Add missing documentation for some defintions in has.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
032c5b69ef Bluetooth: GMAP: Add missing documentation in gmap.h
Add missing documentation for some defintions in gmap.h
Also added missing C++ guards, group and version.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
2d9cb00ba0 Bluetooth: GMAP: Add missing documentation in gmap_lc3_presets.h
Add missing documentation for some defintions in gmap_lc3_presets.h
Also added missing C++ guards, group and version.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
4926db6161 Bluetooth: CSIP: Add missing documentation in csip.h
Add missing documentation for some defintions in csip.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
f7930a2f7e Bluetooth: CAP: Add missing documentation in cap.h
Add missing documentation for some defintions in cap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
2d94be4656 Bluetooth: BAP: Add missing documentation in bap.h
Add missing documentation for some defintions in bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
1724ad2f08 Bluetooth: BAP: Add missing documentation in bap_lc3_presets.h
Add missing documentation for some defintions in bap_lc3_presets.h
Also added missing C++ guards, group and version.
Fixes some formatting.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
d92f79d3a1 Bluetooth: Audio: Add missing documentation in audio.h
Add missing documentation for some defintions in audio.h
Makes formatting and placement of @brief consistent.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
84f5d01bb0 Bluetooth: AICS: Add missing documentation in aics.h
Add missing documentation for some defintions in aics.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Gerard Marull-Paretas
e41ab1ab14 samples: drivers: mbox: fix regex when using channels 0/1
The sample will print a ping-pong message indefinitely on both,
application (or main) core and remote core. When twister is run in
device testing mode, only one terminal is evaluated (application), so
the regex just needs to account for the application core output, not
remote.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 06:23:52 -04:00
Krzysztof Chruściński
67403ed73d logging: Do not strip strings when LOG_OUTPUT is used
When CONFIG_LOG_OUTPUT is enabled that indicates that logging
strings are used by the runtime logging processing so they should
not be stripped from the binary.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-12 06:23:09 -04:00
Evgeniy Paltsev
021b5cd38f toolchain: arcmwdt: always enable TLS in case of CPP
The CPP in ARC MWDT toolchain relies on TLS (THREAD_LOCAL_STORAGE)
so enable it if CPP is selected.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-12 06:22:13 -04:00
Fabrice DJIATSA
8408acd970 Boards: st: nucleo_f303re: fix documentation information
Fix Flash size memory  for nucleo_f303re board

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-07-12 06:21:09 -04:00
Fabrice DJIATSA
e87d3ef505 Boards: st: nucleo_f302r8: fix documentation information
Fix Flash size memory for nucleo_f302r8 board

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-07-12 06:21:09 -04:00
Fabrice DJIATSA
06a4cd6b2a Boards: st: nucleo_f303k8: fix documentation information
Fix Flash size and SPI1 MISO pins for nucleo_f303k8 board

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-07-12 06:21:09 -04:00
Luis Ubieda
9c516db69c sensor: coverity-fix: Simplify unsigned comparison
- VEML7700 - Coverity CID 363733, GH: #74759.
- VEML7700 - CID 363719, GH: #74755.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-12 05:56:30 -04:00
Ioannis Damigos
548d333c2a MAINTAINERS: Update Renesas RA Platforms and hal_renesas maintainers
Added to Renesas RA Platforms:

maintainers -> KhiemNguyenT
collaborators ->  duynguyenxa, thaoluonguw

Added to hal_renesas:

collaborators -> soburi, duynguyenxa, thaoluonguw

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-07-12 05:56:09 -04:00
Jimmy Zheng
ba263da94e arch: riscv: fix exception_depth with RISCV_ALWAYS_SWITCH_THROUGH_ECALL
When 'arch_switch()' switches though Ecall, 'exception_depth' is
incorrectly added to the next thread because the current thread is updated
before arch_switch().
Add 'exception_depth' back to the previous thread when Ecall is called from
'arch_switch()'.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-12 05:55:26 -04:00
Evgeniy Paltsev
89f3d220d4 tests: posix: headers: fix build error when minimal libc is used
The `tests/posix/headers/portability.posix.headers.without_posix_api`
test fails to build in case of toolchain which uses minimal libc by
default (for example ARC MWDT toolchain).

It can be easily fixed by providing sighal.h handler in minimal libc

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-12 05:49:28 -04:00
Fin Maaß
de82190e13 drivers: clock_control: litex: remove redundant entry
remove litex,sys-clock-frequency from litex,clk,
because we already define that in the clock-frequency of cpu0.
This can be accessed via
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-12 05:49:01 -04:00
Guennadi Liakhovetski
46b356a6b0 intel-adsp: fix ACE power-off assembly
A recent commit fb53d2ef8d ("ace: power: replace pseudo-assembly
movi") contained a bug: the Xtensa "movi" assembly instruction must
be written with the immediate argument already shifted left by 8, the
compiler doesn't do that automatically. This still somehow worked on
MTL but failed on LNL. Fix both occurrences.

Fixes: #75700
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-12 05:48:20 -04:00
Anas Nashif
1e20f58c17 ztest: doc: fix doxygen for ztest
Many ztest macros were not indexed correctly as part of the ztest_test
group, for example ZTEST_SUITE was completely missing in the
documentation.

In addition, document a few macros that did not have any documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 18:58:45 -04:00
Anas Nashif
b485355580 MAINTAINERS: add label/tests to OpenAMP
add missing label for OpenAMP and add related samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 18:53:49 -04:00
Anas Nashif
47f327f081 tests: add openamp tags to openamp samples
tag samples with openamp.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 18:53:49 -04:00
Anas Nashif
ebf5ac310f MAINTAINERS: disambiguate ARM area
Stop using "area: ARM" for everything related to ARM, use specific labels
instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 18:53:28 -04:00
Fabio Baltieri
c05500fc6c ci: compliance: add a PR description check step
Add an extra workflow step to block PRs with an empty description so that
these gets flagged automatically and reviewers don't have to ask for it.

Add a message in the actual fail step as well so it's easier for the
user to figure out what went wrong, even in the existing compliance
check case.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-11 18:37:09 -04:00
Ben Marsh
74c871dce2 build: Prefix missed generated syscall includes
PR #63973 namespaced generated headers with zephyr/, including generated
syscall headers.

Since then, some new generated syscall header includes have been added
without the zephyr/ prefix, breaking builds when
CONFIG_LEGACY_GENERATED_INCLUDE_PATH is disabled.

This commit adds the zephyr/ prefix to includes for generated syscall
headers where it has been missed.

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2024-07-11 18:24:58 -04:00
Nicolas Pitre
8d485d4a24 riscv: pmp: actually activate stack overflow protection during boot
Before this, stack protection would be effective only after switching to
the first thread.

Even before the first thread is created, the kernel init code uses the
IRQ stack to set things up. Let's make sure this is safeguarded as well.

This also fixes the incompatibility between CONFIG_RISCV_PMP and
CONFIG_RISCV_ALWAYS_SWITCH_THROUGH_ECALL, the later needing an exception
call to switch to the first thread and exception code assuming stack
guard is already set up in the PMP.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-07-11 18:22:08 -04:00
Nicolas Pitre
0207c7ff73 riscv: pmp: abstract the MPRV catchall entry and its QEMU workaround
This will be needed at more than one location.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-07-11 18:22:08 -04:00
Filip Kokosinski
6138a11acc boards: use lowercase in the renesas,r7fa4m1ab3cfm compatible string
This commit unifies the `renesas,r7fa4m1ab3cfm` compatible string used in
various platforms by making it lowercase for the `arduino_uno_r4` target.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-11 18:21:53 -04:00
Sylvio Alves
0c5d5f796f soc: espressif: disable RNG entropy before app runs
SARADC was kept enabled to feed RNG entropy peripheral,
adding instability to Wi-Fi connection. So we disable it
before app runs as RNG driver already got initial entropy values.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-11 16:19:55 -04:00
Sylvio Alves
43a559080b soc: esp32s2: fix wifi clock gate
ESP32-S2 Wi-Fi clock is not initialized properly, causing
instability when scanning or connecting to a SSID.

Fixes #74899
Fixes #74417

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-11 16:19:55 -04:00
Evgeniy Paltsev
b4f49bf5fc tests: posix: env: fix failure in case toolchain with minimal libc
In case of minimal libc we have CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE = 0
by default. Some toolchains uses minimal libc by default (for example
ARC MWDT toolchain). Let's set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE
explicitly so we can allocate memory for environment variables.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-11 13:24:02 -04:00
Evgeniy Paltsev
67efbf3d57 samples: posix: env: fix failure in case of minimal libc is used
In case of minimal libc we have CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE = 0
by default. Let's set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE explicitly
so we can allocate memory for environment variables.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-11 13:24:02 -04:00
Rubin Gerritsen
85eadcfddc Bluetooth: Mark bt_<type>_err_to_str() APIs experimental
It was pointed out in a future PR that they should have
a corresponding experimental Kconfig entry.

See PR #73795.

This updates the APIs added in PR #73826 and PR #74295.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-11 13:11:59 -04:00
Robert Lubos
5251533f97 net: lib: http_server: Respect Connection close header
In case no "Connection: close" header is present in the request, the
server should keep the connection open for the client. Hence, after
serving a request, we need to check if the header was present (the
parser sets a flag for it), and only close the connection immediately,
if the client requested it. In case the client remains silent, the
connection will be closed anyway after the inactivity timer kicks in.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:11:04 -04:00
Robert Lubos
94b1f443ac net: sockets: Allocate FD after receiving connection in accept()
Allocating FD before pulling the new connection from the fifo can lead
to busy looping in certain cases. If the application keeps calling
accept() on a listening socket after failing to allocate new FD for the
incoming connection, it'll start busy looping, as will report POLLIN in
such case (as the new connection is still on the queue), but it'll
consistently fail with ENFILE.

This can be avoided by trying to allocate new file descriptor only after
new connection has been pulled from the fifo. That way, if we fail to
allocate the file descriptor, the incoming connection will be dropped,
which seems correct given we don't have enough resources to service it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:11:04 -04:00
Robert Lubos
0e601d4103 net: lib: http_server: Add restart delay
In case there were active connections when restarting the server, it
can't be re-initialized immediately, as binding to the server port will
fail. We need to wait for the TCP connection teardown, as even with
REUSEADDR socket option set, binding will fail if the sockets are not in
TCP TIMED_WAIT state (i. e. connections are active).

Because of this, add a configurable delay when restarting the server.
Additionally, make server initialization failures non-fatal, i. e. try
to restart the server again after the delay if the initialization fails.
It's been observed with Chromium, that it tends to keep connections open
even after closing them on the server side (socket lingers in FIN_WAIT_2
state), so the server re-initialization may fail even with delay, so
it's beneficial in  such case to keep retrying the server
re-initialization.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:11:04 -04:00
Robert Lubos
fc10a94683 net: lib: http_server: Close sockets on server core errors
In case of fatal errors (during poll() or when handling listening
socket), the server operation is restarted. It was missed however, that
sockets opened for the server should be closed in such case.

Additionally, in case there were active client connections, it's needed
to cleanup related resources, otherwise running timers may trigger a
crash.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:11:04 -04:00
Evgeniy Paltsev
52fabbfda0 linker: fix shared interrupts for MWDT toolchain
MWDT toolchain adds additional suffix to sections name in case of
ffunction-sections / fdata-sections are enabled.

Let's pick a single set of rules and syntax that work for all
toolchain.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-07-11 13:10:45 -04:00
Evgeniy Paltsev
d698c32e0e linker: fix device deferred init for MWDT toolchain
MWDT toolchain adds additional suffix to sections name in case of
ffunction-sections / fdata-sections are enabled.

Let's pick a single set of rules and syntax that work for all
toolchain.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-11 13:10:45 -04:00
Ederson de Souza
6a1d9877ef cmake: Add LL_EXTENSION_BUILD to EDK flags
Since f3e5d9db3dca2421bd5b4015fbc270d3972376bd, one needs to define
`LL_EXTENSION_BUILD` to enable exporting symbols from extensions. That
patch added that for `add_llext_target`, but missed it for the EDK, thus
breaking it. This patch fixes that.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-07-11 13:10:27 -04:00
Robert Lubos
be7175351a net: lib: http_server: Fix HTTP1 POST request handling
In previous batch of fixes it was overlooked that streams are
HTTP2-specific concept. While for HTTP2 we need to track headers reply
state for each individual stream, at HTTP1 level we need to track this
at the client level. Hence, reintroduce respective flags to track
headers reply state, but only for HTTP1.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:10:09 -04:00
Anas Nashif
83bd3658c3 tests: do not get ZEPHYR_BASE from ENV
find_package() already deals with finding ZEPHYR_BASE, so do not rely on
it being set in ENV, use the variable directly adter find_package() was
called.

Fixes #75387

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 13:09:53 -04:00
Robert Lubos
40d55c68b8 doc: release-notes-3.7: Update networking release notes
Include latest changes/fixes in the networking release notes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 10:19:03 -04:00
Luca Burelli
7ba86312e7 doc: llext: improve documentation
This patch improves the documentation for the llext subsystem, adding
information onhow to configure the llext subsystem, how to build
extensions using the Zephyr build system, and how to load and use these
in a Zephyr application.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-11 16:17:52 +02:00
Luca Burelli
c444fdb581 doc: llext: split existing text into separate files
The existing index.rst file contains a mix of information about the
llext subsystem and the LLEXT Extension Development Kit (EDK). This
commit splits the existing text into two separate files, index.rst and
build.rst, as a first step on improving the documentation.

No change in text is done in this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-11 16:17:52 +02:00
Luca Burelli
f257c997b5 doc: llext: improve Doxygen comments
Review and improve comments in source code to better describe the API
and the functionality provided by the llext library.

No actual code changes are performed in this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-11 16:17:52 +02:00
Dmitrii Golovanov
5d80e253b7 ztest: shell: Fix memory leaks processing test arguments
Fix Ztest shell memory leaks when it process test arguments.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-07-11 16:16:28 +02:00
Mark Wang
64f38fc348 Bluetooth: A2DP: Fix mistake parameter
After configuration, the stream instance is valid and stream's
local_ep valid. bt_a2dp_stream_establish's parameter is stream
too. So in bt_a2dp_stream_establish, stream->local_ep should be
used to tell lower level (AVDTP) the sep.
set_config_param is used by copy-paste mistake.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-11 16:16:09 +02:00
Lyle Zhu
f3a1cf2782 Bluetooth: SDP: Fix stack override issue
Check the remaining space of the local variable
`filter` to avoid stack override issue.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-11 16:15:53 +02:00
Brett Witherspoon
c76818d949 dts: bindings: dac: ad569x: Remove unused properties
These properties are not used by the driver at all, but are
inconveniently marked as required. Lets just remove them.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-11 16:15:28 +02:00
alperen sener
8382fea5b3 test: bluetooth: Correct profile names MBT and DFU
Profile names MBT and DFU are updated as MBTM and DFUM respectively,
according to TCRL 2024-1.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-07-11 16:15:10 +02:00
Chris Friedt
3b54d2b4b9 fs: fcb: rename variables differently than struct tag
Even just making minor edits to fcb, warnings are triggered
from Coding Guidelines of the form

Violation to rule 5.7 (Tag name should be unique) tag: fcb

Rename pointer variable names to fcbp.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-11 16:14:55 +02:00
Anas Nashif
4ed8fa3b9e MAINTAINERS: move test docs to relevant areas
doc/develop/test should go under Twister/Testsuite.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 16:14:41 +02:00
Emil Gydesen
c4840462bf Bluetooth: BAP: Scan delegator: Add log if actionable CBs are not set
If the callbacks are not set, then we cannot do the requested actions
from the broadcast assistant. Since this is a significant issue,
that may prevent the role from working as intended,
LOG_WRN is used other LOG_DBG.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-11 16:13:55 +02:00
Declan Snyder
5fa17a8d39 modules: hal_nxp: Fix i2s define mistake
The commands should be within the if command checking
for CONFIG_HAS_MCUX, fix.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-11 16:13:35 +02:00
Fengming Ye
24773a1810 west: hostap: update hostap revision
Update hostap revision for bug fixes.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-07-11 12:41:38 +02:00
Emil Gydesen
2761204957 Bluetooth: BAP: Fix notifying recv state for bonded devices
The scan_delegator_security_changed function had a few issues
that were addressed:
1) It used an internal field to check level rather than the
   value provided by the API
2) It did not treat bt_addr_le_is_bonded as a boolean return value
3) It did not properly truncate the recv state (fixed by using the
   proper function bass_notify_receive_state)

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-11 12:40:21 +02:00
Fabio Baltieri
367c9d7fa6 input: event-codes: add few missing button codes
Add few missing button codes, these matches the ones used in Linux to
cover HID mouse buttons 1 to 8.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-11 12:39:59 +02:00
Jamie McCrae
0d6532d27c mgmt: mcumgr: smp: Initialise variable
Seemingly newer versions of gcc wrongly detect a variable is used
when it is not set, this is not the case the compiler is wrong,
add a default set to null to prevent the fake warning appearing
as an error in CI

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-07-11 12:39:33 +02:00
Jamie McCrae
f516ee1639 mgmt: mcumgr: transport: Fix SMP header not being packed
Fixes an issue with using SMP on devices that do not support
unaligned memory access e.g. Cortex M0 which would result in a
hard fault

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-07-11 12:39:33 +02:00
Declan Snyder
8a08bea468 doc: release-notes-3.7: Add devicetree notes
Add devicetree and kconfig preprocessor release notes.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-11 12:39:05 +02:00
Brett Witherspoon
f320535f84 drivers: dac: dac_ad569x: Add bit shift for 14/12-bit variants
The 14/12-bit variants (AD5692R/AD5691R) require the data to be in the
upper bits of the two byte data field of the write command. See table 12
and the associated footnotes in the AD5693R/AD5692R/AD5691R/AD5693
datasheet.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-11 09:37:12 +02:00
Jamie McCrae
0f97f0ad11 doc: release: 3.7: Add additional notes on MCUboot changes
Adds extra release notes for MCUboot

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-11 09:36:30 +02:00
Jamie McCrae
1e476429c9 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  fb2cf0ec3da3687b93f28e556ab682bdd4b85223

Brings following Zephyr relevant fixes:
  - 89807992 boot: zephyr: Fix build for nrf9160dk
  - 2f5a7f47 boot: zephyr: Fix build for thingy53
  - c9e4ab8b boot: zephyr: Fix build for thingy52
  - 1d79ef35 boot: Fix ASN.1 for mbedtls >= 3.1
  - 86acda9e ext: fiat: Use user-defined assert macro
  - 9ae634f3 bootutil: Fix signed/unsigned comparison in
    boot_read_enc_key
  - 533fef2a imgtool: Update version.py to take command line
    arguments
  - 316a139c imgtool: dumpinfo improvements
  - f3a57028 imgtool: Various dumpinfo fixes
  - d16a613f imgtool: Assert "measurement value" is last in
    boot_record.py
  - 36f8bf30 imgtool: Fix verify command for edcsa-p384 signed
    images
  - 2712f743 imgtool: Add missing requirements to requirements.txt
    file
  - 45d379e7 zephyr: boards: Add files needed for NXP FRDM MCXN947
    QSPI variant
  - 3113df8f imgtool: initial sanity test
  - a4cb878c imgtool: Fixed missing dependency to 'pyyaml' (for
    dumpinfo)
  - faf2dd1f imgtool: fixed keys/general.py to pass existing
    unittests

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-11 09:36:30 +02:00
Jamie McCrae
c769a647fa mgmt: mcumgr: transport: bluetooth: Fix dynamic registration option
Fixes the Kconfig for dynamic service registration to make it depend
on dynamic database support instead of selecting it, which prevents
issues whereby it is not actually selected

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-07-11 09:36:14 +02:00
Anas Nashif
80ce7d2315 MAINTAINER: DTS bindings should not have a catch-all filter
DTS binding area was capturing everything under dts/bindings instead of
leaving those to the areas affected.
Remove general wildcard and add some of the missing file filteres in the
relevant areas.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-10 19:14:17 -04:00
Anas Nashif
913426e585 ci: set_assignee: pick next area when submitter = assignee
Address the cases where submitter is also the maintainer of the code
changed and other areas are being changed. In this case, assign to the
next area maintainers instead of assigning to submitter.

Example: maintainer of component A introduced significant changes to
area A but also makes changes to other areas B and C. Right now
maintainers of B and C are added as reviewers.

This change will assign to the next area after A, i.e. B in cases where the
submitter is also the maintainer of area A.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-10 19:14:17 -04:00
Alberto Escolar Piedras
0cf89bb8b4 drivers/spi/spi_xlnx_axi_quadspi: Build fix w CONFIG_SPI_ASYNC
Fix a build error when CONFIG_SPI_ASYNC is set.
The issue was detected by CI

```
spi_xlnx_axi_quadspi.c: In function 'xlnx_quadspi_isr':
spi_xlnx_axi_quadspi.c:489:21: error: 'ctx' undeclared
  489 |                 if (ctx->asynchronous) {
      |                     ^~~
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-10 19:13:46 -04:00
Declan Snyder
6ac0d8bf84 drivers: mdio_nxp_enet: Fix busy wait
Fix the busy wait in the MDIO driver that was causing timing
problems in systems with real time requirements performing tasks
more frequently than about a millisecond.

Restructure the code to be less redundant and change the busy wait
kconfig to microseconds instead of millliseconds. Also actually signal
to the mdio driver that it can use the interrupt instead of busy
waiting, this seems to have been forgotten.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-10 19:13:27 -04:00
Anas Nashif
9864852540 github: add template text as comments
Instead of including the boilerplate text and showing it in the created
issue, use comments that are still displayed when editing, but not shown
in the final issue, avoiding confusing and mixup between actual issue
and template text.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-10 19:13:04 -04:00
Henrik Brix Andersen
f9672c4700 doc: releases: 3.7.0: minor clean-ups
Added a few missing CONFIG_ prefixes to Kconfig option references,
reshuffled the CAN release notes a bit to account for the
can_get_min_bitrate() being both introduced and deprecated within one
release cycle.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-10 19:12:39 -04:00
Ryan Erickson
7bef3fd8af modem: hl7800: set RX socket remote address
Set the remote address of received sockets.
This is necessary for services that rely on the remote address.
DNS relies on the remote address to be set properly.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-07-10 16:16:03 -04:00
Emilio Benavente
33a9e4b088 modules: hal_nxp: CMakeLists: Added SAI definition to fix I2S.
Added definition MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK
to fix timeout fault on the I2S_Speed test
using MIMXRT1170_evk/mimxrt1176/cm7.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-07-10 16:15:49 -04:00
Wilfried Chauveau
1b820dfa85 arch: arm: cortex_m: add ip & lr to the clobber list
Calls to other function may clobber ip & lr too so these register need to
be added to the clobberlist.
r3 is not actually used in z_arm_switch_to_main_no_multithreading so it is
also removed from the clobber list.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-07-10 11:58:13 -04:00
Dmitrii Golovanov
5d763534d6 doc: twister: ztest: Add test application diagram
Add a diagram to illustrate a test application's project
components with relationships between Ztest and Twister
objects.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-07-10 11:49:59 -04:00
Dmitrii Golovanov
b826805a44 doc: twister: Move diagrams to sub-directory
Move diagrams to a sub-directory.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-07-10 11:49:59 -04:00
Pisit Sawangvonganan
db6a3cb054 include: fix typo in multiple directories
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Pisit Sawangvonganan
28eb0eaffd include: fix typo in (logging, mgmt)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/logging` and `mgmt`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Pisit Sawangvonganan
ccc2419465 include: arch: fix typo in multiple directories
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `include/zephyr/arch` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Pisit Sawangvonganan
0b24762ed6 include: net: fix typo in multiple directories
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `include/zephyr/net` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Pisit Sawangvonganan
631dfb67f2 include: dt-bindings: fix typo in multiple directories
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `include/zephyr/dt-bindings` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Jonathan Rico
4afe745a1d Bluetooth: host: Add lower bound for CONFIG_BT_BUF_ACL_RX_COUNT
See comment above assert for more.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-10 11:47:26 -04:00
Jonathan Rico
ff5c577aa8 tests: Bluetooth: Add ACL re-assembly test
This tests shows that there is a problematic buffer configuration.

The host locks up when `CONFIG_BT_BUF_ACL_RX_COUNT` is smaller or equal
to the number of connected peers, and all those peers send an L2CAP PDU
that needs re-assembly at the same time.

Although this seems far-fetched, this bug has been observed in a
real-life situation on actual hardware.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-10 11:47:26 -04:00
Théo Battrel
96d8682a5b Bluetooth: Shell: Fix native shell build
Following changes in HCI drivers
(https://github.com/zephyrproject-rtos/zephyr/pull/72323) the build for
the snippet allowing to have the Bluetooth shell run with BabbleSim was
broken.

Fix the snippet by disabling the HCI UART driver.

Add a twister test case that will build the snippet in CI to avoid
silent breaking.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-07-10 11:47:07 -04:00
Grzegorz Swiderski
9b682308b3 scripts: list_hardware: Find all SoCs before checking runner configs
When validating the flash runner configurations in `soc.yml`, the only
SoCs that were considered had to be defined under this structure:

   family:
     - series:
         - socs:
             - name: ...

However, the `family` and `series` keys are optional, so the `soc.yml`
files can also be arranged like this:

   family:
     - socs:
         - name: ...
   series:
     - socs:
         - name: ...
   socs:
     - name: ...

The solution is to move the validation code further down, so that it can
reuse the SoC data that was already correctly parsed while initializing
a `Systems` instance.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-07-10 11:46:52 -04:00
Nikodem Kastelik
c0d508a142 soc: nordic: common: dmm: fix region alignment getter
Getting the required alignment size for memory region node
and device node needs to be handled by a separate macro.
Otherwise alignment of single byte is reported for any region.
Add a test that checks for this particular issue.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-07-10 08:42:40 -04:00
Krzysztof Chruściński
a575d9bc31 tests: drivers: counter: nrf: fixed_top: Rework nrf54h20 cpuppr config
Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-10 08:42:03 -04:00
Krzysztof Chruściński
407aa5cc79 tests: drivers: counter: basic_api: Rework nrf54h20 cpuppr config
Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-10 08:42:03 -04:00
Evgeniy Paltsev
d8929b5dc6 posix: shm: fix build error with minimal libc
In `lib/posix/options/shm.c` we don't include stdio.h
header but use standard SEEK_xxx definitions (i.e. `SEEK_SET`)
which cause build issues (if the minimal libc is used).

Fix that.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-10 14:40:48 +02:00
Jordan Yates
8eff81a627 watchdog: cmsdk_apb: validate in CI
Validate driver in CI by adding the `watchdog` tag to the `mps2/an385`
platform, which uses the driver.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-10 14:39:36 +02:00
Jordan Yates
063d2ff6ec watchdog: cmsdk_apb: only support a single channel
The CMSDK watchdog hardware only supports a single timeout channel.
Return the documented error if more than one timeout is requested to be
installed.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-10 14:39:36 +02:00
Jordan Yates
9138763430 watchdog: cmsdk_apb: validate timeout window
Validate the maximum timeout window, as required by the API tests.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-10 14:39:36 +02:00
Jordan Yates
74f3b587fc watchdog: cmsdk_apb: fix period calculation
The previous calculation was multiplying the timeout in milliseconds
by the clock frequency, giving a cycle count 1000x larger than it should
be.

Fix the calculation and rename `reload_s` to `reload_cycles`, as the
cycle count is what this actually contains.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-10 14:39:36 +02:00
Emil Gydesen
6c71a88ef3 Bluetooth: ISO: Fix and format iso.h documentation
Fixed a few bad or missing documentation parts of iso.h
Also formatted some parts to be consistent with not just
the file itself, but also with bluetooth.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-10 14:38:23 +02:00
Johann Fischer
552c353969 doc: usb: add a note about the deprecation plan
Add a note about about the deprecation of current USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-10 14:36:46 +02:00
Johann Fischer
c9c35fa59f samples: usb: fix API references
Remove references to new device APIs that are not supported by the
samples. Remove the reference to the UART API from the console sample
because it is not really used there, but add it to the CDC ACM sample.
Fix references in HID, MSC and UAC2 samples.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-10 14:36:46 +02:00
Johann Fischer
1248e26b89 include: usbd: add missing macro documentation
Add missing documentation to USBD_DEVICE_DEFINE,
USBD_CONFIGURATION_DEFINE and USBD_DEFINE_CLASS macros.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-10 14:36:46 +02:00
Ben Marsh
8c0d3de0fb posix: sys: sysconf: Unconditionally define POSIX macros
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See #74623 and #74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2024-07-10 14:36:35 +02:00
Vinayak Kariappa Chettimada
f9655ac84e doc: release: 3.7: Add known issue with nRF51x SoC series Bluetooth
Add known issues section with broken Bluetooth support for
nRF51x SoC series boards.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-07-10 14:36:10 +02:00
Ayush Singh
35391f3d34 boards: ti: cc1352p1_launchxl: Refactor for beagleconnect_freedom
- Minimize diff between beagle/beagleconnect_freedom/board_antenna.c
- Make functions static
- Minor formatting
- Remove unused ANTENNA_MUX
- Use DT_FOREACH_PROP_ELEM_SEP for GPIO array

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-07-10 11:41:46 +02:00
Ayush Singh
894e7bdbdc boards: beagle: beagleconnect_freedom: Fix formatting
- Fix formatting in board_antenna.c by using the standard config in
  Zephyr.
- Reduce diff with cc1352p1_launchxl/board_antenna.c as much as possible

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-07-10 11:41:46 +02:00
Ayush Singh
2efe8765a3 boards: beagle: beagleconnect_freedom: Use sky13317
- Use antenna switch sky13317 instead of hack
- Base the board_antenna file on cc1352p1_launchxl/board_antenna.c

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-07-10 11:41:46 +02:00
Ayush Singh
49436854c8 boards: ti: cc1352p1_launchxl: Move out sky13317 bindings
- This antenna switch is used by both beagleconnect_freedom and
  beagleplay.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-07-10 11:41:46 +02:00
Declan Snyder
6eaadc312f tests: i2s_speed: Fix RT1170_EVK overlay files
Remove an overlay with a wrong name not being picked up,
and change the "A" revision overlay to be used by all revisions.

Also fix the "clocks" property in the overlay causing a fault with sai4.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-10 11:38:39 +02:00
Jamie McCrae
5b6b850fb9 scripts: requirements: Bump imgtool to 2.1.0
Updates the minimum version of imgtool to 2.1.0, which is one year
newer than the 2.0.0 release

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-10 11:38:07 +02:00
Natalia Pluta
c9f9c144e9 samples: net: cellular_modem: fix division by zero in sample_echo_packet
A hard fault occurs when the `sample_echo_packet` function attempts
to print the average time per successful echo and no packets have
been sent, resulting in a division by zero error. This fix adds a check
to ensure that `packets_sent` is greater than 0 before performing
the division. This prevents the system from halting due to a usage fault.

Signed-off-by: Natalia Pluta <pluta.natalia.m@gmail.com>
2024-07-10 11:37:44 +02:00
Jukka Rissanen
794d7cf3c5 net: sockets: Remove async service support
As found in PR #75525, we should not modify the polled fd array
in multiple places. Because of this fix, the async version of
the socket service could start to trigger while it is being handled
by the async handler. This basically means that the async version
cannot work as intended so remove its support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-10 11:36:59 +02:00
Rahul Goyal
f1e38e73d7 Drivers: max17048: updated voltage parameter output
present output shows voltage in mV.
updated output shows voltage in uV.

Signed-off-by: Rahul Goyal <goyalrahul1516@gmail.com>
2024-07-10 11:36:28 +02:00
Rahul Goyal
74c86928b2 Samples: max17048: added units to output
present sample output does not contain units.
added units to sample output

Signed-off-by: Rahul Goyal <goyalrahul1516@gmail.com>
2024-07-10 11:36:28 +02:00
Fin Maaß
f82249c932 net: ethernet: check vlan iface existence
Drop a packet, if it has a VLAN tag, for
that we don't have a VLAN interface.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-10 11:35:46 +02:00
Frank Lin
6fc525cc20 drivers: serial: uart_cdns: fix interrupt driven
Fix interrupt driven for shell

Signed-off-by: Frank Lin <linfrank@meta.com>
2024-07-09 19:45:18 -04:00
Yong Cong Sin
49e8c98996 tests: arch: common: stack_unwind: fix symtab test
The symtab test should have the
`CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` enabled. This was not
caught in the CI previously as the regex was also wrong, '['
and ']' are regex syntax and should be escaped.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-09 19:44:08 -04:00
Brett Witherspoon
cb8db004d7 drivers: dac: dac_ad569x: Fix reset error return
The intention here appears to be to return an error. Use an early return
to implement this.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-09 19:43:23 -04:00
Yong Cong Sin
f87539081d lib/libc: picolibc: select its source with Kconfig choice
Implement the selection of the picolibc source in a Kconfig
choice as they are mutually exclusive.

The following table represents the possible choices, where 'X'
means that `PICOLIBC_SUPPORTED=n` and is guarded in the parent
level as `PICOLIBC=n`, so we do not need to care.

Module  Toolchain    C++   |       Choice
  0         0         0    |          X
  0         0         1    |          X
  0         1         0    |    Toolchain only
  0         1         1    |    Toolchain only
  1         0         0    |      Module only
  1         0         1    |          X
  1         1         0    |   Toolchain/Module
  1         1         1    |    Toolchain only

The current implementation favors `PICOLIBC_USE_TOOLCHAIN` over
`PICOLIBC_USE_MODULE` whenever possible, that preference is
maintained in this implementation as well - the TOOLCHAIN
source will be the default choice when the toolchain supports
it or when the C++ is enabled. Otherwise, fallback to MODULE.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-09 17:29:12 -04:00
Johann Fischer
38753852c8 MAINTAINERS: move generate_usb_vif to USB-C section
Script was introduced by USB-C people.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-09 17:26:58 -04:00
Johann Fischer
46b849b586 MAINTAINERS: add maintainer and collaborator for DAP controller
Add maintainer and collaborator for DP drivers and DAP controller.
Followup on the commit 7c9259abbc
("dap: add CMSIS-DAP compatible controller")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-09 17:26:58 -04:00
Daniel Leung
0b76fd92fc tests: logging/dictionary: pytest only looks at last output
There are instances where on hardware tests would result in
multiple dictionary logging blocks. This is usually due to
flashing and running via twister in separate steps. Once
flashing is done, the device starts running and sending
logging string to output, but twister is not ready to read
them, thus leaving the strings in the host's UART buffer.
Then twister starts its testing run by resetting the device
which results in another dictionary logging block to show
up. So the pytest script has to be updated to only look at
the last dictionay logging block.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-09 17:25:22 -04:00
Daniel Leung
ea109ce39b tests: logging/dictionary: filter for backend
Since only the UART backend supports output in hexidecimal form
with dictionary logging, so filter for that or else the pytest
would fail due to none, or wrong captured output.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-09 17:24:02 -04:00
Mathieu Choplain
1fd9dc85b2 tests: drivers: adc_api: use proper printf format
This commit changes the adc_api test to use the proper printf
format specifier when printing the ADC samplings. This ensures
that all values are printed on 16-bit. Without this specifier,
negative values are sign-extended and printed on full integer
size (e.g., 0x8000 -> "0xFFFF8000").

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-09 17:23:30 -04:00
Kevin Wang
6cb8956a08 drivers: watchdog: Refine the atcwdt200 driver's code.
Remove the reset vector setting from driver layer,
the reset vector is more suitable to be set at the board layer.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2024-07-09 17:21:28 -04:00
Luis Ubieda
00a3be90d7 sensor: icm42688: Use RTIO workq on icm42688_submit
To make its execution path non-blocking from the caller's perspective.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
8d0c2f15df sensor: bme280: Use RTIO workq on bme280_submit
To make its execution path non-blocking from the caller's perspective.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
5521fc4410 sensor: bma4xx: Use RTIO workq on bma4xx_submit
To make its execution path non-blocking from the caller's perspective.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
59e8919da7 sensor: akm09918c: Use RTIO workq on akm09918c_submit
To make its execution path non-blocking from the caller's perspective.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
aff6e31ec4 sensor: fallback: Decouple RTIO request using RTIO workqueues service
Incorporate RTIO workqueues to turn sensor_submit_callback into an
asynchronous request.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
5686ac48cc tests: rtio: workq: Add testsuite to exercise RTIO work-queues
Basic tests demonstrating ability to decouple, batch-submit, preempt
and keep track of used items.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
3646b63217 rtio: Add RTIO Work-queues service
Adds ability to process synchronous requests in an asynchronous
fashion, relying on dedicated P4WQ's and pre-allocated work items.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
1f3a0910d7 tests: sensor: generic: Set thread priorities for back-to-back readings
In order to support back-to-back readings, it's required that the
RTIO workq threads priority is higher than the caller issuing the
back-to-back requests, otherwise the requests will fail as P4WQ won't
have the opportunity to clear the is_done semaphore, and the subsequent
request will be rejected.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
cc139b85df sensor: Enable RTIO Semaphores for Async API
In order to decouple the read request from its implementation, we need
to be able to yield to potential lower-priority threads, which is not
possible with k_yield() itself. As such, using RTIO Consume semaphore
enables us to achieve this.

This patch also refactors blocking API (sensor_read) to also block upon
consumption, so as not to require RTIO_SUBMIT_SEM enabled.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Devansh Tanna
6d4fba1f86 drivers: cc13xx_cc26xx: pwm: enable pwm(gpt) in sleep/deepsleep mode
- enabled GPT(PWM) peripheral for sleep/deepsleep mode in init_pwm()
- Fixed: undefined behaviour when using k_sleep()

Signed-off-by: Devansh Tanna <devansht0210@gmail.com>
2024-07-09 17:20:46 -04:00
Benjamin Cabé
95caf476f1 drivers: ptp_clock_nxp_enet: add module_dev to driver config
c8d8dce755 introduced a regression whereby driver config should hold
module device pointer, except it didn't.
This commit adds module_dev to the driver config.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-09 17:20:12 -04:00
Jean Nanchen
77f9f0e965 drivers: sensor: maxim: max31865: Fix fault bit clearing
Ensures D1 sets and D5, D3, D2 reset, preventing undefined states.

Signed-off-by: Jean Nanchen <jean.nanchen@gmail.com>
2024-07-09 15:38:19 -04:00
Thomas Stranger
48e235445b samples: sensor: ds18b20: clearly indicate any errors
Any errors are clearly indicated and program execution
ended.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger
b5d3dea894 drivers: sensor: ds18b20: indicate error for missing response
When multiple devices are on the bus, and no slave matches
the sent rom, the master receives only ones.
This should be handled explicitly and the error reporting
should not rely on the crc mismatch of the scratchpad.

Note: Make sure that the sensor configuration is loaded to the
eeprom (copy scratchpad), otherwise the resolution will not match
the expectations in case a node looses power and recovers.
As in that case the configuration will not be applied again.
Also the sensor may still report the power on reset value
of +85°C just after the sensor powered up.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger
6fd767d6e4 drivers: sensor: ds18b20: verify scratchpad write
Verify that the scratchpad write was successful by
reading back the configuration.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger
53e3936a2e drivers: sensor: ds18b20: verify crc of scratchpad.
After each read of the scratchpad the crc of the data
is checked and in case of a mismatch an error is returned.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger
f4acf390dd drivers: sensor: ds18b20: cleanup header/includes
- Move the content of the header file into the source file,
and drop unnecessary includes.
- Also, drop the bus access function.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Brett Witherspoon
97190d76ec drivers: dac: dac_ad56xx: Fix channel range check
An off by one error in the channel range check results in an out of
bound access to the channel lookup array.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-09 15:31:58 -04:00
Emil Gydesen
35c7cd2e00 MAINTAINERS: Remove thalley from Bluetooth group
Thalley is not working with BT mesh nor BT classic
and shouldn't be assigned as reviewer for those.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-09 15:27:54 -04:00
Omer Gozderesi
1fc97561ed config: esp32: configurable UART FIFO thresholds
The existing configuration of the ESP32 UART FIFO thresholds
was fixed, leading to inefficiencies in handling
Modbus RTU packages exceeding this size.
This commit introduces two new Kconfig options,
allowing users to adjust the esp32 fifo thresholds as needed.
fixes #74311

Signed-off-by: Omer Gozderesi <omer.gozderesi@enda.com>

config: esp32:  configurable UART FIFO thresholds

The existing configuration of the ESP32 UART FIFO thresholds
was fixed, leading to inefficiencies in handling
Modbus RTU packages exceeding this size.
This commit introduces two new Kconfig options,
allowing users to adjust the esp32 fifo thresholds as needed.
fixes #74311
Signed-off-by: Omer Gozderesi <omer.gozderesi@enda.com>
2024-07-09 15:24:02 -04:00
Simon Hein
a5668c78d1 doc: guidelines: update coding guidelines docs
Remove references to a timline for the coding guidelines enforcement
stages. Mark the current stage better and add notes about the
current stage.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-07-09 15:23:18 -04:00
Declan Snyder
dd86bc63e9 boards: nxp: mimxrtxxx: Fix partition unit address
Fix the partition unit addresses not matching tthe reg addresses.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
275ba61577 dts: nxp: rtxxx: Fix LPADC unit address
Fix unit address having an extra 0 in RT6xx/5xx dtsi

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
d8a7b694dc dts: rt6xx: Fix DTC warnings
Fix DTC warnings caused by sram and flexspi definitions.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
fb693c18ac dts: rt5xx: Fix DTC warnings
Fix DTC warnings caused by flexspi and sram node definitions.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
67877e7a27 dts: rw6xx: Fix SRAM node address
DTC warning caused by reg address not matching unit address,
but SRAM node address is translated by ranges property anyways.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
8c8338d456 dts: rw6xx: Fix flexspi address warnings
The unit address didn't match reg which causes the warning, but
flexspi should be part of the peripheral node space anyways.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Mateusz Holenko
82a83896c8 dts: npx: Fix sramx offset for LPC55S06
The current value is wrong and overlaps with `syscon`.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-07-09 15:21:14 -04:00
Robert Lubos
9db2dc4aa2 net: lib: http_server: Move stream-specific flags to stream context
The information about replied headers or END_OF_STREAM flag are
stream-specific and not general for a client. Hence, need to move them
to the stream context.

For the upgrade case, we need to allocate a new stream now when HTTP1
request /w upgrade field is received. The stream ID in such case is
assumed to be 1 according to RFC.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
0e1c0a7b6b net: lib: http_server: Fix trailing headers frame processing
In case client decides to send a trailing headers frame, the last data
frame will not carry END_STREAM flag. In result, with current logic
server would not include END_STREAM flag either, causing the connection
to stall. This commit fixes this logic, so that the server replies
accordingly in case END_STREAM flag is present in the trailing headers
frame.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
b4cfee090d net: lib: http_server: Implement proper CONTINUATION frame processing
CONTINUATION frames are tricky, because individual header fields can be
split between HEADERS frame and CONTINUATION frame, or two CONTINUATION
frames. Therefore, some extra logic is needed when header parsing
returns -EAGAIN, as we may need to remove the CONTINUATION frame header
from the stream before proceeding with headers parsing.

This commit implements the above logic and additionally adds more checks
to detect when CONTINUATION frame is expected. Not receiving a
CONTINUATION frame when expect should be treated as a protocol error.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
7e22dd45a0 net: lib: http_server: Fix frame printouts
Frame printouts should not be done from the state handlers, but rather
during state transition, otherwise a single frame can be printed several
times as new data arrive. This also simplifies code a bit, as we just
print the frame in a single place, instead of duplicating code.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
78c2f48091 net: lib: http_server: Remove upper bounds on buffer sizes
There's really no good reason to have an upper bound on the buffer sizes
and this limits testing in some cases, so just remove them.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
ccf2e9b025 net: lib: http_server: Implement proper RST_STREAM frame processing
In case RST_STREAM frame is received it should not be ignored, but the
corresponding stream should be closed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
b98edfd951 net: lib: http_server: Fix parsing of HTTP2 header frames with priority
In case priority flag is present in the HTTP2 headers frame header, we
should expect additional priority fields before the actual frame
content.

The stream priority signalling has been deprecated by RFC 9113, however
we should still be able to handle this in case some implementation
(nghttp for instance) sends them.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
2e288aed08 net: lib: http_server: Fix handling of HTTP2 frames with padding
Data and header frames can contain padding - we need to take this into
account when parsing them, otherwise the stream is broken.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
245b8351f4 net: lib: http_server: Unify HTTP2 header flags checking
Instead of multiplying function to check header flags, just have a
single one, with flag mask as parameter.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
adfdc54434 net: lib: http_server: Update HTTP2-specific structs/enums naming
For HTTP2-specific structures and enums, use "http2_" prefix to clearly
indicate the distinction from the generic HTTP stuff.

Additionally, some structures/enums describing HTTP2 protocol details
had "server" in the name, while in reality they describe nothing
server-specific. Hence, drop the "server" part where applicable.

Remove unused macros.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
e1e50bdda9 net: lib: http_server: Simplify HTTP2 frame header parsing
* Remove unneeded variable.
* Use system utilities to read big endian numbers instead of parsing
  manually.
* Remove `payload` member from the http_frame structure. It's not used
  for anything useful, and could actually be misleading, as in case of
  large frames, where not entire frame is parsed at once it will point
  to incorrect location.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Guy Morand
0c9858879c samples: logging: disable usermode for some platforms
Those platfroms use rtt as debug port that conflicts with usermode, as
in 27d519b260.

Fixes #75617

Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
2024-07-09 15:20:34 -04:00
Chaitanya Tata
a63a96428e wifi_nm: Fix Wi-Fi interface backward compatibility
If newly introduced interface type is unset then return the first Wi-Fi
interface as a fallback, this fixes backward compatibility.

Also, add NM APIs and use them for type checks, rather than directly
using the type enumeration.

Fixes #75332.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-09 13:07:11 -04:00
Chaitanya Tata
0e6db9c918 modules: hostap: Fix interface addition
WPA supplicant as a network manager monitors interface events and
registers to the Wi-Fi NM module, so, adding a check for NM type before
registering the interface is wrong.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-09 13:07:11 -04:00
Brandon Allen
19d49114a6 net: net_mgmt: fixed typo in doxygen
Replaced "tight" with "tied"

Signed-off-by: Brandon Allen <brandon.allen@exacttechnology.com>
2024-07-09 19:06:56 +02:00
Emil Gydesen
bbf599a3de Bluetooth: TBS: Remove BT_TBS_TECHNOLOGY_IP
BT_TBS_TECHNOLOGY_IP is not a valid technology value
for TBS since it's not defined by the spec.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-09 19:06:29 +02:00
Marcin Niestroj
c368c332c4 drivers: wifi: esp_at: fix UDP socket setup
Right now AT+CIPSTART command is called with both "remote port" and "local
port" being set to the same number. This means that for outgoing UDP
traffic (e.g. when resolving DNS or when reaching out some application
server with CoAP over UDP) always the same outgoing port is used. Such
behavior is wrong, since by default a random outgoing port should be used.

Reusing the same port confuses server implementation that is reached out,
since especially in context of DTLS over UDP, outgoing port defines TLS
context/session to be used. Such servers often ignore TLS packets from new
sessions (e.g. after device reboot) and result in failed DTLS connection
attempts.

Commit dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
UDP sockets") added support for "server-side listening" for incoming
traffic on UDP sockets, which introduced broken behavior of using the same
remote and local port.

In esp_bind() implementation assign newly intorduced 'src' member, instead
of reusing 'dst'. Don't call AT+CIPSTART yet at this stage, as in case of
connect() Zephyr syscall esp_bind() (via bind_default() helper function) is
called implicitly to assign random generated local port, so remote port is
yet to be assigned. Check in esp_recv() whether socket was already
connected (i.e. esp_connect() was called) and if not, invoke
AT+CIPSTART (via _sock_connect()) to start listening on "server-side" UDP
socket.

This patch fixes broken behavior of always reusing the same local port for
outgoing UDP traffic. Instead, randomly generated (by Zephyr net_context
subsys) local port is used. Additionally bind() and recvfrom()
implementation (to handle server-side UDP sockets) is improved, so that
binding to 0.0.0.0 (on any interface) is possible.

Fixes: dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
  UDP sockets")
Fixes: 424ea9f5e4 ("drivers: wifi: esp_at: do not connect socket on
  bind(INADDR_ANY)")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-09 19:06:12 +02:00
Luis Ubieda
95e299ad39 sensor: lis2dux12: fix: CID 363712: Initialize mode-fs
Following the same pattern used in `lis2dux12_sample_fetch_accel`.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 19:05:03 +02:00
Luca Burelli
3cc452c92f llext: consistently use "regions" for memory areas
The term "section" has a very specific meaning in the ELF file format.
After 709b2e4 ("llext: automatically merge sections by type"), some of
the code that was originally dealing with ELF sections is now handling
"memory regions" made of multiple ELF sections of the same type.

Make sure to use the term "region" consistently in the code and
log messages to avoid confusion with the original ELF sections.

Notable exception to this is the "ldr->sect" array, which is actively
used outside Zephyr and will need to be phased out in the future.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-09 19:04:06 +02:00
Luca Burelli
2e085ba29a llext: harmonize error codes
This patch changes the error codes returned by the ELF subsystem to be
more consistent with the standard error descriptions. In particular:

- issues with the ELF file are now reported as -ENOEXEC;
- valid but unsupported edge cases are reported as -ENOTSUP;
- failures in searching for an entry are reported as -ENOENT.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-09 19:04:06 +02:00
Luca Burelli
9450240419 llext: fix table count check
llext_load() included a check to ensure that the ELF file contains all
the necessary tables, but it was not functional. Add the missing check
and rename the variable to avoid confusion with the total section count.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-09 19:04:06 +02:00
Bjarki Arge Andreasen
cdff2575a7 tests: rtc: time_incrementing: set nsec member
The rtc test suite uses timegm to convert a unix
timestamp to datetime, specifically struct tm which has no
nsec field, so the nsec field is not initialized properly.

Update tests to init nsec and isdst members of struct rtc_time.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-07-09 19:03:49 +02:00
Francois Ramu
f3c70b4ab8 tests: drivers: clock control testing on the stm32h7 serie
Disable the pll2 when clearing the clock config prior to
testing the clock_control driver for the stm32h7

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-07-09 19:03:10 +02:00
Krzysztof Chruściński
44c2b19d5e tests: kernel: timer: behavior: pytest: Adjust max stddev
Like in C test. If MAX STDDEV is lower than single clock cycle then
set it to a single clock cycle.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 19:02:51 +02:00
Krzysztof Chruściński
1968cdf556 tests: kernel: timer: timer_behavior: Tweak expected std deviation
If frequency of the system clock is lower then deviation may exceed
default value (10us). Instead of adjusting the default value, test is
rounding up expected standard deviation to a single clock cycle.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 19:02:51 +02:00
Mykyta Poturai
3afd9429c0 json: Fix alignment calculation for nested objects
Currently, json array macros are passing the outer "container" struct
to the Z_JSON_ELEMENT_DESCR macro, causing the alignment to be calculated
from the outer struct which may be incorrect. Fix this by using the
biggest shift from the nested objects to calculate the alignment as the
struct size is calculated based on the biggest alignment of it's members.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
2024-07-09 19:02:25 +02:00
Mykyta Poturai
ddb3234884 json: test: Add test for array elements alignment
Add test to check that alignment and offsets of object array elements
are calculated correctly.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
2024-07-09 19:02:25 +02:00
Nick Kraus
29084dc06b west: Regex based version finding in OpenOCD runner
Previous OpenOCD version finding would fail when additional tokens were
prepended to the 'openocd --version' output, as happens with some third-
party OpenOCD repackages (xPack for one).

Fixes: #71955

Signed-off-by: Nick Kraus <nick@nckraus.com>
2024-07-09 19:02:13 +02:00
Mathieu Choplain
662b9803fa llext: disable verbose for SLID generation scripts
This commit removes the "-vvv" argument from the SLID generation
scripts' command line when building Zephyr or an extension with
Kconfig CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID enabled. This removes
a lot of noise in the build log (usually ~250 lines) and is fine to
do because the printed information is also saved in build artifacts.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-09 17:21:18 +02:00
Pisit Sawangvonganan
9b2ab20f23 bluetooth: fix typo in (include/zephyr/bluetooth, subsys/bluetooth/)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/bluetooth` and `subsys/bluetooth`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-09 17:20:38 +02:00
Robert Lubos
e5d67adf80 net: sockets: services: Don't modify pollfd array from other threads
pollfd array used with zsock_poll() should not be modified while inside
zsock_poll() function as this could lead to unexpected results. For
instance, k_poll already monitoring some kernel primitive could report
an event, but it will not be processed if the monitored socket file
descriptor in the pollfd array was set to -1. In result,
zsock_poll() may unexpectedly quit prematurely, returning 0 events, even
if it was requested to wait infinitely.

The pollfd arrays used by zsock_poll() (ctx.events) is reinitialized
when the service thread is restarted so modifying it directly when
registering/unregistering service is not really needed. It's enough if
those functions notify the eventfd socket used to restart the services
thread.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 17:19:12 +02:00
Henrik Brix Andersen
09d189cb71 drivers: can: loopback: increase default TX thread stack size
Increase the default TX thread stack size for the CAN loopback driver from
256 to 512 bytes as the former has shown to be too little when using the
loopback driver on real hardware.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-09 17:18:34 +02:00
Henrik Brix Andersen
7a25fbb2d7 drivers: can: loopback: set TX thread name
Set TX thread name to aid in debugging.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-09 17:18:34 +02:00
Andrey Dodonov
a4123a8ea2 net: lib: websocket: call socket poll for websocket
If we couldn't send all (or any data) via the socket,
invoke poll instead of blindly retrying and flooding the socket

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2024-07-09 14:04:29 +02:00
Andrey Dodonov
15ead53ad9 net: lib: http: call socket poll for http_client send
If we couldn't send all (or any data) via the socket,
invoke poll instead of blindly retrying and flooding the socket.
Respect timeout through http_client_req

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2024-07-09 14:04:29 +02:00
Pieter De Gendt
9d8881816e zbus: Use section iterator for observations
Iterating the observations can be simplified to a struct iterator instead
of first getting the count and looping afterwards.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 14:03:33 +02:00
Pieter De Gendt
058bfc8065 zbus: Fix ZBUS_CHAN_DEFINE alignment
Align trailing backslashes.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 14:03:33 +02:00
Pieter De Gendt
990c5e13cb zbus: Static channel data initialization
Init the channel data semaphore and observer list statically.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 14:03:33 +02:00
Zihao Gao
6ebb65d163 Bluetooth: fix compiling issue when either A2DP SRC or SNK are not enabled
Some of the A2DP interfaces are not defined if the corresponding feature
is not enabled, and therefore shall not be initialized.
This patchs include the interfaces/variables by the configurations to
go through the compiling stage.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-07-09 14:03:07 +02:00
Krzysztof Chruściński
4a53c69fa5 tests: logging: log_api: Fix logging.frontend.only.rt_filtering
When NO_BACKENDS was not defined then log backends were
initialized (even though not used). During the initialization
filters for that backends were configured and because of that
messages were not filtered out as expected.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 14:01:56 +02:00
Krzysztof Chruściński
347eeababf logging: Fix runtime filtering when frontend and userspace is used
When userspace is used and frontend was used for logging then runtime
filtering was failing because in user context filtering data was
accessed and filtering data is in the kernel space. Fixing that and
adding runtime filtering to the pre frontend function which is
already executed in the kernel space and filter data can be
accessed.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 14:01:56 +02:00
Krzysztof Chruściński
8ed29a625a logging: Fix UART dictionary frontend configuration
Logging string stripping depends on LOG_DICTIONARY_SUPPORT being
enabled and it was not set in UART dictionary frontend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 14:01:56 +02:00
Krzysztof Chruściński
9876075de1 logging: Allow runtime filtering for frontend only case
Log frontend supports runtime filtering so it should be
allowed to enable it even when only frontend is used with
no backends.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 14:01:56 +02:00
Johann Fischer
67a31ef2d7 samples: hid-mouse: protect report buffer
Use the message queue to pass the new report from the input callback,
and use a semaphore to protect the report buffer until it is transferred
to the host.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-09 12:05:04 +02:00
Pieter De Gendt
5e4e51de78 tests: zbus: unittests: Add CMAKE_LINKER_GENERATOR case
Add a test case where the CMAKE_LINKER_GENERATOR is used.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 12:02:51 +02:00
Pieter De Gendt
a6effe318f cmake: linker_script: Fix zbus sections
Use the same zbus linker sections for CMAKE_LINKER_GENERATOR as for
linker scripts.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 12:02:51 +02:00
Pieter De Gendt
6488393937 cmake: linker_script: Add missing k_fifo section
Building for CMAKE_LINKER_GENERATOR needs a section for k_fifo kernel
objects.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 12:02:51 +02:00
Abderrahmane Jarmouni
472cf8a8e1 MAINTAINERS: STM32 Platforms: collaborators: remove ajarmouni-st
Starting next week, I will no longer be active on this work account,
& I will no longer be available to contribute to STM32 in Zephyr.
I will be reachable on my personal account: @JarmouniA

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-07-09 11:59:02 +02:00
Luca Burelli
5ce6a750a5 llext: add explicit cast to fix Coverity CID: 392507
From https://mails.dpdk.org/archives/dev/2021-December/231212.html:

    Downcasting a void* to struct aesni_gcm_session* caused the session
    data to be treated as tainted. Removing the void* temporary variable
    and adding a cast avoids this issue.

Try the same approach here to prevent the ldr->sect_hdrs pointer from
being treated as tainted.

May fix #74817.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-09 11:51:29 +02:00
Luis Ubieda
05f8b9c54b sensor: lps22hh: Prevent overwriting values that weren't overwritten
Previously both temperature and pressure were updated regardless of
which one was requested.

Fixes CID: 392519, GH: 74779.
Fixes CID: 392497, GH: 74777.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 11:51:16 +02:00
Benjamin Bigler
1db356e35c net: mgmt: Fix build error when event direct enabled without event info
If CONFIG_NET_MGMT_EVENT_DIRECT is enabled and CONFIG_NET_MGMT_EVENT_INFO
disabled it does not build because mgmt_push_event writes to non existing
struct members

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-07-09 11:49:47 +02:00
Benjamin Bigler
06a725c1c8 net: mgmt: prevent event_work_handler from blocking
Fix system workqueue block caused by mgmt_event_work_handler
when CONFIG_NET_MGMT_EVENT_SYSTEM_WORKQUEUE is enabled.

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-07-09 11:49:47 +02:00
Aksel Skauge Mellbye
a677e974ef soc: silabs: Include series-specific Kconfig
The series-specific Kconfig files were not included, leading
to RTT not being considered available.

Fixes #75511.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-07-09 08:59:02 +02:00
Jared Kangas
c0fd916fbc drivers: sensor: wsen_itds: fix device ID mismatch return value
During initialization, zero is returned if an unexpected device ID is
read because the returned variable is not written to after a previous
non-zero check. Return -EIO instead to indicate an error occurred.

Detected with the following Coccinelle script:

        @@
        identifier I;
        @@

        *if (I) {
             ...
             return ...;
         }

         if (...) {
             ... when != I
                 when any
        *    return I;
         }

Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
2024-07-09 08:56:04 +02:00
Emil Gydesen
62da8152d0 Bluetooth: BAP: Remove doc for past_sync in pa_sync_req
The past_sync field is no longer there and should not
be documented.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-09 08:50:06 +02:00
Evgeniy Paltsev
4b9828c2a8 tests: logging: fix build error
Currently we get the build error when building
'tests/subsys/logging/log_backend_uart':

error: static_assert expression is not an integral constant expression
BUILD_ASSERT(strlen(TEST_DATA) < SAMPLE_DATA_SIZE);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It can be easily workarounded by using sizeof instead of strlen
to calculate string size.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-09 08:49:05 +02:00
Evgeniy Paltsev
edfb690587 test: logging: dictionary: fix build error
In `tests/subsys/logging/dictionary` we don't include stdio.h
header but use standard stream definitions (i.e. `stdout`)
which cause build issues (if the minimal libc is used).

Fix that.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-09 08:48:24 +02:00
Jordan Yates
af0cbb19c0 scripts: twisterlib: coverage: ignore __ASSERT branches
Disable branch coverage for the `__ASSERT` family of macros. Covering
all of the assertion branches by definition means triggering the
assertion, which can be either challenging or impossible to exercise,
and in either case results in the immediate termination of the test.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 20:41:31 -04:00
Jordan Yates
53bd9ead64 scripts: twisterlib: coverage: fix multiple branch excludes
Multiple values for `--exclude-branches-by-pattern` will result in only
the last value taking effect. Resolve this by merging all the provided
regex patterns into a single pattern with the `|` operator.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 20:41:31 -04:00
Sylvio Alves
6ade0cf715 wifi: esp32: fix memory leak
In case where the system is overloaded, net stack buffer
could fail to allocate next packet. That scenario requires
wifi internal Wi-Fi driver to free current rx buffer. This is
currently not being called. This fixes it by making sure
esp_wifi_internal_free_rx_buffer() is called in all scenarios.

Fixes #63043

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-08 20:41:16 -04:00
Glenn Andrews
1c19d43564 Driver: i2c_ll_stm32_v2: Remove log msg on boot
Converts the `<inf> i2c_ll_stm32_v2: I2C TIMING` message
displayed by the driver to a LOG_DBG. Also makes an actual
error message a LOG_ERR instead of a LOG_DBG.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-07-08 20:40:54 -04:00
Marc Herbert
65f63622e2 tests: cpp: add C++ coverage for pm/device.h
Note CONFIG_PM_* affects device.h too. Even if not compiled, the more
code the pre-processor sees the better.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Marc Herbert
c1852b83cd pm: device.h: fix pm_device designated initializers order for C++
Fixes the following error appearing in the test coverage added by the
next commit:

In file included from zephyr/tests/lib/cpp/cxx/src/main.cpp:18:
```
zephyr/include/zephyr/pm/device.h:275:9: error: designator order for
  field 'pm_device_base::state' does not match declaration order
                        in 'pm_device_base'
  275 |         }
      |         ^
zephyr/include/zephyr/pm/device.h:315:17: note: in expansion of
                                                macro 'Z_PM_DEVICE_INIT'
  315 |              Z_PM_DEVICE_INIT(Z_PM_DEVICE_NAME(dev_id), node_id,
```

Note this failure is observed with any g++ -std=c++NN standard value -
even before C++20.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Marc Herbert
c25b9b240e tests: cpp: add some C++ coverage for device.h / Device Tree
This provides C++ build test coverage for device.h (notably:
Z_DEVICE_INIT() fixed in the previous commit) and for some other Device
Tree macros.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Marc Herbert
c275eaac2d device.h: conditionally remove init braces for C++20 compatibility
Conditionally remove braces for designated initializers of anonymous
unions. This makes it compatible with C++20 while not breaking pre-C11
gcc.

This does for device.h what commit c15f029a71 ("init.h: restore
designated initializers in SYS_INIT_NAMED()") did for init.h

See https://docs.zephyrproject.org/latest/develop/languages/cpp/ and
long discussion in #69411 for more obscure C/C++ compatibility details.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Sylvio Alves
e04964aebd requirements: bump pyelftools to >=0.29
The minimum version of pyelftools is 0.29 to make it working
with scripts/footprint/size_report

Fixes #75605

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-08 17:18:29 -04:00
Tom Burdick
983ee54dfd sensors: ICM42688 read/writes chain callbacks
RTIO expects the CHAINED flag to be set when ordering of operations is
important. The callbacks in the icm42688 stream handling were not
chained into, meaning the callbacks would have occured immediately
rather than *after* the SPI reads/writes.

Update all the spi transactions to chain into the desired callbacks in
the driver.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-08 17:18:16 -04:00
Krzysztof Chruściński
47df73e51b lib: os: mpsc_pbuf: Do not use sem when CONFIG_MULTITHREADING=n
When multithreading is off packet buffer should not use feature which
allows waiting for available buffer.

mpsc_pbuf is used by logging which can work in deferred mode in
no multithreading build.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-08 14:58:32 -04:00
Zhaoxiang Jin
1e93796f8f boards: frdm_mcxn947: Update index.rst
Update index.rst, lowercase regulator.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
5b8bac37d0 tests: adc: Add 'zephyr,vref-mv' property.
Add 'zephyr,vref-mv' property to frdm_mcxn947 overlay file.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
599fddc867 tests: Add frdm_mcxn947 into regulator and adc test scope
Add frdm_mcxn947 into regulator and adc test scope

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
2bd4151ac6 docs: migration-guide: Add NXP LPADC driver update info
Add NXP LPADC (nxp,lpc-lpadc) driver update info.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
630203de97 drivers: lpadc: Update lpadc driver to use the latest feature
Updated nxp lpadc driver, because the phandle type property
'nxp,reference-supply' was removed, and a new phandle-array
type property 'nxp,references' added.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
2eb61a82da dts: arm: nxp_mcxn947: Add 'nxp,reference-cells' for vref node
Add new property 'nxp,reference-cells' for vref node.
Remove lpadc nodes 'nxp,reference-supply' property.
Add new property 'nxp,references' for lpadc nodes.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
8b01be8a16 dts: bindings: lpadc: Change 'nxp,reference-supply' property
Remove 'nxp,reference-supply' property.
Add new phandle-array type 'nxp,references' property.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
bb524682c7 dts: bindings: vref: Add specifier cells for nxp vref
Add specifier cells for nxp vref, when some other
peripherals use the vref to provide reference voltage,
this cells can be used to pass-in vref target voltage.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Szymon Janc
7bfd6b6256 test: bluetooth: Update ICS to TCRL 2024-1
This ICS was generated with new Qualification Workspace tool.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-08 14:57:12 -04:00
Szymon Janc
8665117411 test: bluetooth: Remove qualification project BLS file
With new BT SIG Qualification Workspace it is no longer possible to
export/import full project. Only ICS export/import is possible.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-08 14:57:12 -04:00
Mateusz Holenko
bea06ae846 drivers: i2c: configure sleep pins for Smartbond I2C
Adds missing i2c_sleep pins configuration definition required
to properly support power management operations for
Smartbond I2C controller on da14695_dk_usb board.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-07-08 14:56:14 -04:00
Sylvio Alves
5196bdf964 drivers: eth: esp32: fix build to enable statistics
When CONFIG_NET_STATISTICS=y is enabled, build fails
due to wrong interface pointer.

Fixes #75515

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-08 14:55:47 -04:00
Flavio Ceolin
96b9ab7827 doc: relnotes/3.7: Add info about CVE-2024-6258
Information about CVE-2024-6258 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-08 14:55:33 -04:00
Alberto Escolar Piedras
65fb6264cb samples/drivers/adc/adc_sequence: Build fix for sam_v71_xult
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.

Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
Board sam_v71_xult defines multiple SoCs.

Shortened file name (sam_v71_xult.overlay) not allowed, use
'<board>_<soc>.overlay' naming
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-08 14:55:15 -04:00
Alberto Escolar Piedras
bf53b06a06 tests/drivers pwm_clock: Build fix sam_v71_xult
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.

Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
  Board sam_v71_xult defines multiple SoCs.

  Shortened file name (sam_v71_xult.overlay) not allowed, use
  '<board>_<soc>.overlay' naming
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-08 14:55:15 -04:00
Hess Nathan
980d3f4c4f kernel: corrected parameter names
- applied the exact parameter names of the interface to implementation

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-07-08 12:18:31 -04:00
Adrien Ricciardi
8ca14a7762 fs: nvs: Add more strict checks to determine if an ATE is valid
Make sure that the ATE metadata does not overflow the sector size.
Take into account the data length and also the mandatory reserved ATEs
in each sector.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-07-08 12:15:42 -04:00
Tomi Fontanilles
83cd9f5a01 modules: mbedtls: properly guard PSA_CRYPTO_C
Instead of silently `#undef`ing PSA_CRYPTO_C when TF-M is in use,
enforce that rule at the Kconfig level.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-08 12:14:49 -04:00
Johann Fischer
48dd5c9915 sample: usb: allow samples to be built on all platforms with 'usbd'
Replace platform_allow with integration_platforms, what allow CI to
build samples on all platforms with test feature 'usbd' but still limits
number of platforms when it is invoked with the --integration option.
Replace/add some platforms that already have test feature 'usbd'.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-08 12:13:54 -04:00
Jens Rehhoff Thomsen
efddc8723c Bluetooth samples: Broadcast code handling
The broadcast sink sample no longer treats the broadcast_code_received
semaphore as a boolean.

Fixes #75469

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-07-08 12:12:54 -04:00
Sylvio Alves
3163680427 soc: esp32c6: remove idle source file
risc-v idle call is being fetched from arch/ implementation.
This soc file is not used and can be removed.

Fixes #75540

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-08 12:12:21 -04:00
Henrik Brix Andersen
bbf5183996 MAINTAINERS: use shorter, more intuitive label for llext
Use a shorter, more intuitive label for the Linkable Loadable Extensions
(llext) area.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-08 16:04:13 +02:00
Andrej Butok
c3dd3c69ac soc: nxp: add flashing configuration
- Added a flash runner configuration for rw, mcx, lpc, kinetis and imxrt,
  used for sysbuild multi-image projects like MCUBoot.
- Solved the mass erase issue.
- The sysbuild project "west flash --erase" command caused
  the mass_erase->flash_img1->reset->mass_erase->
  flash_img2->reset sequence.
  It was fixed to the mass_erase->flash_img1->
  flash_img2->reset sequence.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-07-08 16:04:04 +02:00
Emil Gydesen
5901dcbaa7 Bluetooth: Kconfig: Increase BT_HCI_TX_STACK_SIZE for ISO_BROADCAST
When using an encrypted broadcast, the previous value is no
longer enough and caused a stack overflow.

Slightly increased the value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-08 16:03:21 +02:00
Pieter De Gendt
0e9a6ee802 net: buf: Add const to net_buf API
Some public API functions do not modify the net_buf instances and can
declare these arguments as const.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-08 16:02:39 +02:00
Stephan Linz
e823cc5fb4 modules: lvgl: fix initialization macro syntax
Adding a semicolon after the do-while loop in the LV_DEV_INIT()
macro also supports multiple instantiation.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-07-08 15:53:46 +02:00
Daniel Leung
bebff3fb35 soc: mt8195: remove prompts for SoC kconfigs
This removes the prompts for the mt8195 and related kconfigs,
so these cannot be overridden from command line (though
technically they cannot be disabled as they are being selected).
This also prevents them from appearing in the build .config
file as not being set even when we are being for other SoCs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-08 15:53:08 +02:00
Henrik Brix Andersen
370787a227 doc: hardware: peripherals: eeprom: reorganize and add EEPROM shell page
Reorganize the EEPROM periheral documentation to make room for subpages
with additional details. Add a page describing the EEPROM shell module.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-08 15:52:21 +02:00
Pisit Sawangvonganan
5ed3cd4bc9 kernel: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `kernel` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-08 15:51:37 +02:00
Nazar Palamar
b55999d3de samples: bluetooth: exclude cyw920829m2evk_02 from build
exclude cyw920829m2evk_02 from build. For cyw920829m2evk_02
need `west bloobs fetch` (to get BT fw),  which does not
allowed in CI.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-07-08 15:51:21 +02:00
Nazar Palamar
bf17ba9d43 driver: spi: psoc6: fix build error in driver
fix build error related to pinctrl.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-07-08 15:51:21 +02:00
Jiafei Pan
1ed04e7b49 board: imx8mp_evk: update doc to add remoteproc boot
Add document for boot M7 Core by using Linux remoteproc to address
some known issues when boot DDR Zephyr kernel.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-07-08 12:53:22 +02:00
Nils Larsen
dcfc3e7872 drivers: gpio: imx rt11xx: fix wrong gpio pull disable mask
Fixes: #75390
A wrong bit mask (wrong: IOMUXC_SW_PAD_CTL_PAD_PUS_MASK = 0x8) was used.
That bit mask is for PUE/PUS-type gpio registers, but this is the
section for registers with alternative PULL (PDRV) type layout.
Right bit mask: IOMUXC_SW_PAD_CTL_PAD_PULL_MASK

Signed-off-by: Nils Larsen <nils.larsen@posteo.de>
2024-07-08 09:30:15 +02:00
Mark Wang
2ee21ecc0b boards: nxp: add test feature 'usbd' to mimxrt1170_evk
mimxrt1170_evk has supported usb device next stack.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-08 09:28:41 +02:00
Mark Wang
0141bc0f40 sample: usb: mass: add next device sdcard test case
update the sample.yaml file.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-08 09:28:41 +02:00
Mark Wang
9a45300ab5 boards: nxp: enable mcux udc on RT1170-EVK
enable clock and usb phy device tree

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-08 09:28:41 +02:00
Emil Gydesen
c46b2e086b Bluetooth: Kconfig: Add dependency on BT_CONN for PAST
PAST only works if you have a connection, so the PAST
feature should depend on that.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-08 09:27:11 +02:00
Emil Gydesen
711b42ae16 Bluetooth: Host: Fix recv_enabled field for PAST
When syncing to a PA using PAST then the sync_info.recv_enabled
was always just set to true, regardless of what mode was set
during the subscribe parameters.

The mode(s) are now stored in an array (with the default value
as well) so that we can retrieve that information when the PA
has synced via PAST.

It was considered to put the `mode` value into the `bt_conn`
struct, but that would require an API change as the `bt_conn`
parameter for the subcribe function uses `const`.

This commit also modifies the guard for PAST to be the more
correct value CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER instead
of just CONFIG_BT_CONN.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-08 09:27:11 +02:00
Jordan Yates
0010dec4f0 watchdog: wdt_nrfx: don't zero init static
Don't zero initialise the static data structure, as statics are
explicitly initialised to 0 per the C standard, and checkpatch normally
complains about the pattern.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 09:25:24 +02:00
Jordan Yates
23afa2124f watchdog: wdt_nrfx: install return error if enabled
Return the documented error if `wdt_install_timeout` is called after
`wdt_setup`, instead of triggering the state assertion inside of
`nrfx_wdt_channel_alloc`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 09:25:24 +02:00
Jordan Yates
7fe440121f watchdog: wdt_nrfx: feed return error when not enabled
Return an error code if `wdt_feed` is called before `wdt_setup`, instead
of triggering the state assertion inside of `nrfx_wdt_channel_feed`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 09:25:24 +02:00
Hake Huang
e0f772e880 test: pytest: add linkserver support in pytest
pytest supporting add linkserver for nxp platforms

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-07-08 09:23:48 +02:00
Pisit Sawangvonganan
eead5104fc doc: fix typo in multiple directories before v3.7.0 release
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `doc` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-08 09:21:24 +02:00
Declan Snyder
33c87c8e8b boards: frdm_rw612: Fix flash size
Flash size property is in bits, not bytes. The size
of this flash is 512 Mbits, fix this mistake.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-08 09:21:01 +02:00
Alberto Escolar Piedras
a912bb6f14 tests/subsys/ipc/pbuf: Filter out partial native/posix arch builds
Some AMP native simulator targets (like the nrf5340bsim net core)
will not produce a final executable if only one of the core images
is built, when IPC is enabled, as those images require the other
core image to be able to link.
So this test cannot be run when targetting that core alone
(without using sysbuild to build the other).

Let's filter out these targets to avoid twister building
but finding itself with no executable and error out badly
as it cannot run the test.

The filter condition is effectively:
If building for a native target, there must be an .exe being
produced.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-06 17:03:26 +02:00
Alberto Escolar Piedras
7826f7cd20 boards: nrfbsim: Fix testargs with non host libC
Ensure that we call the host libC when allocating space
for a possible set of test arguments even if we are
building Zephyr with an embedded libC.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-06 17:03:26 +02:00
Alberto Escolar Piedras
3da87b9779 kernel kconfig: Do not enable STATIC_INIT_GNU w the old native_posix
native_posix (unlike native_sim) or its breathen (NATIVE_APPLICATION)
link together the "runner" code and the embedded code.
This means that when CONFIG_STATIC_INIT_GNU is set,
any host library code (like the llvm fuzzer) constructors will get
postponed to the Zephyr initialization.
These libraries are unlikely to work if we do this.
(the llvm fuzzer does not)

So let's instead not enable STATIC_INIT_GNU for these targets.
This means possible embedded library constructors will continue to be
picked during the link and be still called during the native runner
initialization instead of during the Zephyr OS initialization as they
were just before we introduced STATIC_INIT_GNU in
6e977ae2d5

Note that native_posix will be deprecated shortly and its users
are strongly encouraged to move to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-06 17:03:18 +02:00
Pisit Sawangvonganan
41b941f9d2 include: drivers: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/drivers` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-06 17:03:10 +02:00
Robert Lubos
e91c47d338 samples: net: zperf: Optimize configuration for better performance
Increase the number of network packets and buffers for better TCP
performance in the sample out-of-the-box.
Decrease the network buffer data size for better buffer management in
the sample (less buffer space wasted for L2 header). The only drawback
of this is reduced TCP TX performance, but less than 2 Mbps in my case.
Finally, enable speed optimizations for another small performance boost.

As the RAM requirements of the sample now increase considerably in the
default configuration, add a note in the readme file about it, and how
to make it fit into smaller boards.

Tested on nucleo_h723zg:
  Before (current defaults):
    UDP      TX          RX
         76.47 Mbps  93.48 Mbps
    TCP      TX          RX
         76.18 Mbps  67.75 Mbps

  After (new defaults):
    UDP      TX          RX
         76.08 Mbps  93.62 Mbps
    TCP      TX          RX
         74.19 Mbps  85.51 Mbps

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-06 17:03:01 +02:00
Emil Gydesen
d05f211289 tests: Bluetooth: tester: Re-add support for checksum
The bug should be fixed now, so it possible to have it enabled as
long as OTS is not registered with the feature flag.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-06 17:02:23 +02:00
Emil Gydesen
03d07950aa Bluetooth: OTS: Fix issue with callbacks not being set
The checks for callbacks in bt_ots_init did not correctly take the
ots_init->features.oacp into account for all callbacks, which
caused some issues.

Slightly optimized the check for ots->cb->obj_read by moving the check
and reducing the number of places the code calls oacp_read_proc_cb.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-06 17:02:23 +02:00
Emil Gydesen
08b9ca4356 samples: Bluetooth: central_iso: Remove K_FOREVER for buf alloc
Allocating a buffer in the system workqueue thread should never
be done wiht a K_FOREVER as that may block the thread forever.

Replace the K_FOREVER with a K_NO_WAIT and slightly modified
the function to handle this case.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-06 17:01:34 +02:00
Marcin Niestroj
2e956c239b drivers: wifi: esp_at: check if MAC address was parsed successfully
Log an error when MAC address was not parsed successfully.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-05 18:45:47 +02:00
Marcin Niestroj
4150765549 drivers: wifi: esp_at: use memcpy() to copy SSID
Target SSID buffer might not be NULL terminated, so use memcpy() instead of
strncpy() for copying it from temporary (AT response fragment) buffer.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-05 18:45:29 +02:00
Marcin Niestroj
f15c4e3adb drivers: nsos: fix resource leak in nsos_adapt_accept() error path
Close file descriptor returned by accept() in error path of
nsos_adapt_accept(), so that file descriptor is not leaked.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-05 18:44:13 +02:00
Jonathan Rico
be61ae4c9c Bluetooth: host: disallow scan with timeout when BT_PRIVACY=y
See comment in code.

Fixes #73634

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-05 18:43:40 +02:00
Miguel Gazquez
3408694960 drivers: memc: fix Kconfig option MEMC_STM32
This commit fixes a bug with the declaration of the Kconfig option
MEMC_STM32.

The option is defined in two files:
- `drivers/memc/Kconfig.stm32`, wich depends on
   - `MEMC`
   - `DT_HAS_ST_STM32_FMC_ENABLED`
-`soc/st/stm32/Kconfig.defconfig`, wich depends on
   - `MEMC`
   - `SOC_FAMILY_STM32`

So, if you have `CONFIG_MEMC=y` in your Kconfig options and you are on a
STM32 SoC, `CONFIG_MEMC_STM32` will be enabled, even if there is no
STM32 FMC enabled.

This Kconfig option causes the driver for the STM32 FMC to be compiled,
regardless of the presence of an enabled node for the FMC.
However, the driver fails to compile if there is no FMC node in the
devicetree. So, if you compile a project with `CONFIG_MEMC=y` on a board
with an STM32 SoC and no enabled FMC, the build will fail.

This commit deletes the Kconfig declaration in the `Kconfig.defconfig`,
as it isn't useful and is the one provoking the bug.
It also add in the `Kconfig.stm32` the compatible `st,stm32h7-fmc`, wich
use the same driver and so need to be enabled by the same Kconfig
option.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-05 18:43:06 +02:00
Emil Gydesen
877895afa5 Bluetooth: GATT: Add additional documention to bt_gatt_unsubscribe
The subscribe parameters shall be a struct that has previously
been subscribed to, as it works as a linked list.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-05 18:41:52 +02:00
Luca Burelli
e35126f83a soc: intel_socfpga_std/cyclonev: enforce ARM_AARCH32_MMU
Currently the code in soc.c depends on the MMU of the CPU being enabled,
but this is not enforced. It is thus possible to cause a build error by
manually disabling it (as is required for some LLEXT tests, see #75289).

Make sure this is averted by explicitly selecting ARM_AARCH32_MMU in the
SoC Kconfig.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-05 18:39:53 +02:00
Fabio Baltieri
ac27d81a95 boards: nucleo: tag some st boards to test for "usbd"
Add the usbd test tag to few ST boards, this should be picking a board
for every variation of the HAL file (checked for #define USBD_FS_SPEED),
so it should catch any inconsistencies between HALs.

There should be one for each of: f0 f1 f2 f3 f4 f7 g0 g4 h5 h7 l0 l4
l5 u5 wb.

Nothing for l1, can't find any boards with a USB port.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-05 18:39:44 +02:00
Fabio Baltieri
4877efd78a boards: nucleo_f042k6: enable USB
The board has a USB port, enable it in devicetree so we can build USB
tests for it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-05 18:39:44 +02:00
TOKITA Hiroshi
40629ac9f9 fb: cfb: Fix CID 394240
This is a simple deletion of unnecessary processing.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-05 18:39:22 +02:00
Jonathan Rico
a7c5fb7065 Bluetooth: GATT: factor out notify callback
- De-duplicate code
- Add `LOG_WRN` on unsubscribe error

Fixes #74720
Fixes #74721

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-05 18:38:17 +02:00
Grzegorz Swiderski
7a10c7dff1 scripts: west_commands: Fix west boards for SoC and arch in modules
Fixes #71761

The `west boards` command parses extra BOARD_ROOTs from Zephyr modules,
so that the boards defined in those modules are automatically listed.

In HWMv2, OOT boards can be described in terms of OOT SoCs, which means
that extra SOC_ROOTs must also be provided. Otherwise, an error message
will be displayed when attempting to list all boards. Therefore, every
Zephyr module SOC_ROOT should be included as well.

In HWMv1 (deprecated), OOT boards can be defined in terms of OOT archs,
but module ARCH_ROOTs had never been included automatically. The fix for
this is long overdue, but it's included for symmetry.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-07-05 14:55:08 +02:00
Lyle Zhu
c9708ff951 Bluetooth: A2DP: Check the pointer before using
Check the pointer `sep` before using it.

Fixes #74734.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-05 12:33:38 +02:00
Lyle Zhu
8276d4f79a Bluetooth: A2DP: Fix NULL pointer references issue
The opposite logic is used to determine if a
pointer is valid.

Correct the judgment logic.

Fixes #74728.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-05 12:32:41 +02:00
Lyle Zhu
6fad658569 Bluetooth: A2DP: Fix NULL pointer references issue
The opposite logic is used to determine if a
pointer is valid.

Correct the judgment logic.

Fixes #74732.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-05 12:32:05 +02:00
Yong Cong Sin
89bf4b2ad9 lib/libc: select PICOLIBC_SUPPORTED if toolchain has it or module exists
Currently, `PICOLIBC_SUPPORTED` could be enabled even when
neither the toolchain has picolibc nor the picolibc module is
present, this can be the case when Zephyr is built with
external toolchain (non-Zephyr SDK) + external build system
where PICOLIBC module doesn't exist.

Fix this by having `PICOLIBC_SUPPORTED` depends on either
toolchain OR module, while taking the libc++ into
consideration.

Here's the full logic table of when the PICOLIBC should
be marked as supported.

libc++  TOOLCHAIN       MODULE          PICOLIBC_SUPPORTED
  0         0             0                     0
  0         0             1                     1
  0         1             0                     1
  0         1             1                     1
  1         0             0                     0
  1         0             1                     0
  1         1             0                     1
  1         1             1                     1

Co-authored-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-05 12:30:42 +02:00
Yong Cong Sin
7950638e53 lib/libc: picolibc: cleanup PICOLIBC_USE_TOOLCHAIN dependencies
Since `PICOLIBC_USE_TOOLCHAIN` is available only if
`PICOLIBC` is enabled, it doesn't need to depend on the latter
again.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-05 12:30:42 +02:00
Robert Lubos
4625fa713f net: mqtt: Fix possible socket leak with websocket transport
In case underlying TCP/TLS connection is already down, the
websocket_disconnect() call is expected to fail, as it involves
communication. Therefore, mqtt_client_websocket_disconnect() should not
quit early in such cases, as it could lead to an underlying socket leak.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-05 12:29:33 +02:00
Lyle Zhu
9be685eefe Bluetooth: A2DP: Access pointer if it is valid
Only access if the pointer `stream` is valid.

Fixes #74735
Fixes #74740

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-05 12:28:45 +02:00
Emil Gydesen
19fe0673f9 Bluetooth: ISO: Tone down some dbg logs
Several log statements were using the regualar LOG_DBG,
but when ISO is actually used, those were called every TX
which at 10ms SDU intervals would fill up the log really fast
and not provided much value outside of some specific debugging.

Modified those logs to use BT_ISO_DATA_DBG which is another
log level for ISO data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-05 12:28:01 +02:00
Carlo Caione
2e1c04a9d4 manifest: Bump libmetal and open-amp
To v2024.05.1

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2024-07-05 12:26:54 +02:00
Jared Kangas
34e4edc28a drivers: eeprom: emulator: correct improper exponentiation
The top-level driver comment states that a uint16_t is used to store
changes if the EEPROM size is smaller than 64kB, or uint32_t otherwise.
However, the 64kB threshold is represented as 2^16 in the actual code,
which is a bitwise XOR instead of an exponent. This causes a uint16_t
to be used only if the size is less than or equal to 18 bytes. Correct
this by using KB(64) instead of 2^16.

Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
2024-07-05 09:18:31 +02:00
Flavio Ceolin
f80c75c3da doc: security: Disclose CVE-2024-3332
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-05 09:18:20 +02:00
Sigmund Klåpbakken
0f776cf0bf arch: arm: cmake: Correct endian in output format
Sets the property `PROPERTY_OUTPUT_FORMAT` to `elf32-bigarm` when
`CONFIG_BIG_ENDIAN` is set to `y`.

Signed-off-by: Sigmund Klåpbakken <sigmundklaa@outlook.com>
2024-07-04 18:01:51 -04:00
Sigmund Klåpbakken
5100f1185d arch: arm: cortex_a_r: Set XPSR endianness bit
When this bit is not set, it defaults to 0 (little endian). This
causes issues for big-endian devices, as data will be accessed using
little endian.

Signed-off-by: Sigmund Klåpbakken <sigmundklaa@outlook.com>
2024-07-04 18:01:51 -04:00
Guennadi Liakhovetski
fb53d2ef8d ace: power: replace pseudo-assembly movi
When switching off memory banks we cannot use movi with arbitrary
immediate arguments, they will be converted by the compiler to memory
accesses. Only constants within the allowed range should be used.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-04 18:01:02 -04:00
Daniel Leung
4ffb813110 tests: logging/dictionary: wait longer for first output
Some hardware takes longer to boot before any output is visible
from the app. So lengthen the initial timeout on waiting for
any output.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 18:00:47 -04:00
Daniel Leung
ddfc39bd63 tests: logging/dictionary: fix pytest log parsing regex
When doing device testing, there may be some other characters
being printed before the dictionary logging header string.
Also the delay boot banner may also be there. So change
the regex to ignore those them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 18:00:47 -04:00
Daniel Leung
04c9637db7 tests: logging/dictionary: fix pytest when built with sysbuild
With sysbuild, the test app is actually built under another
layer of directory where the dictionary JSON file will reside.
Instead of simply using dut.device_config.build_dir, use
dut.devive_config.app_build_dir instead, which takes into
account of that.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 18:00:47 -04:00
Jonathan Rico
ac37d6483a Bluetooth: Host: Remove conn param update checks
The rationale behind that change is that the Application can use the
`bt_conn_le_param_update()` API to signal the controller to reschedule
the link.

Even if the new connection params are within the old ones, the
controller would be free to choose an e.g. smaller interval. The host
API should not prevent this usage.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/74292

Co-authored-by: Knut Eldhuset <knut.eldhuset@nordicsemi.no>
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-04 18:00:35 -04:00
Hou Zhiqiang
2afc6f0210 boards: imx93_evk: ca55: correct board name in yaml
Correct the board name.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-07-04 18:00:17 -04:00
Joakim Andersson
1f07347746 logging: Fix missing CONFIG_ prefix
Fix missing CONFIG_ prefix for log format section strip check.
Logging was still operating on invalid flash addresses.

Fixes #75161

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-07-04 18:08:55 +02:00
Jonathan Rico
3af358d6fd Bluetooth: remove host/adv/resume test
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see #72567.

Prepare that work by removing this test that's in the way.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-04 18:01:03 +02:00
Adam Berlinger
fd45773616 west.yml: stm32: Set __SAUREGION_PRESENT to 0 for STM32H503
This is a mistake in CMSIS header file, since SAU is not present
on STM32H503 devices

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2024-07-04 18:00:45 +02:00
Erwan Gouriou
b98efa2b87 doc: release-notes-3.7.rst: STM32 additions
Update V3.7.0 release notes with new SoC, boards, drivers and features
related to STM32.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-04 18:00:16 +02:00
Erwan Gouriou
e4b03b79e6 samples: stm32: i2c_timing: Fix README header
Move sample README header to the new format designed for cross reference.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-04 18:00:16 +02:00
Daniel Leung
b118da62b8 doc: release,migration-notes/3.7: add bits for serial
This adds some bits about serial drivers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Daniel Leung
f797508c06 doc: release-notes/3.7: add bits about Xtensa architecture
Adds some bits on Xtensa architecture.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Daniel Leung
e783ec6d21 doc: release-notes/3.7: add some bits about I3C
This adds some bits about additions and improvements on I3C.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Daniel Leung
9750920c79 doc: migration-notes/3.7: moving of arch_interface.h
Mention the moving of arch_interface.h from include/zephyr/sys/
to include/zephyr/arch/.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Daniel Leung
018d41845e doc: release-notes/3.7: bits for PCIe
Mention the removal of two functions that have been deprecated
since v3.3.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Alberto Escolar Piedras
1a1032de48 samples/net/dhcpv4_client: Exclude native_posix due to EVENTFD
EVENTFD is not anymore compatible with these targets so let's
disable them with this sample to avoid a failure in twister
otherwise.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-04 17:59:34 +02:00
Dat Nguyen Duy
2457f730f4 soc: nxp_s32: disable TCP/UDP checksum only if eth driver enabled
Only disable TCP/UDP software checksum if the ethernet
driver enabled. This is to avoid interfere with net tests
which don't need the on board driver to function

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-07-04 13:36:55 +02:00
Derek Snell
a610b923df boards: nxp: mimxrt1160_evk: enable LPI2C5 inputs
Enable inputs in pinctrl config.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-07-04 13:27:03 +02:00
Derek Snell
78fd771640 boards: nxp: mimxrt1160_evk: fix LPI2C pinmux
Fixes typos in pinctrl pinmux nodes

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-07-04 13:27:03 +02:00
Leifu Zhao
f504935843 dts: x86: intel: ish: Remove d0i1 and modify d0i2
Remove d0i1 and change threshold for d0i2 to 10ms for pm setting
according to the requirements to pass CTS for chrome projects.

Signed-off-by: Leifu Zhao <leifu.zhao@intel.com>
2024-07-04 13:26:24 +02:00
Aleksander Wasaznik
c33e721c01 Bluetooth: host: test: remove adv/resume2
I am the original author of the test that is being removed. The test was
added in https://github.com/zephyrproject-rtos/zephyr/pull/70670 to try
to specify the behavior of automatic advertiser resuming in the Host.

It turns out now that the behavior of this feature depends on which
Controller is in use and can fail incorrectly.

The test assumes the DUT will be able to create `CONFIG_BT_MAX_CONN`
peripheral connections. But this is not necessarily true. E.g. Some
Controllers, like the SoftDevice Controller, may reserve some Host
connection slots for central roles, making the max number of peripheral
connections smaller.

In conclusion, the test is not correct and should be removed.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-07-04 13:26:01 +02:00
Henrik Brix Andersen
ec601b89df doc: update documentation to use the --shield west build command arg
Update zephyr-app-commands to generate "west build --shield ..." for west
invocations using shields while still generating "cmake .. -DSHIELD=..."
if the tool is set to "cmake".

Updated the various shield documentation pages to recommend using
"--shields" over "-DSHIELD" to match the results of the corresponding
zephyr-app-commands code snippets.

Add proper support to zephyr-app-commands for specifying multiple shields
(using a comma-separated list) and fix a few invocations to use this.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-04 13:25:00 +02:00
Flavio Ceolin
0d0c5afe7a doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6444

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
5b484b0948 doc: relnotes/3.7: Add info about CVE-2024-6444
Information about CVE-2024-6444 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
c8987a917c doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6443

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
22e94def61 doc: relnotes/3.7: Add info about CVE-2024-6443
Information about CVE-2024-6443 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
2251e3c0d2 doc: relnotes/3.7: Add info about CVE-2024-6259
Information about CVE-2024-6259 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
0f4f7431ca doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6442

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
b3e7115f34 doc: relnotes/3.7: Add info about CVE-2024-6442
Information about CVE-2024-6442 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Dev Joshi
a9e6fa4b29 drivers: I2C_DW: Fix I2C scan example
Solves two identical issues listed below:

Issue 1: I2C scanner example for DesignWare hardware gets stuck
indefenitely resulting in system hang up.This is because DW I2C driver
does not handle 0 byte transfer correctly which is the case for I2C
scan example.

Fixed it by overwriting the msg length to 1 if it is 0 and the
buffer is not NULL.

Issue 2: Similarly, if the I2C pins are not pulled up (nothing connected
 to I2C pins), the DW hardware does not actually send the data
(assuming contention on the bus) hence not releasing the semaphore
resulting in calling thread waiting forever.

Fixed it by adding a timeout to k_sem_take call and return error if
cannot successfully acquire it.

Tested scenarios where nothing was connected on the bus and saw the
I2C scan example complete the whole scan command. Then connected
two different sensors on the I2C bus and saw both the address on the
console. Tested both the uses cases on Raspberry Pi Pico.

Fixes #70332.

Found that micropython tackles the same issue by implementing I2C scan
commands with Soft I2C because the same reason mentioned in Issue 1.

Signed-off-by: Dev Joshi <quic_devbhave@quicinc.com>
2024-07-04 08:23:43 +02:00
Armando Visconti
cd7119d292 drivers/sensor/st: ism330dhcx: fix gyro range setting
Fix ism330dhcx_gyro_fs_map[] and ism330dhcx_gyro_fs_sens[] arrays
initialization in order to be able to correctly convert from dps
to register raw value through the array index.

Fix: #72617

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-07-04 08:19:03 +02:00
Armando Visconti
50ad2e05dc drivers/sensor/st: ism330dhcx: fix odr setting
Loop inside the odr array until we find the first
value which is "<=" (amd not "==") the argument.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-07-04 08:19:03 +02:00
Furkan Akkiz
abef5a3c86 drivers: serial: uart_max32: Fixing bugs and code optimizations
- Defined 'api_configure' function outside of
'CONFIG_UART_USE_RUNTIME_CONFIGURE' macro because it is the only
configuration function and used in device initialization function.
- Removed unnecessary 'IF_ENABLED' part.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-07-04 08:17:27 +02:00
Fabio Baltieri
cac70373aa github: hello_world_multiplatform: upgrade from macos-12 to macos-13
Upgrade the CI image for x86 macos from 12 to 13, this is apparently the
latest "free" x86 macos runner that will be supported, let's switch to
it until it gets deprecated.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-03 17:00:50 -04:00
Marcin Niestroj
248e54f9c1 drivers: nsos: add missing 'break' in switch statements
There are 2-level switch statements (one switch inside another) which were
not properly terminated with 'break' statements, leading to implicit
fallthrough. Fix that.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-03 17:00:28 -04:00
Nicolas Pitre
0c1301e728 demand_paging: LRU eviction: remove restriction on PF index 0
The first page frame index was reserved for head and tail ^pointers.
However there are cases where the first frame is actually made
evictable and would trigger the assertion guarding against that.

Fix this by applying an offset to actual frame indexes.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-07-03 15:07:03 -04:00
Alessandro Manganaro
375bf0b835 drivers: bluetooth: hci: hci_stm32wba.c
Providing setup implementation for
STM32WBA BLE HCI driver

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-07-03 15:06:48 -04:00
Alessandro Manganaro
2c42032ef4 drivers: bluetooth: hci: Kconfig
Enabling BT_HCI_SET_PUBLIC_ADDR option for
STM32WBA BLE HCI driver

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-07-03 15:06:48 -04:00
Filip Kokosinski
dcc5dd27fa soc/openisa: rely on the CONFIG_RISCV_ISA_EXT_* options for arch string
This commit makes the RV32M1 SoC rely on the default behavior of relying on
the `CONFIG_RISCV_ISA_EXT_*` config options, and removes the
`zephyr_compile_options` override when the standard toolchain is used.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-03 15:06:14 -04:00
Filip Kokosinski
18ddac4acf soc/openisa: enable the C extension
According to the RV32M1 Series Manual, Rev 1.1 RV32M1 series supports the C
extension, and doesn't support the A extension. Apply fixes accordingly.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-03 15:06:14 -04:00
Nazar Palamar
af04e0d3fa drivers: wifi/airoc: Update cb_search to check SSID length
Issue:
When there are two similar SSIDs (e.g. MySSID and MySSID_Guest),
the current implementation may use the wrong (truncated) SSID
for the connection. See issue#74910 for details.

Fix:
Updated airoc_wifi_scan_cb_search to filter all SSID where
length is different than the user-entered SSID.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-07-03 15:05:57 -04:00
Benjamin Cabé
f3a110bcb9 doc: release: Add highlights of Zephyr 3.7 release
This introduces a high-level summary of the most notable changes in 3.7.
This also tries to capture the most useful changes since previous LTS.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-03 15:04:36 -04:00
Alberto Escolar Piedras
846556fa09 Revert "fdtable: read, write, close: only execute methods if non-NULL"
This reverts commit a9a909c558.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
97e925e57d Revert "posix: device_io: require a full libc for c89 functions"
This reverts commit 6f62292d42.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
61e81a7ba8 Revert "posix: device_io: provide stdin, stdout, stderr variables"
This reverts commit 86b92934cc.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
c69ff543ed Revert "posix: device_io: implement pread() and pwrite()"
This reverts commit 2d72966516.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
1df86af309 Revert "net: sockets: move poll implementation to zvfs"
This reverts commit 93973e2ead.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
14e4de6415 Revert "net: sockets: move select() implementation to zvfs"
This reverts commit 49ac1912b2.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
1a2d508e68 Revert "posix: device_io: implement pselect()"
This reverts commit 305ec62a6b.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
a111cec63d Revert "posix: device_io: implement fdopen()"
This reverts commit 581a0f56e6.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
9f38377a66 Revert "posix: device_io: implement fileno()"
This reverts commit 48dff5562c.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
ade54b35ca Revert "posix: device_io: use mode argument correctly in open()"
This reverts commit 499a633976.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
6f0b8b5e66 Revert "doc: posix: mark posix device io as complete"
This reverts commit d9855da483.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
db5266caa4 Revert "posix: kconfig: remove select y from non-user-selectable help"
This reverts commit b82b5b0734.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
9a02561406 Revert "posix: procN: add missing alias for getpid()"
This reverts commit be086f174c.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
772ba464f7 Revert "posix: add stubs for signal.h functions that need process support"
This reverts commit b2243af32d.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
0642737847 Revert "tests: posix: headers: add checks for posix signals option group"
This reverts commit 308322e9b9.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
b2ca594f47 Revert "doc: posix: mark posix signals supported with undefined behaviour"
This reverts commit b10f1ca3a6.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
72e2787e70 Revert "posix: fd_mgmt: implement dup(), dup2(), fseeko(), and ftello()"
This reverts commit b18cad15b9.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
57af8a4f64 Revert "doc: posix: mark posis fd mgmt as supported"
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

This reverts commit e9b676a9ab.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Chaitanya Tata
650227d8c4 modules: hostap: Fix check for iface up
We only need the interface to be administratively up, the operationl
status is managed by the WPA supplicant.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
176a47c2df modules: hostap: Fix SoF
Due to recent changes to hostap, the stack usage is increased, so,
increase the stack size to fix SoF.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
f4e0a1abea modules: hostap: Fix MbedTLS config issue
Fixes build issues when Wi-Fi security is enabled for default
implementation, the alternative implementation is managed separately,
and doesn't need these.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
515f1fee48 modules: hostap: Fix MbedTLS TLS
TLS is only for Enterprise, so, move to enterprise macro.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Jamie McCrae
8924d563bb soc: nordic: Fix run once regex issue and add missing entries
Fixes an issue whereby multiple boards would be grouped when using
a regex to group them, and adds missing nRF91 entries to the list

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-03 09:33:21 -04:00
Guennadi Liakhovetski
32d05d360b intel_adsp/ace: power: fix firmware panic on MTL
The power_down() function attempts to lock the hpsram_mask on-stack
variable in data cache, which causes an exception. Moving it to .bss
by making it static fixes it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-03 15:31:12 +02:00
Jared Kangas
8ec3c045f8 drivers: adc: lmp90xxx: fix checksum mismatch return value
During channel reads, zero is returned on CRC mismatches: the returned
error variable is not written to after a previous non-zero check. Return
-EIO to mirror other drivers' checksum validation behaviors.

Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
2024-07-03 15:29:07 +02:00
Emil Gydesen
b413b505ee Bluetooth: BAP: Broadcast: Fix state checks
The existing state checks for both the broadcast sink
and broadcast source only ever checked the first BIS.
This sort of made sense, since they are all linked by HCI
(i.e. they share the same state), but there is a race condition
in the ISO and BAP callbacks that could allow applications
to delete sinks and sources before all the ISO callbacks
had been handled.

By treating the sink and source states as the highest value
of the BIS, then we better treat all BIS the same.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-03 15:28:17 +02:00
Mathieu Choplain
38ab4b38db tests: dma/chan_blen_transfer: place TX buf in RAM
This commit removes the const qualifier from TX (source) buffer
of the chan_blen_transfer DMA test to ensure it gets placed in
RAM rather than flash. This ensures the test can pass on hardware
where the DMA controller is unable to access flash.

Fixes #75125.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-03 15:27:26 +02:00
Jukka Rissanen
c77b818679 net: ipv6-pe: Verify that hmac calculation was ok
Make sure to check return values of mbedtls hmac APIs so that
the digest is calculated properly.

Fixes #75259
Fixes #75260
Fixes #75261

Coverity-CID: 366271
Coverity-CID: 366277
Coverify-CID: 366279

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-03 15:25:58 +02:00
Jeppe Odgaard
7e22942078 samples: modules: canopennode: add bootloader argument
The README "Testing CANopen Program Download" section needs a sysbuild
MCUboot option. Otherwise only the application is built and the test will
fail.

This has probably been missing since commit
238d113185.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-07-03 15:22:01 +02:00
Yong Cong Sin
a6e672f9b2 doc: modules: fix indentation
Fix the indentation of `bar` in the code block.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-03 08:53:46 +02:00
Tom Burdick
ec36e3b97c docs: Add icm42688 changes to migration guide
Adds the icm42688 devicetree binding changes to the migration guide
noting that the previous bindings were not at all in use.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-03 08:52:47 +02:00
Yuval Peress
1b51740fa3 twister: Fix gTest harness
The gTest harness asssumed that the lines end with the test name, but
some gTest implementations include the test duration in the line. Update
both the tests and regex to allow this and also avoid capturing
characters into the `test_name` that cannot be valid test name chars.

Fixes #72318

Signed-off-by: Yuval Peress <peress@google.com>
2024-07-03 08:52:13 +02:00
Jukka Rissanen
9abca61841 doc: net: Add info about misc network config options
Add information about these missing Kconfig options:

CONFIG_NET_CONFIG_MY_IPV6_ADDR
CONFIG_NET_CONFIG_PEER_IPV6_ADDR
CONFIG_NET_CONFIG_MY_IPV4_ADDR
CONFIG_NET_CONFIG_MY_IPV4_NETMASK
CONFIG_NET_CONFIG_MY_IPV4_GW
CONFIG_NET_CONFIG_PEER_IPV4_ADDR

Fixes #75211

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-03 08:50:22 +02:00
Peter Gielda
f925af9c47 dts: riscv: Fix incorrect plic size
Fix wrong size of the plic node dts entry.

Signed-off-by: Peter Gielda <pgielda@antmicro.com>
2024-07-02 22:21:17 -04:00
Daniel Leung
bd2fc8009b doc: doxygen: provide a way to override configs locally
This allows specifying the environment variable
ZEPHYR_DOXYGEN_OVERLAY pointing to a overlay file for
doxygen to override configs in the base zephyr.doxyfile.in
for local document builds.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-02 19:25:53 -04:00
Erwan Gouriou
5ce7462dcc west.yml: TF-M: Fix 2 issues preventing usage on STM32 targets
Points to the updated T-FM

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-02 19:24:58 -04:00
Tahsin Mutlugun
700ebe1b55 tests: drivers: i2c: i2c_target_api: Use address-width property
Boards that use 1024 byte EEPROM buffers need 16-bit address widths
otherwise eeprom_target driver will cause build failure.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Tahsin Mutlugun
223447262c tests: drivers: i2c: i2c_target_api: Support 16-bit word addresses
Existing tests fail when 16-bit address width is used. Adjust the code
to support 16-bit addresses as well.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Fabio Baltieri
36d90be198 drivers: udc_stm32: only check for HS_SPEED if defined
Seems like not all stm32 devices define USBD_HS_SPEED in the HAL, only
check for USBD_HS_SPEED if defined. Fixes a build failure with the new
stack on F1 MCUs.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-02 19:23:35 -04:00
Erwan Gouriou
6700a154be west.yml: hal_stm32: Remove autoconf.h
Sync with hal_stm32 PR

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-02 14:25:14 +02:00
Eve Redero
cc3558ba00 doc: detail how to find the drop-down version selector
Adding more guidance in the documentation website top banner

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2024-07-02 14:19:46 +02:00
Benjamin Bigler
81556d6150 drivers: ethernet: phy_mii: check if there is a mdio config
In fixed-link mode, mdio remains unconfigured. This results in a null
pointer dereference, triggering a bus fault

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-07-02 14:18:46 +02:00
Jonathan Rico
85c57c2da3 Bluetooth: host: ensure ownership of conn on TX path
This is a bug-fix:

When upper layers want to send something, they add a `conn` object to a
list. They do so by adding a node on `struct conn` rather than the object
itself.

We forgot to increase the reference count of the connection object when
doing so. This means that there can be a scenario where the conn object is
destroyed and re-used while still being on the TX list/queue.

This is bad for obvious reasons.

This patch fixes that by:
- increasing the refcount when putting on the TX list
- decreasing the refcount *only* when popping off the TX list
- passing a new reference from `get_conn_ready` into `bt_conn_tx_processor`

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-02 14:18:23 +02:00
Robert Lubos
71f668d1f3 samples: net: dhcpv4_client: Enable DNS in the sample
The DHCP server can distribute DNS addresses, hence enable DNS resolver
in the sample to show this functionality.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-02 14:17:16 +02:00
Robert Lubos
28ed03afc4 samples: net: dhcpv4_client: Replace example DHCP server with kea
Currently used DHCP server in the sample, dhcpd, is no longer maintained
and reached EOL. Therefore, update the sample's readme file with a
sample configuration for its successor, kea.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-02 14:17:16 +02:00
Yong Cong Sin
4f1ee4b753 arch: riscv: irq: include util_macro.h for the macros
Macros like `BIT()` & `BIT64()` from the `util_macro.h` are
used, include their header to compile properly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 14:14:35 +02:00
Jukka Rissanen
9647db8808 net: dns: Avoid superfluous error message
If we have configured the DNS dispatcher to be only as a
responder but receive a query response, or if we are only
as a resolver but receive a query, then the dispatcher just
ignores the packet and returns -ENOENT.

Unfortunately we print an error message in this case

[00:10:18.818,000] <err> net_dns_dispatcher: DNS recv error (-2)

which is totally unnecessary and causes confusion so do not
print an error message in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-02 14:11:15 +02:00
Sreeram Tatapudi
d0474cefde tests: bluetooth: shell: Enable flow control
Enabling UART flow control for CYW20829

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Sreeram Tatapudi
e3f4a63ac0 soc: infineon: cyw20829: Updates linker script
Add missed #include <zephyr/toolchain/common.h>
in linker script to fix build error with
samples/subsys/bindesc/hello_bindesc

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Sreeram Tatapudi
28b03b86b7 samples: bluetooth: Update samples to support cyw920829m2evk_02
Update bluetooth projects to support cyw920829m2evk_02 platform

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Yong Cong Sin
e912a95355 arch: riscv: update the description of INCLUDE_RESET_VECTOR Kconfig
Update the description of the `INCLUDE_RESET_VECTOR` Kconfig so
that it is more clear to the user what it does.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Yong Cong Sin
6de21fc1d2 Revert "soc: riscv-privileged: support SoCs without reset vector"
This reverts commit 75f5d98002.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Yong Cong Sin
5ee20e11ef soc: nordic: vpr: select INCLUDE_RESET_VECTOR for default implementation
For SOCs that do not implement a custom `__reset` function,
select `INCLUDE_RESET_VECTOR` so that Zephyr provides a default
implementation that simply jumps to `__initialize`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Henrik Brix Andersen
e5aad45bb1 west: commands: runners: canopen: increase default SDO timeout
Increase the default SDO timeout for the CANopen program download west
runner from 0.3 seconds to 1 second. Depending on the flash size and speed,
a full erase may take slightly longer than 300 ms.

The timeout can be customized by using the --sdo-timeout runner parameter.

Fixes: #73987

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-02 09:20:57 +02:00
Declan Snyder
94815e7955 tests: arm_irq_vector_table: Fix RT/WXXX
Fix preprocessor expression for custom vector table due
to OS timer isr being needed. The parentheses are missing.
Also add RW6xx to the list which has the same isr needed for ostimer.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-02 09:19:46 +02:00
Gerson Fernando Budke
768b8bbca3 scripts: west robot & simulation: Fix OOT
The current version of scipts do not consider OOT boards use cases and
the tests with robot now are strict to only one robot file, which is
not realistic for real environment. This address those issues and allow
multiple testsuits at command line and lists at tests entries. It add
another test parameter to allow configure robotframework options.

Fixes: #74563

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2024-07-01 16:10:35 -04:00
Krzysztof Chruściński
0825f24910 soc: nordic: nrf54h: DMM shall be applied only to rad&app
cpuppr can only use slow peripherals and uses RAM3 as RAM so
it does not need to use DMM.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Krzysztof Chruściński
7a6b355535 tests: boards: nrf: dmm: Adjust test to dmm changes
After changing dmm to not apply data cache line alignment for all
regions test needs to be aligned.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Krzysztof Chruściński
5f32265459 soc: nordic: common: dmm: Fix memory utilization
DMM was enforcing cache line alignment all memory regions, including
those which were not cacheable. Fixing it by using memory attribute
from the device tree to determine if alignment needs to be applied.

Because of that memory usage was significantly increased because
even 1 byte buffers (e.g. for uart_poll_out) was consuming 32 bytes
(cache line size).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Xudong Zheng
19c1f9f6c5 drivers: serial: pl011: add support for hardware flow control
Flow control will be enabled for UART if hw-flow-control is set.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-07-01 16:08:23 -04:00
Pisit Sawangvonganan
94b752d2b4 lib: smf: use while (true) in get_child_of for better clarity
Replace the condition-less `for` loop (`;;`) in `get_child_of` with
a `while (true)` loop and remove the redundant `return NULL;`
at the end, which is never reached.

This change aims to enhance readability since `while (true)` is better
suited for this scenario.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-01 16:08:05 -04:00
Hakan Jansson
f371ea4b97 boards: infineon: cyw920829m2evk_02: update documentation
Update documentation, mainly to clarify use of onboard KitProg3 debug
adapter and Infineon custom OpenOCD.

Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
2024-07-01 16:07:42 -04:00
Krzysztof Chruściński
ce157c689d tests: lib: spsc_pbuf: Do not run test with cache
Test was using a configuration which enforces cache management in the
packet buffer. However it shall not be used if producer and consumer
is the same core. Testing this configuration on a single core does
not make sense as it actually fails on cores with data cache.

Making this configuration build_only so it is checked against
compilation errors.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:07:30 -04:00
Krzysztof Chruściński
0bb25d2e17 lib: os: spsc_pbuf: Clarify using cache management in the module
Packet buffer can be used for sharing data between cores. In that
case when any core has data cache then data cache handling must
be enabled in the module. However, it shall never be enabled when
the packet buffer is used on a single core. Adding that information
to the documentation.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:07:30 -04:00
Jan Zyczkowski
b737598dcf boards: nordic: Change NRFS logs to debug level
Change NRFS logs to debug level not to break tests.

Signed-off-by: Jan Zyczkowski <jan.zyczkowski@nordicsemi.no>
2024-07-01 16:07:15 -04:00
Johann Fischer
6aaad0a5cd drivers: udc_stm32: handle ZLP flag
A function, such as CDC ECM, can set the ZLP flag to handle a
class-specific protocol. This is not to be confused with the ZLP role in
control transfers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-01 16:06:26 -04:00
Johann Fischer
de728c393b drivers: udc_stm32: implement driver API to get actual device speed
Implement driver API to get actual device speed.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-01 16:06:26 -04:00
Henrik Brix Andersen
c4c5f168e8 ci: ignore changes to the CANopen program download runner
Ignore changes to the CANopen program download west runner in CI.

This script is only executed when performing a DFU using the CANopen
protocol via CAN, which is never triggered in CI anyways.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-01 16:05:44 -04:00
Henrik Brix Andersen
f14697d4c3 MAINTAINERS: put the CANopen runner script under the CAN area
Put the scripts/west_commands/runners/canopen_program.py script under the
CAN area.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-01 16:05:44 -04:00
Emil Gydesen
0eb612b28b doc: Bluetooth: Audio: Remake zephyr_gaf.svg to graphviz
Remake the Zephyr Generic audio framework (GAF) figure to a graphviz
version.
This makes it easier to modify it directly in the .rst file.

This also adds the missing GMAP/GMAS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Emil Gydesen
05b11e58eb doc: Bluetooth: Audio: Remake gaf.svg to graphviz
Remake the Generic audio framework (GAF) figure to a graphviz version.
This makes it easier to modify it directly in the .rst file.

This also adds the missing GMAP/GMAS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Emil Gydesen
0b4d7523fd doc: Bluetooth: Audio: Remake audio_arch to graphviz
Remake the Bluetooth Audio Architecture figure to a graphviz
version. This makes it easier to modify it directly in the
.rst file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Nikolay Agishev
80fe531119 ARCMWDT: Fix issues with posix types
Fix posix pid_t type redifiniton (zephyr vs arcmwdtlib).
Add omitted in arcmwdtlib type sigevent.

This Fixes https://github.com/zephyrproject-rtos/zephyr/issues/75105

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-07-01 18:14:34 +02:00
Emil Gydesen
fa447948d2 Bluetooth: BAP: Scan del: Overwrite metadata if len == 0
If the metadata length is 0 in the mod source operation,
we set the length to 0 and memset the stored value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:14:14 +02:00
Benjamin Cabé
1f0c22eb01 net: ptp: fix incorrect req_timestamp decoding
Removed incorrect use of ntoh to decode Delay_Req timestamp

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 18:13:42 +02:00
Benjamin Cabé
a89a5ee52d net: ptp: fix offset check by adding missing int64_t cast
Add cast to NSEC_PER_SEC macro to correctly check offset.
Prior to this commit, the would eval to true incorrectly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 18:13:42 +02:00
Benjamin Cabé
5a07cf4e0d doc: esp32: fix rendering of MCUboot note
Use proper syntax to ensure rendering of the
CONFIG_BOOTLOADER_MCUBOOT snippet is correct.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 18:12:43 +02:00
Henrik Brix Andersen
fa4537df8f ci: move github runners from macos-11 to macos-14
Move the GitHub runners currently on macos-11 to macos-14 as the former is
no longer supported by GitHub.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-01 18:12:21 +02:00
Gerard Marull-Paretas
574f939432 device: only define/initialize metadata for DT devices
Check if node identifier is valid to define and initialize device
metadata. Without this patch, "software devices", ie, DEVICE_DEFINE,
would fail to compile when enabling the device metadata feature.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-01 09:25:27 -04:00
Gerard Marull-Paretas
91e16f16b3 device: add missing comma to Z_DEVICE_INIT
When PM_DEVICE is enabled, pm_base needs to be expanded with a trailing
comma.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-01 09:25:27 -04:00
Alex Fabre
9b9d455f02 boards: st: fix sysbuild multi image flash
Problem:

When flashing a multi-image project with STLink through sysbuild,
the flash utility is told to erase the whole flash between each
single image flash.

Resulting in a partial flash where only the last image is effectively
stored on flash...

Correction:

A `west flash` must not implicitly perform a mass erase on its own.

If a flash erase is required, the option has to be passed manually.

The problem is discussed in the following issue:
zephyrproject-rtos/zephyr#69582

Due to CI tests errors, the correction is not applied on
eval board `b_u585i_iot02a`.

See following issue:
zephyrproject-rtos/zephyr#75164

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2024-07-01 09:06:50 -04:00
Guillaume Gautier
c93d6b8559 drivers: adc: stm32: apply extended calibration on u5
Some STM32U5 can apply an extended calibration to enhance the ADC
performance.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-07-01 09:06:22 -04:00
Guillaume Gautier
aa670f7e4a drivers: adc: stm32: check ldo ready bit
For STM32H7, U5 and WBA, check the LDORDY bit of the ADC ISR register
after enabling the internal regulator. This method is safer than the
delay.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-07-01 09:06:22 -04:00
Hao Luo
faa5fa1ab0 drivers: i2c: bugfix for ambiq i2c driver
Added k_sem_give for error return case.
Changed enabled interrupt bits.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-07-01 09:06:05 -04:00
Valerio Setti
3dac7cb936 MAINTAINERS: add valeriosetti as collaborator for Mbed TLS module
Previous commit 8defc560fe forgot
to add valeriosetti also in "West project: mbedtls". This commit
fixes this.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-07-01 09:05:45 -04:00
Krzysztof Chruściński
e367231f29 drivers: uart: uart_elementary: Add missing pull-ups to nrf54h20dk
Add missing pull-up for RX pin in nrf54h20dk dual uart configuration.
Lack of pull-up was causing test failures.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 09:05:33 -04:00
Jiafei Pan
d5a91a24de dts: pinctrl: unify pinctrl binding for imx8mp/n/m
Currently imx8mm/n use pinctrl binding of nxp,imx8m-pinctrl.yaml which
is used for imx8mq series platforms, but imx8mm/n have different pinctrl
hardware module with imx8mq, so change imx8mm/n to use binding of
nxp,imx8mp-pinctrl.yaml as imx8mm, imx8mn and imx8mp have the same
pinctrl hardware module.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-07-01 09:05:02 -04:00
Benjamin Cabé
f19446f35d drivers: ethernet: stm32: fix PTP on STM32F7
As of recent update of stm32f7 HAL to cube version V1.17.2
the workaround for misspelled HAL_ETH_PTP_CONFIGURATED macro
is not needed anymore, and causes PTP support to fail to compile.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 09:04:43 -04:00
Alessandro Manganaro
594e614f49 soc/st/stm32/st32wbax: STM32WBA55 BLE Ext Adv Fix
SYSTEM_WORKQUEUE_STACK_SIZE increase is required to fix not
only BLE Ext Adv (70935), but also other BLE use cases according
STM32WBA HCI driver

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-07-01 09:04:32 -04:00
Alessandro Manganaro
ef91738b86 west.yml: STM32WBA55 BLE Ext Adv Fix
STM32WBA55 BLE Extended Advertising issue (70935) fixed
using a correct BLE Controller configuration.

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-07-01 09:04:32 -04:00
Tim Lin
c79432e108 drivers/input: it8xxx2: Add critical section to prevent race conditions
The KBS_KSOH1 register contains both keyboard and GPIO output settings.
Not all bits are for the keyboard will be driven, so a critical section
is needed to prevent race conditions.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-07-01 09:04:14 -04:00
Henrik Brix Andersen
951a0daa55 boards: nxp: lpcxpresso55xxx: list USB device as supported
List USB device and USB device "next" as supported on the NXP
LPCXpresso55S16 (which uses dedicated USB RAM) and LPCXpresso55S36 (which
does not use dedicated USB RAM).

This allows testing these two implementations during CI runs.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-07-01 09:03:48 -04:00
TOKITA Hiroshi
700910edfc doc: release: 3.7: Remove the duplicated colon.
Beautify the line about the support of the Arduino UNO R4 WiFi board.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-01 09:03:37 -04:00
TOKITA Hiroshi
e0f148fdb9 doc: release: 3.7: Release notes for Renesas EK-RA8M1 board
Add Renesas EK-RA8M1 board that is supported in release 3.7

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-01 09:03:37 -04:00
Abderrahmane Jarmouni
41ab2d4aca doc: stm32h747i_disco: minor fix
minor doc fix.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-07-01 09:03:26 -04:00
Benjamin Cabé
6e4a45f7a9 doc: css: Use body color for captions
Make sure that captions (tables, figures, ...) can be properly
seen on both light and dark them by setting their text color
to the default "body" color.
Fixes #73190.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 09:02:54 -04:00
Ian Morris
2c34da96f0 drivers: clock_control: ra: fix issue with setting memwait cycles
Setting the number of memory wait cycles must take place while the clock
is set to 32MHz or less. This patch ensure the MEMWAIT register is
changed before the clock is changed from its default value (of 8MHz).
Note that in order to set MEMWAIT to 1 the power control mode must be
set to high speed (which is why the lines of code interacting with the
OPCCR register have also been moved).

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-07-01 09:17:54 +02:00
Chang Feng
971a0d1d93 driver: spi: gd32: fix spi reg clear wrong flag
SPI DMATEN and DMAREN flags are in SPI_CTL1 register. fixed wrong register.

Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2024-07-01 09:16:22 +02:00
Andreas Klinger
ac4878e9d0 drivers: gnss: gnss_u_blox_m10: fix compiler warning
Fix warning on implicit declaration of function 'malloc' when compiling
gnss_u_blox_m10.c.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2024-07-01 09:14:12 +02:00
Flavio Ceolin
bb56c3898c bluetooth: host/classic: Fix possible buffer overflow
Fix possible buffer overflow in rfcomm. Check the buffer len
before read it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-01 09:13:22 +02:00
Alberto Escolar Piedras
40810983ea release: Zephyr v3.7.0-rc2
Set the version to v3.7.0-rc2

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-29 13:03:00 +02:00
Jukka Rissanen
3b72fe557e drivers: eth: e1000: Use double with PTP clock
Instead of mixing floats and doubles, convert the code to
use double so that we avoid float->double conversion warning
from compiler.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
c95f61f688 samples: net: txtime: Do not run qemu_x86 with twister
The txtime can be run manually with qemu_x86 but it is enough
to have native_sim compiled with twister.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
ba88c50fb3 samples: net: txtime: Add e1000 overlay for qemu_x86
This allows user to run the sample in qemu_x86.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
d9703934f1 samples: net: txtime: Add support for native_sim board
native_sim needs to enable PTP clock support

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
d121e88390 samples: net: txtime: The option type should be int
When setting boolean options using setsockopt(), the option
type should be int as the size of the option type is checked
and only int is accepted.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Torsten Rasmussen
2bfea20d70 cmake: tf-m: create tfm_api dependency on tfm_s.hex
Incremental builds for TF-M are not picked up by Zephyr linking stage.
Code changes to tf-m repository results in a rebuild of TF-M and thus
an updated tfm_s.hex (and other files).

tfm_s.hex is merged together with the zephyr hex to form a final merged
hex file for flashing. This is done as a post-build command, however
such as step cannot take extra dependencies. The Zephyr target can have
extra dependencies, however that will only ensure the dependency is
brought up-to-date when Zephyr re-link, not re-linking Zephyr when the
dependency changes.

Therefore an object dependency is placed on the interface.c file for
Zephyr TF-M interface implementation, which ensures the tfm_api library
is brought up-to-date whenever TF-M rebuilds, and this update again
ensures the Zephyr itself is re-linked whenever TF-M rebuilds.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-29 05:24:49 -04:00
Yong Cong Sin
cea6bf555f os: fdtable: include zephyr/kernel.h for struct k_mutex
Was getting the following error:

include/zephyr/sys/fdtable.h:150:38: warning: 'struct k_mutex'
declared inside parameter list will not be visible outside of
this definition or declaration
  150 |                               struct k_mutex **lock);
      |                                      ^~~~~~~

(#51667) tried to fix this by including `zephyr/sys/mutex.h`,
but `struct k_mutex` is defined in `zephyr/kernel.h`, so
include the latter instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-29 05:21:42 -04:00
Maciej Perkowski
a033ba65d2 twister: Add warning to the "-footprint-from-buildlog" flag
The flag won't work with sysbuild since there is no way to
reliably tell to a parser which data came from which image.

fixes: #74092

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-28 21:12:57 -04:00
Ederson de Souza
d83a649a67 lib/posix: Get uptime in ticks instead of cycles
__z_clock_nanosleep function was getting current time in cycles, via
k_cycle_get_32(), to perform its time calculations. However, when calling
k_sleep() to actually sleep, times are measured in ticks.

This causes a problem when there's a big skew between the uptime
measured in cycles vs uptime measured in ticks: in some platforms, the
system clock maybe up for a long time already when Zephyr starts
counting ticks, for instance, while downloading an image via PXE. In
this case, the calculations done inside __z_clock_nanosleep end up
measuring a much bigger current time than expected, thus sleeping too
much, basically all the time since system clock initialization.

This patch fixes that by avoiding the cycle trip: stick to ticks,
instead. They start counting from Zephyr initialization instead, which
is the expected uptime.

Fixes #69608

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-28 21:01:54 -04:00
Sylvio Alves
f65770c1a1 soc: esp32xx: always use section prologue with alignment
ESP32 requires proper alignment between sections. There are some
scenarios, as reported in #74533, that the section can
get shifted, causing runtime failure.
Making sure SECTION_PROLOGUE is used with ALIGN_WITH_INPUT
will guarantee its consistency.

Fixes #74533

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-28 21:00:11 -04:00
Jukka Rissanen
0cfd963ddc net: wifi: shell: Avoid using sscanf
The sscanf() is not available for minimal libc so it cannot be used.
Use the net_bytes_from_str() that is provided for this purposes.

Fixes #75029

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-28 20:58:50 -04:00
Bjarki Arge Andreasen
5343ae6817 tests: drivers: rtc: rtc_api: add config for alarm time mask
RTCs support a variety of combinations of alarm time fields, set
by the alarm time mask. Until now, alarm tests have selected
only the minute and hour fields, as these are always supported,
but some RTCs require setting every supported field when setting
the alarm time, while other RTCs don't support setting every field.

To support all RTCs in the test suite, a configuration has been
added which makes the alarm time mask configurable. Boards can now
define the specific alarm time mask they want to test within
their boards .conf files.

Additionally, the alarm tests have been refactored to not depend
on the time.h library to determine the struct rtc_time times to
set as these are constant, so they are now provided as const
structs instead.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-28 20:58:22 -04:00
Krzysztof Chruściński
90ab94f61d logging: Do not store module name pointer when strings are stripped
When logging strings are stripped then addresses to log module
names are invalid. Do not store that address in the const
data structure associated with the logging module to avoid
someone accessing it. Store null instead.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-28 20:57:41 -04:00
Johann Fischer
a79700623d tests: drivers: udc: add build_only test case
nRF54H20 USB device controller cannot be enabled without VBUS, but the
device should not be connected to the host during testing. Add it to
build_only section.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Johann Fischer
ef512305fb tests: drivers: udc: updates to pass testing on supported platforms
Do not halt control endpoint, control endpoint may not be enabled when
there no host is connected. Yield after buffer is queued to allow the
driver to work.

Tweak pool size and number of buffers to pass the test with high-speed
drivers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Johann Fischer
155ef4bd1d drivers: udc_stm32: disable control endpoints in udc_disable()
Disable control endpoints in udc_disable() implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Johann Fischer
a01ab79685 drivers: udc_kinetis: add missing return statement
Add the missing return statement to the branch where no slabs are
available.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Henrik Brix Andersen
1c0f241b92 tests: drivers: can: api: restore default bitrates
Restore the default CAN bitrates after having tested setting bitrate and
timing. This ensures the arbitration phase bitrate is proportional to the
data phase bitrate, allowing CAN FD transmission tests to complete.

Fixes: #73723

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-28 20:55:53 -04:00
Jamie McCrae
88f30f3f51 samples: Use DEFAULT_IMAGE for sysbuild
Uses the variable for the default image when adding sysbuild
dependencies so that they can be copied out-of-tree and still work

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-28 20:54:25 -04:00
Maciej Perkowski
116fdc1a23 maintainers: remove gopiotr from twister collaborators
Piotr no longer works in Nordic and was not active in Zephyr
since December 2023.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-28 20:54:13 -04:00
Johann Fischer
88c2476136 samples: usb: mass: increase main stack size
"ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0" observed on a few
supported platforms when using SD card disk. Increase main stack size
for next USB device stack configuration to prevent stack overflow.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:54:01 -04:00
Sylvio Alves
57f6077f7c hal_espressif: remove extra not-used constructor
After #74682, any function with constructor attribution requires
additional configuration. Due to some left-over and not-used
code in hal_espressif with that attribution, some samples started failing.
This is an additional to ##75063

Fixes #75169

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-28 20:53:47 -04:00
Daniel Leung
8c10964435 xtensa: mmu: clear ZSR_DEPC_SAVE at boot
ZSR_DEPC_SAVE is being used to determine whether we are faulting
inside double exception if this is not zero. It is possible that
the boot ROM or custom startup code leaves this non-zero, which
would result in a fake triple fault. So clear it at boot. Note
that the zeroing is done in MMU init code as these triple
faults are not actual hardware ones but only semantics, and will
occur once MMU is enabled.

Fixes #75194

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 20:53:37 -04:00
Adrien MARTIN
fd90c9ba21 drivers: spi: gecko: propagate spi config error
This commit catch the return code of the spi_config function and
early returns on error so that high level spi transfer api gets
the error too.

Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
2024-06-28 21:53:22 +02:00
Iuliana Prodan
f91700e629 linker: nxp: adsp: add orphan linker section
Add missing linker section to avoid warning
about orphans when building with host compiler.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-06-28 21:53:01 +02:00
Chaitanya Tata
fbe7e95359 net: sockets_service: Fix thread failure
In case of thread failure, fix the registrations by properly managing
the synchronization i.e. use conditional wait only if thread is being
initialized or will be initialized, else check for success or failure
without waiting for conditional variables.

Fixes #73523.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-06-28 21:52:49 +02:00
Daniel Leung
9a08fdc1df tests: logging/dictionary: enable pytest to test output
Add pytest to test the output of dictionary logging to make sure
the encoded logs can be decoded back into strings, and to also
make sure the decoded logs have the expected strings.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
d1c222a7c7 tests: logging: copy dictionary logging sample into tests
This is in preparation for introducing pytest to test the output
of dictionary logging. Code is the same, but the testcase.yaml
is trimmed to only those that can be tested.

Note that a copy is made instead of moving the whole sample over
is simply due to various documentation having references to
the sample. Since RST files under tests/ are not parsed for
zephyr:code-sample:<name>, the linking would have been vanished.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
2eb0ffb7ea scripts: logging/dictionary: fix annoying pylint warning
pylint keeps failing and complaining about arg_data_type is
used before assignment. So assign it to None to silence
the warning.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
f5762e07f2 logging: dictionary: new verion 3 format
The package_len has been extended from 10 bits to 11 bits
in the log message header. So the format for dictionary
logging also needs to be updated.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
0e33c7a976 scripts: logging/dictionary: replace %#llx too
Python does not really support long long double, so %llx cannot
be formatted correctly, so we replace it with a simple %lx.
There is another variant %#llx and we also need replace it to
%#lx.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
ecc642b2df scripts: logging/dictionary: refactor common parser functions...
... and put them into the LogParser class file instead of
the verisoned parser. This is in preparation for introducing
a new parser version.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
3da42fb547 scripts: logging/dictionary: fix long long alignment
Printing long long requires alignment on 64-bit before parsing
the actual argument. Or else the parser would be looking at
some unrelated bits. So fix it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
eacf71d92a scripts: logging/dictionary: extract DataTypes into its own file
This extracts the DataTypes class into its own file. This is in
preparation to add a new version of parser which can reuse this
class.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
cb0a3ce6aa logging: dictionary: keep string section if always runtime
If logging packages need to be created at runtime, the format
strings need to be in memory for the packaging code to know
what to be packed. So prevent stripping the logging string
section if CONFIG_LOG_ALWAYS_RUNTIME is enabled.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
531557a772 logging: fix dictionary database not being generated
Fix the dictionary database not being generated under some
situations even though CONFIG_LOG_DICTIONARY_DB_TARGET is
disabled. For example, build and run through QEMU via
west build -t run.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Louis Feller
5b4c8945fd west : runners : Fix error message when runners.yaml is not found.
Adjust error message so that it clearly states runners.yaml is
missing from <build_dir>/zephyr, instead of referencing CMake cache
variable ZEPHYR_RUNNERS_YAML, which is no longer used (since
3124c02987 ).
Also clean up that variable in CMake since it is no longer used
(0 other references in entire tree).
Fixes #70605

Signed-off-by: Louis Feller <louis.feller@st.com>
2024-06-28 12:23:18 -04:00
Ioannis Damigos
6cc5478530 bme280: Update decoder to decode channels correctly
Update bme280 sensor driver decoder to decode
correctly the requested channels.

Fixes issue #74927

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-28 12:22:54 -04:00
Carles Cufi
457994816b doc: west: Clarify basic west terms
Terms like the west workspace or even west projects and modules were not
documented prominently enough, prompting users to ask for additional
clarification. This patch attempts to resolve this by adding terms and
explanation of concepts to the glossary and west doc pages.

Fixes #67376.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-28 12:22:41 -04:00
Flavio Ceolin
e1f20f36a0 pm: policy: Move device power state constraints to policy
Move information about device power state constraints from device
to policy.

It slows down the constraints lookup since we now have to find the
constraints for a device in a global array, but it saves resources
because we don't need to add a reference to constraints in all devices
instances.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-28 12:22:28 -04:00
Sebastian Głąb
c6ef6941a3 samples: drivers: mbox: Extend mbox sample
Print on what board/core sample is executing.

Print how many bytes of data can be sent
in the mbox message (show use of mbox_mtu_get_dt()).

Print how many channels are available for incoming and/or
outgoing messages (show use of mbox_max_channels_get_dt()).

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-28 12:21:55 -04:00
Sebastian Głąb
92b0d6dda5 samples: drivers: mbox: Fix overlays for nrf54h20
Add sample configuration 'nrf54h20_app_ppr' where:
- cpuapp sends messages to cpuppr vevif channel 15,
- cpuppr sends messages to cpuapp bellboard channel 18.

Add sample configuration 'nrf54h20_rad_app' where:
- cpuapp sends messages to cpurad bellboard channel 12,
- cpurad sends messages to cpuapp bellboard channel 18.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-28 12:21:55 -04:00
Emil Gydesen
cb80ca3a50 doc: Bluetooth: Add sample app for CAP ini/acc in status table
Add the sample application as existing for the CAP initiator
and CAP acceptor.

The samples are still in progress of being improved and
fully featured, but they exist and can be used already now.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 12:21:37 -04:00
Francois Ramu
9e03abb8cb debug: no UNALIGNED_ACCESS_SUPPORTED for cortex M0 or M0plus
Set the UNALIGNED_ACCESS_SUPPORTED only for MCU with cortex M
that are neither M0 nor M0plus
Cortex M0 or M0plus mcus do not support un-aligned address access

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-28 12:21:18 -04:00
Jukka Rissanen
2abd982040 doc: release-notes-3.7: Add notes for selected network components
Added release notes for these network components:

* DNS/mDNS/LLMNR
* gPTP/PTP
* Sockets
* Capture API
* Virtual interface
* VLAN
* Wi-Fi

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-28 12:21:05 -04:00
Emil Gydesen
1159c2adda Bluetooth: OTS: Add return validation of bt_uuid_create for client
The OTS client did not validate the return value of bt_uuid_create.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 07:50:30 -04:00
Jordan Yates
5b0fb6e406 doc: release-notes: document CMSIS-NN upgrade
Update the version update and link to the changelog.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
08eab876d8 samples: tflite-micro: add REQUIRES_FLOAT_PRINTF
Add `CONFIG_REQUIRES_FLOAT_PRINTF=y` to tflite-micro samples as in the
past the module was using its own `printf` implementation, but now uses
our logging infrastructure.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
3905e8d6be tests: lib: cmsis_nn: add missing filter dimension
Specify the missing filter dimension that was the reason for the v6.0.0
version bump.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
f4d09c9791 modules: cmsis-nn: add *_s4.c sources
Add new sources for 4 bit function variants to build system.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
afdbb3b94b submanifests: update tflite-micro
Update `tflite-micro` to the latest version.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
5abf8aa165 manifest: update cmsis-nn to v6.0.0
Update cmsis-nn to version 6.0.0.
Revision history can be found at:
https://arm-software.github.io/CMSIS-NN/latest/rev_hist.html

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
TOKITA Hiroshi
1bcebbafac tests: subsys: display: cfb: Add CFB tests
Add test cases for testing basic CFB functions.

These tests cannot run in CI because the CI environment has no display.
Mark these tests as `build_only`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-28 07:21:47 -04:00
TOKITA Hiroshi
83860c2dfd fb: cfb: Add framebuffer deinitialize function
Add the `cfb_framebuffer_deinit` function for deinitializing
the framebuffer.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-28 07:21:47 -04:00
TOKITA Hiroshi
d542e75975 fb: cfb: Fix CFB_FONT_MSB_FIRST font rendering
I broke the rendering of the CFB_FONT_MSB_FIRST font in
the previously committed #53796.
I will correct the entire font rendering process to make it
easier to remove the restriction that the vertical size of
the font must be a multiple of 8.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-28 07:21:47 -04:00
Johann Fischer
06086ce771 drivers: udc_dwc: remove rwup flag
The driver does not implement host_wakeup, remove rwup capability flag.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 07:21:29 -04:00
Nikolay Agishev
5d92abeaec ARCMWDT: Fix cbprintf issue with omitted function prototype
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().

This PR also actual to LLVM-based compilers with strict
rules of compilation. It covers warnings generated with
additional flag -Wincompatible-function-pointer-types-strict.

This fixes https://github.com/zephyrproject-rtos/zephyr/issues/74562

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-28 07:21:11 -04:00
Emil Gydesen
7b0784c1f6 Bluetooth: ASCS: Validate num_ases in CP requests
Add validation of the number of ASEs in control point
write requests.

This validates that the number of ASEs
in the control point is not greater than the total number
of ASEs we support.

This also validates that the GATT MTU is large enough to
hold all the responses from the write since those can only be
sent as notifications and never be truncated.

Finally this validates and updates the size of the buffer used to
hold the responses, which may be an optimization for some builds.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 07:20:47 -04:00
Jordan Yates
91f8c1aea9 everywhere: replace #if IS_ENABLED() as per docs
Replace `#if IS_ENABLED()` with `#if defined()` as recommended by the
documentation of `IS_ENABLED`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:20:32 -04:00
Cong Nguyen Huu
41418f5266 drivers: nxp_s32_canxl: add CANXL MRU handler
Add CANXL MRU handler, use the same RX, TX IRQ number.
Update the error priority that is lower priority than
the the tx_rx_mru priority incase the error interrupt
happens continuously, mru interrupt priority must be
higher to get report error counter. Otherwise the mru
interrupt can be delayed by error interrupt and
never call to MRU handler. This fixes #75022.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-06-28 07:20:20 -04:00
Dominik Ermel
f0d443e3d1 doc: release: 3.7: Add release notes for Flash
Flash API additions and new drivers.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-28 07:19:59 -04:00
Gerard Marull-Paretas
4753005c55 scripts: get_maintainer: check maintenance status
Error if an area is set as maintained but it has no maintainers
assigned.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-28 07:19:49 -04:00
Gerard Marull-Paretas
86e2030ba8 MAINTAINERS: set area status to odd fixes if not maintained
If no maintainers are present, area should not be considered maintained.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-28 07:19:49 -04:00
Dominik Ermel
568ccd585a doc: release: 3.7: Add Flash Map release notes
Add notes on changes in Flash Map.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-28 07:19:39 -04:00
Pisit Sawangvonganan
cfbe2adabc net: if: remove unused eth_ctx variable
Removed the declaration and assignment of `eth_ctx` variable from
`net_if_get_wifi_sta` and `net_if_get_wifi_sap` functions since
it was not being used.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-28 11:37:25 +02:00
Emil Gydesen
6af17919d6 doc: releases: migration-guide-3.7: Add not for BT_LE_ADV_PARAM
The macro was modified in a way that may cause issues for some.
See e.g. 15d66ccc23
for an example of it needing a change.

The migration guide GH PR number refers to the PR that modified
the macro.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 11:35:56 +02:00
Robert Lubos
5442e47dfa net: tcp: Delay ACK if no PSH flag is present
Delay an ACK in case no PSH flag is present in the data packet. as
described in RFC 813. This allows to reduce the number of ACK packets
we send and thus improve the TCP download throughput.

The results achieved on `nucleo_h723zg` board and the zperf sample
are as follows:
Before: 77.14 Mbps
After: 93.14 Mbps

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-28 11:34:50 +02:00
Jordan Yates
cf870e8350 bluetooth: correct bt_le_scan_param scan type
The `type` parameter of `struct bt_le_scan_param` is documented as
taking a `BT_LE_SCAN_TYPE_*` value, not a `BT_HCI_LE_SCAN_*` value.

In practice this makes no difference as the values are defined as the
same integer, but does result in `<zephyr/bluetooth/hci.h>` not needing
to be included.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 11:34:36 +02:00
Benedikt Schmidt
bc4743fbf2 logging: avoid overflow of package length in log_msg
Check if the calculated package length exceeds the maximum possible
value.
Fixes #75015

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-06-28 11:34:25 +02:00
Nerijus Bendžiūnas
31ad324120 drivers: i2c: stm32: remove redundant new line
LOG_* adds "\n" by itself.

Fixes redundant lines during startup:

```
[00:00:00.100,000] <inf> i2c_ll_stm32_v2: I2C TIMING = 0xb0f6343d

[00:00:00.100,000] <inf> i2c_ll_stm32_v2: I2C TIMING = 0xb0f6343d

[00:00:00.100,000] <inf> i2c_ll_stm32_v2: I2C TIMING = 0xb0f6343d

[00:00:00.100,000] <inf> i2c_ll_stm32_v2: I2C TIMING = 0xb0f6343d

[00:00:00.100,000] <inf> flash_stm32_qspi: Reading SFDP
```

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@astrolightspace.com>
2024-06-28 08:56:09 +02:00
Derek Snell
c4ebcfe684 boards: nxp: mimxrt1170_evk: doc: remove LinkServer west debug limitation
`west debug` is no longer an issue with LinkServer runner.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-06-28 08:51:49 +02:00
Hess Nathan
8b942e15e2 arch: x86: corrected parameter names
- applied the exact parameter names of the interface to implementation

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-27 20:06:20 -04:00
Ryan McClelland
fbf209e5c8 dts: bindings: cpu: add definition for arm,cortex-m55
A binding for the m55 cpu was missing. Add the yaml files.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-06-27 20:06:06 -04:00
Andrej Butok
b93453fe56 doc: release: 3.7: Add note about LinkServer runner .hex support
Added note about enabled flash support for Intel Hex
files for the LinkServer runner.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-27 18:02:57 -04:00
Robert Lubos
fcb23000e9 doc: release-notes: Add 3.7.0 release notes for networking
Add 3.7.0 release notes for networking.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-27 18:02:25 -04:00
Sven Ginka
1b09d5a883 drivers: sam_can: fixed MCAN Register Base Address
Before that fix, the default mrba was used; added
DMA Base Address to DTSI. Fixes #68472

Signed-off-by: Sven Ginka <sven.ginka@gmail.com>
2024-06-27 17:56:04 -04:00
Chris Friedt
e9b676a9ab doc: posix: mark posis fd mgmt as supported
Mark the POSIX_FD_MGMT Option Group as supported.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:17:56 -04:00
Chris Friedt
b18cad15b9 posix: fd_mgmt: implement dup(), dup2(), fseeko(), and ftello()
Implement the remaining functions from the POSIX_FD_MGMT Option
Group that are part of POSIX, and add the
CONFIG_REQUIRES_FULL_LIBC dependency to CONFIG_POSIX_FD_MGMT, to
pull in the remaining C89 functions.

The POSIX_FD_MGMT Option Group is required for PSE52, PSE53, and
PSE54 Subprofiling Option Groups.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:17:56 -04:00
Chris Friedt
b10f1ca3a6 doc: posix: mark posix signals supported with undefined behaviour
Mark the POSIX_SIGNALS Option Group as supported to the extent
possible under Zephyr, as Zephyr does not yet support processes.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:16:50 -04:00
Chris Friedt
308322e9b9 tests: posix: headers: add checks for posix signals option group
Add tests for the presence of items in the POSIX SIGNALS Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:16:50 -04:00
Chris Friedt
b2243af32d posix: add stubs for signal.h functions that need process support
Since Zephyr itself does not currently support processes, but
conformant applications should still be able to link, add stubs
for the remaining POSIX functions in the POSIX_SIGNALS Option
Group.

The POSIX_SIGNALS Option Group is required for PSE51, PSE52,
PSE53, PSE54, and likely many other POSIX Subprofiles.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:16:50 -04:00
Chris Friedt
be086f174c posix: procN: add missing alias for getpid()
Newlib requires an alias for the getpid() function. There was
a Kconfig already present for doing so, but the actual alias
was missing.

So this is technically a bugfix.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:16:50 -04:00
frei tycho
f299516e01 include: logging: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-27 15:16:17 -04:00
Fabio Baltieri
96815be5f7 input: pinnacle: fix return value check for WAIT_FOR
WAIT_FOR returns type in this case is a boolean, use a boolean as
variable and check.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-27 15:16:05 -04:00
Anas Nashif
10c9037ff1 doc: release: allow tests after RC1
After RC1 (feature freeze), new tests for existing features are allowed.
Afterwards, only bug fixes and documentation to existing tests are
allowed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-27 15:15:43 -04:00
Anas Nashif
ef5bb33f7b doc: Update release criteria
Update release criteria based on previous discussions and agreements
reached.
- remove bug count at critria
- Add platform tiers
- Define criteria
- Clarify block bugs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-27 15:15:43 -04:00
Anas Nashif
1706879fbd doc: release: clarify changes allowed during stabilization
Clarificatin on feature freeze and exceptions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-27 15:15:43 -04:00
Sylvio Alves
c029fa5b0a west.yml: update hal_espressif for bugfixes
This update includes bugfixes related to esp_timer,
responsible for handling Wi-Fi thread events.
This also removes all constructor attributes from non-used
hal functions.

Fixes #74368
Fixes #74277
Fixes #75063

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-27 15:15:29 -04:00
Adrien Ricciardi
914d7911da doc: storage: nvs: Fixed data CRC notes formatting
Used the same notes format than in other parts of the documentation.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-27 15:15:08 -04:00
Emil Gydesen
15d66ccc23 Bluetooth: Tester: Fix issue with initializing adv_params
The macro was changed to return a const pointer, but the
BTP use the returned pointer in a non-const way.

Modify the usage so that the macro is used to initialize
the adv_param instead, and then provide a non-const pointer
to tester_gap_create_adv_instance.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-27 15:14:48 -04:00
Torsten Rasmussen
6f5b183de7 sysbuild: check for existence of APPLICATION_CONFIG_DIR
Check for existence of APPLICATION_CONFIG_DIR in sysbuild.
sysbuild.conf is an optional file, meaning that sysbuild will not fail
if APPLICATION_CONFIG_DIR points to a non-existing folder.

A normal Zephyr build already fails when passing an invalid
APPLICATION_CONFIG_DIR but only because it cannot find a required
prj.conf in the folder.

Checking the existence of APPLICATION_CONFIG_DIR in sysbuild and fail
the build when a non-existing folder is passed to sysbuild ensures
sysbuild behaves similar to a normal Zephyr build regarding a
non-existing folder, while still allow sysbuild.conf itself to be
optional.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-27 10:58:11 -04:00
Karol Lasończyk
ed8d70c2a5 drivers: adc: saadc: Extend gains support for nRF54L15
Add support for gains: 1/2, 1/3, 2/5, 1/4.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-27 10:57:54 -04:00
Aleksander Wasaznik
8cd98b139d Bluetooth: test: privacy/legacy: Scan continuously
Some controllers, like the SoftDevice Controller can miss the first few
advertisements after the host tells it to start scanning. The DUT would
assumes the first RPA advertisements report it gets is the first that
was sent, but it was actually not the first. This would skew the
tester's judgement about the timing of RPA rotations.

To remedy this, the tester will scan continuously and switch between
expecting the identity address and the RPA without stopping the scanner.

The tester will tell the DUT to switch to RPA after it has received the
identity address advertisement. This ensures that the tester will not
miss the first RPA advertisement.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-06-27 10:55:55 -04:00
Fin Maaß
115d3d8aa7 drivers: spi: litex: add missing include
add missing include of `soc.h`.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-27 10:55:09 -04:00
Lingao Meng
c51743c849 include: bluetooth: Mark adv params as const
After:https://github.com/zephyrproject-rtos/zephyr/pull/75034

There are not reason not allow structure as const.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-27 10:54:40 -04:00
Anas Nashif
42c5953327 MAINTAINERS: add maintainer to Ambiq platform
Add maintainer to an area that is active and maintained.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-27 10:54:24 -04:00
Chris Friedt
b82b5b0734 posix: kconfig: remove select y from non-user-selectable help
Several help prompts for non-user-selectable Kconfig options
included the phrase "select 'y' here", which does not make
any sense in this situation.

Adjust the help sections to use more appropriate language.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
d9855da483 doc: posix: mark posix device io as complete
Mark the POSIX_DEVICE_IO Option Group as commplete. This Option
Group is required for PSE51, PSE52, PSE53, PSE54, and most of
the interesting applications involving file descriptors and
sockets.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
499a633976 posix: device_io: use mode argument correctly in open()
Previously, we had only used the flags field and ignored mode
with the open() function.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
48dff5562c posix: device_io: implement fileno()
Implement fileno() as required by the POSIX_DEVICE_IO Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
581a0f56e6 posix: device_io: implement fdopen()
Implement fdopen(), as required by the POSIX_DEVICE_IO Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
305ec62a6b posix: device_io: implement pselect()
Implement pselect() as it's required by POSIX_DEVICE_IO

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
49ac1912b2 net: sockets: move select() implementation to zvfs
Move the implementation of zsock_select() to zvfs_select(). This
allows other types of file descriptors to also make use of
select() functionality even when the network subsystem is not
enabled.

Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
93973e2ead net: sockets: move poll implementation to zvfs
Move the implementation of zsock_poll to zvfs_poll. This allows
other types of file descriptors to also make use of poll()
functionality even when the network subsystem is not enabled.

Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
2d72966516 posix: device_io: implement pread() and pwrite()
Add pread() and pwrite() implementations, which are nearly
identical to read() and write() but differ in that they do not
update the file-descriptor offset and instead read from a
specific file offset.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
86b92934cc posix: device_io: provide stdin, stdout, stderr variables
Create a compatibility Kconfig option for libc's that provide
their own stdin, stdout, stderr variables.

These are POSIX variables, so eventually we may want to
consider defaulting this option to 'y' and maybe providing
some zvfs abstraction for them.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
6f62292d42 posix: device_io: require a full libc for c89 functions
The POSIX_DEVICE_IO Option Group requires a number of c89
functions mainly from stdio.h .

Namely,

clearerr(), fclose(), feof(), ferror(), fflush(), fetc(),
fgets(), fprintf(), fputc(), fputs(), fread(), freopen(),
fscanf(), fwrite(), getc(), getchar(), gets(), perror(),
printf(), putc(), putchar(), puts(), scanf(), setbuf(),
setvbuf(), ungetc(), vfprintf(), vfscanf(), vfprintf(), and
vscanf().

These should be provided by any conformant C library
(not by the POSIX API).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Chris Friedt
a9a909c558 fdtable: read, write, close: only execute methods if non-NULL
Only invoke vtable methods read, write, and close if they are
non-NULL.

The close() vtable method is optional, so that should not return
an error if zvfs_close() is called and that method is
unimplemented.

Otherwise, if zvfs_read() or zvfs_write() are called and the
corresponding vtable method is unimplemented, fail setting
errno to EIO.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 09:01:23 -04:00
Hao Luo
d1eea369b1 drivers: ambiq: Add dependencies to avoid showing to non-ambiq platforms
Fixed the Kconfig.ambiq under i2c and spi so that they don't litter.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-06-27 08:59:40 -04:00
Johan Carlsson
79a2e2445d drivers: spi: mcux_flexcomm: fix invalid dma config for last tx packets.
fixes an incorrect dma configuration. When lpc dma driver was extended
with gather/scatter support the spi dma driver stopped working.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-06-27 08:50:39 -04:00
Pisit Sawangvonganan
dc5527721a drivers: clock_control: remove '&' when assigning clock_control_xxx_init
Remove address-of operator ('&') when assigning `clock_control_xxx_init`
function pointer in `DEVICE_DT_INST_DEFINE` macro.

This change aims to maintain consistency among the drivers in
`drivers/clock_control`, ensuring that all function pointer assignments
follow the same pattern.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-27 08:50:20 -04:00
Alex Fabre
648f6dcac4 boards: st: add adc1 peripheral for nucleo_h533re
This nucleo board inherit from the root `h5` dts some special nodes:
- `vbat` on adc1 channel 2
- `vref` on adc1 channel 17
- `die_temp` on adc1 channel 16

The issue is discussed here:
https://github.com/zephyrproject-rtos/zephyr/issues/72914

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2024-06-27 08:49:49 -04:00
Alex Fabre
12bb405783 doc: st: fix nucleo_h533re documentation
1. Changing default ADC sens line for ch0 on PA0
- `adc1` was documented to be sensing ch14 on PB1.
- This seems impossible because of a conflict between ch14
and UART2.
- `adc1` node is not defined in the board's DTS.

2. Set SPI1 NSS pin to PA4
- hardware NSS signal was documented to output on PC9.
- PC9 cannot be assigned as HW NSS for SPI1.
- HW NSS on SPI1 is by default on PA4, and remapeable to PA15.

3. Update number of UART lines available
- There are a total of 7 U(S)ARTs available on this board.

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2024-06-27 08:49:49 -04:00
Emil Gydesen
044f8aaeb3 Bluetooth: OTS: Add len validation in olcp_ind_handler
Verify the length of the indication before we pull from the
buffer.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-27 08:49:20 -04:00
Adam Wojasinski
3b78e76554 net: lib: ptp: Fix issues raised by static analyzer
Fix minor issues reported by static analysis tool.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-27 08:48:59 -04:00
Babak Arisian
0c611d01a7 Bluetooth: Audio: Dereference null return value in cap_initiator.c
Null pointer dereferences in functions:
  bt_cap_initiator_unicast_audio_update (Line 1478)
  bt_cap_initiator_unicast_audio_stop (Line 1693)

Fixes #74729 and #74739

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-06-27 08:48:46 -04:00
Emil Gydesen
1fc67d22d1 tests: unit: util: Add unit test of utf8_trunc and utf8_lcpy
The two functions did not have unit tests, and at least one
issue with input validation have been indentified and fixed
prior to these.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-27 08:48:31 -04:00
Emil Gydesen
4cf00a6125 zephyr: Add zero-len check for utf8_trunc
The function did not check if the provided string had a zero
length before starting to truncate, which meant that last_byte_p
could possible have pointed to the value before the string.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-27 08:48:31 -04:00
Babak Arisian
a895abab86 Bluetooth: Audio: Unchecked return value in audio.h
Unchecked return value in functions: print_ltv_array (Line 287)

Fixes #74733

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-06-27 08:48:18 -04:00
Tomi Fontanilles
5f41ec8e39 manifest: trusted-firmware-m: fix debug build
Pulls in assert usage fixes.

Fixes #73862.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-06-27 08:47:38 -04:00
Robert Lubos
125f1f593e samples: net: zperf: Fix sample performance issues
Sockets service thread need to be cooperative for best performance.

Enable CACHE_MANAGEMENT as some boards don't do it by default, it has
devastating impact on the performance as well.

Finally, increase FDS count, so that uploads still work when both TCP
and UDP receiver are enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-27 08:47:26 -04:00
Alberto Escolar Piedras
ad3dcc9f89 doc: release 3.7: Add bsim related notes
Mention that coded phy is now supported and tested

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-27 08:47:11 -04:00
Adrien Ricciardi
08496ff6b4 fs: nvs: Improve nvs_calc_free_space() result precision
The nvs_calc_free_space() function does not return 0 when the NVS
is considered full, because some special ATEs are not taken into account.

This commit takes into account the ATE that is reserved for deletion in
each sector, in addition of the 'GC done' ATE when present.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-27 10:53:28 +02:00
Lyle Zhu
1d1dc7a875 Bluetooth: Classic: HF_AG: Fix unexpected return
When `buf->len` is 0, the function of the while-loop
will be returned with error code `-ENOTSUP`.
The code block after while-loop cannot be reached
event though it is a correct command.

Use `buf->len` as the end condition of the while-loop.

Fixes #74730.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-27 10:53:17 +02:00
Lyle Zhu
a3a08b93ed Bluetooth: Classic: HF_AG: Fix incorrect status judgment
Wrong condition of AG status is used for status
checking.

Fixes #74727.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-27 10:53:05 +02:00
Lyle Zhu
599812281b Bluetooth: Classic: HF_AG: Fix incorrect status judgment
Wrong condition of AG status is used for status
checking.

Fixes #74726.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-27 10:52:56 +02:00
Dominik Ermel
89fdc35c51 drivers/flash/spi_nor: Fix missing check for return value
Add check for returned value from the call to spi_nor_cmd_write
in spi_nor_write.

Fixes #74775

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-27 10:52:48 +02:00
Patryk Koscik
65a80d5bc2 tests: posix: getopt: hifive1: reduce MIN_REQUIRED_HEAP_SIZE to 1024
This commit reduces `CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE` from
2048 to 1024 for the SiFive HiFive1 board.

Otherwise, the test fails on the following assert from Newlib:
memory space available for newlib heap is less than the minimum required
size specified by CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE

Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
2024-06-27 08:51:18 +02:00
Patryk Koscik
a2dd9a4ea5 boards: sifive: hifive1: fix spi0 region address
Fixes the incorrect `spi0` node region for `hifive1@B` target.

Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
2024-06-27 08:51:18 +02:00
Declan Snyder
58c347a44c doc: release-notes-3.7: Add reset drivers notes
Add release notes for the reset controller driver class.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-27 08:50:01 +02:00
Dominik Ermel
c51e22c97e doc: release: 3.7: Fix typos
Some typos fixes.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-27 08:28:02 +02:00
Conor Paxton
ba3456c064 boards: microchip: skip flash based CI tests for PolarFire SoC
Microchip's PolarFire SoC has a system controller that utilizes an
external spi flash for performing "auto update" of the FPGA design. This
is not a feauture fully integrated into Zephyr as of yet, so in an
effort to not constantly fail the CI, add flash tag to the ignore list.

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2024-06-27 08:27:54 +02:00
Damian Nikodem
a7e9be60cf driver: ssp: reorganize ssp ip acquired flow
The previous port acquire/release functions have been removed,
and a new IP acquire/release mechanism has been introduced.

Additionally, the RX FIFO clearing function for PTL has been corrected.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-06-27 08:25:59 +02:00
Oleksii Moisieiev
7c64a8b1a7 drivers: tee: optee: handlde GET_THREAD_COUNT call
Optee driver should handle GET_THREAD_COUNT call. This limitation is
set in Optee-OS during build and limits number of symultanious calls
to optee. Add sym to handle this limitation.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
97ec5548bd tests: drivers: optee: handle exchange capabilities call
Capabilities should be set correctly or optee will show error message:
[00:00:00.000,000] <err> optee: OPTEE does not support dynamic shared
memory

Test suite should set optee UID or the following error message should
be displayed:
[00:00:00.000,000] <err> optee: OPTEE API UID mismatch

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
3301c450e0 tests: drivers: tee: Fix normal_call behaviour in tests
During SMC_RPC_FUNC_ALLOC call optee driver puts new shm object to a4
and a5 variables and then expects this object to be in a1 and a2 from
OP-TEE OS. Fixed behaviour so normal_call callback will act the same
way as OP-TEE OS

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
92408c02d9 tests: drivers: optee: Introduce unit tests for the OP-TEE driver
This should test OP-TEE driver basic functionality without
communication with real OPTEE OS.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
eb0b341ba6 drivers: tee: optee: Introducing OP-TEE driver implementation
This includes the TEE driver api implementation for OP-TEE.
It provides an interface to the OP-TEE TrustZone from the Normal space
to start sessions and request functions of the TA.

- targets ARM and ARM64;
- use SMC to connect to OP-TEE;
- accepts requests on privileged and unprivileged device.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
e1a66760b2 dts: bindings: Introduce device-tree bindings for OP-TEE
This introduces dts mapping description for the optee node.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
0fe2bfbd6a drivers: tee: optee: Moving optee smc interface from optee client
Moved helper headers, needed to work with OP-TEE, which defines basic
defines, used during communication with Trust-Zone

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
cb3e0e7a91 drivers: tee: Add Tee driver generic API
Implementation of the generic API Trusted Execution Environment driver.
This implements all basic syscalls, needed by tee driver, basic
defines and helpers to work with shared memory.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Tom Burdick
c6830034d6 tests: Remove vmu_1170 from spi_loopback tests
The board didn't have a proper overlay for the test and failed to build
the test case causing CI failures.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-26 14:13:21 -04:00
Tom Burdick
058253b4b6 icm42688: Follow st's devicetree bindings
Fix the devicetree bindings to actually be used as the default
configuration, following the example set by various ST sensor devices.

This requires sadly dropping enums and using #defines for various
options as well as repeating many numbers, but presumably is the way to
do it given the precedent set by ST with sensors like the lsm6dso.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-26 14:13:21 -04:00
Flavio Ceolin
c0a955d5f7 manifest: Update TF-A to v2.10.4
Update Trusted Firmware A to the latest LTS release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-26 14:12:53 -04:00
Duy Phuong Hoang. Nguyen
657d7a3662 tests: Exclude EK_RA8M1 from testing CPP98
The Renesas RA HAL isn't compatible with the C++98 standard so
skipping the test ek_ra8m1 on CI

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-06-26 13:36:14 -04:00
The Thanh. Nguyen
f93f801c65 driver: serial: Add serial driver support for Renesas RA8 devices
Add implementation of sci_b_uart for Renesas RA device

Signed-off-by: The Thanh. Nguyen <the.nguyen.yf@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
ee4613a3a6 boards: arm: Add initial support for EKRA8M1
Add support for the EK RA8M1 board
This board is using Renesas RA8M1 MCU.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
f978c69eb4 driver: gpio: Add initial gpio drirver support for RA8M1
This is the initial commit to support for gpio driver
for RA8M1 MCU, the coding is base on renesas fsp hal

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
75f1f7e982 drivers: pinctrl: Add pinctrl driver for RA8 series
This is the initial commit to support minimum pinctrl
driver for Renesas MCU RA8M1.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
7195f0de0f soc: renesas: ra: Add initial support for RA8M1 SOC series
Add minimal support for RA8M1 SOC series.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
259b3d0095 arch: arm: Add initial support for Cortex-M85 Core
Add initial support for the Cortex-M85 Core which is an implementation
of the Armv8.1-M mainline architecture.

The support is based on the Cortex-M55 support that already exists in
Zephyr.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-06-26 13:36:14 -04:00
Chris Friedt
fa9e93382c posix: allow for external implementation of option groups
Make it easier for external C libraries, toolchains, and
integrators to override Zephyr's implementation of functions and
sybmols on a per-Option-Group basis.

This change adds a number of non-user-configurable Kconfig
options that block internal Cmake rules from building Zephyr's
C sources corresponding to the particular option.

This is useful, for example, if a specific C library has a smaller,
or faster, or more secure  version of some symbols belonging to a
a particular option group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-26 13:08:21 -04:00
Maochen Wang
b7ed82c060 modules: mbedtls: Fix init hang issue
In device init phase, it will call _mbedtls_init before malloc_prepare
as mbedtls has higher priority defined in SYS_INIT..
_mbedtls_init() will call psa_crypto_init() and malloc buffer,
but z_malloc_heap is not initialized, which will cause device hang.
Should call malloc_prepare() before _mbedtls_init to fix this issue,
so decrease the priority of mbedtls to default 40.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-26 13:07:02 -04:00
Maochen Wang
e309f781ff libc: common: Fix init hang issue
In device init phase, it will call _mbedtls_init before malloc_prepare
as mbedtls has higher priority defined in SYS_INIT..
_mbedtls_init() will call psa_crypto_init() and malloc buffer,
but z_malloc_heap is not initialized, which will cause device hang.
Should call malloc_prepare() before _mbedtls_init to fix this issue,
so add new Kconfig to increase the priority of libc to deafult 30.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-26 13:07:02 -04:00
Nicolas Pitre
b5be646e20 arch/arm64/mmu: improve debugging output
Rationalize the debug log to make it easier to use.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-26 13:06:42 -04:00
Nicolas Pitre
d7e9ea0b71 arch/arm64/mmu: fix page table reference counting part 3
Commit f7e11649fd ("arch/arm64/mmu: fix page table reference
counting") missed another case where the freeing of a whole table
"branch" didn't take into account the fact that some sub-tables might
be shared and therefore must be cleared only if the reference count is
down to 1.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-26 13:06:42 -04:00
Paul He
88d27ccf62 posix: pthread: correct log info of new stack address
When a new stack is allocated successfully in pthread_attr_setstacksize,
the new address should be printed not the original one.

Signed-off-by: Paul He <pawpawhe@gmail.com>
2024-06-26 13:06:28 -04:00
Declan Snyder
3f59cf9439 drivers: nxp_enet: Fix CID 363724
This addresses the coverity issue ID 363724.
This issue seems to have been a false positive, but the root complaint
from coverity was that within the callstack of ENET_Up, some functions
use the buffer config pointer as an array, whereas in the zephyr driver
it is declared as a singleton. Address it by redeclaring this as an
array of size 1 instead of a singleton.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-26 13:06:14 -04:00
Declan Snyder
b05d719107 drivers: nxp_enet: Fix CID 392512
This commit fixes coverity issue 392512.
The issue was that the return value of clock_control_on was not being
checked. Fix by checking the return value.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-26 13:06:14 -04:00
Henrik Brix Andersen
f4dbe524d0 doc: releases: release notes: 3.7: add remaining CAN release notes
Add remaining Controller Area Network (CAN) subsystem release notes for
v3.7.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-26 13:05:59 -04:00
Henrik Brix Andersen
bc88a81c0a doc: releases: release notes: 3.7: add EEPROM release notes
Add EEPROM subsystem release notes for v3.7.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-26 13:05:25 -04:00
Jordan Yates
40eededf01 bluetooth: bt_le_ext_adv_start_param is const
`bt_le_ext_adv_start` does not modify the `param` argument, which can
therefore be marked as `const`. This allows the struct to exist purely
in ROM.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 13:05:14 -04:00
Jordan Yates
243eb36b18 everywhere: reindent .overlay files with tabs
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 15:59:44 +02:00
Jukka Rissanen
4fefde2f09 tests: net: socket: Add tests for tracing
Make sure we at least build test the network socket tracing
support. The tracing tests do not enable networking so do the
socket tracing tests here.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-26 15:49:43 +02:00
Johann Fischer
e3151de7fa boards: nxp: add test feature 'usbd'
Commit b6b43c3ed7
("drivers: udc: implement udc_mcux_ehci and udc_mcux_ip3511")
introduced MCUX shim driver using UDC driver API. Add test feature
'usbd' to a few supported boards to allow Twister to select these boards
for testing during CI runs.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-26 15:46:38 +02:00
Robert Lubos
4a47803b0c net: if: Add OpenThread interfaces unique name
OpenThread interfaces were not considered when default interface name
is assigned, so they ended up with a generic "netX" name. Since it
useful to have an option to identify interface easily by name, assign an
unique "threadX" name for OpenThread interfaces, just like it's done for
other interface types.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-26 15:32:00 +02:00
Bjarki Arge Andreasen
50f1ab6e20 modem: cmux: disable all work when released
The cmux module does not properly cancel all work when it is
released from its modem pipe. Releasing CMUX must cancel all
work as the pipe is no longer available, as it is set to NULL.

If work remains which tries to transmit something to the now
released pipe, a NULL dereference occurs.

This exact issue occurs if a DLCI channel is trying to open
after the modem pipe has been released, as the CMUX component
will send an open request at a fixed interval.

The expected behavior is for the open request to be cancelled,
and further open requests to be prevented until cmux is again
attached to a pipe.

Lastly, added a check to ensure that the pipe is indeed released
when calling attach, to ensure all work is indeed stopped before
modifying the pipe and buffers.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-26 09:27:20 -04:00
Bjarki Arge Andreasen
9d76f9ad37 tests: modem: cmux: extend test suite to cover release case
When the CMUX is released from its pipe, it must stop transmitting
data to it, and prevent starting any work which requires
transmitting data like connecting CMUX or opening a DLCI pipe.

This commit extends the CMUX test suite to validate this behavior.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-26 09:27:20 -04:00
Jukka Rissanen
0cac7af4e4 net: dns: Do not fail if cache flush bit is set in class
Mask the DNS_CLASS_FLUSH value when checking if the DNS_CLASS_IN
is set when unpacking a query.

Fixes #74829

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-26 09:27:07 -04:00
Ioannis Karachalios
0c5bfeefac drivers: usb: device: Fix disable sequece
This commit should deal with
fixing the way USB_MCTLR_REG
is zeroed in order to disable
the USB controller along with
its tranceiver.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-26 09:20:51 -04:00
Emil Gydesen
68a0741d4f Bluetooth: ISO: Allow 0 interval and latency in CIG for unused dir
If the CIG only contains C to P CISes, then we should allow
setting the P to C interval and latency to 0, and vice versa.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-26 09:01:53 -04:00
Marek Matej
cd8fc0eb11 samples: sysbuild: update list of platforms
Add ESP32 boards to test the MCUboot builds.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-26 09:01:25 -04:00
Marek Matej
6a7c8d789f soc: espressif: Update MCUboot segment size
- Fix the build issues with the insufficient memory for
  the MCUboot.
- Fix the sysbuild with MCUboot tests on all ESP32xx SoCs.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-26 09:01:25 -04:00
Simon Frank
2ca7e41b26 drivers/sensor: lis2mdl: use common SPI duplex option
Driver used a custom SPI duplex option. Replaced with the common one
found in spi-device.yaml.

Signed-off-by: Simon Frank <simon.frank@lohmega.com>
2024-06-26 09:01:13 -04:00
Wilfried Chauveau
3d31d50c0d cmake: emu: armfvp: Fix find program’s search paths
The current implementation does not work well when ARMFVP_BIN_PATH is a
colon separated list.

This lets `find_program` deal with the lists.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-06-26 09:00:43 -04:00
Sadik Ozer
ada6ab25ee drivers: serial: Update MAX32xxx tx and rx ready functions
Update rx and tx ready function as per of its description.
For tx_ready if tx interrupt enabled AND tx fifo is not full
For rx_ready if rx interrupt enalbed AND rx fifo not empty

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-26 09:00:26 -04:00
Sadik Ozer
1df9ccc801 manifest: Update hal_adi to get get INTEN register
Fetch hal_adi to get Wrap_MXC_UART_GetRegINTEN(...) function
This function is going to be used to update MAX32xxx UART driver

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-26 09:00:26 -04:00
Lars-Ove Karlsson
49979fcace libc: minimal: Removed unnecessary casts
Remove two casts since the type was already the same.
Otherwise, the casts caused a warning with IAR tools.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2024-06-26 09:00:13 -04:00
Robert Lubos
0ca2a3cce0 net: lib: lwm2m: Fix expected block calculation
Coverity reported that a formula used to calculate the next expected
block in case the block size from the request differs our own block size
has a bug. The expression used to calculate the block size diff would
evaluate to an unsigned integer, giving (wrongly) enormous results in
case block size from the request is smaller than the Zephyr's default.

It turns out however, that this formula is no longer needed at all.
Since commit d3081e2f30, Zephyr's LwM2M
implementation will no longer negotiate the block size in case of write
operation, but simply comply with the block size included in the
request. This means that calculating the diff makes no longer sense and
can be safely removed - the next expected block number should be simply
increased by 1.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-26 08:59:56 -04:00
Robert Lubos
0528df9a4e net: shell: udp: Check net_pkt_read_u8 result
In case packet read fails for any reason, there's no point proceeding or
printing the byte, just break the loop in such case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-26 08:59:41 -04:00
Jamie McCrae
b325f50599 doc: release: 3.7: Add note on build system watch file fix
Adds a note that an issue with watched files has been fixed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-26 08:59:24 -04:00
Robert Lubos
ee451e5cf0 net: sockets: tls: Fix iov_len comparison in sendmsg()
vec->iov_len is of type size_t, so the comparison was always true.
Additionally, doing the memcpy() when iov_len was 0 did not really make
sense, so do it only when the actual length is larger than 0.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-26 12:39:51 +02:00
Chris Friedt
9ada52f060 fdtable: replace z_ prefix with zvfs_ for fdtable.h functions
For each of the fdtable.h functions listed below, convert the
z_ prefixed semi-private functions to use the zvfs_ prefix.

ZVFS stands for Zephyr Virtual File System and
is intended to be a common library used by the C library,
POSIX API, Networking, Filesystem, and other areas.

There are already a few functions in fdtable.h that use the
zvfs_ prefix, so this change is mostly about unifying them in
a way that uses a suitable prefix ("namespace") so that it can
be considered a public API.

- z_alloc_fd
- z_fdtable_call_ioctl
- z_finalize_fd
- z_finalize_typed_fd
- z_free_fd
- z_get_fd_obj
- z_get_fd_obj_and_vtable
- z_get_obj_lock_and_cond
- z_reserve_fd

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-26 12:33:02 +02:00
Abderrahmane Jarmouni
66e7bdde53 samples: drivers: counter: alarm: add stm32-rtc test case
A specific test case for STM32 RTC is needed because of the way Counter
node is selected in preprocessing.
Tests STM32 RTC_Alarm using counter_ll_stm32_rtc driver.
This also clarifies how STM32 RTC Alarm can be used in this test.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-26 06:01:18 -04:00
Johan Hedberg
63d97c1556 Bluetooth: shell: Fix missing check for buffer allocation
In practice this allocation is very unlikely to fail, however being
consistent with checking for a failure keeps Coverity happy.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-26 05:59:15 -04:00
Andrzej Głąbek
de2efdee97 include: adc: Fix initialization of .differential in ADC_CHANNEL_CFG_DT
This is a follow-up to commit ff0f389d0b.

When the `zephyr,differential` property is used together with a driver
that selects `ADC_CONFIGURABLE_INPUTS`, the `differential` field is
initialized twice what causes a compilation error in C++. Fix this by
refactoring the logic around initialization of `.differential`.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-06-26 05:59:01 -04:00
Andreas Ålgård
eb4c76a6ec net: lib: dhcpv4_server: Fix client ID bug
First byte of client ID should be htype, followed by the client address.
See: https://datatracker.ietf.org/doc/html/rfc1533#section-9.12

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2024-06-26 05:58:49 -04:00
Robert Lubos
0aeecbbbfb net: tcp: Fix peer pointer use in net_tcp_endpoint_copy()
net_tcp_endpoint_copy() used wrong pointer to copy peer address.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-26 05:58:36 -04:00
Robert Lubos
f3dbd38a77 net: tcp: Conditionally compile entire tcpv4/6_init_isn()
Partial conditional compilation within tcpv4/6_init_isn() caused
errors in coverity, as hash variable seemed to be used w/o
initialization.

As those functions are not really used at all if
CONFIG_NET_TCP_ISN_RFC6528 is disabled, we can just conditionally
compile entire functions to avoid confusion.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-26 05:58:36 -04:00
Fabian Blatz
f95f57c668 doc: release: 3.7: Add note on LVGL changes
Adds release notes for the LVGL Zephyr module.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-26 05:58:24 -04:00
Tomasz Bursztyka
7f8cc43a0b MAINTAINERS: Add another maintainer to the device driver model
Better have 2 maintainers on this critical part.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
2024-06-25 21:27:15 -04:00
Johann Fischer
90081578ae doc: mm: fix heap function references in documentation
Add missing doxygengroup Low Level Heap Allocator and Multi-Heap Wrapper
Utility.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-25 21:26:55 -04:00
Luca Burelli
d4ea1da10e llext: fix llext_find_section(), remove llext_section_by_name()
The function llext_section_by_name() is used only in one place, and it
expects the caller to have the section headers cache available. This
cache is freed after the ELF file is loaded, so the function is not
usable in the context where it is called.

Remove the function and replace the call with a direct search in the
ELF file section headers array, as was done before 08eb314c35.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Luca Burelli
95cab98110 llext: fix section addresses at link time by using sh_info
Currently, the code uses the section name to identify the target section
of a relocation. This is not reliable, as the section name is not
guaranteed to be in a specific format. Instead, use the sh_info field of
the relocation section header to identify the target section.

This is a tricky change, as it requires a workaround for the Xtensa
port, whose code path diverges here into the `link_plt` function and
ultimately different arch-specific code. Avoiding this divergence
will require additional refactorings.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Luca Burelli
a1550c4db1 llext: fix llext_load() optimization
The optimization in llext_load() to avoid using the generic path for
sections that are cached in memory was broken for two reasons:
- it was comparing an ELF section index to LLEXT_MEM_BSS, which is a
  llext_mem enum, and
- it was using the wrong section address for the cached sections since
  the "merged sections" feature was introduced in 709b2e44bf.

This patch fixes both issues using the new llext_loaded_sect_ptr()
helper function.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Luca Burelli
ee6074a35d llext: calculate offsets for ELF sections in memory areas
The recent changes to the loader code merged related sections together,
making sure the merged sections are self-coherent. This, however, did
not take into account that the original ELF sections are now a _subset_
of the merged section - and might not start from the beginning of the
merged section.

This patch converts the `sect_map` member of `struct llext_loader` to a
structure with two fields:
- mem_idx: the memory area index where the ELF section is mapped
- offset: the offset of the ELF section inside the memory area

The offset is calculated after all sections are merged and the final
groups are defined. This will allow the loader to correctly calculate
the address of symbols and relocations in the merged sections.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Luca Burelli
e42549c632 llext: add a test for llext_find_section
Add a new test case that verifies that llext_find_section() returns the
correct offset for a symbol in a loadable extension. This exploits the
fact that in the STORAGE_WRITABLE cases, the symbol addresses will be
inside the ELF file buffer, so they can be easily compared.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Luca Burelli
cec4be3a84 llext: rework test and sample coverage
This patch reworks the testcase.yaml and sample.yaml files for the llext
subsystem to further reduce the number of tests performed by CI while
improving overall coverage.

The following changes are introduced by this commit:

- Remove the arch_allow field from the common section to allow any arch
  to be tested in the build_only test. All other tests explicitly narrow
  down the arches they are applicable to.
- In addition to platforms with active issues, also exclude a number of
  platforms that are always skipped by the runtime filter due to
  RAM/Flash limitations.
- Add integration_platforms to limit the test count to a few selected
  platforms which are representative of the different arches.
- Remove a number of duplicate SLID tests and group them into a single
  test that covers both ARM and Xtensa architectures.
- Test the relocatable case on ARM as well.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Luca Burelli
6c5983492b llext: set proper LLEXT_STORAGE default for Xtensa
This patch sets the default value for LLEXT_STORAGE_WRITABLE to 'y' on
the Xtensa architecture. This is necessary because it does not currently
support the read-only mode for the LLEXT storage.

Make sure the default reflects this instead of asking the user to
manually set it.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Luca Burelli
2ba545c5c6 llext: test: align ELF file buffers to 4k
The ELF files should be aligned to at least sizeof(elf_word) to avoid
issues. Use a larger value to ease debugging, since it reduces the
differences in addresses between similar runs.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-25 21:25:33 -04:00
Nicolas Pitre
a53ddff3b6 tests: demand_paging: touch memory with more useful content
When content validation fails it is rather difficult to figure out the
cause if some meaningless byte mismatches another meaningless byte.
Let's store each memory location with its own virtual address so if a
mismatch occurs when reading it back it is obvious where it comes from.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-25 21:19:40 -04:00
Henrik Brix Andersen
771a362f4b soc: nxp: lpc: lpc55xxx: fix CONFIG_LPC55XXX_USB_RAM defaults
Setting a boolean Kconfig option default to "n" after having set it to "y"
does not make the option disabled. Instead, avoid setting default to "y"
for SoCs known not to have dedicated USB RAM.

Fixes: #73912

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-06-25 21:19:18 -04:00
Pisit Sawangvonganan
1e03106d75 net: ip: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/ip` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-25 21:19:00 -04:00
David Leach
96aad48be0 samples: sensor: qdec: fix mimxrt1050_evk build failure.
Recent PR turned on test case for twister which revieled a bug
with building the test case for RT1050 EVK. The touch_controller
DTS node was removed a by commit 57ad325e and further deprecated
by bde07beb5 when the platform was converted to tread displays as
shields.

Signed-off-by: David Leach <david.leach@nxp.com>
2024-06-25 21:18:47 -04:00
David Leach
28b91fddb7 MAINTAINERS: nxp drivers: add MarkWangChinese to NXP Drivers
Add MarkWangChinese to NXP drivers. He helps support USB, Bluetooth

Signed-off-by: David Leach <david.leach@nxp.com>
2024-06-25 19:15:35 -04:00
Sercan Erat
03ac4c80c0 boards: rak: rak11720: Add missing flag and fix wrong spi pins
Update dts file to use the new HCI api of apollo3 blue.
Fixing wrongly define spi cs pins for rak11720.

Signed-off-by: Sercan Erat <sercanerat@gmail.com>
2024-06-25 19:15:02 -04:00
Keith Packard
0491000c16 tests/kernel: Add test for constructors in C
Make sure constructors are run even when not using C++.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-25 19:14:37 -04:00
Alberto Escolar Piedras
6e977ae2d5 lib c/cpp: Move .ctor .init_array handling from C++ to kernel
* Move ctors and init_array from the CPP library
  to the kernel library, as this is common for both C
  and C++ and it is the kernel who is running it.
* Rename the hidden kconfig option CPP_STATIC_INIT_GNU
  STATIC_INIT_GNU instead.
* If STATIC_INIT_GNU is not selected verify there is
  constructors left behind.
* Rename common-rom-cpp.ld to common-rom-init.ld
* Rename z_cpp_init_static to z_init_static,
  and have the kernel always call it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Keith Packard <keithp@keithp.com>
2024-06-25 19:14:37 -04:00
Félix Turgeon
5cd580ce44 scripts: coredump: Add register write handler to arm cortex-m gdbstubs.
When working with coredumps, it is useful to be able to modify base
registers. Adding this capability allows implementing scripts to
inspect backtrace of threads other than current the current thread.

Signed-off-by: Félix Turgeon <felixturgeon@meta.com>
2024-06-25 19:14:20 -04:00
Fabio Baltieri
766de73e08 doc: release: 3.7: add input release notes
Just few new drivers and two migrated ones.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-25 19:13:41 -04:00
Yong Cong Sin
9a8d1360cb posix: signal: use the provided argument in the macros
The `SIGNO_WORD_IDX` & `SIGNO_WORD_BIT` macros should have
used its own argument `_signo` instead of `signo`. It didn't
cause and error because the function's argument has `signo`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-25 19:13:30 -04:00
Declan Snyder
3fe65eec7f samples: adc_dt: Move frdm_rw612 overlay to boards
The overlay was in the root of the sample folder instead of the boards
folder. This is clearly a mistake.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-25 19:13:15 -04:00
J. Neuschäfer
a0d1d0619d arm: Fix typo in comment
Change "etxra" to "extra" in Kconfig comment.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2024-06-25 19:13:00 -04:00
Abe Kohandel
de69ebd1f8 usb: correct udc_dev parameter name
Rename uhc_dev parameter of USBD_DEVICE_DEFINE macro to udc_dev to
reflect that this is a USB Device Controller device and not a USB Host
Controller device.

Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
2024-06-25 14:16:48 -04:00
Luis Ubieda
089eaf93ec sensor: lm75: Enforce dependency of int-gpios with Trigger feature
As pointed out on #57586: `LM75_TRIGGER_GLOBAL_THREAD` can't be enabled
without the int-gpios being present in the DTS node. This commit
requires at least one LM75 instance featuring it, otherwise it won't
work.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-25 14:16:28 -04:00
Tomasz Leman
a3835041bd intel_adsp/ace: power: Use MMU reinit API on core context restore
Replace the MMU initialization call with the new MMU re-initialization
API during the core context restore process in the ACE power management
code.

The previous code was directly calling `xtensa_mmu_init()` upon
restoring the core context, which is not appropriate when the MMU
context may have been preserved during low-power states. The new
`xtensa_mmu_reinit()` API is designed to re-establish the MMU context
without overwriting the existing page table, ensuring that any runtime
changes to the MMU configuration are retained.

Changes made in this patch:
- Removed the call to `xtensa_mmu_init()` from the
  `_restore_core_context()` function.
- Added a call to `xtensa_mmu_reinit()` after restoring the
  miscellaneous registers.

This update aligns the ACE power management code with the correct MMU
handling procedures when recovering from low-power states, as per the
recent changes in the Xtensa MMU support.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-06-25 14:15:27 -04:00
Tomasz Leman
a983a5e399 dts: xtensa: intel: Remove non-existent power domains from ACE30 PTL DTS
This patch removes definitions of power domains from the ACE30 PTL DTS
file that do not exist in the actual hardware.

The following power domain nodes have been removed:
- 'ml1_domain' with a bit-position of <13>
- 'io3_domain' with a bit-position of <11>
- 'io2_domain' with a bit-position of <10>

These nodes were previously included in the DTS file but do not
correspond to any physical power domain in the ACE30 PTL hardware. Their
presence in the DTS could lead to confusion and misconfiguration, as the
software might attempt to interact with non-existent hardware features.

By removing these nodes, the DTS now accurately reflects the hardware
capabilities of the ACE30 PTL platform, ensuring that the power
management infrastructure within the firmware operates based on the
correct hardware configuration.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-06-25 14:15:27 -04:00
Tomasz Leman
a2eada74c6 dts: xtensa: intel: Remove ALH nodes from ACE 3.0 PTL DTS
Remove the Audio Link Hub (ALH) nodes from the ACE 3.0 PTL DTS file.

This patch cleans up the Device Tree Source (DTS) for the ACE 3.0 PTL
platform by removing the definitions of the ALH DAI nodes. The ALH
interface is not utilized in the ACE 3.0 PTL architecture, making these
nodes redundant.

The following changes are made:
- Deleted the 'alh0' and 'alh1' nodes, which were previously defined
  with FIXME comments indicating a problematic modeling of individual
  ALH channels/instances using node labels.

This cleanup helps to prevent confusion and potential errors in device
configuration by ensuring that the DTS reflects the actual hardware
capabilities of the ACE 3.0 PTL platform.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-06-25 14:15:27 -04:00
Tomasz Leman
442e697a8f dts: xtensa: intel: Reorder power domains by bit position in ACE30
Rearrange the power domain entries in the ACE30 PTL device tree source
file to be in ascending order according to their bit positions. This
reordering improves the readability of the device tree source by
grouping power domains logically according to their bit position within
the power management registers.

The changes in this patch include:
- Moving 'ml1_domain' and 'ml0_domain' to their correct positions
  according to their bit-position values (13 and 12, respectively).
- Adjusting the order of 'io3_domain', 'io2_domain', 'io1_domain', and
  'io0_domain' to reflect their bit positions (11, 10, 9, and 8).
- Placing 'hub_hp_domain' and 'hst_domain' at their new positions
  according to their bit-position values (6 and 5).

No functional changes are introduced with this patch. It solely aims to
make the device tree source more intuitive and easier to navigate when
mapping power domains to their respective control bits.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-06-25 14:15:27 -04:00
Ievgen Ganakov
d1b5d7092e intel_adsp: ace30: Correct power control register bitfield definitions
This patch updates the power control and status register bitfield
definitions in the ACE30 PTL ADSP power management header to match the
documented hardware specifications. The previous definitions contained
discrepancies that did not align with the actual hardware layout,
potentially leading to incorrect assumptions and usage within the
firmware.

Changes made in this patch:
- Renamed 'rsvd0' to 'rsvd4' to accurately represent the reserved bits
  starting at bit position 4.
- Removed the 'rsvd6' field, which was incorrectly defined and is not
  present in the hardware register layout.
- Adjusted the bit widths for 'ioxpgs' and 'mlpgs' to correctly reflect
  the number of bits these fields occupy in the hardware.
- Introduced a new 'rsvd15' field in both 'ace_pwrctl2' and
  'ace_pwrsts2' structures to account for the remaining reserved bits,
  ensuring the structure sizes accurately represent the full register
  width.

By correcting these bitfield definitions, the firmware's power
management code will now be consistent with the actual hardware design,
improving reliability and maintainability of the codebase.

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-06-25 14:15:27 -04:00
Robert Lubos
4ba53a6325 samples: net: sockets: echo_client/server: Remove duplicate configs
A few configs in prj.conf were duplicated, remove duplicates.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-25 14:15:16 -04:00
Robert Lubos
67187f620b samples: net: sockets: echo_client/server: Bump ZVFS_OPEN_MAX config
Recent POSIX changes caused that 3 file descriptors are now preallocated
for stdin/out/err. This caused file descriptor shortage in all-in TLS
configuration of the sample, hence increase the maximum FD count.

In the server sample this manifested itself as an accept() error. This
triggered a busy loop though in the sample, as in case of accept()
errors it'd just try again w/o any delay. This made this issue hard to
investigate, so to avoid such cases in the future, make the accept()
failure fatal in the echo_server sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-25 14:15:16 -04:00
Robert Lubos
fa27d706ea samples: net: sockets: echo_client/server: Bump DTLS max frag len
Echo samples exchange data fragments longer than the default DTLS max
fragment length introduced in commit
f033cd5601. Hence, need to increase this
config value for the sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-25 14:15:16 -04:00
Robert Lubos
9391ca9893 samples: net: sockets: echo_client: Bump NET_SOCKETS_POLL_MAX config
Commit 3046e95d85 introduced eventfd use
in the sample, increasing the pollfd array size, however the config
indicating maximum number of monitored events remained intact, so the
sample didn't really work.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-25 14:15:16 -04:00
Bartosz Sokolski
72197097ae drivers: i2s_nrfx: Fix division by 0 in divider calculation
Skip cases which would result in division by 0 in clock calculation

Signed-off-by: Bartosz Sokolski <bartosz.sokolski@nordicsemi.no>
2024-06-25 12:19:20 -04:00
Jonathon Penix
afba61608e arm64: linker: lld: Handle symtab/strtab/shstrtab to fix warnings
lld will produce warnings for the symtab, strtab, and shstrtab sections
if --orphan-handling=warn is specified and there are no matching rules
in the linker script for these sections.

Handle these sections when building with lld to prevent the warnings.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-06-25 12:18:57 -04:00
Bjarki Arge Andreasen
9f867a1893 samples: net: cellular_modem: disable AT shell for NRF91_SLM
The NRF91_SLM has no additional AT channel for the AT shell to
use. This commit disables the AT shell for boards which use
the NRF91_SLM.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-25 12:18:40 -04:00
Bjarki Arge Andreasen
a58abd0450 drivers: modem: cellular: correct user DLCI channels
The supported modems don't have the same number or assignment
of DLCI channels. For example, the NRF91_SLM only has DLCI
channel 3 assigned to GNSS tunneling, where the ublox sara r5
has DLCI 3 assigned to an additional AT channel, and DLCI 4
assigned to GNSS tunneling.

This commit updates the creation and assignment of DLCI
channels and pipelinks to match the capabilties of each modem.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-25 12:18:40 -04:00
Bjarki Arge Andreasen
717474dddb MAINTAINERS.yml: Name change bjarki-trackunit -> bjarki-andreasen
Update maintainers file to match name change of bjarki-trackunit
to bjarki-andreasen.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-25 12:18:27 -04:00
Andrej Butok
1c8dd59187 doc: modem: fix double from
Fix the double 'from' in the "Modem pipelink" chapter.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-25 12:18:15 -04:00
Pisit Sawangvonganan
07994ab5d7 bluetooth: fix typo in (common, crypto, services, shell)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/(common, crypto, service, shell).

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-25 10:27:23 -04:00
Pisit Sawangvonganan
0df7fd68a7 bluetooth: mesh: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/mesh directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-25 10:27:23 -04:00
Pisit Sawangvonganan
521b9e2c04 bluetooth: host: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/host directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-25 10:27:23 -04:00
Pisit Sawangvonganan
9b305d5d72 bluetooth: controller: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/controller directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-25 10:27:23 -04:00
Pisit Sawangvonganan
110574f532 bluetooth: audio: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/audio directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-25 10:27:23 -04:00
Andrzej Kaczmarek
d177619a05 manifest: Update hal_renesas to pull new CMAC library
Update sha for hal_renesas to pull new CMAC library which fixes issue
with invalid setting for sleep clock accuracy. This enables CMAC to work
properly on RCX clock.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-06-25 10:27:09 -04:00
Enguerrand de Ribaucourt
dc987267ac doc: develop: tools: add VS Code setup guide
This basic guide only covers linting so far. It could be expanded in the
future to be more accurate and detailed. The current configuration
allows to navigate the code but some symbols are not recognized by the
linter, and the native compiler is always used.

Co-authored-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Co-authored-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
2024-06-25 10:26:55 -04:00
Sebastian Panceac
9ce338d416 Bluetooth: Fix CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY build warnings
This commit fixes compilation warnings that are present when compiling
with CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY as can be seen in this
compiler log:

"""
In file included from /zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/
include/string.h:215,
                 from /zephyr/subsys/bluetooth/host/smp.c:15:
In function '__memcpy_ichk',
    inlined from 'sc_send_public_key' at /zephyr/subsys/bluetooth/host/
smp.c:3006:2:
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
warning: argument 2 null where non-null expected [-Wnonnull]
   83 | __ssp_bos_icheck3_restrict(memcpy, void *, const void *)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
note: in a call to built-in function '__builtin_memcpy'
/zephyr/subsys/bluetooth/host/smp.c: In function 'smp_public_key':
/zephyr/subsys/bluetooth/host/smp.c:4214:21: warning: argument 2
null where non-null expected [-Wnonnull]
 4214 | memcmp(smp->pkey, sc_public_key, BT_PUB_KEY_COORD_LEN) == 0) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/string.h:62:10: note:
in a call to function 'memcmp' declared 'nonnull'
   62 | int memcmp (const void *, const void *, size_t);
      |     ^~~~~~
"""

The warning is caused by the potential use of NULL "sc_public_key"
global pointer that is not assigned a value in "smp_init()" if
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled. This commit
conditionally changes the behavior of function "smp_public_key()"
if CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is activated to simply return
and not use the "sc_public_key" variable. Other functions that are not
called anymore by "smp_public_key()" are also conditionally
deactivated when CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled

Signed-off-by: Sebastian Panceac <sebastian.panceac@ext.grandcentrix.net>
2024-06-25 10:26:41 -04:00
Chris Friedt
32d8326373 modules: thrift: update doc and cmake to build with macos
Added tabs to the thrift doc so that building works for macos
and is consistent with the rest of the documentation in terms
of one tab per os.

Updated client and server makefiles to discover include paths
for boost and openssl.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-25 10:26:28 -04:00
Piotr Pryga
cbd85195e1 drivers: clock_control: Remove XTAL accuracy change for nRF54L
There was an error in calculation of LFXO INTCAP code that prevented
obtaining desired XTAL accuracy below 50PPM. The error was fixed
the accuracy should be within expected range.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-06-25 10:26:11 -04:00
Piotr Pryga
37e5b1055e soc: nrf54l15: Fix HFXO INTCAP code calculation rounding error
The implementation of formula, to calculate HFXO INTCAP code,
had a rounding error. That may lead so small deviation of HFXO
clock accuracy.

The IPS formula uses capacitance values in piko Fartd units.
That requires use of floating point data types. To avoid that
implementation of the formula uses femto Farats (1000 smaller unit).

In the former implementation conversion from femto Farad to piko Farad
was done just after reading of the desired capacitance from DTS.

To make sure the calculations are correct the change of unit must be
done at very end. Also rounding must be applied.

Also the formula was split and more comments were added to make the
implementation clear.

The commit fixes the implementation of the IPS formula.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-06-25 10:26:11 -04:00
Piotr Pryga
f0f5f28f99 soc: nrf54l15: Fix LFXO INTCAP code calculations
There were two errors in calculations of LFXO INTCAP code:
- The value provided by DTS files is internal desired capacitance.
  The value from DTS has to be "encoded" before use in INTCAP
  calculations formula. The formula for encoding is:
  CAPACITANCE_CODE = (<desired_value> - 4pF) / 0.5
  Subtract of 4 is related with lowest value in the allowed range.
  Division by 0.5 is related with change to steps size.
  In former code the subtration of 4pF was missing.

- The mid_val calcuation was wrong due offset_k left shift by 4.
  It should be left shift by 3 to get total left shift of 9.
  That matches the left shift of former part of the equation.
  Final integer value was calculated by right shift 10, it should
  be right shift 9. Then rounding was done by use of mod by (1 << 10)
  It should be mod by (1 << 9) and compared with (1 << 8), that is
  half of 0-512 range.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-06-25 10:26:11 -04:00
Anas Nashif
e0f8a8f16e twister: remove some of the confusion in terminology
Remove legacy use of 'test case' and replace with `test scenario` where
applicable.
Update terminology and some other parts of twister docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-25 10:25:51 -04:00
Anas Nashif
6829210775 doc: ztest: Fix confusing terminology and align with twister.
Testcase definition to match what we use in twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-25 10:25:51 -04:00
Robert Lubos
ddf9e67169 net: lib: sockets: net_mgmt: Add note about thread priorities
Add a note about the thread priority requirements in the help string of
the Kconfig option enabling net_mgmt sockets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-25 10:25:37 -04:00
Robert Lubos
913b06251d samples: net: sockets: net_mgmt: Increase main thread priority
net_mgmt sockets do not implement internal queue but use
net_mgmt_event_wait() internally to receive events. As a consequence,
in case of events burst, some events may be lost if the receiving
thread has lower priority than the net_mgmt thread.

This was visible in the sample, where only DAD event was reported
properly, as IPv6 Add/Remove events were triggered in pair with
corresponding multicast events (from solicited-node multicast
address).

We can mitigate this by increasing main thread priority to be at the
same priority as net_mgmt thread, so that the receiving thread (main)
has a chance to run in between event reports.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-25 10:25:37 -04:00
Andrej Butok
fe2e560577 tests: flash_map: Increase the test coverage of supported platforms
- Increase the test coverage of supported platforms.
- Fix test_flash_area_check_int_sha256 for platforms with
  flash program size >32. Increase the supported flash program size
  to 512 (maximum supported by Zephyr platforms now).
- Fix test_flash_area_get_sectors test for platforms
  with maximum number of sectors per image slot >256.
  Increase the support value to 1024.
- Fix possible stack size overflow.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-25 10:25:22 -04:00
Alberto Escolar Piedras
9d9cf4d17d drivers/gpio/gpio_rzt2m: Handle trig == GPIO_INT_TRIG_WAKE
Fix a build warning due to the enumerate for the trigger
polarity possibly being (from the point of the compiler)
also GPIO_INT_TRIG_WAKE.
We fix it by simply returning a not valid argument error
which is what most other drivers do if they do something
smart enough.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-25 10:25:04 -04:00
Filip Kokosinski
243783243c MAINTAINERS: introduce the Microchip RISC-V Platforms area
This commit introduces the `Microchip RISC-V Platforms` area. This area
coveres the following current Zephyr targets:
* `m2gl025_miv`
* `mpfs_icicle`

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-06-25 06:08:57 -04:00
Filip Kokosinski
b2a061dc5d MAINTAINERS: add orphaned RISC-V boards back to the RISC-V area
This commit restores the pre-HWMv2 status of RISC-V boards being covered by
the RISC-V area of maintenance.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-06-25 06:08:57 -04:00
Grzegorz Swiderski
282f728752 doc: board_porting: Fix Kconfig.defconfig example
The part that says "Always set CONFIG_BOARD here" is outdated. In HWMv2,
CONFIG_BOARD is set by the build system, and we don't want to encourage
users to set it manually.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-06-25 06:07:21 -04:00
Aaron Ye
a7db1eab6c boards: ambiq: enable twister on apollo4x evb
This commit enables the twister on apollo4p_evb and apollo4p_blue_kxr_evb.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-06-25 06:07:08 -04:00
Aaron Ye
faf229714a soc: ambiq: apollo4x: remove untestable cache kconfig
This commit removes the untestable data and instruction cache kconfig
which causes CI failure.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-06-25 06:07:08 -04:00
Aaron Ye
ae37cc415a boards: ambiq: apollo4p_evb: add missing flash node
This commit adds the missing flash controller node in apollo4p_evb.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-06-25 06:07:08 -04:00
Dawid Niedzwiecki
b584e2c6d0 toolchain: clang: arm: do not use fp instruction when CONFIG_FPU=n
Clang uses floating-point instructions by default, even if -mfpu is not
defined. Disable using FPU when CONFIG_FPU=n.

Using floating-point instructions when FPU is not enabled generates
Usage Fault.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-06-25 06:06:36 -04:00
Manuel Argüelles
123f99c87b tests: drivers: counter: fix skip tests check
When running this test with multiple counter instances enabled that
support different capabilities, if one of the instances does not
support the test required capabilities, the test will be
immediately skipped not giving the chance to run to the subsequent
instances.

Fix this by marking the test as skipped, only of all counter instances
under test were skipped.

Fixes #74358

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
2024-06-25 06:06:19 -04:00
Eunkyu Lee
e491f220d8 Bluetooth: Host: Add missing buffer length check
Modified to check the length of the remaining data in buffer
before processing the next report. The length check is missing
in the cont routine.

Signed-off-by: Eunkyu Lee <mochaccino.00.00@gmail.com>
2024-06-25 06:06:06 -04:00
Jamie McCrae
11c1f3de61 cmake: modules: extensions: Fix dts watch file processing
Fixes and simplifies the handling of how the dts watch file is
processed

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-25 06:05:52 -04:00
Jamie McCrae
f4cfb8cd96 cmake: modules: extension: Fix dts file watch
Fixes an issue in the code that processes the output file of a
compiler to see which files should be watched, the compiler can
combine multiple files into a single line instead of putting them
each on separate lines if the length of the file paths is short,
therefore account for this and split it up into multiple elements

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-25 06:05:52 -04:00
Lingao Meng
be96512d82 scripts: spelling.txt: add double prepositions
Add double prepositions to the default spelling check list.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-25 06:05:35 -04:00
Lingao Meng
302422ad9d everywhere: replace double words
import os
import re

common_words = set([
    'about', 'after', 'all', 'also', 'an', 'and',
     'any', 'are', 'as', 'at',
    'be', 'because', 'but', 'by', 'can', 'come',
    'could', 'day', 'do', 'even',
    'first', 'for', 'get', 'give', 'go', 'has',
    'have', 'he', 'her',
    'him', 'his', 'how', 'I', 'in', 'into', 'it',
    'its', 'just',
    'know', 'like', 'look', 'make', 'man', 'many',
    'me', 'more', 'my', 'new',
    'no', 'not', 'now', 'of', 'one', 'only', 'or',
    'other', 'our', 'out',
    'over', 'people', 'say', 'see', 'she', 'so',
    'some', 'take', 'tell', 'than',
    'their', 'them', 'then', 'there', 'these',
    'they', 'think',
    'this', 'time', 'two', 'up', 'use', 'very',
    'want', 'was', 'way',
    'we', 'well', 'what', 'when', 'which', 'who',
    'will', 'with', 'would',
    'year', 'you', 'your'
])

valid_extensions = set([
    'c', 'h', 'yaml', 'cmake', 'conf', 'txt', 'overlay',
    'rst', 'dtsi',
    'Kconfig', 'dts', 'defconfig', 'yml', 'ld', 'sh', 'py',
    'soc', 'cfg'
])

def filter_repeated_words(text):
    # Split the text into lines
    lines = text.split('\n')

    # Combine lines into a single string with unique separator
    combined_text = '/*sep*/'.join(lines)

    # Replace repeated words within a line
    def replace_within_line(match):
        return match.group(1)

    # Regex for matching repeated words within a line
    within_line_pattern =
	re.compile(r'\b(' +
		'|'.join(map(re.escape, common_words)) +
		r')\b\s+\b\1\b')
    combined_text = within_line_pattern.
		sub(replace_within_line, combined_text)

    # Replace repeated words across line boundaries
    def replace_across_lines(match):
        return match.group(1) + match.group(2)

    # Regex for matching repeated words across line boundaries
    across_lines_pattern = re.
		compile(r'\b(' + '|'.join(
			map(re.escape, common_words)) +
			r')\b(\s*[*\/\n\s]*)\b\1\b')
    combined_text = across_lines_pattern.
		sub(replace_across_lines, combined_text)

    # Split the text back into lines
    filtered_text = combined_text.split('/*sep*/')

    return '\n'.join(filtered_text)

def process_file(file_path):
    with open(file_path, 'r', encoding='utf-8') as file:
        text = file.read()

    new_text = filter_repeated_words(text)

    with open(file_path, 'w', encoding='utf-8') as file:
        file.write(new_text)

def process_directory(directory_path):
    for root, dirs, files in os.walk(directory_path):
        dirs[:] = [d for d in dirs if not d.startswith('.')]
        for file in files:
            # Filter out hidden files
            if file.startswith('.'):
                continue
            file_extension = file.split('.')[-1]
            if
	file_extension in valid_extensions:  # 只处理指定后缀的文件
                file_path = os.path.join(root, file)
                print(f"Processed file: {file_path}")
                process_file(file_path)

directory_to_process = "/home/mi/works/github/zephyrproject/zephyr"
process_directory(directory_to_process)

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-25 06:05:35 -04:00
Jordan Yates
f3beebbc0f doxygen: fix undocumented parameters
Fix several doxygen warnings from undocumented parameters.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-25 06:05:20 -04:00
Maksim Salau
da9b308563 drivers: adc: saadc: Disable burst mode on unused channels
Burst mode enabled on an unused channel causes a freeze during a
conversion consisting of several channels (not including the one with
burst mode enabled).

Discovered on nRF52832 (nRF52-DK) using the following approach:
  channels 0-3 are used for application purposes as a sequence
  channel 4 is used for battery measurements with oversampling

After few successful conversions the sequence (channels 0-3) freezes the
thread while waiting for semaphore to end the conversion.

Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
2024-06-25 09:04:41 +02:00
Lyle Zhu
37d62c6a16 Bluetooth: RFCOMM: check the validity of received frame
Check whether the received frame is complete by
comparing the length of the received data with
the frame data.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-25 09:03:44 +02:00
Jamie McCrae
28eb135391 doc: release: 3.7: Add note on build system changes
Adds release notes for self submitted build system changes

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-24 22:31:12 -04:00
Jamie McCrae
5f2a2d6e22 doc: release: 3.7: Add note on MCUboot changes
Adds release notes for MCUboot

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-24 22:31:12 -04:00
Martin Jäger
7bc2806b2c doc: release-notes v3.7: add LoRaWAN section
Inform about newly added support for LoRaWAN fragmented transport and
firmware-upgrade over the air (FUOTA).

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-06-24 22:28:55 -04:00
Flavio Ceolin
ba126b36ea doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6258

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-24 22:26:11 -04:00
Flavio Ceolin
bf70a80a81 doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6259

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-24 22:26:11 -04:00
Daniel Leung
5c4c31cfe0 i3c: ccc: fix missing break in switch in _do__getcaps()
In i3c_ccc_do_getcaps(), there is a missing break statement
in the switch case for GETCAPS_FORMAT_2_CRCAPS. Add it.

Fixes #74764

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-24 22:25:57 -04:00
Luis Ubieda
f21e6278dc boards: croxel_cx1825: fix: Remove arduino support claims
This board is not compatible with the Arduino pinout. Therefore,
this patch removes all Arduino references to avoid confusion and CI
failures.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-24 22:25:45 -04:00
Sreeram Tatapudi
ca674b413e dts: arm: infineon: Update cat1b MPN's
Update cat1b MPN's to reflect the current supported parts

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-06-24 22:25:32 -04:00
Nicolas Pitre
a4ebd5e8db arch/arm64/mmu: move hardware specifics to private header
None of the moved definitions are meant to be used by any code outside
of arch/arm64/core/mmu.c. Move them away from global scope to the
private header where more such definitions already live.

This is especially relevant as the previous commit fixed some of those
definitions which then caused conflicts with some external SDK that
carries a copy of those original buggy definitions.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-24 22:24:50 -04:00
Nicolas Pitre
1e27100442 arch/arm64/mmu: use 64-bit mask values with page table descriptors
Inverting a mask whose type has only 32 bits  doesn't produce the
expected result. Fix those to be 64-bit values.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-24 22:24:50 -04:00
Glenn Andrews
895f246227 Lib: SMF: Add test for stuck handled bit
Update test_lib_self_transition_smf.c to detect the bug that was in
smf_set_handled().

Also delete unneeded test state STATE_D_ENTRY

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-06-24 14:50:00 -04:00
Glenn Andrews
27d7e38ee0 Lib: SMF: Refactor test_lib_self_transition_smf.c
Make the code less dependent on
magic #defines by using a single enum for test states.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-06-24 14:50:00 -04:00
Glenn Andrews
87db81e5cd Lib: SMF: fix stuck handled bit when transitioning
If both `smf_set_state()` and `smf_set_handled()` are called in
a run action, the `internal->handled` bit would not be reset.

This could cause an issue on the next run action by not
propagating events to parents.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-06-24 14:50:00 -04:00
Henrik Brix Andersen
adccdd9fa6 boards: nxp: lpcxpresso551s16: enable usbphy1
Enable the USB1 High Speed PHY on the NXP LPCXpresso55S16 development
board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-06-24 14:49:45 -04:00
Henrik Brix Andersen
ca69e06940 dts: arm: nxp: lpc55s1x: add usbphy1 devicetree node
Add devicetree node for the USB1 High Speed PHY present in the NXP LPC55S1x
series.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-06-24 14:49:45 -04:00
Andrej Butok
fdfebdd15b soc: lpc: mcxn: fix the flash_fill() fail.
- Fix flash_fill() for lpc55 and mcxnx4.
- Set FLASH_FILL_BUFFER_SIZE to the minimal size of data
  which can be written to a device (by default is only 32).
- Fix the [flash_map.test_flash_area_erase_and_flatten]
  failed test of tests/subsys/storage/flash_map.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-24 14:49:32 -04:00
Sylvio Alves
6b4beb9494 drivers: eth_esp32: fix function call as from hal
When external PHY has crystal, ESP32 can be configured
to use custom GPIO as clock source for it. However, due to
latest clock subsystem and hal updates, current driver
fails to build and blocks its usage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-24 14:49:16 -04:00
Sylvio Alves
cc29fc1182 driver: eth_esp32: fix shared clock check
Both MDIO and Ethernet drivers share the same clock subsystem.
After clock control update in #73807, clock_control_on()
now returns -EALREADY for already initialized clock subsystem.
As a result, ethernet driver won't initialize as needed.

Fixes #74440

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-24 14:49:16 -04:00
Ali Hozhabri
3b726dee53 Bluetooth: Host: Fix HCI command timeout usage
Fix Bluetooth initialization problem caused by PR#72090
for at least ST boards that are using BlueNRG BLE modules.

For more information, please refer to issue #74528.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-06-24 14:48:25 -04:00
Bjarki Arge Andreasen
9d761a1769 drivers: rtc: rtc_ll_stm32: coverity 368806 fix
Replace DIV_ROUND_CLOSEST() with a normal division to simplify
operation and avoid redundant handling of signed integer rounding
as the temp value is an unsigned value. The temp value is in nano
precision, so rounding is largely inconsequencial anyway compared
to the comparatively low precision sync prescaler.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-24 14:48:15 -04:00
Jukka Rissanen
c706b9031c net: if: Make sure interface name can contain terminating null
The minimum length for the network interface buffer is 2 so that we
can have terminating null there.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-24 14:48:03 -04:00
Jukka Rissanen
8c1834a25a net: dns: mdns_responder: Interface name might miss terminating null
The network interface name that is copied to if_req struct might
be missing terminating null.

Fixes #74795
Coverity-CID: 368797

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-24 14:48:03 -04:00
Jukka Rissanen
b1a1a534ff net: websocket: Remove dead code
The zsock_close() is not needed as the fd is always <0 so
the close is never called.

Fixes #74791
Coverity-CID: 366273

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-24 14:47:52 -04:00
Jukka Rissanen
2ed2d38d7d shell: backend: uart: Fix POSIX name conflict
If CONFIG_POSIX_API is enabled, the read() and write() function
names will conflict.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-24 12:45:46 -04:00
Francois Ramu
e0c25089e3 samples: drivers spi_flash on the external NORof stm32h5 disco kit
Define the configuration to run the test on the external memory
xspi flash of the stm32h573i_dk disco kit in MemoryMapped Mode
Reading is done with memcopy and erase/write are aborting operation
to send the appropriate command

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-24 12:45:34 -04:00
Francois Ramu
2f0dd2c66f samples: code relocation in external memory of stm32h5 disco kit
Define the configuration to run the code_relocation
application on the external memory xspi flash
of the stm32h573i_dk disco kit in XIP

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-24 12:45:34 -04:00
Francois Ramu
ead5c84547 boards: arm: stm32h573 disco kit can flash on external NOR
Configure the external NOR flash memory to be executable.
Change the board.cmake to add the external loader for
flashing (version that do not mass-erase the external flash).
The address of the external flash is not needed
when flashing a hex file.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-24 12:45:34 -04:00
Francois Ramu
b40c037233 drivers: flash: stm32 xspi driver supports the MemoryMapped mode
Adding the support of the memoryMapped mode
to the flash_stm32_xspi driver through the CONFIG_STM32_MEMMAP
That will allow XiP from the external octo_flash
Erase and Write operation must Abort operations.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-24 12:45:34 -04:00
Lyle Zhu
2d89be6702 Sample: bluetooth: add mimxrt1040_evk support
Enable mimxrt1040_evk for handsfree and
handsfree_ag samples.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-24 12:44:49 -04:00
Lyle Zhu
ab4a9d2018 boards: mimxrt1040_evk: enable Bluetooth
Add pinmux pinmux_lpuart3_flowcontrol
and pinmux_lpuart3_sleep for HCI-UART.

Add a node m2_hci_uart for HCI_UART.

And add chosen `zephyr,bt-hci =
&bt_hci_uart;`

Update section `Supported Features`,
section `Connections and IOs` and
section `Serial Port` for this feature.

Add section `Fetch Binary Blobs` to
guide how to fetch binary blobs for
BT modules.

add section `Bluetooth Module` for
hardware rework.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-24 12:44:49 -04:00
Georgij Cernysiov
bb3737bde6 drivers: ethernet: adin2111: minor code style correction
Use tabs instead of spaces.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-06-24 12:44:04 -04:00
Georgij Cernysiov
104a019913 drivers: ethernet: adin2111: move OA buffers out from device data
Move OA-related TX and RX buffers out from the device data.
Don't define the buffers without the `spi-oa` property. That
saves ~32KB when using generic spi protocol.

Rearrange device data fields to reduce byte holes found with
Pahole.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-06-24 12:44:04 -04:00
Nazar Palamar
2eaae36220 driver/bluetooth/hci/hci_ifx_psoc6_bless: fix long bt startup time
Added force unblock psoc6 bless rx thread to process controller
events (at the end of psoc6_bless_send function)

Internal case: SWINTEGRAT-1767

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-24 12:43:48 -04:00
Piotr Kosycarz
6898f93e48 samples: sensor: qdec: verify position value
At least for nrf boards, the emulation timer settings generate
reading around -60 degrees. Verify that value with some threshold.

Delay the first reading to prevent 0 at the beginning.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-24 12:43:25 -04:00
Piotr Kosycarz
456fed3bc3 samples: sensor: qdec: align pins for nrf boards
To match used loopbacks.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-24 12:43:25 -04:00
Ioannis Karachalios
d5332532e5 drivers: mipi_dbi: smartbond: Unused symbol
Suppress warning thrown when
the reset line is not used.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-24 12:43:12 -04:00
Ioannis Karachalios
edd779dbed boards: renesas: dts: Various fixes
This commit should deal with fixing
various issues on the board's dts
overlay files:

1. PSRAM node was not enabled when
   display buffers were stored in
   psram and thus, raising linker
    error (overflow memory section).

2. Remove MIPI DBI read operations
   for the MIPI DBI driver. This is
   because not all drivers support
   read and most of the cases it does
   not have any practical usage.
   In addition, this might trigger
   conflicts with SPI sensors.
   If needed, users should explicitly
   enable read operations by defining
   an SPI device taking into consideration
   conflicts with SPI devices connected
   to the SPI bus.

3. Remove enabling the DMA driver.
   It should be enabled by default.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-24 12:43:12 -04:00
Ioannis Karachalios
9d1b62b8ac drivers: usb: device: smartbond: Use DMA driver
This commit should deal with updating
the way USBD was handling the DMA
engine. Based on the #73803 request
DMA should be handled via the DMA
driver API class and not directly.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-24 12:43:12 -04:00
Ioannis Karachalios
1bcff4130c drivers: dma: smartbond: Fix pending length
This commit should deal with fixing
the pending length value returned
upon requesting the status of a channel.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-24 12:43:12 -04:00
Carles Cufi
6cc771cb0c Bluetooth: mesh: Remove deprecated Kconfig option
The MESH_LABEL_NO_RECOVER Kconfig option was introduced as deprecated in
Zephyr 3.5.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-24 12:42:30 -04:00
Carles Cufi
06d7d763bd Bluetooth: gatt: Remove deprecated write struct member
The struct member was deprecated back in Zephyr 3.1.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-24 12:42:30 -04:00
Carles Cufi
0ee2f25ab7 Bluetooth: conn: Remove deprecated macros
The removed macros were deprecated in Zephyr 2.7.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-24 12:42:30 -04:00
Carles Cufi
7d651ea623 Bluetooth: ATT: Remove deprecated macros
The removed macros were deprecated in v3.0.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-24 12:42:30 -04:00
Carles Cufi
a87b825641 doc: bluetooth: mesh: Remove outdated text
The bt_mesh_cfg_srv structure was removed in ad2fd44d7a, no need to
keep this text here anymore.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-24 12:42:30 -04:00
Robert Lubos
b854d8b466 net: sockets_service: Increase stack size for mDNS responder
Tests showed that mDNS responder needs slightly more stack on certain
platforms, hence increase the default for such case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:42:16 -04:00
Robert Lubos
ca322ec3d4 samples: net: sockets: big_http_download: Fix build with TLS enabled
After enabled POSIX_API in the sample, not all headers were included in
the build due to #ifdefs around header inclusions. This commit fixes
this.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:42:16 -04:00
Robert Lubos
bed98044e3 samples: net: tftp_client: Bump main thread stack size
The sample was crashing due to stack overflow on the main thread.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:42:16 -04:00
Robert Lubos
648b3db443 samples: net: telnet: Bump IPv6 mcast address count
The multicast IPv6 address count was too low to create all
solicited-node multicast address, resulting in an error being
printed on boot:

  Cannot join solicit node address ff02::1:ff00:1 for 1 (-12)

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:42:16 -04:00
Robert Lubos
c8ce949ec7 samples: net: stats: Update project configuration
Fix two issues with the current configuration:
* The log buffer was too small for the sample, causing part of the stats
  printout to be dropped
* The sample set CONFIG_NET_CONFIG_NEED_IPV4 but did not actually set
  any IPv4 address, nor enable DHCP, causing the NET_CONFIG
  initialization failure.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:42:16 -04:00
Robert Lubos
027a19a565 net: lib: dns_sd: Fix buffer sizes on query processing
A few issues were identified with DNS_SD segment buffers, making it work
"by chance" (depending on memory layout):

- size check in dns_sd_query_extract() did not take NULL termination
  into account, and in result could overflow provided buffer
- the proto_buf in send_sd_response() can either be used to parse
  protocol or domain, depending on number of segments in the query.
  It should therefore be large enough to hold either.
- Similarily, instance_buf should be able to hold
  DNS_SD_INSTANCE_MAX_SIZE, not DNS_SD_SERVICE_MAX_SIZE.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:42:16 -04:00
Robert Lubos
63a5d26877 samples: net: mdns_responder: Bump CONFIG_NET_SOCKETS_POLL_MAX
Socket service library threw an error, the configured value was too
low for it to work.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:42:16 -04:00
Robert Lubos
65d9bf1ed7 samples: net: lwm2m_client: Bump IPv6 mcast address count
The multicast IPv6 address count was too low to create all
solicited-node multicast address, resulting in an error being
printed on boot:

  Cannot join solicit node address ff02::1:ff00:1 for 1 (-12)

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:42:16 -04:00
Aleksandr Khromykh
ddc23f47d8 Bluetooth: Mesh: rename deprected key refresh field
Commit renames deprecated key refresh field.
It still has to exist to allow backward compatibility
with previous versions when data are restored from
the persistent memory.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-06-24 12:42:03 -04:00
Sebastian Głąb
b99cf9f691 boards: nordic: nrf54h20dk: Counter and i2c are supported by cpuppr
Extend Twister configuration for nrf54h20dk/nrf54h20/cpuppr.
Add counter and i2c to the list of supported peripherals.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-24 12:41:47 -04:00
Robert Lubos
d9a979f2dc net: lib: dhcpv4: Fix typo in logs
DHCPv4 was misspelled in logs.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:41:38 -04:00
Robert Lubos
cd5e1cd0a5 net: lib: http_server: Fix possible NULL pointer dereference
Fix possible NULL pointer dereference in http_hpack_decode_header().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-24 12:41:22 -04:00
Jukka Rissanen
a0b56dab1a net: dns: llmnr_responder: Fix uinit variable
The family variable was not initialized and could potentially
be left like that. This could only affect error printout.

Fixes #74796
Coverity-CID: 368799

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-24 12:41:06 -04:00
Andrej Butok
5310ee7bf4 doc: mem_mgmt: fix mem_non_cacheable code
Fix the mem_non_cacheable code according its comment.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-24 12:40:19 -04:00
Jordan Yates
a9456221cd doc: version: document the numeric version limits
The `VERSION` numeric fields are used to construct the `uint32_t`
`KERNELVERSION` and `APPVERSION` values, which only allocates a single
byte for each field.

The field in `app_version.h` is `APP_TWEAK`, not `APP_VERSION_TWEAK`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-24 08:28:54 -04:00
Jordan Yates
e82e358ed4 cmake: version.cmake: cleanup docs
Cleanup the documentation to fix indentation and remove leading zeros.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-24 08:28:54 -04:00
Jordan Yates
20348d6b71 cmake: version: enforce single byte limits
Enforce the single byte size limits on the numeric fields in `VERSION`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-24 08:28:54 -04:00
Jordan Yates
629858f572 tests: cmake: app_version: test app_version.h
Test the basic `app_version.h` file generation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-24 08:28:54 -04:00
Martin Tverdal
78d2ed5428 soc/nordic/nr54l: increase flash erase time define
Time it takes to "erase" one "page" of rram is too low.
Where getting timeouts.
"erase" of rram is done by writing all the words.
one "page" is 4096 bytes meaning 1024 32bit words.
worstcase time it takes to write one 32bit word from
0x00000000 to 0xffffffff is about 42us, giving 42ms
to write 1024 words.

Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
2024-06-24 08:28:13 -04:00
Martin Tverdal
b9aae1388c drivers/flash/nrf_rram: increase flash timeout multipler rram
Erasing rram is very similar to partial erase on flash.
So we should use the same multiplier as there, 1.5.
0.1 multipler is way to low and was causing timeouts.

Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
2024-06-24 08:28:13 -04:00
Jiafei Pan
60b62be6fb board: imx8mp_a53: enlarge networking stack size
This patch is to fix issue #74594

The issue is caused by default stack size 1500 bytes of NET_RX_STACK_SIZE
is to small for ARM64 platform, then the stack of net_rx thread is overflow
and break the net_mgmt thread's stack, as a result net_mgmt thread is
crashed.

So this patch will enlarge all the stack size of net stack threads.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-24 14:26:43 +02:00
Lingao Meng
dfc948a753 tests: bluetooth: fix missing net_buf_ref(rsp)
Remove unused rsp.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-24 14:26:22 +02:00
Lingao Meng
f6480db986 samples: bluetooth: Fixes bt_hci_cmd_send_sync API usage
If func:`bt_hci_cmd_send_sync` return no-zero value, indicate
that `cmd(buf)->status` not zero, in this condition, rsp not
to assign anything, so remove it.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-24 14:26:22 +02:00
Lingao Meng
b11c43cb09 drivers: bluetooth: Remove unused rsp params
The `rsp` params actually not used, so removed.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-24 14:26:22 +02:00
Aleksander Wasaznik
a9c95c5c87 Bluetooth: Host: Enforce correct pool in bt_hci_cmd_send_sync
`cmd(buf)` depends on this since it uses `net_buf_id`, which would alias
multiple pools.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-06-24 14:26:11 +02:00
Bjarki Arge Andreasen
016b4f1d33 modem: ppp: coverity 330618: explicitly ignore retval
Explicitly ignore the return value of net_pkt_read_u8() as the
net_pkt is validated before being queued for transmit within
modem_ppp_ppp_api_send()

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-24 14:25:46 +02:00
Romain Pelletant
8e6cff0176 soc: esp32: fix unknown defined for linker
* Fix unknown define at link stage when CONFIG_BT is enabled
Solve #74836

Signed-off-by: Romain Pelletant <romain.pelletant@fullfreqs.com>
2024-06-24 14:25:37 +02:00
Sylvio Alves
ee1b13c822 soc: esp32c3: fix tls linking error
Fix linking error due undefined tdata entry.
After #72642, tdata could be undefined due to
missing TLS check.

Fixed #74852

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-24 14:25:18 +02:00
Alberto Escolar Piedras
2dc67c56b4 tests/net/lib/http_server/hpack: Exclude native_posix
This test explicity enables the POSIX_API which is
not compatible with native_posix.
Let's exclude this target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-24 13:01:38 +02:00
Alberto Escolar Piedras
f13196429e subsys/net/lib/http: Set feature macro as required
This file uses strnlen() but the C library
is not require to expose its prototype unless
_POSIX_C_SOURCE is defined.
So let's define it to avoid an implicit function
declaration warning.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-24 13:01:38 +02:00
Eric Holmberg
18ebfe59d0 drivers: serial: esp32_usb: fix interrupt-enable race condition
After enabling interrupts, serial_esp32_usb_irq_tx_enable() calls the
interrupt handler to handle any old events that occurred while interrupts
were disabled.  However, this happens in the callers context, so if an
interrupt arrives during the call, it will call the interrupt handler again
resulting in corruption if the interrupt handler is not reentrant.

Fixes #74569

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2024-06-24 09:47:05 +02:00
Nazar Palamar
41c9ec3e42 driver/bluetooth/h4_ifx_cyw43xxx: Allow CBUCK regulator to discharge
Problem:
re-plug USB (e.g cy8cproto_062_4343w kit) can cause that
CY43xx device become unresponsive (cy8cproto_062_4343w).
As result we catch ASSERTION FAIL (timeout) on HCI_Reset command.

Fix: added delay (BT_POWER_CBUCK_DISCHARGE_TIME_MS) to be sure
that BT CBUCK regulator to discharge.

Tested on:
cy8cproto_062_4343w, cy8ckit_062s2_ai and cy8ckit_062s2_43012 kits.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-24 09:46:01 +02:00
Nazar Palamar
b6d0958ab7 drivers: serial: CAT1 UART driver: fix HW flow control
fix HW flow control:
- remove cyhal_uart_enable_flow_control
- added Cy_SCB_UART_EnableCts if cfg->flow_ctrl = true
  (required to enable hw flow control)
- configuration of CTS/RTS done by pincntr driver

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-24 09:46:01 +02:00
Nazar Palamar
f343a1a677 cy8cproto_062_4343w: board: fix polarity for LED_0
Update polarity for LED_0 from GPIO_ACTIVE_HIGH to
GPIO_ACTIVE_LOW.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-24 09:46:01 +02:00
Aleksandr Khromykh
f9d7385879 Bluetooth: Mesh: add extension config server by lcd server
Commit add extension of configuration server by large
composition data server.
Mesh Protocol v1.1 specification
4.4.21.1
The Large Composition Data Server is a main model
that extends the Configuration Server model.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-06-24 09:44:58 +02:00
Aleksandr Khromykh
3e2b44a5dd Bluetooth: Mesh: add extension config server by private beacon server
Commit add extension of configuration server by private
beacon server.
Mesh Protocol v1.1 specification
4.4.11.1
The Mesh Private Beacon Server model is a main model
that extends the Configuration Server model.

Configuration server and private beacon server shall always
exist together since they have bound states.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-06-24 09:44:58 +02:00
Jeff Welder
af57038bb0 modem: pipelink: Add missing extern C in header
<zephyr/modem/pipelink.h> was missing
"extern C" statement.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2024-06-23 20:37:14 +02:00
Evgeniy Paltsev
e5c05da9cb MAINTAINERS: Synopsys: add mwdt linker tool file to mwdt entry
Add mwdt linker tool file to mwdt entry

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-06-22 05:47:16 -04:00
Mahesh Mahadevan
0635c23c41 dts: rw6xx: Fix the PM state definitions
The CPU states were not picked up by the PM
subsystem

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-22 05:40:42 -04:00
Jordan Yates
1ab4fe68d1 scripts: spelling.txt: add double prepositions
Add double prepositions to the default spelling check list.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-22 05:40:22 -04:00
Jordan Yates
07870934e3 everywhere: replace double words
Treewide search and replace on a range of double word combinations:
    * `the the`
    * `to to`
    * `if if`
    * `that that`
    * `on on`
    * `is is`
    * `from from`

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-22 05:40:22 -04:00
Tomasz Bursztyka
b0e327bd9c drivers/spi: Fix context release in case of error
SPI context has to be released even in case of error.

Fixes: #72782

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
2024-06-22 05:39:55 -04:00
Fabian Blatz
b7b1a56124 modules: lvgl: support linking memory pool to custom section
This patch adds a kconfig option `LV_Z_MEMORY_POOL_CUSTOM_SECTION`
which allows to place the buffer the memory pool is backed by into a
section with the label ".lvgl_heap".

Resolves issue: #66494.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-22 05:39:41 -04:00
Peter Mitsis
4123c531f3 tests: Add test for IPI cascades
Adds a test to show that enabling IPI cascades
(CONFIG_SCHED_IPI_CASCADE=y) can correct an invalid set
of high priority threads on an N CPU system.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-21 20:49:11 -04:00
Peter Mitsis
11417b2b57 doc: kernel: smp: Add section about IPI cascades
Adds a section providing additional information about IPI cascades
to the kernel's SMP documentation.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-21 20:49:11 -04:00
Peter Mitsis
ada3c90f8f kernel: Add CONFIG_SCHED_IPI_CASCADE
When this new Kconfig option is enabled, preempted threads on an SMP
system may generate additional IPIs when they are switched out.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-21 20:49:11 -04:00
frei tycho
75cd10bf56 testsuite: change controlling expressions in while to Boolean
Use `do { ... } while (false)` instead of `do { ... } while (0)`.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-21 15:41:26 -04:00
Steven Shen
bc915ef55c arch: arm64: Fix ICC_SGI1R mask for arm64
According to "Arm A-profile Architecture Registers",
Interrupt Controller Software Generaated Interrupt
Group 1 Register (ICC_SGI1R), AFF is 8 bits width
and the mask should be 0xFF but not 0xF.

Cortex_a_r is okay and no need to be fixed.

Signed-off-by: Steven Shen <steven.shen@jaguarmicro.com>
Tested-by: Rex Nie <rex.nie@jaguarmicro.com>
2024-06-21 15:32:38 -04:00
Katarzyna Giądła
bf6ba17655 samples: sensor: sensor_shell: Extend timeout for pytest tests
The test `sample.sensor.shell.pytest` fails althought the output
is correct. Time to execution is not enough.
This change extend test execution timeout.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
2024-06-21 15:26:07 -04:00
Bjarki Arge Andreasen
3d67591971 doc: relase: Document addition of at shell and pipelinks
Document the addition of pipelinks to the modem_cellular.c device
driver and the new modem at shell which uses the pipelinks to
communicate directly with the modems.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-21 15:25:48 -04:00
Bjarki Arge Andreasen
99866e172a doc: release notes: Added release notes for modem subsystem
Added release notes for modem subsystem for release 3.7

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-21 15:25:48 -04:00
Bjarki Arge Andreasen
49e3910f41 doc: services: modem: add section for pipelink
Add section documenting the new modem pipelink.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-21 15:25:48 -04:00
Bjarki Arge Andreasen
04dfbb65bd modem: pipelink: add header to doc group
Add modem pipelink header to doc group modem_pipelink and add
this group to the modem group.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-21 15:25:48 -04:00
Mathieu Choplain
3ffa56fd7e tests: drivers: counter: support STM32 w/o RTC
This commit adds a missing #ifdef check which prevents building the
'counter_basic_api' test for boards under the following conditions:
 * RTC node is defined in device tree (compatible = "st,stm32-rtc")
 * RTC node is disabled in device tree (status = "disabled")
 * Kconfig "CONFIG_COUNTER_RTC_STM32=n" is specified

This check matches the ones done a few lines above for NXP MCUs.

Without this check, building the test under the conditions listed above
failed with the infamous `undefined reference to '__device_dts_ord_N'`
linker error, because the test attempts to obtain RTC's `struct device`
despite CONFIG_COUNTER_RTC_STM32=n, which ultimately fails because the
RTC driver is not built unless there is an enabled RTC node in DT.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-06-21 15:04:20 -04:00
Erwan Gouriou
e1b13b6aa0 west.yml: stm32: Remove PAGESIZE definition
PAGESIZE definition from legacy.h conflicts with POSIX definition.
Since this definition comes from legacy.h file which is only there
for Cube backward compatibility that we don't maintain in Zephyr,
simply remove it.

Note:
This is a second fix for #73363 which wasn't sufficiently tested.
Legacy file is included in stm32yyxx_hal_def.h headers and actually
removing it generates build errors as we're relying on some of the
definitions. Removing this inclusion is necessary and will be done
but on next release.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-21 15:03:00 -04:00
Carles Cufi
caa25827a7 doc: soc porting: Fix introduction paragraph
The introductory paragraph had a broken link and was arbitrarily
referencing a couple of files that will be described extensively later.
Instead, just present the content generically.

Fixes #69990.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-21 14:57:30 -04:00
Mathieu Choplain
8e7b0c4af3 samples: llext: modules: increase stack size
This commit increases the size of the main stack for the LLEXT sample
subsys/llext/modules, which otherwise overflows the stack on several
platforms.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-06-21 14:56:27 -04:00
Yong Cong Sin
2bb78f3e1a arch: riscv: stacktrace: use current thread if thread is NULL
Zephyr's thread stack size is not fixed, in most cases we would
need the `thread` argument to obtain the `stack_info`, unless
we are unwinding the irq stack, since that is fixed.

Otherwise we can only safely print the current `mepc` register,
unwinding the esf without the stack info of a thread can
result in undefined behavior.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-21 14:55:27 -04:00
Yong Cong Sin
b79a68fc49 arch: riscv: stacktrace: refactor fatal stack bound
Pass the current thread to `walk_stackframe()`, so that we do
not need to hardcode `_current` in `in_fatal_stack_bound()`,
which will allow it to reuse the `in_stack_bound()`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-21 14:55:27 -04:00
Gerson Fernando Budke
e6d8ed2e0d samples: sensor: qdec: Fix wrong harness
The #73619 which fixes the atmel,sam-tc-qdec sensor implementation
introduced agregression on the sample test removing the harness
console. That changed the test to use the default ztest behaviour
which is incompatible with the test outpout. This restore the
harness to the default console value.

Fixes: #74531

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-06-21 14:55:12 -04:00
Fabian Blatz
2b2f35511c doc: releases: Add LVGL paragraph to the migration guide
Adds a paragraph detailing the deprecation of `LV_Z_POINTER_KSCAN` to the
migration guide 3.7.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-21 11:54:11 -04:00
Fabian Blatz
a2833ab2cf samples: subsys: display: lvgl: Remove kscan pointer check
Removes the check for whether or not the kscan kconfig option is set to
change the GUI accordingly.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-21 11:54:11 -04:00
Fabian Blatz
5a62c1137c modules: lvgl: Remove LVGL pointer kscan
Removes the wrapper code of the kscan based pointer input device. It was
implemented during the transitioning phase until all intree drivers were
converted to the input subsystem.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-21 11:54:11 -04:00
Andy Ross
e9c23274af Revert "soc: intel_adsp: only implement FW_STATUS boot protocol for cavs"
This breaks SOF load on MTL devices.  See SOF bug for details:
https://github.com/thesofproject/sof/issues/9243

This reverts commit fa798ce2d5.

Signed-off-by: Andy Ross <andyross@google.com>
2024-06-21 11:52:38 -04:00
Lingao Meng
cfd79e8bf0 bluetooth: host: Use K_WORK replace delayable
Use K_WORK defined. This delayed work is never used with any
other timeout than K_NO_WAIT, so the "delayed" part of it
is never actually needed

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-21 11:42:04 -04:00
Georgij Cernysiov
2f25c3666a include: net: net_pkt: fix unused variable warnings
Fix warnings generated by -Wunused-parameter.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-06-21 11:41:25 -04:00
Robert Lubos
abc91227b2 net: lib: zperf: Fix socket leak during asynchronous TCP upload
In case of TCP upload error, zperf would leak a socket when running in
asynchronous mode. The upload work have to release the socket it
allocated in any case, regardless of the session result.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-21 11:38:11 -04:00
Robert Lubos
5cea38021e net: lib: zperf: Fix socket leak during socket setup
During socket setup, if one of the setsockopt() calls failed, the
function would return an error w/o closing the socket. That's wrong, as
in case of errors the function should clean up any resources it
allocated, the socket file descriptor is lost otherwise and resources
are leaked.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-21 11:38:11 -04:00
Jonathan Rico
62368ba489 doc: Bluetooth: Add release notes for TX path rework
Add release notes mentioning the recent TX path rework.

https://github.com/zephyrproject-rtos/zephyr/pull/72090

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-21 11:37:59 -04:00
Benjamin Bigler
c4bf917549 net: coap: add explicit cast in coap_bytes_to_block_size
Using coap from c++ gave invalid conversion error

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-06-21 11:37:47 -04:00
Sylvio Alves
844cb3e479 drivers: intc: esp32: fix kconfig visibility
Kconfig options in those drivers are visible and selectable
to any board/soc when it should not. This makes sure both
depends on proper family.

Fixes #74347

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-21 11:37:33 -04:00
frei tycho
f17a67fee4 lib: avoided increments/decrements with side effects
- moved ++/-- before or after the value use

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-21 08:48:15 -04:00
Jordan Yates
cc37eac6bd dts: cleanup leading spaces
Cleanup leading spaces found via the following regexes:
  r" compatible ="
  r"^  "
in:
  zephyr/**/*.dts
  zephyr/**/*.dtsi

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-21 08:46:12 -04:00
Jordan Yates
79f81f6eb8 scripts: checkpatch.pl: treat .overlay files as dts
Treat devicetree overlay files as DTS source for the purposes of
checkpatch.

Fixes #74570.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-21 08:46:12 -04:00
Marek Pieta
f6600040e4 usb: cdc_acm: Update log level only if UART log backend is enabled
Change updates log level only if UART log backend is enabled in Kconfig
configuration. The log level update is not needed in case logs are
provided over other backend (e.g. RTT).

Change affects both USB stacks.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-06-21 08:45:22 -04:00
Ioannis Damigos
b9dab49b13 drivers/smartbond: Remove atomic flags from drivers
Remove atomic flags from drivers that use balanced calls
for PM locking.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-21 08:45:10 -04:00
Erwan Gouriou
94f7a60d3b samples: stm32: serial_wakeup: Enable fifo
Uart FIFO is useful in case of wakeup on serial as it will allow
to avoid losing chars.
Enable it systematically on all overlays for this sample.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-21 08:44:54 -04:00
Robert Lubos
5499a82850 tests: net: http_server: Add HPACK testsuite
Add tests suite covering HTTP2 HPACK header compression and Huffman
encoding.

Note - many HPACK encoding/decoding cases in tests look similar, but
there are subtle differences in HPACK header used. For decoding, we
should be able to decode all of them. For encoding, we only test what
we support (no dynamic indexing).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-21 08:44:38 -04:00
Robert Lubos
bd4469aa79 samples: net: dns_resolve: Increase socket-related configs
Current NET_SOCKETS_POLL_MAX and ZVFS_OPEN_MAX values were too low for
the sample after the DNS refactoring, making the sample unusable in
current state.

Bump those values accordingly to make the sample functional again.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-21 08:44:29 -04:00
Robert Lubos
1aca4205b8 net: lib: dns: Fix error code returned when socket creation failed
We should return the errno value in such case, as ret will always be -1
on failure, which might misleading, as it does not give any hint on what
failed.

Also bump the log level of the error message, so the failure is visible
w/o needing to enable debug logs. Such a failure is fatal for the DNS
subsystem, so error level is justified here.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-21 08:44:29 -04:00
Robert Lubos
e018281d3b net: lib: dns: Fix DNS dispatcher double net buf unref
The `dns_data` buffer, allocated by the DNS dispatcher was dereferenced
twice - once in registered DNS handler, second time in the dispatcher
itself.

Since the buffer was allocated by the dispatcher, and it's not really
guaranteed that the buffer will be freed in the registered handler (this
depends on the processing outcome, the function may return early w/o
freeing the net buf in case of errors), it makes most sense for the
dispatcher to keep ownership of the buffer. Hence, the registered
handlers will no longer release the buffer provided in any case, and the
dispatcher will free it on exit.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-21 08:44:15 -04:00
Maureen Helm
fe382e57d9 boards: adi: Improve twister vendor filter coverage
Some of the new max32 family boards were missing the vendor name in
their board yamls and not being tested by `twister --vendor adi`.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-06-21 08:44:04 -04:00
Alberto Escolar Piedras
3d729986e0 tests/bsim: Provisionally disable the nrf54l15 BT tests
Let's provisionally disable the nrf54l15 BT tests in CI
due to instability issues in the controller for this
platform.
See https://github.com/zephyrproject-rtos/zephyr/issues/74635

This should be reverted once the underlaying issue is fixed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-21 11:32:40 +02:00
TOKITA Hiroshi
5e295ac39e doc: release: 3.7: Add hyperlinks for boards
Add hyperlinks to each board's page for added in this release.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-21 10:11:53 +02:00
TOKITA Hiroshi
2b976609b3 boards: raspberrypi: rpi_5: Correct hyperlink target
Added `_` to handle the hyperlink target correctly.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-21 10:11:53 +02:00
TOKITA Hiroshi
bcb7d42ac7 doc: releases: 3.7: Correct RaspberryPi5 identifier
`rpi_5` is the correct identifier for RaspberryPi5.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-21 10:11:53 +02:00
TOKITA Hiroshi
82c380b988 doc: add release note about Renesas RA
updated release notes for 3.7

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-21 10:11:53 +02:00
Nikolay Agishev
2d75d7b2d3 ARCMWDT: Remove workaround with stripping DWARF info
Remove obsolete workaround with conditional turning off "-g"
flag when Thread Local Storage used.

Recent versions of MetaWare have no issue with linking files with
TSL-related data.

Moreover, pointed workaround breaks userspace for recently added
ARC-V platforms, as they use both TLS and DWARF info while compilation
process.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/29920

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-21 10:10:24 +02:00
Glenn Andrews
4a4d506510 Board: disco_l475_iot1: Fix PWM assignment
Most people would expect green_pwm_1 to go to LD1 on the dev board.
However it is routed to CN1 pin 2, since routing it to LD1 would
interfere with SPI SCK on the Arduino connector. This PR adds a
comment to tell users that LD1 won't light up as expected and to
fix the comments stating which PWM goes to which pin.

Also updated the documentation to note this.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-06-21 10:08:36 +02:00
Jun Lin
14eef26d96 dts: npcx: workaroud bbram 1st byte issue for npcx4
Apply the workaround for the issue "BBRAM First Byte" in the
NPCX49nF_Errata. This bypass limits the access to the BBRAMs' first byte
(i.e., the offset 0). As a result, only 127 bytes are available in npcx4
chips.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-06-21 10:07:41 +02:00
Jun Lin
e555f20462 driver: bbram: npcx: fix the way to clear bbram status
Bits in the BBRAM status register (BKUP_STS) are write-1-to-clear bits.
The current driver writes 0 to clear those bits, which is incorrect.
Fix it in this commit.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-06-21 10:07:41 +02:00
Alberto Escolar Piedras
383b97b742 tests/bsim/bluetooth/audio: Increase real time deadline
These 2 tests have been seen failing in CI due to
the real time timeout.
Let's increase their deadline so it does not happen.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-21 10:06:43 +02:00
Daniel Leung
c44c922198 soc: xtensa/dc233c: remove xtensa_dc233c_stack_ptr_is_sane
The generic stack pointer checker in the architecture code is
enough so we can remove the platform specific one. Besides,
xtensa_dc233c_stack_ptr_is_sane() does not do much checking
either.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-21 09:59:36 +02:00
Daniel Leung
31c96cf395 xtensa: check stack boundaries during backtrace
This checks for stack boundaries during backtrace to make sure
we are not stepping into invalid memory.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-21 09:59:36 +02:00
Daniel Leung
5b84bb4f4a xtensa: check stack frame pointer before dumping registers
Check that the stack frame pointer is valid before dumping
any registers while handling exceptions. If the pointer is
invalid, anything it points to will probably be also be
invalid. Accessing them may result in another access
violation.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-21 09:59:36 +02:00
Daniel Leung
cb9f8b1019 xtensa: separate FATAL EXCEPTION printout into two
It is observed that during logging in fatal exception,
it prints "FATAL EXCEPTION(null)". Exact reason is unknown
as debugging through GDB would make it all work again. So
separating it into two log statements to avoid this situation.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-21 09:59:36 +02:00
Maureen Helm
e1c51f9a72 boards: adi: Fix input subsys tests and samples for max32 boards
Input subystem tests and samples were failing to build on these max32
boards because the zephyr,code property was missing on gpio-keys child
nodes. The devicetree binding doesn't specify the property as required,
but the driver implements a build assert when the property isn't
defined.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-06-20 17:08:08 -04:00
Nerijus Bendžiūnas
272d52ff7a drivers: flash: mark unused argument
Fixes:

```
.../zephyr/drivers/flash.h: In function 'flash_params_get_erase_cap':
.../flash.h:106:63: error: unused parameter 'p' [-Werror=unused-parameter]
  106 | int flash_params_get_erase_cap(const struct flash_parameters *p)
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
```

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@astrolightspace.com>
2024-06-20 17:04:52 -04:00
Pierrick Guillaume
3500a6133d cmake: modules: fix FindThreads use of deprecated PTHREAD config
With the update of the Kconfig symbols to new naming scheme,
CONFIG_PTHREAD does not exist anymore.
Use the new CONFIG_POSIX_THREADS instead

Follow-up: #73047
Signed-off-by: Pierrick Guillaume <pierguill@gmail.com>
2024-06-20 17:03:57 -04:00
Zhani Baramidze
6ced73e552 scripts: fixed missing argument in parse_from_attribute call.
In size_report script, if the DWARF section of ELF file contains both
debug_loc and a debug_loclists sections, LocationListsPair class is
used to track locations. In that case, parse_from_attribute was missing
one argument which was causing the script to fail.

Signed-off-by: Zhani Baramidze <jbaramidze@meta.com>
2024-06-20 17:03:21 -04:00
Flavio Ceolin
38ef4b3749 doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6137

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-20 17:02:58 -04:00
Flavio Ceolin
3010a1f8a4 doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6135

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-20 17:02:58 -04:00
Flavio Ceolin
310cb3cad3 doc: relnotes/3.7: Add info about CVE-2024-6135
Information about CVE-2024-6135 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-20 17:02:58 -04:00
Emil Gydesen
bca432c8e8 kernel: Add missing @brief for z_fatal_error
The function did not have a @brief and thus was not
showing up in the documentation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-20 17:02:45 -04:00
Lothar Felten
d1a900266f doc: release: 3.6: Release notes for Lilygo boards
Add Lilygo boards that are supported in release 3.6

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-06-20 17:02:27 -04:00
Anke Xiao
7076f33988 tests: drivers: i2c: i2c_target_api: update testcase.yml
Added frdm_ke17z512 platform to allow testing single_role.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-20 17:02:12 -04:00
Sylvio Alves
b38d4300b9 soc: esp32c3: fix TLS flash addressing
When TLS is used, `__tdata_start` is PROVIDED by
"thread-local-storage.ld" using absolute address, which
makes it land in wrong flash address. This causes risc-v startup
code to fail during memcpy/memset.

This PR overrides `__tdata_start` to use ADDR, which will
make sure it is placed in DROM region due to AT keyword.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-20 14:07:54 -04:00
Benjamin Cabé
704421cc83 doc: clean-up Development Environment and Tools page
GitHub labels were hard to visually parse so use guilabel role to make them
stand out more, and put them in tabular format.
Other minor cosmetic tweaks

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
a8573a985c doc: fix incorrect bullet lists
ReStructuredText bullet lists should be preceded by an empty
line

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
3c3627b968 samples: net: vlan: improve README formatting
simple tweaks to improve HTML rendering of the
vLAN README

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
dea2bcb214 samples: net: tftp: doc: formatting/spelling clean up
misc fixes to ensure proper formatting and spelling of the
TFTP sample README

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
f6d0383a97 samples: net: http_server: use proper language in code-block
Achieve proper syntax highlighting using "console"
language when command snippets start with a prompt.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
bd73073708 doc: samples: net: mqtt: improve formatting
use code literal formatting for KConfig identifiers

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
f6db733f4a doc: samples: userspace: add cross reference to C functions
use :c:func:  role to cross reference the function mentioned
in the README

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
ee820206ef doc: samples: logging: add reference to Kconfig
use kconfig:option role to properly cross reference the Kconfig
mentioned in the README

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
0bd8a2faca doc: use proper pygment for Kconfig code-blocks
Kconfig snippets should use "kconfig" pygment to get proper highlighting

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
e04cdb0d2f doc: usb: samples: improve commands formatting
use code literal formatting for commands in RST file

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
b4b623c26c doc: use proper pygment for .conf code-blocks
config file snippets should use "cfg" pygment to get proper highlighting
This commit updates all occurences where "kconfig" or other languages
were used.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Yong Cong Sin
7adac57943 scripts: checkpatch: add stdio.h FILE typedef
Add `FILE` typedef in the `stdio.h` so that when doing
`FILE *file` definition checkpatch doesn't complain about
the position of the '*' and fail in CI.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-20 14:07:14 -04:00
Joakim Andersson
901a8f7efb drivers: pinctrl_nrf: : Allow applying pins of disabled peripherals
According to the nrfx peripheral resource sharing example in
samples/boards/nrf/nrfx_prs it should be possible to share a resource
and apply the pins on peripheral that share resource ID.
However the sample only works since it only demonstrates UART and SPIM,
and by enabling both another SPIM driver, and UART is enabled for the
console. It would not be possible to enable a TWIM driver in addition.
Instead allow the PSELs if the configuration for NRFX has been enabled.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-06-20 12:09:24 -04:00
Pieter De Gendt
99366dd2be linker: Add ROM_SECTIONS location
Currently iterable sections as per the documentation are added with
zephyr_linker_sources(SECTIONS ...) after bss/noinit.
This commit allows putting sections after common-rom.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-06-20 12:08:58 -04:00
Troels Nilsson
eea1573b2b Bluetooth: Controller: Collection of small fixes for BIS
Use PDU_BIS_LLID_FRAMED in empty PDUs for framed BIS

Allocate room for header when calculating max_pdu for framed BIS

Set group_sync_delay, stream_sync_delay and framed properly for BIS
broadcaster

Add missing call to isoal_tx_event_prepare() for BIS

Signed-off-by: Troels Nilsson <trnn@demant.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-20 12:07:32 -04:00
Morten Priess
b1bcd799fb Bluetooth: controller: Add data path config for ISO sync receiver
- Assign sync_delay parameters for ISO-AL sink creation
- Store framing information from BIGinfo for use in sink creation
- Set max_octets for sink creation

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-06-20 12:07:32 -04:00
Nirosharn Amarasinghe
1a640e4711 Bluetooth: controller: Included transport latency in LE_Big_Established
Included missing transport_latency_BIG information in HCI
LE_Big_established message.

Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
2024-06-20 12:07:32 -04:00
Mark Wang
e2ec54bb9d drivers: udc: mcux: remove CONFIG_DT_HAS_NXP_USBPHY_ENABLED
remove CONFIG_DT_HAS_NXP_USBPHY_ENABLED to make codes more simple

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-20 12:07:07 -04:00
Carles Cufi
4fecad4fe0 scripts: runners: nrf_common: Fix recover on 54H20
In order for the --recover option to work properly on the nRF54H20, it
requires executing it for both cores, the radio and the application one.
Extend the recover_target() function so that it does so for both 53 and
54H20.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-20 12:05:39 -04:00
Maximilian Deubel
71c4526ab3 drivers: sensor: bmm150: Fix setting of attributes
Some functions in the bmm150 driver were depending on a define
that was never used. Changed it to the one that is actually defined.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-20 12:05:23 -04:00
Luis Ubieda
7cda467cc1 sensor: vcnl36825t: Scrub redundant scaling on meas_timeout_us
Confirming the Proximity Integration is an integer, we don't need to
pre-apply the Scaling factor to then be accounted for when the actual
meas_timeout_us is calculated.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-20 12:05:07 -04:00
Luis Ubieda
51ad3d34bd sensor: vcnl36825t: fix: Address CID 347083
Coverity found this legitimate issue: the datasheet specifies PS_IT
being 2-bits long (1, 2, 4, 8) and this driver assumes more steps are
available. Remove extraneous fields so the Proximity integration
setting fits in the expected 16-bit value.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-20 12:05:07 -04:00
Dominik Ermel
2258dcb755 drivers/flash: Add missing documentation for flash_fill
Add the missing flash_fill documentation.

Fixes #74407

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-20 12:04:26 -04:00
Szymon Janc
78b93feb6d tests: bluetooth: tester: Enable BT_TINYCRYPT_ECC for nRF5340
This needs to be enabled in nRF53 CPUAPP for LE SC support to be
enabled.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-06-20 12:04:18 -04:00
Piotr Kosycarz
4d01353640 drivers: serial: fix cfg.baudrate may be used uninitialized
drivers/serial/uart_async_to_irq.c: In function 'get_rx_timeout':
drivers/serial/uart_async_to_irq.c:51:26:
warning: 'cfg.baudrate' may be used uninitialized
   51 |                 baudrate = cfg.baudrate;
      |                 ~~~~~~~~~^~~~~~~~~~~~~~
drivers/serial/uart_async_to_irq.c:45:28: note: 'cfg' declared here
   45 |         struct uart_config cfg;

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-20 12:04:02 -04:00
Rubin Gerritsen
69fb606579 Bluetooth: Host: Define bt_security_err_to_str()
This can be useful if application developers
want to print them in the applications.

Later we can also use them in
the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Rubin Gerritsen
4e30803e15 Bluetooth: Host: Define bt_gatt_err_to_str()
The function reuses the ATT implementation.
To make the function simpler to use, the function handles both positive
and negative values.

Unfortunately the APIs do not document if the API returns an
errno val or a GATT return value.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Rubin Gerritsen
b25985ad6a Bluetooth: Host: Define bt_smp_err_to_str()
This API converts a SMP error code to a string.
This can be useful if application developers want
to print them in the applications.

BT_SMP_ERR_SUCCESS was added for completeness.

Later we can also use them in the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Rubin Gerritsen
94d712e5cf Bluetooth: Host: Define bt_att_err_to_str()
This can be useful if application developers
want to print them in the applications.

Later we can also use them in
the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
TOKITA Hiroshi
e96cfe0478 tests: arch: arm: arm_irq_vector_table: Do not run if GEN_ISR_TABLES=y
The Renesas RA ICU forcibly enables GEN_ISR_TABLES, and it remains
enabled even if it is disabled in prj.conf.
Adding `not CONFIG_GEN_ISR_TABLES` to the filter condition to skip
this case.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-20 12:57:54 +02:00
TOKITA Hiroshi
daa3bb1d55 drivers: interrupt_controller: renesas_ra: Enable GEN_ISR_TABLES explicitly
Renesas RA ICU driver requires to generate ISR tables.
Adding `select GEN_ISR_TABLES` to force enable it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-20 12:57:54 +02:00
Hake Huang
ef62bba336 driver: i3c: fixing i3c init error
i3c config need has i2x/i3c baudrate configured first.
so in i3c init we shall set the baudrate first

fixing: #65153

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-06-20 12:48:36 +02:00
Luc BEAUFILS
c4c5408677 board: phytec: fix typos
Some Phytec board documentation had typos. This commit fixes them.

Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
2024-06-20 12:48:02 +02:00
Maochen Wang
8a37897b5c net: ethernet: Fix EAPol packet length changed wrongly
In ethernet_recv(), it will call ethernet_update_length() to check for
ipv4 or ipv6 packet if it needs to get rid of the padding in the
packets. But for EAPOL packets, no need to do this, which may modify
the packet length of EAP type packet wrongly and leads to EAPoL
packets dropped in supplicant.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
c116c9faf8 hostap: Add macro to wrap the interface monitoring code
Add macro to wrap the interface monitoring code and user can choose if
enable it.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
1726aa4345 hostap: fix wifi sta connection not triggerred issue
Use select_network instead of enable_network, then can trigger sta
connection mutiple times. Also update the configuration in
add_interface().

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
001ac3976a modules: hostap: fix hostap compile error and support enterprise
Fix compile error when enable enterprise security mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
762169034b net: wifi: split wifi interface into STA and uAP
Split wifi interface into station mode and soft-AP mode, as there may be
station and soft-AP two interfaces that work concurrently.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Andy Sinclair
7f0f0a4f97 drivers: gpio: shell: Fixed gpio info crash bug
When getting gpio info for a specific device with no line
names, invalid memory was accessed.
The check for the length of the line name array has been
corrected to avoid this.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-06-20 08:59:49 +02:00
Seppo Ingalsuo
1198c7ec29 Drivers: DAI: Intel: Move ACE DMIC start reset clear to earlier
The unreset of ACE PDM controllers is moved to beginning of
void dai_dmic_start() and done side-by-side. This change is done
for adhering to recommended hardware initialization flow to
avoid intermittent failures on ARL-S.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-06-20 08:59:20 +02:00
Seppo Ingalsuo
78920e839e Drivers: DAI: Intel: Reduce traces dai_dmic_start()
This patch removes the traces printed inside spinlock protected
code. The DMIC capture start code is timing critical. Traces
leave an unknown delay into start sequence, so it's better to not
produce them.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-06-20 08:59:20 +02:00
Seppo Ingalsuo
9db580357b Drivers: DAI: Intel: Remove trace from dai_dmic_update_bits()
The dai_dmic_update_bits() function is used in start trigger
code dai_dmic_start() and in capture runtime to control DMIC
IP in unmute sequence. Especially the start sequence is timing
critical so it's better not produce additional delay in this
function.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-06-20 08:59:20 +02:00
Francois Ramu
29b1e2a7d5 boards: st: nucleo_h743/h753 use the FDCAN clock at 80MHz on pll2q
When using the FDCAN1, use the PLL2q clock source at 80MHz on the
nucleo_h743zi or nucleo_753zi boards, now that sysclck is 480MHz.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-20 08:59:11 +02:00
Henrik Maier
abeae8fd08 net: lib: http_server: Fix dynamic HTTP post zero 0 length reply
Fix issue in http server that a http post
was unable to send a 0 length reply.

Signed-off-by: Henrik Maier <hwmaier@gmail.com>
2024-06-20 08:58:03 +02:00
Ben Marsh
23736ee7d1 doc: releases: Add PR #73422 fix to release notes
Add the mDNS Resolver/Responder coexistence fix from PR #73422 to the
v3.7 release notes.

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2024-06-20 08:57:55 +02:00
Jerzy Kasenberg
1464209173 drivers: usb_device: smartbond: Fix EP OUT after resume
When device was resumed from sleep OUT endpoints were most
likely not enabled due to condition that checked pending transfer.
Configured OUT endpoints should be enabled (ready for RX)
if they were enabled by interfaces.

Now separate bit field enabled is added and check to
see if OUT endpoint should be ready for reception after
sleep is done.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-06-19 13:44:32 -04:00
Jerzy Kasenberg
a953bdf309 drivers: usb_device: smartbond: Delay message USB_DC_EP_DATA_OUT
Callback with USB_DC_EP_DATA_OUT was called directly from
interrupt handler (handle_ep0_rx()) while rest of the interrupt
conditions were not checked yet.
Some interfaces started next transfer directly from this callback
resulting in case where TX endpoint was still marked as busy
and transfer was eventually abandoned.

Now message is sent from all affected endpoints after every USB
pending interrupt is handled.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-06-19 13:44:32 -04:00
Jerzy Kasenberg
f456852510 drivers: usb_device: smartbond: Fix unnecessary flush
Switching from write to read on EP0 is done when data is
transmitted.
Additionally receiver is enabled when NAK is created in
response to OUT token. This may happen when host sent
ZLP before everything was transmitted.
This case flushed receiver FIFO which could lead to
setup packet corruption.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-06-19 13:44:32 -04:00
Jerzy Kasenberg
18a7603560 drivers: usb_device: smartbond: Add power management
Add support for automatic control of PLL for USB subsystem.

This utilized virtual USB clock present in clock control.
USB driver enables PLL when device is attached or USB
sends resume signaling.

PLL can be turned off (if application does not requested it)
when device is detached (application request)
or USB host sends suspend request.

When VBUS is not present or application did not started USB yet
PD_DOMAIN_SYS is also not acquired that allows for deep
sleep. When USB is active deep sleep will never be activated.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-06-19 13:44:32 -04:00
Jerzy Kasenberg
16c0cecbf6 drivers: usb_device: smartbond: Fix reenable of EP0
When EP0 was disabled EP0 was setup to ignore setup and
out packets.
In usb_dc_ep_enable() function mask was never cleared.
It resulted in USB stop functioning after application
disabled endpoint (usb_disable()) and then tried
to enable usb again.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-06-19 13:44:32 -04:00
Jerzy Kasenberg
0f167af30f drivers: usb_device: smartbond: Fix VBUS interrupt enable
Code was enabling USB_IRQn twice. One of the calls clearly
should be enabling VBUS_IRQn.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-06-19 13:44:32 -04:00
Jerzy Kasenberg
207195dfe8 drivers: clock_control: smartbond: Add USB clock
Smartbodn does not have dedicated USB clock.
For USB to work PLL needs to be turned on.
To allow for flexible configuration artificial USB clock
is added that can be operated via clock_control subsystem.
This new clock turns on PLL when USB subsystem is enabled.
PLL can also be request in DT if application requires
more speed.

PLL can be automatically turned off when USB enters suspend
state and application did not requested it.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-06-19 13:44:32 -04:00
Jordan Yates
17d466918f tests: fs: nvs: add mps2/an385 support
Add support for running the test with the simulated `mps2/an385` board.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-19 13:43:45 -04:00
Jordan Yates
912026f65b boards: mps2_an385: add NVS support
Add support for NVS on the board by default. Using the simulated flash
driver is required as this board has no flash controller. Support is
desired as this is the ARM board used by coverage testing.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-19 13:43:45 -04:00
Mateusz Karlic
631248449a drivers: intc_gic: Return GICC_IAR without mask
The documentation recommends to read and then write-back the entire
register, when ending interrupts.

Signed-off-by: Mateusz Karlic <mkarlic@antmicro.com>
2024-06-19 13:43:06 -04:00
Henrik Brix Andersen
fbc0318809 boards: st: stm32h735g_disco: enable USB device support
Enable USB device support on the stm32h735g_disco board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-06-19 13:24:49 -04:00
Rafał Kuźnia
f7d7cb885f soc: nordic: configure recover run once for nrf54h20
The nrfutil device v2.4.x now supports the recover operation. Configure
run once to ensure that domains are not unnecessarily erased.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-06-19 13:24:23 -04:00
Aleksandr Khromykh
3cf219fb97 Bluetooth: Mesh: align mesh and host psa usage
Commit aligns usage mesh and host PSA.
Since PSA crypto is supported in host then
there is no reason to switch off some of host
features to get rid of tinycrypt functions in
the final image.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-06-19 13:24:08 -04:00
Alberto Escolar Piedras
77acec32f7 native/posix arch: Reorder sections to avoid a RWE segment
GNU ld since 2.39, produces more security related warnings.
Due to the way we ordered sections the linker may end up with
a segment in the elf which contains both executable code
and read and write data.
This results in this new versions of the linker warning us.

So, in the linker script,
let's move the executable native_sim_if section from
being placed with the other native port related segments
after .data to being placed after .text instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-19 13:23:58 -04:00
Marek Matej
e5de9d2447 soc: espressif: esp32: improve memory utilization
Move the user_iram_end boundary to allow more statical allocations.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-19 13:23:47 -04:00
Nikolay Agishev
a2dd517d7f ARCMWDT: Fix macroses for section definition
With adding support for ARC-V architecture some additional
changes in section definitions are required.

This PR fixes https://github.com/zephyrproject-rtos/zephyr/issues/74421

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-19 13:23:13 -04:00
Francois Ramu
deaa40aeb9 tests: drivers: spi loopback testing on the nucleo_h743/h753 boards
Reduce the spi1 clock freq to pass the testcase on the nucleo
_h753zi or nucleo_h743zi boards
Connect D11 & D12 pins on the board to pass the test

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-19 13:23:06 -04:00
Francois Ramu
5716429c01 tests: subsys: lorawan testing on the nucleo_wl55jc with timeout
Running the tests/subsys/lorawan/clock_sync/ requires a long timeout
to pass. Set a timeout: 500 to cover most of the usecase

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-19 13:22:49 -04:00
Jakub Topic
4fe32e1f4a drivers: rtc: rv3028: fix RTC time mask
Correct the RTC time mask to validate all supported fields.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-06-19 13:22:29 -04:00
Jakub Topic
2feeeefbe7 drivers: rtc: pcf8563: check if the node has an interrupt pin
Verify if the int1_gpios property exists for the specific node.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-06-19 13:22:29 -04:00
Jakub Topic
fdd7f524b9 drivers: rtc: pcf8563: validate time
Validate the contents of `struct rtc_time` against the provided mask
when setting time or alarm.

Use the same names of function parameters as those in the RTC Interface.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-06-19 13:22:29 -04:00
Arkadiusz Cholewinski
012520d2d7 Kernel: Integration test
Propose scenarios of integration test for kernel testing.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-06-19 13:41:06 +02:00
Jonathan Rico
c6345c6371 Bluetooth: l2cap: service as much TX channels as possible
Similar to ISO connections, ACL connections are not serviced as fast as
possible. Change this, and try to send as much as we have resources for.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-19 13:38:49 +02:00
Jonathan Rico
d3dbf890bf tests: Bluetooth: make an L2CAP multilink stress test
This test's purpose is to stress the TX data path in the case of multiple
connections.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-19 13:38:49 +02:00
Jonathan Rico
8af7180531 Bluetooth: iso: make TX path service all connections
ISO connections that were in the TX queue were not getting serviced in
time. This happens because `iso_data_pull()` returns `NULL` when that
particular connection (`conn`) is done sending.

But it doesn't trigger the TX processor again to process other channels in
the queue. This patch fixes that by calling `bt_tx_irq_raise()`.

We can't do this from `conn.c` as we don't know if the `NULL` returned is
because the current channel is out of data or because it has data but it
can't send it (e.g. the current buf is being "viewed" already).

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/74321

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-19 13:38:41 +02:00
Dominik Ermel
97a97c744a drivers/flash: Fix typos and incorrect description
Fixing typos.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-19 09:34:19 +02:00
Dominik Ermel
33f8039d95 drivers/flash: Fix flash_fill write chunk calculation
Fix incorrect last chunk calculation.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-19 09:34:19 +02:00
Rubin Gerritsen
1b33616535 Bluetooth: Host: Add log entry for connection creation timeout
This makes it more clear what is happening when the host cancels
connection creation where the controller raises
the connection complete event with status set to
"UNKNOWN CONNECTION IDENTIFIER (0x02)".

This is especially useful for developers not familiar with this
detail in the spec.

See also: Core_v5.4, Vol 4, Part E, Section 7.8.13,
LE Create Connection Cancel command.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-18 20:11:53 -04:00
Alberto Escolar Piedras
1949f3205e subsys/pm/Kconfig: Fix typo
Fix a trivial typo in Kconfig

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-18 20:02:00 -04:00
Daniel Mangum
d216a281d8 samples: tflite-micro: fix link to original magic_wand samples
Fixes link to magic_wand sample, which was removed from the tflite-micro
repository.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-06-18 20:00:41 -04:00
Dawid Niedzwiecki
cda3baf10c tests: drivers: counter: counter_basic_api: run on google_dragonclaw
Add google_dragonclaw board definition and allow running the
drivers.counter.basic_api.stm32_subsec test on the board.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-06-18 19:59:42 -04:00
Johann Fischer
7e123084e2 doc: usb: document USB message notifications
Add documentation about USB message notifications. Use literalinclude to
pull code snippets from the samples.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-18 19:56:54 -04:00
Johann Fischer
afa6411139 doc: usb: include group usbd_msg_api
Include group usbd_msg_api to reference its members.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-18 19:56:54 -04:00
Tomasz Moń
e653816665 doc: usb: include new MSC device API
Add doxygen group with MSC device API and document macro to create
mapping between disk access and MSC LUN.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-18 19:56:54 -04:00
Johann Fischer
52dbc3377b doc: usb: make example code most left-aligned
Make example code most left-aligned.
Also use :samp: to format identification strings in the table.
Followup on commit 8739efe0fc
("doc: usb: add initial USB device configuraiton howto").

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-18 19:56:54 -04:00
Flavio Ceolin
836c2ccfd4 pm: device_system_managed: Fix functions return
Fix functions return when CONFIG_PM_DEVICE_SYSTEM_MANAGED is
not enabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-18 19:56:39 -04:00
TOKITA Hiroshi
2393aef169 doc: add release note about RaspberryPi/RaspberryPiPico
updated release notes for 3.7

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-18 19:56:26 -04:00
Yong Cong Sin
02a47cecb9 fdtable: lseek's returned offset should start from 0
An offset of `>= 0` is valid from a `lseek` call, fix it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 19:56:13 -04:00
Yong Cong Sin
3ecef55179 posix: shm: offset should compare with the shm size
The read/write offset should have compared with the size of
the shm object, not the size of the buffer.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 19:56:13 -04:00
Manuel Argüelles
3799073e72 dts: arm: nxp: fix clock name for FTM nodes
Clock NXP_S32_FTMx_CLK reference the output of PCC_FTMx clocks, but
FTM has an internal clock mux to select the clock source of the
counter, which for ucans32k1sic board is set to system clock. Fix the
clock nodes to use the correct clock name. So far this was working
because both NXP_S32_FTMx_CLK and NXP_S32_CORE_CLK are configured to
the same frequency.

Fixes #74348

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
2024-06-18 19:55:50 -04:00
Swift Tian
beef60df65 samples: tests: dts: mspi: update ambiq specific MSPI dts
Updated apollo3p_evb overlay files for MSPI peripheral devices.

Signed-off-by: Swift Tian <swift-tian@qq.com>
2024-06-18 19:55:35 -04:00
Swift Tian
0a2824c69c dts: mtd: update MSPI device binding
update the device bindings so that it becomes SoC independent.

Signed-off-by: Swift Tian <swift-tian@qq.com>
2024-06-18 19:55:35 -04:00
Swift Tian
5d24b6d37d drivers: fix Kconfig.mspi for issue #74349
Fix the Kconfig.mspi under flash and memc so that it don't litter.

Signed-off-by: Swift Tian <swift-tian@qq.com>
2024-06-18 19:55:35 -04:00
Swift Tian
533f115b78 MAINTAINERS.yml: update file list for MSPI
Add more files and directory related to MSPI.

Signed-off-by: Swift Tian <swift-tian@qq.com>
2024-06-18 19:55:35 -04:00
Manuel Argüelles
989a30807f tests: drivers: counter: nxp s32: test all PIT channels
Make sure that all PIT channels are tested.

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
2024-06-18 19:55:20 -04:00
Manuel Argüelles
ace214bc3c manifest: hal_nxp: pull HAL fixes for NXP S32
Fixes #74360

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
2024-06-18 19:55:20 -04:00
Chris Friedt
72bd951ac4 net: ptp: do not use a reserved id in global scope
Generally, we should avoid using reserved names in global
contexts.

subsys/net/lib/ptp/clock.c:58:25: \
  error: 'clock' redeclared as different kind of symbol
   58 | static struct ptp_clock clock = { 0 };

/opt/toolchains/zephyr-sdk-0.16.8/arm-zephyr-eabi/picolibc/ \
  include/time.h💯12: \
  note: previous declaration of 'clock' with type 'clock_t(void)' \
  {aka 'long unsigned int(void)'}
  100 | clock_t    clock (void);

subsys/net/lib/ptp/clock.c:58:25: \
  error: 'clock' defined but not used [-Werror=unused-variable]
   58 | static struct ptp_clock clock = { 0 };

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-18 19:54:53 -04:00
Tom Burdick
694428947a sensors: Fix shell missing channel types
The shell tries to decode all channel types and sequential channel
indexes. Unfortunately when swapping to channel specs we forgot to reset
the channel index for the next channel type to look at.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-18 14:55:27 -04:00
Anas Nashif
1a46b7ed0e ci: assignees: set multiple assignees of same area
Noticing many PRs that wait too long in the queue although once of the
maintainers approved with asignees set to other maintainers.

This changes the current behavior of picking the first maintainer in the
list and assigning to them only, instead we assign to all maintainers of
the main area being changed.

Who ends up driving the PR to a mergeable state is then to the
maintainers and they can unassign/assign based on availability.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-18 14:39:22 -04:00
Yong Cong Sin
15dc87d172 tracing: trace sys_init calls
Created tracing APIs to trace the enter and (exit + result) of
SYS_INIT and DEVICE_DT_DEFINE (and friends).

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:39:05 -04:00
Ioannis Damigos
3daf69a5f0 dts/da1469x: Disable i2c2 node
Disable i2c2 node

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-18 14:36:38 -04:00
Ioannis Damigos
082e2b706a da1469x: Move enabling PM from board to SoC level
Move enabling PM from board to SoC level

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-18 14:36:38 -04:00
Ioannis Damigos
27c14042bd i2c_smartbond: Introcude TX_FIFO_DEPTH macro
Introcude TX_FIFO_DEPTH macro to avoid "magic"
numbers.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-18 14:36:38 -04:00
Ioannis Damigos
d9ad8c9c99 i2c_smartbond: Fix spin locking
Fix spin locking

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-18 14:36:38 -04:00
Ioannis Damigos
c7da55ef2c spi_smartbond: check that DMA controllers were provided
Check that DMA controllers were provided in
spi_smartbond_dma_deconfig()

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-18 14:36:38 -04:00
Ioannis Damigos
0a0bccabd8 drivers/smartbond: Fix PM device runtime support
Removed PM device runtime support from drivers in PD_SYS domain.

Update the rest device drivers to call pm_device_runtime_get/put()
functions when CONFIG_PM_DEVICE_RUNTIME is enabled.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-18 14:36:38 -04:00
Bjarki Arge Andreasen
1fc26b8974 drivers: rtc: api: Add helper for determining calibration
Add helper function which calculates the required calibration to
1 Hertz from the actual frequency of an RTC. This helper is both
functional and adds to the documentation of the RTC calibration
API.

The rtc.h header now includes zephyr/kernel.h instead of
zephyr/types.h as __ASSERT_NO_MSG is now referenced in the header.

The commit additionally extends the rtc_api_helpers test suite
with a test to validate the conversion function itself.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-18 14:35:55 -04:00
Pierrick Guillaume
724762facd fs: open: fix zfp flags not set when calling truncate
If filesystem relies on zfp flags being set after open, this can lead to
inconsistency with the current implementation of FS_O_TRUNC.
Move the assignment of zfp->flags before any other call to fs api to avoid
such issues.

Signed-off-by: Pierrick Guillaume <pierguill@gmail.com>
2024-06-18 14:35:03 -04:00
Daniel DeGrasse
a837117403 doc: flash_debug: fix some issues with probes documentation
Fix a few issues with the probes documentation for NXP boards:
- fix references to debug probe type in probes page introduction
- add an explicit "Install the host tools" step for the LPC-Link and
  MCU-Link based debug probe update steps.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-18 14:34:47 -04:00
Daniel DeGrasse
470dc3d53c boards: nxp: mimxrt1050_evk: fix reference to A0 silicon on EVK
RT1050 EVK rev A boards (with rev A silicon) are not well supported by
Zephyr. Update the documentation page to remove the reference to A0
silicon, as the page describes details specific to the RT1050 EVKB with
rev B silicon.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-18 14:34:47 -04:00
Daniel DeGrasse
e3794fd0f2 boards: nxp: imxrt10xx: update debugging section to use common snippets
Update iMXRT10xx board debug sections to use common snippets, which
describe debug configuration settings shared between all these boards.
This should help avoid documentation falling out of date in the future.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-18 14:34:47 -04:00
Yong Cong Sin
19e4cb8f89 libc: cleanup deprecated heap-related Kconfigs
The following heap-related Kconfigs shared by the picolibc &
minimal libc have been deprecated for more than 2 releases,
remove them and update the Kconfigs accordingly:

- `CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE`
- `CONFIG_MINIMAL_LIBC_REALLOCARRAY`

Cleanup the handling to support the deprecated malloc arena
size configuration values.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
c22c98e510 libc: minimal: remove deprecated Kconfigs
The following Kconfigs have been deprecated for more than 2
releases, remove them:

- `CONFIG_SUPPORT_MINIMAL_LIBC`
- `CONFIG_MINIMAL_LIBC_MALLOC`
- `CONFIG_MINIMAL_LIBC_CALLOC`
- `CONFIG_MINIMAL_LIBC_REALLOCARRAY`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
c9d08fc876 driver: ieee802154: remove deprecated Kconfigs
The following Kconfigs have been deprecated for more than 2
releases, remove them:

- `IEEE802154_CC13XX_CC26XX_SUB_GHZ_RADIO_TX_RETRIES`
- `CONFIG_IEEE802154_2015`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
67578faefe lib: cpp: remove deprecated Kconfigs
These Kconfigs should have been deprecated for more than 2
releases, remove them:

- `CONFIG_CPP_MAIN`
- `CONFIG_CPLUSPLUS`
- `CONFIG_LIB_CPLUSPLUS`
- `CONFIG_EXCEPTIONS`
- `CONFIG_RTTI`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
95dc81998e settings: remove CONFIG_CONFIG_SETTINGS_FS
`CONFIG_CONFIG_SETTINGS_FS` has been deprecated for
more than 2 releases, remove it and its associated source
code.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
624f4a1ec0 net: ieee802154: remove CONFIG_NET_L2_IEEE802154_ACK_REPLY
`CONFIG_NET_L2_IEEE802154_ACK_REPLY` has been deprecated for
more than 2 releases, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
d7f41e938d lib: hash: update the include headers
Include "stdio.h" as `malloc()` is used in the header.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
abbd19c393 drivers: interrupt controller: update GIC Kconfigs
Selection of these GIC Kconfigs have been deprecated
for more than 2 releases, users should use the devicetree
method instead, update the Kconfigs.

The SOCs below have been updated to not select `GIC_V3`, since
their devicetree already have the required compatible:
- fvp_aemv8r
- rzt2m
- rk3658

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
3e4a9b9ec7 drivers: ethernet: stm32: remove deprecated MAC address Kconfigs
The following Kconfigs:

- `CONFIG_ETH_STM32_HAL_RANDOM_MAC`
- `CONFIG_ETH_STM32_HAL_USER_STATIC_MAC`
- `CONFIG_ETH_STM32_HAL_MAC3`
- `CONFIG_ETH_STM32_HAL_MAC4`
- `CONFIG_ETH_STM32_HAL_MAC5`

have been deprecated for more than 2 releases, user should
have switched to the devicetree method now, remove them.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
2585595bca drivers: eeprom: remove CONFIG_EMUL_EEPROM_AT2X
`CONFIG_EMUL_EEPROM_AT2X` has been deprecated for more than 2
releases, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
e6295b5279 log: remove CONFIG_LOG_DOMAIN_ID
`CONFIG_LOG_DOMAIN_ID` has been deprecated for years and
shouldn't be used according to its documentation, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
1899e4f667 bluetooth: remove CONFIG_BT_DEBUG_LOG
`CONFIG_BT_DEBUG_LOG` has been deprecated for more than 2
releases, replace it with `CONFIG_BT` + `CONFIG_LOG`:

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Yong Cong Sin
88c96f7986 drivers: counter: stm32: remove deprecated clock source Kconfigs
These clock selection Kconfigs should have been deprecated for
more than 2 releases, remove them:

- `CONFIG_COUNTER_RTC_STM32_CLOCK_SRC`
- `CONFIG_COUNTER_RTC_STM32_CLOCK_LSI`
- `CONFIG_COUNTER_RTC_STM32_CLOCK_LSE`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Daniel DeGrasse
2792f2e3fd doc: releases: 3.7: add release notes for SD
Add release notes for SD subsystem for 3.7

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-18 14:33:42 -04:00
Daniel DeGrasse
5c638cd679 doc: release: 3.7: add SDHC driver release notes
Add SDHC driver release notes for changes since 3.6

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-18 14:33:42 -04:00
Daniel DeGrasse
3e16122574 doc: release: 3.7: add disk driver release notes
Add release notes for changes to disk drivers since 3.6

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-18 14:33:42 -04:00
Yong Cong Sin
3c0aae8415 net: lwm2m: replace deprecated lwm2m_engine_get_resource
`lwm2m_engine_get_resource()` has been mark for deprecation for
more than 2 releases, but we are still using it in tree now,
because the `__deprecated` marker was probably forgotten in the
initial deprecation commit.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:32:56 -04:00
Yong Cong Sin
94e12d595e net: lwm2m: remove deprecated functions & definition
These functions have been deprecated for more than 2 releases,
remove them:

- lwm2m_engine_update_observer_min_period
- lwm2m_engine_update_observer_max_period
- lwm2m_engine_create_obj_inst
- lwm2m_engine_delete_obj_inst
- lwm2m_engine_set_opaque
- lwm2m_engine_set_string
- lwm2m_engine_set_u8
- lwm2m_engine_set_u16
- lwm2m_engine_set_u32
- lwm2m_engine_set_u64
- lwm2m_engine_set_s8
- lwm2m_engine_set_s16
- lwm2m_engine_set_s32
- lwm2m_engine_set_s64
- lwm2m_engine_set_bool
- lwm2m_engine_set_float
- lwm2m_engine_set_objlnk
- lwm2m_engine_set_time
- lwm2m_engine_get_opaque
- lwm2m_engine_get_string
- lwm2m_engine_get_u8
- lwm2m_engine_get_u16
- lwm2m_engine_get_u32
- lwm2m_engine_get_u64
- lwm2m_engine_get_s8
- lwm2m_engine_get_s16
- lwm2m_engine_get_s32
- lwm2m_engine_get_s64
- lwm2m_engine_get_bool
- lwm2m_engine_get_float
- lwm2m_engine_get_objlnk
- lwm2m_engine_get_time
- lwm2m_engine_register_read_callback
- lwm2m_engine_register_pre_write_callback
- lwm2m_engine_register_validate_callback
- lwm2m_engine_register_post_write_callback
- lwm2m_engine_register_exec_callback
- lwm2m_engine_register_create_callback
- lwm2m_engine_register_delete_callback
- lwm2m_engine_set_res_buf
- lwm2m_engine_set_res_data
- lwm2m_engine_set_res_data_len
- lwm2m_engine_get_res_buf
- lwm2m_engine_get_res_data
- lwm2m_engine_create_res_inst
- lwm2m_engine_delete_res_inst
- lwm2m_engine_path_is_observed
- lwm2m_engine_send
- lwm2m_send
- lwm2m_engine_enable_cache

And additionally, the following definition:
- LWM2M_RD_CLIENT_EVENT_REG_UPDATE_FAILURE

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:32:56 -04:00
Yong Cong Sin
d85087ee46 subsys/settings: remove deprecated function
`settings_mount_fs_backend()` has been deprecated for
more than 2 releases, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:32:56 -04:00
Yong Cong Sin
606f90efa9 net: dns: remove deprecated function
`dns_sd_extract_service_proto_domain()` has been deprecated for
more than 2 releases, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:32:56 -04:00
Yong Cong Sin
d9743aaa35 include: mgmt: mcumgr: remove deprecated functions
These functions have been deprecated for more than 2 releases,
remove them:

- zephyr_smp_rx_req
- zephyr_smp_alloc_rsp
- zephyr_smp_free_buf

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:32:56 -04:00
Yong Cong Sin
a3fada484a include: net: openthread: remove deprecated function
`openthread_set_state_changed_cb()` has been deprecated for
more than 2 releases, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:32:56 -04:00
Yong Cong Sin
cccb6b20c0 include: json: remove deprecated tokens
These token enums been deprecated for more than 2 releases,
remove them:

- JSON_TOK_LIST_START
- JSON_TOK_LIST_END

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:32:56 -04:00
Yong Cong Sin
18a6b07aa5 include: bluetooth: remove bt_le_whitelist_add()
`bt_le_whitelist_add()` has been deprecated for more
than 2 releases, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:32:56 -04:00
Nazar Palamar
f41cb40a6e drivers: wifi/airoc: update airoc_wifi_host_buffer_get
Update airoc_wifi_host_buffer_get function to set final
buff size based on input “size” param.

Update airoc_mgmt_send to use airoc_wifi_host_buffer_get
instead net_buf_alloc_len.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-18 15:55:19 +02:00
Wei-Tai Lee
9361c27ccd boards: andestech: Add missing supported drivers to board yaml
Add some supported drivers to adp_xc7k_ae350.yaml

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-06-18 15:55:06 +02:00
Fin Maaß
3a843f924b dts: riscv: litex: remove atomic extention
remove atomic extention, as the standard
vexriscv has no A.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-18 15:54:46 +02:00
Luca Burelli
38b0460de3 check_compliance: allow _MODULE variant of Kconfig options
Since b53a792ff0 Zephyr has the ability to define tristate Kconfig
options. When a tristate option FOO is selected as a "module", this
results in autoconf.h defining CONFIG_FOO_MODULE, not CONFIG_FOO.

This patch allows the check_compliance script to also accept references
to a Kconfig symbol ending in _MODULE if the prefix is defined.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-18 15:54:39 +02:00
Eunkyu Lee
88881257ab Bluetooth: Classic: Add length check in bluetooth classic
Added length checks for user input in `sdp_client_receive` and
`l2cap_br_info_rsp`.

Signed-off-by: Eunkyu Lee <mochaccino.00.00@gmail.com>
2024-06-18 15:54:27 +02:00
Emil Gydesen
35fa700485 Bluetooth: BAP: Broadcast: Add checks for length before merging BIS cfg
Before merging the BIS specific codec configuration with the
subgroup codec configuration, we should ensure that the
BIS data is not empty, as that would trigger an error from
bt_audio_data_parse.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-18 15:53:24 +02:00
Marcin Niestroj
efcc0ed27f scripts: pytest: execute 'zephyr.exe' in application build directory cwd
Execute 'zephyr.exe' in application build directory as 'current working
directory' (cwd). This makes sure that native_sim specific drivers (like
flash simulator with file backend in 'flash.bin') are using unique context
for external resources with relative paths.

This fixes executing native_sim tests in twister with flash simulator.
Previously a shared 'flash.bin' was used for all executed 'zephyr.exe'
processes in twister. After this patch a unique 'flash.bin' file is used
for each tested sample, since those 'flash.bin' is placed in application
build directory instead of twister root directory.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-18 15:53:00 +02:00
Daniel DeGrasse
1616bf8ecd doc: releases: migration-guide-3.7: add note for ssd16xx displays
The `orientation-flipped` dt property was dropped from the devicetree
binding for the ssd16xx display driver. Add a note to the migration
guide directing users to now set orientation at runtime.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-18 15:52:35 +02:00
Daniel DeGrasse
109431ec23 doc: release: 3.7: add display release notes
Add display release notes for Zephyr 3.7

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-18 15:52:35 +02:00
Jiafei Pan
f985e75ba1 drivers: eth_nxp_enet: fix MMIO mapping issue
Fixed #74370, the issue is caused by the update to introduce MMIO
mapping, after MMIO mapping, should use data->base for device
base memory address.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-18 15:52:21 +02:00
Francois Ramu
e58ab6d713 soc: stm32: config DBGMCU register writing for SWO configuration
Some stm32 series, do not have a LL_DBGMCU_SetTracePinAssignment
function  to enable trace IO port, this is the case with the
stm32h7 serie.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-18 15:52:10 +02:00
Rex Chen
dcf42917c5 net: lib: dhcpv4: Add check for input parameter of echo_reply_handler
For station and internal AP coexist case, station connected to
external AP, ping from station to external AP cause cpu hang.

Internal AP dhcpv4 server register handler echo_reply_handler
on icmp handler by net_icmp_init_ctx for dhcp server snoop
feature. Ping also register handler handle_ipv4_echo_reply on
icmp handler for ping cmd. If no external station connect to
internal AP, input parameter ‘user_data’ of function
echo_reply_handler is NULL. When we trigger ping process,
icmp_call_handlers fetch all handlers from icmp handler
if receive any ICMP packet, so echo_reply_handler be called,
but input parameter is NULL, cause CPU hang.
Add input parameters check to fix this issue.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-06-18 11:07:09 +02:00
Ivan Iushkov
0b71206054 bluetooth: samples: Add missing option to hci_uart_async sample
hci_uart_async/debug.mixin.conf is used to enable RTT logging
for hci_uart_async sample. RTT can be used to avoid conflict
between different serial interfaces because the sample uses
UART as an interface for HCI communication.
RTT_CONSOLE option enabled in the debug.mixin.conf depends on
CONFIG_USE_SEGGER_RTT so enabling CONFIG_USE_SEGGER_RTT by
default makes it easier to build the project with RTT enabled

Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
2024-06-18 11:05:50 +02:00
Rodrigo Peixoto
d0a2451b6d doc: zbus: isolated pool by channel
Add the information about the possibility of isolating the pool per
channel.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-06-17 21:20:05 -04:00
Rodrigo Peixoto
6ec617340f samples: zbus: add isolated pool to msg_sub sample
Add isolated pool (static and dynamic) to the sample illustrating how to
use that and performing some testing in different scenarios.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-06-17 21:20:05 -04:00
Rodrigo Peixoto
3b10caf96e zbus: channel msg subscriber pool isolation
Currently, zbus uses a single global `net_buf`pool to publish messages to
msg_subscribers. It would be good to have a way to separate the pools for
channels related to critical parts of the systems to avoid publication
failure on these particular channels. These channels will not use the
global pool. They can set an isolated pool by calling the
`zbus_chan_set_msg_sub_pool.`

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-06-17 21:20:05 -04:00
Daniel Leung
da702463b9 x86: select CONFIG_THREAD_STACK_INFO for exception stack trace
When CONFIG_X86_EXCEPTION_STACK_TRACE is enabled, also forcibly
enable CONFIG_THREAD_STACK_INFO. Without the thread stack info,
it is possible the stack unwinding would go out of the thread
stack and into unknown memory, resulting in hard fault.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-17 21:19:32 -04:00
Luis Ubieda
f4531d21f5 croxel: cx1825: doc: Fix typo on RGB LED PN
Minor typo in the Part-number (LP5521 instead of LPS5521).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-17 21:19:11 -04:00
Gerson Fernando Budke
0561d74d31 drivers: counter: sam: Add qdec as tc special mode
The current atmel,sam-tc-qdec sensor implementation shared the timer
counter node. This create issues when users wants define both modes.
The current proposal changes the qdec dedinition to be a child of
tc and refactor all the chain of definitions.

Fixes #71312

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-06-17 17:47:42 -04:00
Pisit Sawangvonganan
ebb75b38dd drivers: ethernet: stm32: replace reverse with intrinsic __RBIT
Replaced the software `reverse` function, used for bit reversal, with
the intrinsic `__RBIT` function.

This utilizes the hardware bit-reversal instruction for improved
efficiency.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-17 17:46:29 -04:00
Flavio Ceolin
bcc6d41ec5 random: timer: Comply with MISRA Rule 14.4
Use boolean expression in a controlling expression.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-17 17:46:16 -04:00
Flavio Ceolin
36ef3da2d7 arch: xtensa: fatal: Comply with MISRA Rule 14.4
Use boolean expression in a controlling expression.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-17 17:46:16 -04:00
Flavio Ceolin
490251d779 soc: intel_adsp/ace: Comply with MISRA Rule 14.4
Use boolean type in a controlling expression.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-17 17:46:16 -04:00
Benjamin Cabé
02ad7ef1f9 doc: Add build env variable to know if doxygen has run
Some extensions may be able to run faster if they can check if Doxygen
contents has changed from one build to the other

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-17 12:11:34 -04:00
Torsten Rasmussen
be2993be6e sysbuild: move sysbuild/application to _sysbuild
The sysbuild part of sysbuild/application creates a sysbuild/application
folder under top-level build dir. However, having a sysbuild folder at
this level means that tab completion for sysbuild pre-fixed build
targets will stop after completing just `sysbuild` and then show several
subfolders, making it hard to see important build targets, such as:
`ninja sysbuild_menuconfig`.

As `sysbuild/application` is just a folder name, then move it to
`_sysbuild` instead to avoid impacting tab completion for  ninja and
make.

Also strip the `application` part in the process, as the extra folder
doesn't provide any extra benefit, but is just one more level to enter
when browsing the build folder structure.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-17 12:10:43 -04:00
Torsten Rasmussen
a54c117223 sysbuild: set APPLICATION_BINARY_DIR to sysbuild CMake folder
If not defined by caller, then set APPLICATION_BINARY_DIR to
CMAKE_CURRENT_BINARY_DIR. This is normally be done by
`find_package(Zephyr)`, but due to the indirection introduced with
fc1884ecf5 to allow applications to
provide their own sysbuild entry point, then the APPLICATION_BINARY_DIR
is unexpectedly set to the bin dir of the entry point.

Restore the old behavior so that APPLICATION_BINARY_DIR per default
again points to top-level sysbuild binary dir.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-17 12:10:43 -04:00
Aksel Skauge Mellbye
4f712fffe0 drivers: pinctrl: gecko: Fix Series 1 I2C SCL route location config
Implementation erroneously used a mask from the ROUTEPEN register
when writing the ROUTELOC register.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-17 12:10:11 -04:00
Aksel Skauge Mellbye
35d95f934c drivers: pinctrl: gecko: Fix Series 2 I2C location config
Series 2 uses DBUS for alternate function control, which directly uses
port and pin numbers for location selection. Configure pinout as part
of the I2C_SDA/I2C_SCL case, rather than the separate _LOC case,
as the port and pin are not available at this point.

Configure route register prior to enabling the route, to ensure that
the wrong pin is not temporarily claimed.

Fixes an issue where DBUS was always configured to port A and
pin given by the GECKO_LOC() macro, rather than the correct port/pin
pair.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-17 12:10:11 -04:00
Torsten Rasmussen
a9efb1dae6 west: update build extension command to use APP_DIR
`west build` can be invoked without specifying the source directory when
being invoked from the source directory itself.
When using `west build` for incremental builds, then the build command
will examine the CMake cache to determine the application dir by using
the value of CMAKE_HOME_DIRECTORY.

With sysbuild, this leads to the wrong assumption that the sysbuild
itself is the application to build.

Instead, have west build look for APP_DIR which points to the correct
source dir when sysbuild is used. Use APPLICATION_SOURCE_DIR when
APP_DIR is not set, as this indicates a no-sysbuild build.

Keep CMAKE_HOME_DIRECTORY behavior as last fallback mechanism.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-17 12:09:45 -04:00
Valerio Setti
8defc560fe MAINTAINERS: add valeriosetti as collaborator
Add valeriosetti as collaborator for:
- Mbed TLS
- TF-M Integration

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-17 12:09:26 -04:00
Jakub Topic
7efd885bd7 drivers: rtc: update alarm_set_callback to return ENOTSUP
This commit addresses the issue related to the rtc.h API returning ENOSYS
for a driver not implementing alarm_set_callback when the ALARM
functionality is enabled but interrupts, and thus alarm callbacks, are not
supported by the current configuration.

The following drivers have been modified to return correct code:
- rtc_pcf8523
- rtc_pcf8563
- rtc_rv3028

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-06-17 12:09:15 -04:00
Jakub Topic
3de17474b0 tests: drivers: rtc: skip alarm callback test if not supported
Check for ENOTSUP on alarm callback test if ALARM functionality is
enabled but callbacks are not supported

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-06-17 12:09:15 -04:00
Robert Lubos
2fc0c128c9 tests: net: conn_mgr_monitor: Remove debug logs
Printing event name during event processing caused unexpected delays on
slower platforms, making the tests fail. As according to the tests
author those prints were unintentional leftovers, just remove them.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-17 12:08:51 -04:00
Dmitrii Golovanov
1ccd972563 twister: Fix on output directory reaching backup limit
Stop Twister if there are too many backup copies of the output
directory already.
Before this fix, Twister silently kept artifacts from the last run,
unless `--clobber-output` was explicitly given.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-17 12:08:20 -04:00
Andriy Gelman
d2607f0911 drivers: can: mcp251xfd: Use macro to set TDCO
Use CAN_CALC_TDCO() macro to set TDCO. There is a minor change how the
tdco is calculated. In the macro the SYNC segement is taken into
account while it wasn't used before.

Fixes #73821.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-06-17 12:08:08 -04:00
Piotr Kosycarz
83958eb937 samples: sysbuild: hello_world: add testing base on console
Extend automated testing on HW by veryfing console output.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-17 15:30:14 +02:00
Marco Widmer
e83f88b9a4 logging: use runtime message creation when logging is disabled
If compiler optimizations are disabled, some compilers (especially
arm_cortex_m) are using unrealistic amounts of stack for dead code.
Currently, if CONFIG_LOG=y and CONFIG_NO_OPTIMIZATIONS=y,
CONFIG_LOG_ALWAYS_RUNTIME is enabled to reduce the stack used by the
logging code.
However, if CONFIG_LOG=n, CONFIG_LOG_ALWAYS_RUNTIME is not available
which causes the compiler to allocate lots of stack space for the (dead)
logging code.
This patch forces runtime message creation when CONFIG_LOG=n. Since all
logging code is dead code when logging is disabled, the behavior should
be unchanged.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-06-17 15:30:02 +02:00
Christoph Schnetzler
239c20d2c7 logging: use #ifdef instead of #if
use #ifdef to avoid to use undefined macros in #if expressions

Signed-off-by: Christoph Schnetzler <christoph.schnetzler@husqvarnagroup.com>
2024-06-17 15:29:39 +02:00
Christoph Schnetzler
3c9e05959b logging: cmsis: prevent wundef warnings
If -Werror is used compilation fails due to wundef warning.

Signed-off-by: Christoph Schnetzler <christoph.schnetzler@husqvarnagroup.com>
2024-06-17 15:29:39 +02:00
Eric Holmberg
563ef0d28f net: tracing: fix sys_track_socket_init() declaration
Function declaration does not match definition causing a compilation error
when CONFIG_TRACING_OBJECT_TRACKING is enabled.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2024-06-17 15:29:22 +02:00
Chris Friedt
4d0a8c1e8b doc: posix: async-io: clean up async-io documentation
The async-io documentation was in need of some beautification.

Rather than repeating the same thing inside of the table, just
mention that the whole option is expected to fail enosys.

At this time, there does not seem to be sufficient need for
implementing async io, so it is only present so that conforming
applications can still link properly.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-16 06:38:27 -04:00
Yong Cong Sin
e0956f09d1 docs: posix: fix for unimplemented functions
The following functions are not implemented:
- getc_unlocked()
- getchar_unlocked()
- putc_unlocked()
- putchar_unlocked()

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-16 06:37:54 -04:00
Alberto Escolar Piedras
6663096162 release: Zephyr v3.7.0-rc1
Set version to v3.7.0-rc1

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-15 08:27:11 -04:00
Kai Vehmanen
6339609c15 soc: intel_adsp: tools: improve cavstool.py winstream code
Modify the winstream code in cavstool.py to use the Regs helper
class and get rid of byte array access when reading and writing
to winstream headers. This brings the cavstool.py implementation
closer to the Zephyr C reference implementation and ensures
the header fields are read and written to with 32bit access.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-06-15 14:21:02 +02:00
Chris Friedt
12cc7bbd8a net: sockets: use z_finalize_typed_fd() to identify as sockets
Fill-in the mode field of the fd_entry so that the
implementation can be made aware that the specific file
descriptors created are sockets.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-15 07:47:12 -04:00
Tomasz Moń
e1b95eb6df drivers: udc_dwc2: Initial Buffer DMA support
Implement absolute minimum necessary to get Buffer DMA working. Require
Data Cache to be disabled if DWC2 OTG has DMA enabled because the stack
does not currently guarantee cache line alignment for allocated buffers.

Set EPENA bit before disabling IN endpoints because it seems to be
necessary in Buffer DMA mode (without EPENA the wait for INEPNAKEFF does
time out). Setting EPENA should have no impact on Completer mode
operation (where EPENA is not necessary for INEPNAKEFF to trigger).

Programming Guide recommends programming SUPCnt to 3, but the only
advantage would be to be able to tell how many back-to-back SETUP packets
were received if there was no more than 3 back-to-back SETUPs. This
information doesn't seem to be useful. The disadvantage is that the
buffer needed for receiving SETUP packet must be able to hold SUPCnt
multiple of 8 bytes. Use SUPCnt 1 so the 8 bytes buffer is enough.

Make sure to clear StsPhseRcvd interrupt bit in Buffer DMA mode because
the DMA seems to prevent the SETUP Phase Done interrupt from triggering
if StsPhseRcvd is set. Clearing this bit doesn't seem to be necessary in
Completer mode. This bit is set on control transfers with data stage
from host to device.

Both Buffer DMA and Completer mode operation on nRF54H20DK was verified
using USB2CV Chapter 9 Tests and MSC Tests with Mass Storage sample.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-15 07:43:45 -04:00
Tomasz Moń
59702c7633 drivers: udc_dwc2: Avoid unnecessary register accesses
Do not use sys_clear_bits() followed by sys_set_bits() on DCTL register
to avoid writing to DCTL register twice - first with zeroed out address,
and then with the new address. Change the code to write the address in
one DCTL register write.

Do not use sys_set_bits() to set test mode, but rather prepare the
correct value first.

Set DCFG and GUSBCFG registers in one go. There is no point in reading
back the value or doing multiple subsequent writes to these registers.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-15 07:43:45 -04:00
Tomasz Moń
2c9371ea45 drivers: udc_dwc2: Add DMA register bit defines
Add register bit defines for registers needed for DMA operation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-15 07:43:45 -04:00
Marek Matej
90ecdf0dab soc: espressif: esp32s2: improve memory layout
- Allow more statical allocations by reordering the sections
  in the mcuboot.ld and in default.ld.
- Reorder the ROM sections to cover the cases described in
  the `common-rom-common-kernel-devices.ld`.
  Changing the order of .rodata and .text we prevents to create an
  overlapped segments issue.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-15 05:19:00 -04:00
Hess Nathan
fe06ffb37f coding guidelines: comply with MISRA Rule 13.4
- avoid to use assignment expression value

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-15 05:17:26 -04:00
Robert Hancock
680fa154bf drivers: spi_xlnx_axi_quadspi: Reduce IRQ work
This driver could end up doing a great deal of work inside the ISR when
large SPI transfers were in use, which could cause significant IRQ
latency. For the normal, non-async SPI transfer case, use events to
signal the calling thread to complete the work rather than performing
FIFO transfers inside the ISR.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-06-15 05:15:46 -04:00
Robert Hancock
68a24863c0 drivers: spi_xlnx_axi_quadspi: Optimize FIFO handling
Add an optional DT property to specify the size of the RX/TX FIFO
implemented within the SPI core. The property name used is the same one
used by Xilinx's device tree generator.

When the FIFO is known to exist, we can use the RX FIFO occupancy register
to determine how many words can be read from the RX FIFO without checking
the RX FIFO empty flag after every read. Likewise with the TX FIFO, we can
use the FIFO size to avoid checking the FIFO full flag after every write.
This can increase overall throughput.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-06-15 05:15:46 -04:00
Robert Hancock
cff3811613 drivers: spi_xlnx_axi_quadspi: add STARTUP block workaround support
Add support for a workaround required when using the Xilinx Quad SPI core
with the USE_STARTUP option, which routes the core's SPI clock to the
FPGA's dedicated CCLK pin rather than a normal I/O pin. This is typically
used when interfacing with the same SPI flash device used for FPGA
configuration. In this mode, the SPI core cannot actually take control
of the CCLK pin until a few clock cycles are issued, which would break
the first transfer issued by the core. This workaround applies a dummy
command to the connected device to ensure that the clock signal is in the
correct state for subsequent commands.

See Xilinx answer record at:
https://support.xilinx.com/s/article/52626?language=en_US

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-06-15 05:15:46 -04:00
Noah Pendleton
f61950a782 cmake: sca: Enable CodeChecker error exit status
Normally the return code of `CodeChecker analyze` and `CodeChecker parse`
is suppressed, so all the enabled commands can execute instead of
crashing the build.

Add a new option, `CODECHECKER_PARSE_EXIT_STATUS`, to permit failing the
build if `CodeChecker parse` returns non-zero.

Signed-off-by: Noah Pendleton <noah.pendleton@gmail.com>
2024-06-15 05:14:48 -04:00
TaiJu Wu
555c07ef08 sched: Limit deadline scheduler parameter
The deadline of deadline scheduler should lager than zero
because if deadline is negative, it menas the task should
be finished in past.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2024-06-15 05:13:41 -04:00
Daniel Leung
ea3a47e38f soc: intel_adsp/hda: fix range checking
intel_adsp_hda_set_buffer() asserts when the HDA buffer is
outside of RAM space. However, it uses CONFIG_SRAM_SIZE as
if it is bytes. In reality, CONFIG_SRAM_SIZE is in KB so
we need to multiply it by 1024, or simply use marco KB().

Fixes #74250

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:46:04 -04:00
Daniel Leung
c1a462e1a5 xtensa: mmu: bail on semantic triple faults
There actually is no triple faults on Xtensa. Once PS.EXCM is
set, it keeps going through double exception vector for any
new exceptions. However, our exception code needs to unmask
PS.EXCM to enable register window operations. So after that,
any new exceptions will go through the kernel or user vectors
depending on PS.UM. If there is continuous faults, it may
keep ping-ponging between double and kernel/user exception
vectors that may never get resolved. Since we stash DEPC
during double exception, and the stashed one is only cleared
once the double exception has been processed, we can use
the stashed DEPC value to detect if the next exception could
be considered a triple fault. If such a case exists, simply
jump to an infinite loop, or quit the simulator, or invoke
debugger.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:44:48 -04:00
Daniel Leung
d344a6bc85 xtensa: make arch_user_string_nlen actually work
arch_user_string_nlen() did not exactly work correctly as any
invalid pointers being passed are de-referenced naively, which
results in DTLB misses (MMU) or access errors (MPU). However,
arch_user_string_nlen() should always return to the caller
with appropriate error code set, and should never result in
thread termination. Since we are usually going through syscalls
when arch_user_string_nlen() is called, for MMU, the DTLB miss
goes through double exception. Since the pointer is invalid,
there is a high chance there is not even a L2 page table
associated with that bad address. So the DTLB miss cannot be
handled and it just keeps looping in double exception until
there is another exception type where we get to the C handler.
However, the stack frame is no longer the frame associated
with the call to arch_user_string_nlen(), and the call return
address would be incorrect. Forcing this incorrect address as
the next PC would result in some other exceptions, e.g.
illegal instruction, which would go to the C handler again.
This time it will go to the end of handler and would result
in thread termination. For MPU systems, access errors would
simply result in thread terminal in the C handler. Because of
these reasons, change the arch_user_string_nlen() to check if
the memory region can be accessed under kernel mode first
before feeding it to strnlen().

Also remove the exception fixup arrays as there is nothing
there anymore.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:44:48 -04:00
Daniel Leung
79939e3279 xtensa: mmu: mpu: add xtensa_mem_kernel_has_access()
This adds a new function xtensa_mem_kernel_has_access() to
determine if a memory region can be accessed by kernel threads.
This allows checking for valid mapped memory before accessing
them to avoid relying on page faults to detect invalid access.

Also fixed an issue with arch_buffer_validate() on MPU where
it may return okay even if the incoming memory region has no
corresponding entry in the MPU table.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:44:48 -04:00
Daniel Leung
61ec0d15d5 xtensa: mmu: arch_buffer_validate is only for user thread
arch_buffer_validate() is only to verify that user threads have
access to the memory region. It should not be used to verify
if kernel thread has access (which they should anyway). So
change the logic.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:44:48 -04:00
Daniel Leung
27f4e7fe0c xtensa: only use BREAK if explicitly enabled
Introduce CONFIG_XTENSA_BREAK_ON_UNRECOVERABLE_EXCEPTIONS to
use BREAK instruction for unrecoverable exceptions. This
definitely requires debugger to be attached to the hardware
or simulator to catch that.

Also move the infinite loop to NOT result in an infinite
interrupt storm as the debug interrupt will be triggered over
and over again. Same for the simcall exit as it does not
need to be called repetitively.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:44:48 -04:00
Daniel Leung
bc3e77b356 xtensa: make it work with TLB misses during interrupt handling
If there are any TLB misses during interrupt handling,
the user, kernel and double exception vector will be triggered
for the miss and the DEPC and EXCCAUSE overwritten as the TLB
missse are be handled in the assembly code and execution
returned to the original vector code. Because of this, both
DEPC and EXCCAUSE being read in the C handler are not the ones
that triggered the original exception (for example, level-1
interrupt). So stash both DEPC and EXCCAUSE such that
the original cause of exception is visible in the C handler.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:44:48 -04:00
Daniel Leung
371ad016f8 xtensa: no need to clear DEPC on C handler exit for MPU
Xtensa MPU code does not handle double exception in C. So there
is no need to clear DEPC on C handler exit.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:44:48 -04:00
Daniel Leung
b696257eb2 xtensa: fix getting exccause during backtrace
We have frame pointer struct and BSA struct to extract
the exception cause (exccause). There is no need to
resort to custom assembly to do that. Besides, given
that the BSA is different between different Xtensa cores,
there is no guarantee it is at the same place as what
the assembly assumes. So just do that without assembly.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:44:48 -04:00
Daniel Leung
682b572414 xtensa: remove ZSR_MMU_0 and ZSR_MMU_1
They are not being used in the code so there is no need to
reserve them as scratch registers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-15 04:44:48 -04:00
Adam Berlinger
3dabe035c7 samples: boards: stm32: Add example for STOP3 mode on STM32U5
Simple blinky example, but using STOP3 mode. When in STOP3 mode,
GPIOs are not driven, but only pull-up or pull-down can be enabled
based on value in PWR registers.

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2024-06-15 04:44:26 -04:00
Adam Berlinger
19b39406eb soc: st: Add support for STOP3 on STM32U5
LPTIM is not available in STOP3 mode, so RTC needs to be used instead.
This code usese similar approach as STM32WBAx for suspend to ram.
The STOP3 is disabled by default in device tree.

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2024-06-15 04:44:26 -04:00
Adam Berlinger
2c88cc08b3 drivers: timer: Fix timing in suspend-to-ram
Fix timing in suspend-to-ram when using STM32WBA.
Switch to use RTC timer should be done only when idle is set
and LPTIM clocks should be switched off

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2024-06-15 04:44:26 -04:00
Nazar Palamar
36fb0279d2 test: bluetooth/tester: fix ccc_find_by_attr
Added check if ccc_values[i].attr != NULL,
before accessing to ccc_values[i].attr structure:
(handle == ccc_values[i].attr->handle)

On 20829 platform it's causing hard fault, not sure about
another platforms (in GAP testing).

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-15 04:43:31 -04:00
Nazar Palamar
492439af79 test: bluetooth/tester: add overlays for cyw920829m2evk_02 board
- added overlays for cyw920829m2evk_02 board

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-15 04:43:31 -04:00
Nazar Palamar
7bc9234262 boards: CYW920829M2EVK-02: enable hw-flow-control for uart2
- enable hw-flow-control for uart2
- added p3_0_scb2_uart_cts, p3_1_scb2_uart_rts in **-pinctrl.dtsi

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-15 04:43:31 -04:00
Philippe Cornu
6e56de34fb boards: arm: stm32h750b_dk: add support for display
ltdc devicetree definition & external SDRAM selection
for the display buffer

Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com>
Signed-off-by: Toon Stegen <toon@toostsolutions.be>
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-15 04:43:17 -04:00
Trent Piepho
971227180b drivers/sensor: si7006: Switch to undef DT_DRV_COMPAT
This style is used in sensor drivers.  It's more complicated than the
other way, which is used in different drivers that are not sensor
drivers.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2024-06-15 04:42:31 -04:00
Trent Piepho
0f219e1e6d drivers/sensor: si7006: Fix math for calculating sensor values
The existing code rounded the result to an integer, then multiplied that
integer by 1000000 to get micro-degrees or micro-percent, and then
divided by 1000000 to get whole degrees/percent and took the modulus to
get fractional degrees/percent.

Obviously, multiplying and then dividing an integer by the same value
has no effect!

The result is the humidity and temperature were always rounded down to
the nearest integer.

Fix this to properly keep the fractional component.  This is done in a
way that avoids any integer divisions, which are slow on all CPUs, but
especially most microcontrollers, e.g. Cortex-M, lack any integer
division instruction.

Avoiding the base 10 math does not require more code.  One just needs to
think in binary and use binary fractions instead of base 10 fractions.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2024-06-15 04:42:31 -04:00
Trent Piepho
88649dad1a drivers/sensor: si7006: Mask off low two bits of data reads
The low two bits are not part of the data, but rather "status" bits that
should be masked off.

This is documented in the HTU21D datasheet Edition 8, date 05/2017, pp.
15, and Sensirion SHT21 datasheet version 6, date 10/2022, §6 (wording
exactly the same):

"The two status bits, the last bits of LSB, must be set to ‘0’ before
calculating physical values."

Also Silicon Labs Si7006 example driver code:
        /* Swap the bytes and clear the status bits */
        return ((data.byte[0] * 256) + data.byte[1]) & ~3;

Since these are the LSBs, it has only a small effect and might not have
been noticed despite being wrong.

While editing this code, switch to using the Zephyr endian conversion
functions intead of a written out conversion.

Add error code to error log message.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2024-06-15 04:42:31 -04:00
Trent Piepho
c7b3b13119 drivers/sensor: si7006: Clean up headers
Some, like stdio.h, don't belong here at all and aren't needed.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2024-06-15 04:42:31 -04:00
Trent Piepho
d7e03dd148 drivers/sensor: si7006: Support SHT21 and HTU21D
These three sensor types are all largely compatible.  The SHT21 and
HTU21D can be supported by this driver by sending command 0xE3 instead
of 0xE0 to read the temperature.

Mention the sensor names in bindings and Kconfig to help those looking
for support to find it.  There have been at least five PRs attempting to
add SHT21 and/or HTU21D support that did not realize the Si7006 is the
same.

As mentioned in PR #22862, the Sensirion SH21 is the original.  The dts
bindings are adjusted (in a backward compatible way!) to make the sht21
the base binding and si7006 is derived from that.

Examples of dts compatibles:

TE Connectivity née Measurement Sepcialties HTU21D:
compatible = "meas,htu21d", "sensirion,sht21";

Sensirion SHT21:
compatible = "sensirion,sht21";

Silicon Labs Si7006
compatible = "silabs,si7006";

Silicon Labs Si7021
compatible = "silabs,si7021", "silabs,si7006";

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2024-06-15 04:42:31 -04:00
Trent Piepho
6817ac34b6 drivers/sensor: si7006: Remove unused struct device field
Use was removed but the field itself wasn't deleted.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2024-06-15 04:42:31 -04:00
Jakub Zymelka
2cb0a07a63 samples: ipc: icmsg: Align icmsg sample for nRF54L15
Add nRF54L15 APP and FLPR cores to icmsg sample application.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-06-15 04:41:47 -04:00
Jakub Zymelka
bd40190c25 samples: mbox: Add nRF54L15 to MBOX sample targets
Add nRF54L15 APP and FLPR cores to ping-pong sample application.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-06-15 04:41:47 -04:00
Jakub Zymelka
9473e3236d dts: nordic: Align boards dts to new VEVIF, BELLBOARD nomenclature
After changing the VEVIF and BELLBOARD names,
the dts for the individual boards must be aligned.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-06-15 04:41:47 -04:00
Jakub Zymelka
8091e93838 drivers: mbox: nrf: Change VEVIFs and BELLBOARD nomenclature
Renaming 'LOCAL' to 'RX' and 'REMOTE' to 'TX'.
This seems more descriptive and intuitive to use.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-06-15 04:41:47 -04:00
Jakub Zymelka
c7b36517ec dts: nordic: nrf54l15: Add mbox VEVIF nodes
Add a mbox VEVIF nodes to be used for communicating FLPR -> APP.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-06-15 04:41:47 -04:00
Jakub Zymelka
bace4a102d drivers: mbox: add initial driver for nRF VEVIF event
Add a mailbox driver for VEVIF events (VPR irq).
The driver can be built in either 'rx' or 'tx' configuration.
The VPR sends the event, so it uses the 'tx' configuration,
while the master core uses the 'rx' configuration of the driver
to receive the VPR events.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-06-15 04:41:47 -04:00
Jordan Yates
25fa41c209 scripts: twisterlib: coverage: handle multiple gcov dumps
Extend the coverage tool to handle applications that generate multiple
gcov dumps in a single execution. This can happen when the application
calls `sys_reboot`.

Handling multiple dumps enables coverage testing of exception handlers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-15 04:39:53 -04:00
Jordan Yates
cc328a7fbf lib: os: reboot: dump coverage info on sys_reboot
If `sys_reboot` is called during testing, the standard dump when `main`
returns will never be executed. Failing to dump at this point means any
coverage information gathered will be lost upon reboot.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-15 04:39:53 -04:00
Jordan Yates
e881445065 testsuite: coverage: don't lock scheduler in ISR
Don't attempt to lock the scheduler is trying to dump coverage
information from an ISR. The scheduler won't run while the ISR is in
progress.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-15 04:39:53 -04:00
Dawid Niedzwiecki
3b85e8b8ea drivers: counter: add missing include
Add missing include for get_value_64 in the counter_handlers.c file.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-06-14 21:14:43 -04:00
Swift Tian
0b9430169e samples: mspi: Add a mspi async sample
The sample is added to demonstrate mspi_transceive asynchronously.
Apollo3 MSPI controller has hardware command queue and supports
scatter IO and callback management, so no additional software queue
is required.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
5dfdf2bc05 samples: mspi: Add a mspi flash sample
The sample code is copied from spi_flash. To flash API, there is no
difference if the bus is spi or mspi.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
2b103137ab tests: mspi: Add apollo3p_evb board to flash test
The apollo3p_evb board has a ATXP032 NOR flash and driver is tested
in mspi/flash test.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
ece0c9b0d3 drivers: mspi: Add ATXP032 NOR flash driver
The ATXP032 is a NOR flash device that supports up to ~100MHz
octal SDR/DDR with 4MB nonvolatile memory.
The device driver uses MSPI bus API and could be used across different
SoC controllers that implement the MSPI bus API.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
efdddd46b1 samples: memc: Add APS6404L device to memc example
Demo the usage of APS6404L device driver in memc example.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
c7ed0b6aa8 drivers: memc: Add APS6404L device driver
The APS6404L psram is a quad SDR SPI device that runs up to 100MHz.
It can provide 8MB of external RAM for SoCs that supports XIP feature.
The device driver uses MSPI bus API and could be used across
different controllers that implement the MSPI bus API.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
4d83bc2c8c tests: mspi: Add apollo3p_evb board to api test
Add the apollo3p_evb board to test the MSPI controller implementation.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
43e23cf9f2 drivers: mspi: Add Ambiq apollo3p mspi controller
The Ambiq MSPI controller is implemented using the MSPI bus API.
The hardware supports up to 48MHz octal SDR with XIP, scrambling and
hardware command queue features.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
aa66570c9e dts: mspi: Add Ambiq MSPI DTS and bindings
Add the Ambiq MSPI nodes to soc device tree and base bindings for
MSPI controllers and devices.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
81e51f0356 soc: ambiq: Add shared_ram section
Add linker script file shared_ram.ld where defines sections used by
specific peripherals.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
292a4ebf21 tests: mspi: Add a mspi flash test
The mspi flash test is intended to test mspi flash device driver
implementation on MSPI bus. The test requires the device to have at
least two sectors of memory with MSPI_FLASH_SECTOR_SIZE as size.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
eccc2ba8c4 drivers: flash: Add a flash emulator
Add a flash emulator that uses MSPI API to emulate a flash device
on MSPI bus.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
0e1f88dd0e dts: mtd: Add MSPI flash emulator binding
Add the binding the flash emulator under MSPI bus.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
25d01eaed4 doc: Add MSPI to bus emulator documentation
Add the MSPI bus emulator to documentation.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
42d24e5716 tests: mspi: Add mspi api test
Add a MSPI controller API test and run on native_sim board.
The API implementation within mspi_emul.c is the test target.
The stub device emulator is added for convenience to test controllers.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
f5554ca762 emul: mspi: Add the mspi controller emulator
Add bus emulator support for MSPI and the MSPI controller emulator.
The mspi_emul.c not only serves as an emulator but also provides an
example implementation of the MSPI API. It does not actually do anything
other than validating parameters and forwarding transceive request back
to the device driver emulators.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
99175e1443 boards: dts: Add MSPI controller to native_sim
Add the MSPI emulator controller node in the board dts.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
11c1722fef dts: mspi: Add MSPI emulator bindings
Add the controller and device emulator bindings for MSPI.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
a86bbd3ebf doc: Add MSPI API documentation
Add the mspi.rst doc and related things for document generation.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
8dd5b1e6b8 dts: mspi: Add MSPI bindings
Add the generic controller and device bindings for MSPI.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Swift Tian
8a2bf58826 drivers: mspi: Add the new MSPI API
The MSPI(multi-bit SPI) is provided as a generic API to accommodate
advanced SPI peripherals and devices that typically require command,
address and data phases, and multiple signal lines during these phases.
While the API supports advanced features such as XIP eXecute In Place
and scrambling, it is also compatible with generic SPI.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-06-14 21:07:00 -04:00
Sadik Ozer
6bb6bfb458 tests: drivers: gpio: Enable gpio driver tests for max32670evkit board
Enable gpio driver test for max32670evkit

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-14 21:06:16 -04:00
Sadik Ozer
8db4e355fb boards: Add MAX32670EVKit board
Added MAX32670EVKit board
For more information about this board please check
https://www.analog.com/

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-14 21:06:16 -04:00
Sadik Ozer
b5fb89cb52 soc: Add the MAX32670 SoC
Add MAX32670 Kconfig and dts files

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-14 21:06:16 -04:00
Vinayak Kariappa Chettimada
fe89b0ddfb Bluetooth: Controller: Fix BT_CTLR_ISOAL_PSN_IGNORE for event overlap
Fix BT_CTLR_ISOAL_PSN_IGNORE implementation when adjusting
Sequence Number during overlap with current CIG event.
Reuse the implementation from non-PSN ignore implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-06-14 21:06:01 -04:00
Marcin Niestroj
4835658b46 west: runners: openocd: handle empty --elf-file
Make this param truly optional, so that hex file alone is enough for
flashing.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-14 21:05:49 -04:00
Evgeniy Paltsev
59667d19ed snps: board: rmx100: add pmp
Add RV PMP to the SoC configuration and to simulator options

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-06-14 21:05:36 -04:00
Anas Nashif
f33d2c1251 MAINTAINERS: move inactive maintainers to collaborators
Move inactive maintainers to the collaborator section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-14 19:22:52 -04:00
Flavio Ceolin
82f111a3b3 toolchain: llvm: Fix missing symbols
__INT16_C, __UINT16_C, __INT8_C and __UINT8_C are not defined in
zephyr_stdint.h and have to be defined in llvm.h when
CONFIG_MINIMAL_LIBC is enabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-14 19:10:08 -04:00
Flavio Ceolin
c0aba216af toolchain: llvm: Fix possible undefined macro
When CONFIG_MINIMAL_LIBC is enabled, __INTMAX_C and __UINTMAX_C
depend on int_c. Move the build guard to ensure that it is defined
when CONFIG_MINIMAL_LIBC is enabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-14 19:10:08 -04:00
Flavio Ceolin
e452bc36a6 dai: ssp/ptl: Add missing definition in PTL
SSCR0_ACS is missing in PTL header.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-14 19:08:07 -04:00
Thomas Gagneret
f5df063cbd scripts: zephyr_module: Move SPDX name normalization to writer.py
Since `writer.py` is the one writting the SPDX file, it should normalize
the name field and not `walker.py` which generates the SBOM components.

Signed-off-by: Thomas Gagneret <thomas.gagneret@hexploy.com>
2024-06-14 19:07:48 -04:00
Thomas Gagneret
0d05318c96 scripts: zephyr_module: Add URL, version to SPDX
Improve the SPDX with the current values:
 - URL: extracted from `git remote`. If more than one remote, URL is not
 set.
 - Version: extracted from `git rev-parse` (commit id).
 - PURL and CPE for Zephyr: generated from URL and version.

For zephyr, the tag is extracted, if present, and replace the commit id for
the version field.
Since official modules does not have tags, tags are not yet extracted for
modules.

To track vulnerabilities from modules dependencies, a new SBOM,
`modules-deps.spdx` was created. It contains the `external-references`
provided by the modules. It allows to easily track vulnerabilities from
these external dependencies.

Signed-off-by: Thomas Gagneret <thomas.gagneret@hexploy.com>
2024-06-14 19:07:48 -04:00
Jonathon Penix
eaa903d852 kconfig: llvm: Set default opt level to -Oz when building with LLVM
Experimentally, -Oz seems to give size results closer to GCC's -Os
(though GCC does now support -Oz as well). Set -Oz as the default for
LLVM to give the better codesize.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-06-14 19:05:50 -04:00
Jonathon Penix
d6041d62b3 cmake: kconfig: Add new abstraction for -Oz optimization level
Both Clang [1] and (recently) GCC [2] support this flag to enable
additional codesize optimizations beyond -Os, possibly at the expense of
performance.

This tradeoff is worthwhile for some (and, Clang's -Oz seems to be
closer to GCC's -Os currently), so add a new abstraction for this flag
so users can select it as appropriate.

[1] https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-O0
[2] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-Oz

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-06-14 19:05:50 -04:00
Nikolay Agishev
efedf1cff3 ARCMWDT: Add compiler support for nSIM RMX platform
Add MetaWare compiller support for nSIM RMX platform

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-14 19:01:06 -04:00
Sylvio Alves
85ae583f45 west.yaml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
   898a1ca64a759541d9fcc37fef921db93d99ad70

Brings following Zephyr relevant feature:
 - 898a1ca6 boot: zephyr: add ESP32-C6 support

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-14 18:58:45 -04:00
Nicolas Pitre
51a5986b04 tests: demand_paging: extend memory access patterns
Add the ability to touch memory in the opposite direction from one loop
to the next so to exercize the LRU eviction algorithm.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-14 18:58:02 -04:00
Nicolas Pitre
92bc0cd0da demand_paging: Least Recently Used (LRU) eviction algorithm
This is a O(1) LRU eviction algorithm. A bit more complex but way more
scalable than the NRU algorithm.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-14 18:58:02 -04:00
Nicolas Pitre
6a3aa3b04e demand_paging: add frame tracking functions to eviction algorithms
Let eviction algorithms be notified when a given page frame:

- should be considered as possible candidate

- should no longer be considered as candidate

- has just been marked as "accessed"

The NRU algorithm is unchanged so it implements those as empty stubs.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-14 18:58:02 -04:00
Raffael Rostagno
9265c82313 soc: esp32c6: Kconfig and .ld updates, DTS and comments fix
Kconfig, .ld and comments fixing
Fixed address of UART1, WDT and RTC timer disabled by default

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
3b732a1ade tests: rtc_clk: Added support to ESP32C6
Added support for C6 for CPU and LP clock testing

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
6096a10b9a drivers: clock_control: Refactor for ESP32C6
Added support for C6 to allow CPU clock config

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
ec10f1b97f boards: esp32c6: Added PWM test file for esp32c6_devkitc
Added basic PWM test for esp32c6_devkitc

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
d59168eecb drivers: ledc: Clock source update to support ESP32C6
Clock source SCLK added for C6 on LEDC

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
67e43f6a81 drivers: intc: Fix for ESP32C6 interrupt sources allocation
Fix to properly allocate IRQs for interrupt sources over 60.
It also screens out non-allocatable IRQs used by the CPU.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
1173273f32 boards: esp32c6_devkitc: Added support for GP-SPI2
Added support for general purpose SPI2 (GP-SPI2)

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
7500f4e620 drivers: spi: Add suport to ESP32C6
Added GP-SPI2 (general purpose SPI2) support for ESP32C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
909f7922d6 drivers: watchdog: Added support to C6
Added support to watchdog timer to ESP32C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Lucas Tamborrino
a62423f391 drivers: Update to add support for esp32c6
Changes to bring support for esp32c6 SoC.
- clock control
- gpio
- pinctrl
- serial
- timer

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-06-14 18:51:46 -04:00
Lucas Tamborrino
861c2890a6 boards: espressif: esp32c6: add esp32c6_devkitc
Add esp32c6_devkitc basic support.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-06-14 18:51:46 -04:00
Lucas Tamborrino
2efdd9e789 dts: riscv: espressif: add esp32c6
Add esp32c6 basic device tree.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-06-14 18:51:46 -04:00
Marek Matej
b3523c9bfa soc: espressif: add esp32-c6 support
Add basic support for esp32c6 SoC.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-14 18:51:46 -04:00
Lucas Tamborrino
32f73ef5d8 dt-bindings: add esp32c6 signals
Add clock, interrupt controller and pinctrl related macros
for esp32c6

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-06-14 18:51:46 -04:00
Raffael Rostagno
9f75f7d395 west.yml: update for esp32c6 support
hal_espressif update for C6 support

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
Daniel DeGrasse
65b10a14e0 tests: settings: functional: file: add native_sim/native/64 overlay
In 0be0d2175b (cmake: modules: extensions: Revert using common
board files), the overlay for `native_sim/native/64` in the settings
functional file test was not recreated. Duplicate the overlay used for
the `native_sim` target to support this test correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 18:51:01 -04:00
Pisit Sawangvonganan
47390f7244 drivers: disk: remove sdmmc_sdhc.h since no longer used
Removed `sdmmc_sdhc.`h header file from `drivers/disk` and updated
`CODEOWNERS` to reflect this.

At the point of pull-request, there are no references to this file
in the `codebase`, indicating it is no longer needed.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-14 18:50:47 -04:00
frei tycho
d5ff0cc820 include: sys: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-14 18:50:33 -04:00
Jan Kowalewski
c698ca6f4d boards: ct: ctcc: add ctcc/nrf52840 board definition
Adds CTHINGS.CO Connectivity Card nRF52840 (ctcc/nrf52840)
board support.

Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-06-14 18:50:14 -04:00
Jan Kowalewski
e2c9efc4c9 dts: bindings: vendor-prefixes: add CTHINGS.CO
Add CTHINGS.CO to vendor prefixes

Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-06-14 18:50:14 -04:00
Benjamin Lemouzy
5c8937fbac drivers: sensor: lm75: add alert threshold support
Add SENSOR_ATTR_ALERT and SENSOR_ATTR_HYSTERESIS attributes support.
The code is heavily inspired by the one for lm77 sensor.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2024-06-14 18:48:32 -04:00
David Ullmann
eb2fc22967 doc: add release note about Reyax LoRa module
updated release notes for 3.7

Signed-off-by: David Ullmann <davidl.ullmann@gmail.com>
2024-06-14 17:12:49 -04:00
David Ullmann
ba75fe482a tests: add build test for reyax lora driver
adding test to build the reyax lora driver

Signed-off-by: David Ullmann <davidl.ullmann@gmail.com>
2024-06-14 17:12:49 -04:00
David Ullmann
35740a8322 drivers: lora: implement reyax lora driver
implementation of reyax lora module

Signed-off-by: David Ullmann <davidl.ullmann@gmail.com>
2024-06-14 17:12:49 -04:00
David Ullmann
421e598825 dts: lora: add board support for reyax lora module
adding board support for reyax module as a shield on psoc62s4 board

Signed-off-by: David Ullmann <davidl.ullmann@gmail.com>
2024-06-14 17:12:49 -04:00
David Ullmann
de6274f302 lora: add config for reyax lora module
adding the Kconfig for reyax lora module

Signed-off-by: David Ullmann <davidl.ullmann@gmail.com>
2024-06-14 17:12:49 -04:00
David Ullmann
3db614fe3b dts: bindings: Add reyax
adding vendor prefix to prepare for adding lora module

Signed-off-by: David Ullmann <davidl.ullmann@gmail.com>
2024-06-14 17:12:49 -04:00
Hess Nathan
15ddfa8b80 coding guidelines: comply with MISRA C:2012 Rule 11.2
avoid convert pointers to incomplete type using the pointer to first item

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-14 17:12:12 -04:00
Nicolas Pitre
696edbe841 arm64: move simple memcpy/memset alternatives to assembly
Assembly implementation for z_early_memset() and z_early_memcpy().
Otherwise the compiler will happily replace our C code with a direct
call to memset/memcpy which kind of defeats the purpose.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-14 17:11:40 -04:00
Nicolas Pitre
64855973c0 arm64: speed up simple memcpy/memset alternatives
We need those simple alternatives to be used during early boot when the
MMU is not yet enabled. However they don't have to be the slowest they
can be. Those functions are mainly used to clear .bss sections and copy
.data to final destination when doing XIP, etc. Therefore it is very
likely for provided pointers to be 64-bit aligned. Let's optimize for
that case.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-14 17:11:40 -04:00
Daniel DeGrasse
94ade2578c doc: releases: migration-guide: add migration note for GC9X01 display
Add migration note to GC9X01 display, which has been converted to the
MIPI DBI API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 17:11:20 -04:00
Daniel DeGrasse
1893928d94 tests: drivers: build_all: display: clean up reg addresses
Clean up register addresses for devices defined as children of the dummy
SPI bus, so that they start from zero. This ensures all SPI chip select
gpio indices will be used

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 17:11:20 -04:00
Daniel DeGrasse
be23e70fff drivers: display: gc9x01: convert to MIPI DBI API
Convert galaxycore GC9X01 to MIPI DBI API. In tree boards and tests
using this display have also had their devicetrees updated to use the
new MIPI DBI SPI emulated device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 17:11:20 -04:00
Babak Arisian
7b9a0e7e95 Bluetooth: Audio: add add_by_broadcast_name for the assistant shell
Add add_by_broadcast_name command that scan for broadcast sources
has BT_DATA_BROADCAST_NAME that matches with whatever name is given
to the shell command.

Fixes #70836

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-06-14 17:11:04 -04:00
Eric Ackermann
4f72df466c net: Support partial checksum offloading
The Xilinx AXI Ethernet subsystem is capable of RX/Tx checksum
offloading. While it supports computing IP and UDP/TCP checksums, it
does not support computing ICMP checksums and only computes IP checksums
for ICMP messages. Thus, this patch adds an additional configuration for
ethernet drivers that indicates for which protocols checksum offloading
is (to be) supported. This flag is then considered by the IP subsystem
in determining when flags need to be computed in software.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2024-06-14 17:10:43 -04:00
Sylvio Alves
f6fdfd4ee1 soc: esp32c3: add systimer clock disable option
When both MCUBoot and application run, systimer is initialized twice.
As a consequence, application freezes as systimer new initialization
conflicts with previous.

This PR adds the systimer clock disable function, that shall be called
before mcuboot jump to application, making sure it will
work as expected.

Fixes #74189

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-14 17:10:07 -04:00
Bartlomiej Buczek
79f4f2ac31 samples: drivers: adc: Allow coverage calculation.
Sample must end to dump coverage data.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-06-14 17:08:52 -04:00
Giardina, Anthony
809c0923c6 xtensa: userspace: fix uninitialized return values in mpu_map_region_add
Ensure that *first_idx is populated for the case of adding entries
to an empty table

Signed-off-by: Anthony Giardina <anthony.giardina@intel.com>
2024-06-14 14:49:29 -04:00
Damian Nikodem
a2386efbce drivers: ssp: update SSP driver to support Intel ACE30 PTL
This commit refactors the SSP driver to support the Intel ACE30 PTL
platform. The changes include:
- Adding new structures ssp_rx_dir and ssp_tx_dir to hold the TDM
slot configuration for RX and TX directions
- Adjusting the dai_ssp_set_config_blob functions to work with
the new TDM slot configuration.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-06-14 20:33:18 +02:00
Dong Wang
9faf111744 dts: bindings: dma: correct compatible name of Intel SEDI dma controller
Replace an underscore with a hyphen in the name to align with the general
naming convention.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-14 20:33:05 +02:00
Daniel Mangum
2e04cfd887 boards: esp32s3_devkitm: remove conflicting usb_serial reference
The usb_serial node is referenced twice in the procpu dts file. The first
time the status is set to "okay", while the second it is set to "disabled".
Only the second status is honored, so the first is removed to eliminate
confusion.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-06-14 14:02:53 -04:00
Tomi Fontanilles
f2c643ba02 storage: flash_map: replace TinyCrypt by PSA
As part of ongoing work to move away from TinyCrypt and towards PSA
(#43712), introduce a PSA option and remove the TinyCrypt one for the
SHA-256 implementation.

The Mbed TLS implementation is modified to use `mbedtls_sha256`
directly for smaller code size.

As of now the implementation defaults to PSA only if TF-M is enabled
because a dependency loop happens if using `PSA_CRYPTO_CLIENT` as a
condition in `FLASH_AREA_CHECK_INTEGRITY_BACKEND`.

A test case is added for the PSA implementation, and an NS platform is
added to the base test case to verify the compilation on a TF-M-enabled
platform.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-06-14 14:02:08 -04:00
Tomi Fontanilles
703e5258eb mgmt: updatehub: replace TinyCrypt by PSA
As part of ongoing work to move away from TinyCrypt and towards PSA
(#43712), introduce a PSA option and remove the TinyCrypt one for the
SHA-256 implementation.

The Mbed TLS implementation is modified to use `mbedtls_sha256`
directly for smaller code size.

The reliance of mgmt/updatehub on storage/flash_map's configuration
(`FLASH_AREA_CHECK_INTEGRITY_BACKEND`) is removed.
The choice of which implementation to use is made automatically,
based on whether a PSA API provider is present (`PSA_CRYPTO_CLIENT`).

This commit also add a test case with PSA (based on Mbed TLS)
in samples/subsys/mgmt/updatehub/sample.yaml.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 14:02:08 -04:00
Francois Ramu
298bf49048 samples: sensor: dht_polling run sample on sensor present
Add a fixture to run the sample only when the DHT sensor
HX330x is present (shield) on the nucleo_f40re board
'fixture_i2c_hs300x'
The stm32f401 Nucleo board itself has no sensor mounted

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 14:01:41 -04:00
Chris Friedt
0af0187095 doc: posix: mark memory protection as supported
Mark _POSIX_MEMORY_PROTECTION as supported (i.e. a
conformant application will link). Zephyr's mm API does not
currently support modifying memory protection bits after
pages have been mapped, so use of this function may result
in undefined behaviour.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
2d4346ba53 posix: implement mprotect()
Provide a stub for mprotect() to satisfy the requirement for the
base definitions / system interfaces and subsequently PSE51,
PSE52, PSE52, etc.

Currently, Zephyr's virtual memory-management API does not seem
to support modifying memory protection bits after pages have
already been mapped.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
64f336c251 posix: tie page size to mmu page size
Make POSIX_PAGE_SIZE_BITS not user-configurable and tie it to
CONFIG_MMU_PAGE_SIZE if there is an MMU. Otherwise, simply
default it to something small.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
24378ed08a doc: posix: mark shared memory objects as supported
Mark _POSIX_SHARED_MEMORY_OBJECTS as supported.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
f4cb161393 tests: posix: add tests for shared memory objects
Add tests for shared memory objects.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
5346306261 posix: add support for shared memory objects
Implement shm_open() and shm_unlink() to complete support for
the _POSIX_SHARED_MEMORY_OBJECTS Option.

Since mmap() support is not yet implemented in Zephyr, I/O is
limited to read(), write(), ftruncate(), lseek(), close(), for now.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
58c1c48df0 fdtable: per-fd offset support, add read/write_offs() methods
File offset actually varies on a per-file-descriptor basis,
and not with the resource that is abstracted behind the file
descriptor.

This is consistent with both the POSIX model and also the
ISO C/C++ model, so Zephyr should follow suit.

This is very work-around-y, but it's necessary to ensure
that shared memory objects, block devices, files and
directories all behave consistently.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
2710903014 os: fdtable: add mode field for fd_entry
Add a mode field for struct fd_entry, as well as a new
initializer, z_finalize_typed_fd().

The constants ZVFS_MODE_* may be used to differentiate
between fifo, character device, message queues, directories,
semaphores, block devices, shared memory objects, regular files,
symbolic links, and sockets.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
2fd7297aed doc: posix: mark mlockall() and munlockall() as supported
Mark mlockall() and munlockall() as supported, as well as the
_POSIX_MEMLOCK Option.

These functions are currently expected to fail, but are
required so that conformant applications can still link
successfully.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
5e99e13b4c posix: add support for mlockall() and munlockall()
Add support for mlockall() and munlockall(). These two functions
comprise the _POSIX_MEMLOCK Option which is required by PSE51,
PSE52, PSE53, and PSE54.

Zephyr's on-demand paging API does not yet support pinning and
unpinning *all* virtual memory regions, so these functions are
expected to fail, setting errno to ENOSYS. Any other usage is
currently categorized as undefined behaviour.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
d44047120b doc: posix: mark mlock() and munlock() as supported.
Mark mlock() and munlock() as supported, as well as the
_POSIX_MEMLOCK_RANGE Option.

These functions are currently expected to fail, but are
required so that conformant applications can still link
successfully.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
d949c9c8b8 posix: add support for mlock() and munlock()
Add support for mlock() and munlock(). These two functions
comprise the _POSIX_MEMLOCK_RANGE Option which is
required by PSE51, PSE52, PSE53, and PSE54.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
510be57d7f doc: posix: mark mapped files as supported
Mark POSIX_MAPPED_FILES as supported.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
73394a8390 posix: add implementation of mmap(), msync(), and munmap()
Add stubs for mmap(), msync(), and munmap() as required by the
_POSIX_MAPPED_FILES Option and POSIX_MAPPED_FILES and
Option Group of IEEE 1003.1-2017.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
156eaab70e posix: move ioctl() from fdtable to posix
The ioctl() call should be a part of the _XOPEN_STREAMS
Option in posix, so move it there.

Create a zephyr-native zvfs_ioctl() in the layer below.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
50fc010f0f posix + fdtable: move zvfs_ftruncate() to fdtable.c
Move the zvfs_ftruncate() call from fs.c to fdtable.c, as file
types other than regular files can also be truncated.

Instead of hard-wiring zvfs_ftruncate() to fs_truncate(),
add a new ZVFS_IOCTL_TRUNCATE so that the operation can be
handled with other ioctl() operations.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
65020f5b1f doc: posix: mark fstat() as implemented
The fstat() function is implemented as part of the
POSIX_FILE_SYSTEM Option Group, but it is implemented through
zvfs, as an ioctl, which allows other file descriptor types to
support queries of file descriptor status.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
1f9ca63b93 posix: fs: implement fstat() via zvfs_fstat()
Route the fstat() call (part of POSIX_FILE_SYSTEM) to
zvfs_fstat() so that other types of file descriptors can also
supply file status information.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt
1a95246f61 posix: features: correct typo _POSIX_XOPEN_STREAMS
An invalid feature test macro was found in in sysconf.h .

It should be corrected from _POSIX_XOPEN_STREAMS to
_XOPEN_STREAMS.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Anas Nashif
252ca99d0c ci: testplan: do not run tests on all platforms when a test changes
With many tests having 10s or scenarios and variants, anytime we make a
change to a test right now, we end up building all scenarios on all
platforms which ends up in multiple 10s of the thousands of instances
that need to run on 30 or 40 runners blocking CI for hours. We do not
really need that, a test needs to be smart about its coverage and not
rely on boiling the ocean to catch, mostly build errors that are
platform specific.

Change this to do the normal coverage we get on push events.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-14 13:59:24 -04:00
Dawid Niedzwiecki
3edd5a9070 board: google_dragonclaw: add supported features
Add the list of supported features to the google_dragonclaw board
definition.

It allows running more tests.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-06-14 19:35:34 +02:00
Francois Ramu
0b83a9b18c samples: subsys: task_wdt on the IWDG of the stm32f4
Run the sample on the IWDG of stm32f4 nucleo boards
instead of WWDG because the APB1 prescaler cannot set
the WWDG input clock source to match the wd timeout.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 19:34:58 +02:00
Robert Hancock
2d171efcec drivers: sensors: Add driver for LM95234 temperature sensor
Add a driver for the National/TI LM95234 Quad Remote Diode and Local
Temperature Sensor with SMBus Interface and TruTherm Technology.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-06-14 19:34:01 +02:00
Daniel DeGrasse
2c7cd3dc1e doc: releases: migration-guide-3.7: add note for UC81xx displays
Add note for UC81xx displays, which have been migrated to the MIPI DBI
API. This note describes how to define the MIPI DBI wrapper device
needed for the UC81xx display

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 19:32:39 +02:00
Daniel DeGrasse
7714f8f87b tests: drivers: display: build_all: add uc81xx
Add uc81xx to display build test

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 19:32:39 +02:00
Daniel DeGrasse
9fdaf43e79 drivers: display: uc81xx: convert to MIPI DBI API
Convert UC81XX display to use MIPI DBI API, as this display uses a SPI
3/4 wire bus. In tree shields using this driver have also had their
devicetrees updated to use the new MIPI DBI SPI driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-14 19:32:39 +02:00
Lars-Ove Karlsson
25cdda10e1 kernel: Unified type of stack protection canary __stack_chk_guard.
Extern declaration of __stack_chk_guard added volatile to
the type while the declaration was non-volatile. This cause
type check errors with compilers that declares the
__stack_chk_guard variable in an internal pre-include
header file (IAR).

While I think the volatile keyword is unnecessary, I decided
on keep it and add it to the declaration in
kernel/compiler_stack_protect.c

Tested with IAR ICCARM and the Zephyr SDK GCC.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2024-06-14 19:26:27 +02:00
Rubin Gerritsen
8799ab1ec2 test: Apply semantic patch file ztest_strcmp.cocci
This patch file updates the use of assertion macros
comparing strings.

Command line used:
```
./scripts/coccicheck --mode=patch \
--cocci=scripts/coccinelle/ztest_strcmp.cocci tests/
```

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-14 19:25:42 +02:00
Rubin Gerritsen
470a0fcaa5 cocinelle: Add a sematic patch file for ztest string assertions
ztest now provides functionality to compare strings.
These are simpler to use than the strcmp ways.

The semantic patch transforms many of the commonly used patterns.
It does not handle variable length macros.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-14 19:25:42 +02:00
Rubin Gerritsen
fc377363e4 cocinelle: Parse ztest test functions
We want to able to use cocinelle on ztest functions as
well when transforming APIs.

Provide a simple macro so that test functions are recognized.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-14 19:25:42 +02:00
Luca Burelli
6db484455d llext: remove the "modules_enabled" tests
These tests are simple copies of the existing tests with the addition of
the CONFIG_MODULES=y option. This different Kconfig setting has no
practical effect on the code, and the tests are therefore redundant.

Remove them to halve the number of tests.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 19:24:51 +02:00
Luca Burelli
57011e4c1a llext: add a "modules" Kconfig tristate example
This adds a new sample to demonstrate the use of tristate symbols
in Kconfig to build a function as an llext module or as a built-in
part of Zephyr.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 19:24:51 +02:00
Luca Burelli
baa3b6a5ba llext: disable LL_EXTENSION_SYMBOL when not building an llext
The LL_EXTENSION_SYMBOL macro is used to export a symbol to the base
image. When CONFIG_LLEXT is not defined, or the file is being compiled
outside of an llext, the macro is not useful and would leave orphan
sections in the final image instead.

This patch adds the LL_EXTENSION_BUILD definition to the llext build
process, and uses it to stub out the symbol-defining macro when not
building an llext.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 19:24:51 +02:00
Fabio Baltieri
12405a64d4 input: analog_axis: implement power management support
Implement suspend and resume, just stop and restart the timer that kicks
the main thread update cycles.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-14 19:22:25 +02:00
Jiafei Pan
4f034f46b0 soc: imx8mp: enable rdc for enet
Add RDC dts node for ENET and configure it in soc.c.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
3f831e30fa soc: imx8mm/n/p: enable cache driver for Cortex-A Core
Enable Cache driver in hal_nxp.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
20dae220bd board: imx8mp_evk: add ENET support on Cortex-A Core
Add ENET support on Cortex-A Core, enable it in DTS.
Update board document for supported features.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
5c95d04b26 clock: mcux_ccm: add enet clock support for imx8m serial
Add ENET clock support for imx8m serial platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
671aaf48b5 drivers: mdio_nxp_enet: using MMIO mapped address
Use ENET module MMIO mapping address directly.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
bbf34ad6a0 drivers: mdio_nxp_enet: remove unused header file
soc.h is not used, and some platform has no such header file, so
remove it.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
c8d8dce755 drivers: ptp_clock: ptp_enet: use MMIO mapped address
Get MMIO mapped address from ENET module driver.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
cca390d243 drivers: ethernet: eth_enet: add MMIO mapping
Adding MMIO mapping support in ENET module driver before MDIO, MAC
and PTP drivers initialization, so that they can reuse this mapping.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
6d48c8ce19 board: imx8mp_evk: enable MMU direct mapping for A-Core
Enable MMU direct mapping, so that driver can use it for MMIO mapping
as currently hal driver needs direct mapping (physical address and
virtual address 1:1 mapping).

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
0c958ae212 drivers: ethernet: eth_enet: remove building error
Don't block building in case of there is no unique ID provided.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Jiafei Pan
f1aa5d9391 drivers: eth_nxp_enet: fix cache maintain
Need to disable cache maintain by driver in case of
using noncache DMA buffer.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-06-14 19:21:18 +02:00
Phi Bang Nguyen
727f04b159 samples: video: capture: Add support for i.MX RT1170 EVK
Add support for i.MX RT1170 EVK

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-14 19:20:08 +02:00
Phi Bang Nguyen
831f5f6ba6 samples: video: capture: Display captured frames on screen
Improve the sample application by displaying the captured frames instead
of just discarding them.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-14 19:20:08 +02:00
Phi Bang Nguyen
0ecbd0b9c9 samples: video: capture: Use a chosen node for camera
In order to be generic, use a chosen node for camera so that the sample
is not specific to NXP SoCs. Also, always favorite a real video device
unless it is unavailable.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-14 19:20:08 +02:00
Phi Bang Nguyen
553f527a49 samples: video: capture: Enhance logs readability
There are some compatibilty situations where carriage return does not
work (e.g. on Serial Monitor in VSCode). Moreover, keeping the
timestamps logs on the console would help to have an idea about the
frame rate. So, it's better to use line feed instead of carriage return
in this case.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-14 19:20:08 +02:00
Phi Bang Nguyen
ee3347a9f3 samples: video: capture: Run clang-format
Run clang-format on the file before making any changes

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-14 19:20:08 +02:00
Phi Bang Nguyen
96d8330d9b samples: video: capture: Update documents and tests
The mt9m114 camera shield is now added. There are also some changes in
the mt9m114 camera driver, e.g. frame rate, default format, capabilities.
Update the sample document and test to reflect these changes.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-14 19:20:08 +02:00
frei tycho
d8179401b5 kernel: avoided increments/decrements with side effects
- moved ++/-- before or after the value use

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-14 19:19:29 +02:00
TaiJu Wu
a2e97405d0 lib: check null pointer before taking lock for bitarray
In some function in bitarray.c, we should check the pointer
of bitarry before taking bitarray lock.

In this patch, we move the null-check assert before the use of
the struct to provide better validation than a crash.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2024-06-14 19:18:28 +02:00
Rubin Gerritsen
bfba19dc41 Bluetooth: Host: Add the API bt_hci_err_to_str()
This API converts a HCI error code to a string.
This can be useful if application developers want to print them
in the applications.

Later we can also use them in the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-14 19:17:48 +02:00
Johann Fischer
8739efe0fc doc: usb: add initial USB device configuraiton howto
Add initial documentation how to configure and enable new USB device
support. Use literalinclude to pull code snippets from the samples.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Johann Fischer
cf2113e437 samples: usb: rework common code to use usbd_register_all_classes()
Rework common USB samples code to use usbd_register_all_classes().

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Johann Fischer
4191602f11 usb: device_next: add helper to register all available class instances
Add helper to register/unregister all available class instances.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Johann Fischer
9e80d4f976 doc: usb: rework new USB device support overview description
Rework new USB device support overview description.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Johann Fischer
1d0616a33b doc: usb: include Audio Class 2 device API
Include new Audio Class 2 device API.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Johann Fischer
7f2320ae08 doc: usb: include new HID device API
Include new HID device API.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Grzegorz Swiderski
f908b41154 soc: nordic: Resolve z_arm_platform_init in the linker generator
Fixes #72673
Follow-up to #70977 and #71590

The CMake linker generator doesn't have an API equivalent to `PROVIDE`,
but the existing `zephyr_linker_symbol()` function should do just fine.
It still lets us set `z_arm_platform_init = SystemInit` and thus keep
the reduced ROM space.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-06-14 19:16:37 +02:00
Nicolas Pitre
b148178bd2 demand_paging: eviction/nru: fix pathological behavior
Currently, the NRU algorithm always picks the lowest (and very often the
same) clean unaccessed page over and over when e.g. doing large anonymous
memory mappings. Spread the eviction selection more uniformly by by
starting the search right after the last victim instead of always
restarting from 0.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-14 19:15:59 +02:00
Piotr Kosycarz
3222f378ab samples: subsys: ipc: ipc_service: check console output
Verify host console.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-14 19:14:38 +02:00
Piotr Kosycarz
45aca35650 samples: subsys: logging: multidomain: check console output on HW
Verify host console.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-14 19:14:13 +02:00
Vinayak Kariappa Chettimada
d9171df773 samples: Bluetooth: peripheral_hr restart advertising on disconnect
Restart legacy advertising on ACL disconnect similar to when
using extended advertising in this sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-14 19:13:19 +02:00
Tom Burdick
3b94af2b5c sensors: Submit call returns void
The integer return of sensor_submit should be void as the call is
asynchronous and the response is meant to be delivered using RTIO APIs
signaling that the submission completed with error or success.

Change the function signature to void and fix all uses of the submit
API, fixing some bugs in the process.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-14 19:13:02 +02:00
Sylvio Alves
8adec6d749 boards: docs: remove extra table line
Remove extra table line present in a few esp32-based board
to meet default style.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-14 19:12:29 +02:00
Yong Cong Sin
0103c56dd6 zephyr: remove deprecated headers
These headers have been deprecated for > 2 full releases,
let's remove them to keep them out of v3.7.0 LTS.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-14 19:12:00 +02:00
Guillaume Gautier
fe05606630 drivers: flash: select ncs line for stm32 xspi
Add support to select the nCS line for XSPI from the device tree.
Disable the nCS override.
This setting only works with series that have an XSPIM (so not H5)

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-06-14 15:44:38 +02:00
Guillaume Gautier
3e99dc26f6 dts: bindings: flash_controller: add ncs line property to stm32 xspi flash
Add a property to define the nCS line used by the XSPI driver for the
external Flash.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-06-14 15:44:38 +02:00
Dmitrii Golovanov
68bb87bd50 twister: pytest: Log output passthrough
Pass Twister pytest plugin's log output, as well as output from
a test image running with pytest, up to Twister log irregardless
of the current verbosity level set at Twister.
This allows to collect full test output and also ensures that
recording data embedded in the test log is passed to the Twister
pytest harness for export.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-14 09:41:52 -04:00
Dmitrii Golovanov
01dcb942c6 tests: kernel: timer_behavior_external: Fix a typo
Rename `do_analysys()` to `do_analysis()`.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-14 09:41:52 -04:00
Dmitrii Golovanov
d72dd3562e tests: kernel: timer: Fix log capture on external tool testing
Fix incomplete test log capture when the external tool is used
and Twister Pytest Harness script ends without reading output
from the last test case running on the device.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-14 09:41:52 -04:00
Dmitrii Golovanov
014a0983fb tests: kernel: timer_behavior_external: Additional stats recording
Additional logging of kernel.timer.timer_behavior_external test case
statistics for timer drift, variance, etc. as JSON-formatted records
to make easier data collection and its further analysis.
These log records will be processed by the Twister Harness recording
feature which captures and parses timer statistics from the log output,
then composes it into twister.json and recording.csv files.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-14 09:41:52 -04:00
Dmitrii Golovanov
dd67791857 tests: kernel: timer_behavior: Additional stats recording
Additional logging of kernel.timer.timer test case statistics for
timer drift, variance, etc. as JSON-formatted records to make easier
data collection and its further analysis.
These log records will be processed by the Twister Harness recording
feature which captures and parses timer statistics from the log output,
then composes it into twister.json and recording.csv files.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-14 09:41:52 -04:00
Dmitrii Golovanov
35e313f9e5 twister: recording: Allow JSON data fields
Extend Twister Harness recording feature to allow selected data fields,
extracted from the log by a regular expression, to be parsed into JSON
objects and eventually reported in `twister.json` as `recording` list
property of the test suite.

With this extension, log records can convey layered data structures
passed from a test image as summary results, traces, statistics, etc.

This extension also allows flexible recording structure: a test image
can output different types of data records incapsulated into a fixed
set of fields, so `recording.csv` file columns are respected, whereas
some of the columns keep strings with json-encoded semi-structured data.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-14 09:41:52 -04:00
Valerio Setti
e9687c7e5c bsim: add tests for BT_USE_PSA_API
Add a couple PSA overlay configs for the BT tests in order to evaluate
PSA API support introduced by CONFIG_BT_USE_PSA_API. These test are
performed on nrf52840dk platform.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Valerio Setti
035b4af8b4 doc: update migration guide about changes to bt-crypto
Update migration guide about the support to PSA functions
introduced in bt-crypto.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Valerio Setti
32b43564df bt: hci_ecc: add option to use PSA APIs instead of TinyCrypt
This commit adds CONFIG_BT_USE_PSA_API to allow the end
user to prefer PSA APIs over TinyCrypt for crypto operations
in bluetooth. Of course, this is possible only if
a PSA provider is available on the system, i.e.
CONFIG_PSA_CRYPTO_CLIENT is set.

This commit also extends
tests/bluetooth/mesh/basic/bluetooth.mesh.gatt adding a specific
case using PSA.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Valerio Setti
32b792b21f bluetooth: remove BT_TINYCRYPT_ECC in bluetooth mesh tests
Some bluetooth test were using BT_TINYCRYPT_ECC without also
setting BT_ECC. This means that BT_TINYCRYPT_ECC gets disabled
as it depends on BT_ECC.
This commit fix this by removing BT_TINYCRYPT_ECC in all test
for bluetooth mesh.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Valerio Setti
814b2ed457 bt-host: add option to use PSA APIs instead of TinyCrypt
By enabling CONFIG_BT_USE_PSA_API the user can specify to use
PSA APIs instead of TinyCrypt for crypto operations in bluetooth
host module.

This commit also extends tests/bluetooth/gatt in order to
add a PSA test.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Valerio Setti
9032f8d791 bt-crypto: add option to use PSA APIs instead of TinyCrypt
This commit adds CONFIG_BT_USE_PSA_API to allow the end
user to prefer PSA APIs over TinyCrypt for crypto operations
in bluetooth. Of course, this is possible only if
a PSA provider is available on the system, i.e.
CONFIG_PSA_CRYPTO_CLIENT is set.

This commit also extends tests/bluetooth/bt_crypto adding
a test case for PSA.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Valerio Setti
a9f7788f9f trusted-firmware-m: select PSA_CRYPTO_CLIENT when BUILD_WITH_TFM
TF-M is a PSA API provider alternative to Mbed TLS one. As
a consequence when CONFIG_BUILD_WITH_TFM is set
CONFIG_PSA_CRYPTO_CLIENT should be set as well.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Evgeniy Paltsev
ec72339d61 ARC: enable barriers for HS
As we start to use data memory barriers in SMP scheduler code
explicitly (not only internaly in the atomics implementation)
let's enable barriers for ARC HS.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-06-14 15:38:39 +02:00
Jeppe Odgaard
86fa756dde tests: drivers: dac: use zassert_ok
Replace `zassert_equal` with `zassert_ok` where return value contains 0
or errno.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-06-14 15:38:24 +02:00
Thibo Verheyde
ddef306394 drivers: serial: esp32: Fix next buffer release on rx disable
Set event data rx buffer as next buffer instead of current buffer.

Signed-off-by: Thibo Verheyde <thibo@dptechnics.com>
2024-06-14 15:38:02 +02:00
Sigmund Klåpbakken
6f215526d7 runners: jlink: Add support for big endian device
Sets the endianness of the JLink and the GDB Server based on if
`CONFIG_BIG_ENDIAN` is set.

Doc on JLink LE/BE option:
https://wiki.segger.com/J-Link_Commander#LE

Doc on GDB server -endian option:
https://wiki.segger.com/J-Link_GDB_Server#-endian

Signed-off-by: Sigmund Klåpbakken <sigmundklaa@outlook.com>
2024-06-14 15:37:46 +02:00
Daniel Leung
e98e4ed067 serial: convert kconfig source to rsource
Simple cosmetic change to convert all the source commands
to rsource so that includes are relative to driver/serial.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-14 15:37:31 +02:00
Dominik Ermel
a593f344b5 tests/storage/flash_map: Fix erase and flatten test
Fix offset read for verification and comparison of read to
erased value, where type mismatch has been causing fails in
comparisons.

Fixes #74066

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-14 15:37:10 +02:00
Marcel Birthelmer
58a54e3452 soc: samd51: Fix xosc32 initialization
At osc32k_init in the soc_samd5x.c file the start-up value of 7 which
is reserved. This fixes the startup timeout and control gain with the
correct values.

Signed-off-by: Marcel Birthelmer <marcel@carrietech.com>
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-06-14 15:36:55 +02:00
Yangbo Lu
b77dab6199 drivers: ethernet: phy_realtek_rtl8211f: enable RGMII TX/RX delay
The RGMII specifies output TXC/RXC and TXD/RXD without any clock skew.
Need to add skew on clock line to make sure the other side sample
right data. This can also be done in PCB traces.
This patch is to enable RGMII TX/RX delay to ensure timing.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-06-14 15:36:39 +02:00
Yangbo Lu
e5f6cee9fb drivers: ethernet: phy_realtek_rtl8211f: fix monitor work schedule
Monitor work should be scheduled for non-interrupt mode.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-06-14 15:36:39 +02:00
Sebastian Głąb
48fc6877e4 samples: drivers: adc: adc_sequence: Enable test execution on nrf54h20
Add overlay file for nrf54h20 cpuapp target.
Add nrf54h20 target to platform_allow.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-14 15:36:17 +02:00
Sebastian Głąb
cc9bd6d77e samples: drivers: adc: adc_dt: Add nrf54h20 to platform_allow
Enable test execution on nrf54h20dk.
Overlay file already exists.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-14 15:36:17 +02:00
Sebastian Głąb
a3e1e398bf boards: nordic: nrf54h20: Add ADC to the list of supported peripherals
ADC driver was aligned to nrf54h20 target.
Enable ADC Twister tests on that platform.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-14 15:36:17 +02:00
Piotr Kosycarz
1b3725e099 samples: sensor: accel_polling: Allow coverage calculation
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-14 15:35:17 +02:00
Piotr Kosycarz
e63c691a86 samples: sensor: bme680: Allow coverage calculation
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-14 15:35:02 +02:00
Seppo Takalo
35cc774aa5 net: lwm2m: Retry DTLS handshake before dropping to bootstrap
Allow DTLS handshake to be retried before the engine
drops into bootstrap. Otherwise any termporary failure,
for example DNS failure might drop us into bootstrap
without retrying.

Now all the retry logic should be in sm_do_network_error().
sm_do_registration() should only fall back to bootstrap
if there is configuration error.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-06-14 15:34:39 +02:00
Jens Rehhoff Thomsen
ab9fd0b5c9 Bluetooth: BAP: Add bt_bap_base_get_size function
bt_bap_base_get_size function returns the size of the BASE.

Fixes #73847

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-06-14 15:34:23 +02:00
Rubin Gerritsen
768c45a11d Bluetooth: Controller: Clarify that it can be overridden out of tree
Nordic devices are commonly used with the nRF Connect SDK.
There the SoftDevice Controller is set as the default
Bluetooth Controller. To avoid confusion when reading DTS
and Kconfig files, clarify this by adding a note.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-14 15:33:59 +02:00
Andries Kruithof
811387600a Bluetooth: Audio: CAP: babblesim test for broadcast reception start
Add a babblesim test for the broadcast reception start procedure
from the CAP commander

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-06-14 15:33:34 +02:00
Alberto Escolar Piedras
9ae5352372 tests/bsim/run_parallel.sh: Do not attempt to run parallel with no tests
If there is no tests in the test list, do not attempt to run
parallel.
This avoids parallel trying to attempt to read the input from
the terminal in that case.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-14 05:31:08 -04:00
Alberto Escolar Piedras
c2950bec73 ci: bsim tests: Fix for missing result xml files
Do not fail during results merge if
twister or the bsim workflows did not run
(or produce an xml).
Depending on what has changed in a PR
and therefore what tests are run this can happen.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-14 05:31:08 -04:00
Yong Cong Sin
bb66d1188c arch: riscv: stacktrace: conditionally check stack_info
Check if an address is in the thread stack only when
`CONFIG_THREAD_STACK_INFO` is enabled, since otherwise the
`stack_info` will not be available.

This fixes compilation error when `CONFIG_THREAD_STACK_INFO`
is explicitly disabled.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-14 05:22:59 -04:00
Maximilian Deubel
96112ade74 drivers: swdp: document API
This patch adds documentation for the SWDP API.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
f1b6073a27 driver: swdp_bitbang: hardcode request lut
Hardcode the lookup table for SWDP requests.
This is an optimization to save some space.
Documentation was added to understand the values.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
05a45a19e3 dap: fix timeout handling
Use k_timepoint_t for timeout handling in the swj_pins function.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer
94f48c7a78 samples: debug: add CMSIS DAP sample using USB as interface
Add CMSIS DAP sample using USB as interface.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer
9a9afb0b54 dap: implement DAP SWD sequence command
DAP SWD sequence command is a requirement to support CMSIS-DAPv2.
Raise supported version to "2.1.0".

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer
e31cdc00a0 dap: react properly to unsupported UART commands
Add ID_DAP_UART_* command definitions and react properly to
unsupported UART commands.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
58d9d889aa dap: add support for DAP_INFO string elements
Add support for DAP_INFO string elements.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
6522dd7f53 dap: implement wait for SWJ pins command
Implement wait for SWJ pins command.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer
3e8f9fb7df drivers: swdp_bitbang: add SW output sequence
Add API to read count bits from SWDIO into data LSB first.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
3ef2c66a8a driver: swdp_bitbang: rework pin configurations
Move low-level GPIO functions to a separate file and use GPIO driver
API if low-level GPIO support is not available for the platform.
Allows alternative pin configuration using only two pins, clk and dio.
Improve binding description.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johan Carlsson
f5ccc3c82c dap: do not return error in DAP connect command
If a host client crashes or fails to disconnect, the probe will
hang. Allow a new connection without raising errors.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johan Carlsson
e46e72320e dap: add Konfig option to set maximum packet size
This also fixes a bug where the packet size returned was only 17 byte.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-06-14 11:14:17 +02:00
Johann Fischer
7c9259abbc dap: add CMSIS-DAP compatible controller
Add CMSIS-DAP compatible controller which is a handler between
the host interface and SWD driver. The controller follows CMSIS-DAP
reference implementation. It expects a request buffer from the host
interface, splits it to simple transfers and forwards to the DP driver,
and finally returns a response buffer to the host.
Interface to the host can be implemented with USB HID device support.

Controller implements only SW-DP support and is tested
with pyOCD and ADIv5.x.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2024-06-14 11:14:17 +02:00
Johann Fischer
3cf630fb0b driver: add SWDP driver interface API and bit-bang driver
Add Serial Wire Debug Port interface driver API and bit-bang driver.

The driver requires a simple Hardware Interface Circuits (HICs),
where signals CLK, DOUT, DIN, ENn, OE_ENn, RESETn
are connected to board GPIOs and buffered signals SWD_CLK and SWD_DIO
to the target.

Signal OE_ENn controls the direction of the Serial Wire (SWD_DIO),
ENn the buffers SWD_CLK possibly others and enables/disables HIC.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Francois Ramu
2146813cb3 tests: drivers: adc stm32 api testing on the stm32h7s78 disco kit
add the stm32h7s78_dk disco kit to run the tests drivers
This  testcase is executed (XiP) from the external NOR
of the stm32h7s78_dk board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
e78cdc823d boards: arm: stm32h7s78 disco kit supporting more features
Add the ADC, WDG, entropy features to the stm32h7s78_dk disco kit

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
4ade2a88e4 dts: arm: stm32h7 add wdg and adc, rng node to stm32h7R/h7S devices
Add the IWDG and WWDG watchdog peripherals
the ADC1 & 2 peripherals with sensor for die temperature and voltage
the RNG entropy generator

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
b014150508 drivers: flash: stm32h7 flash driver supports the stm32h7rs serie
Add the support of the stm32h7rs serie to the flash stm32h7 driver
Remap Flash registers to the stm32h7rs serie.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
da8a812582 drivers: adc: stm32 adc driver supporting the stm32H7RS
Introduce the stm32h7RS serie to the ADC driver,
based on the stm32h7: two ADC 12 resolution
For stm32h7rs ADC calibration, the
LL_ADC_SetCalibrationFactor is not used.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
24ff13e92c drivers: watchdog: stm32 wdg driver support stm32H7RS serie
Add the stm32h7rs serie to the stm32 WDG driver

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
895ef1d6c5 drivers: hwinfo: stm32 driver supports the stm32h7rs serie
Add the support of the stm32h7rs serie to the HWinfo
driver. UID base is 0x8FFF800

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Luca Burelli
08eb314c35 llext: refactor: use cached section headers
The section headers are now available in the loader structure, so we can
use those directly instead of reading them from the ELF file every time.

This commit contains no logic changes; it removes all copies of the
header loading code and replaces them with direct access to the cached
section headers.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Luca Burelli
817bbda5cc llext: read all section headers at once
This change reads all section headers at once, instead of reading them
one by one. This is more efficient and allows to further simplify the
code downstream.

The section headers are directly accessed from the file buffer if the
llext_peek() function is supported by the loader. Otherwise, they are
read into a buffer allocated on the heap and used only during the
llext_load() function.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Luca Burelli
a976a1a25c llext: llext_load: document memory management policy
The do_llext_load function is responsible for loading an extension from a
file, and for this purpose it calls a number of functions that a) allocate
memory, and b) can fail. This creates the opportunity for memory leaks if
the error paths are not handled correctly.

This commit adds a comment at the beginning of the function to document
the memory management policy that has to be followed in this file:
cleanup is not performed in the error paths, and all memory is freed at
the end of the do_llext_load() function, both in the case of error and of
successful loading.

As an improvement, the symbol table is not freed if the LLEXT log level
is set to debug, so that it can be used, for example, to inspect the
symbols of the loaded extension.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Luca Burelli
89e27b9312 llext: improve debug messages
The recent llext_map_sections() rework changed the way debug messages
are output so that the names of most skipped sections are not printed
at all. This makes debugging harder since the section names are useful
to identify the contents at a glance.

Also print a few additional fields from the section header, and use 0x
prefixes for hex numbers.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Sercan Erat
0666fe2a35 boards: rak: Add Rak11720 board
Added support for the Rak11720 board. Rak11720 is a WisBlock Core module
with Apollo3 Blue SoC from Ambiq and a Semtech SX1262 LoRa® transceiver.
For more information about this board please check:
https://docs.rakwireless.com/Product-Categories/WisDuo/RAK11720-Module/Overview/#product-description

There are known issues that have been identified while communicating
with SX1262 transceiver:

- Gpio interrupt handling error: ambiq_gpio_pin_interrupt_configure
function is not able to configure SX1262 Dio1 interrupt pin correctly.
Please check issue 73958.
- Spi communication error: Rak11720 uses a custom CS pin.
Firstly, custom CS pin support is necessary. Secondly, spi_ambiq_xfer
function is not able to communicate with SX1262 transceiver.
Please check issue 73959.

These issues have been documented for future solutions. Despite these
limitations, the current support enables basic functionality.

Examples can be build by below command for Rak11720:
west build -b rak11720 samples/hello_world

Signed-off-by: Sercan Erat <sercanerat@gmail.com>
2024-06-14 11:13:27 +02:00
Declan Snyder
163ddc0e84 boards: lpcxpresso5s69//ns: Fix mbedtls build err
Fix issue where when building with TFM and PSA client
there is an error from want RSA key type not being
defined in mbedTLS library.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-14 11:13:05 +02:00
Declan Snyder
4bf9e62ba0 boards: nxp: Remove suppression of LPC DTC warns
DTC warnings are useful and we should keep them enabled.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-14 11:13:05 +02:00
Declan Snyder
801028b763 dts: nxp,lpc-gpio: Fix binding to group ports
LPC GPIO binding was wrong in that the reg address
on the simple soc bus was given as an index of the gpio ports
within a gpio controller. Fix this by putting the GPIO node
on the simple bus as a single node with the correct base address,
and make the ports children of this node.

Change the driver to get the port number from the reg address
instead of a custom property, and get base address from DT instead
of the SDK macro definition.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-14 11:13:05 +02:00
Anke Xiao
4141b7cb64 tests: drivers: i2c: add i2c support for NXP FRDM-KE17Z512
Added support for NXP FRDM-KE17Z512,
and tested i2c_target_api sample.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Anke Xiao
fdf39a7ab7 boards: nxp: frdm_ke17z512: enable lpi2c0 and lpi2c1 driver
Added lpi2c support to test i2c samples

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Anke Xiao
89a0ff8f61 soc: nxp: kinetis: soc.c: configure i2c driver clock
Set the i2c driver clock source when it is Okay.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Anke Xiao
5aeeae91e2 dts: arm: nxp: nxp_ke1xz.dtsi: add i2c periperal info
The i2c driver is disabled by default, enabled under board folder
for ke17z512 platform.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Johan Hedberg
1c53726e80 Bluetooth: Host: Fix deprecation and versioning for HCI APIs
Add versioning to the new HCI API so that it shows up officially as
unstable, and add a reference to the new API from the old API.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-14 11:12:01 +02:00
Johan Hedberg
c9a0ab2587 doc: migration-guide-3.7: Mention the removal of CONFIG_BT_NO_DRIVER
Mention the removal of the BT_NO_DRIVER option, and explain how drivers are
now expected to be enabled or disabled. Also group all bullet points
related to the HCI API changes as a dedicated sub list.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-14 11:12:01 +02:00
Dong Wang
72fa07e0bc manifest: hal_intel: update to lastest revision
The update contains all SEDI driver enhancements ported from ISH code base
for PV release.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-14 11:11:47 +02:00
Riku Karjalainen
ff0635d700 drivers: flash: stm32: fix flash write error handling
The stm32 flash driver returns success even though
writing failed when instruction cache was enabled.
Fix by not overriding error code when re-enabling
instruction cache.

Signed-off-by: Riku Karjalainen <riku.karjalainen@vaisala.com>
2024-06-14 11:11:33 +02:00
David Leach
d45605e6a3 drivers: apic_tsc: revert add dependency of DYNAMIC_INTERRUPTS
PR #74127 introduced a dependency loop that appeared to not be caught
by CI.

Signed-off-by: David Leach <david.leach@nxp.com>
2024-06-13 23:54:29 -05:00
Dong Wang
af6d790d0e drivers: apic_tsc: add dependency of DYNAMIC_INTERRUPTS
The reason is that this driver needs to call the function
'irq_connect_dynamic()' which  is implemented with DYNAMIC_INTERRUPTS.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-13 21:58:49 -05:00
Jeppe Odgaard
b1f2eb9a11 samples: drivers: adc: add nucleo_h563zi
Add Nucleo H563ZI board support to ADC sample.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-06-13 20:46:44 -04:00
frei tycho
b29e8ff0d6 include: toolchain: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-13 20:31:41 -04:00
Benjamin Cabé
c9d0f15006 doc: mem_mgmt: Add missing definition for mem_mgmt doxygen group
Avoid warning and properly list memory management APIs in Doxygen
documentation by actually declaring the mem_mgmt doxygen group

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 20:31:16 -04:00
Reto Schneider
1bf5af7e89 kernel: banner: Add option to clear screen on boot
On each reboot, this option causes the serial output to start top-left
on the users terminal, simplifying (human) parsing.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-06-13 20:30:14 -04:00
Hess Nathan
5120744c8d lib: added blanks between operators
To adhere to general code style, I added some
blanks around operators

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-13 20:28:23 -04:00
Hess Nathan
974bad6242 coding guidelines: comply with MISRA Rule 12.1.
-added parentheses verifying lack of ambiguities

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-13 20:28:23 -04:00
Hess Nathan
7fb4a748b5 coding guidelines: comply with MISRA Rule 21.15
- made explicit the copied data type

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-13 20:27:19 -04:00
Paulo Santos
1db7caae56 kernel: update k_work_schedule_for_queue() docstring
This commit updates the missing retval from the underlying call of
`submit_to_queue_locked()` when the work was running and has been queued
to the queue that was running it.

Signed-off-by: Paulo Santos <pauloroberto.santos@edge.ufal.br>
2024-06-13 20:26:35 -04:00
Torsten Rasmussen
644f6b6e97 doc: rpi_pico update to cmsis-dap
Follow-up: #59076

The PR#59076 updated the board.cmake to use cmsis-dap instead of
picoprobe but without updating the documentation.

This commit updates the board documentation to match the code changes.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-13 20:25:57 -04:00
Prashanth S
59b2ef2739 drivers: timer: Add TI DM TIMER support
TI Dual-Mode timer is used as the arch timer for systick on J721E R5
cores. Add DM Timer for systick timer support.

Signed-off-by: Prashanth S <slpp95prashanth@yahoo.com>
Signed-off-by: Andrew Davis <afd@ti.com>
2024-06-13 20:25:14 -04:00
Daniel Schultz
4e95fde58c boards: phytec: phyboard_lyra: Add OpenOCD support for M4
The phyBOARD-Lyra AM62x is equipped with an XDS110 JTAG debugger. Add
missing OpenOCD configuration and some documentation to support
'west debug'.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-13 20:24:16 -04:00
Daniel Schultz
680228d5d6 boards: ti: sk_am62: Add OpenOCD support
The SK AM62 EVM is equipped with an XDS110 JTAG debugger. Add
missing OpenOCD configuration and some documentation to support
'west debug'.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-13 20:24:16 -04:00
Daniel Schultz
281500f046 soc: ti: k3: Enable BUILD_NO_GAP_FILL for all M4
By default, a post build step tries to fill gaps in the output
hex file. Since the AM62x, for example, has different,
non-contiguous memory sections, it tries to fill a gap over
multiple GBs. Disable this feature since the K3 architecture has no
dedicated flash for the firmware and stores it in a Linux rootfs.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-13 20:24:16 -04:00
Daniel Schultz
b22c961e5e scripts: west: runner: openocd: Add gdb-client-port
The gdb-port defines the GDB port and the openocd runner passes
this value to openocd as well as gdb. However, the TI AM62x board
provides multiple ports for each subsystem. For example, systick
appears at 3333, A53 as 3334-3337, R5F as 3338 and M4F as 3339.

If we want to connect to the M4F, we need to add another port which
is different to the to the gdb-port value.

This patch adds an additional argument --gdb-client-port to define
the port which GDB should connect to. It defaults to 3333, identical
to gdb-port.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-13 20:24:16 -04:00
Andrzej Głąbek
f73471eaf9 tests: timer_api: Use 64-bit integers in busy slew threshold calculation
32-bit multiplication overflows for the 130000 ppm value used currently
on Nordic SoCs and the duration that is configured to 100000 us.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-06-13 20:22:08 -04:00
Andrzej Głąbek
1cfd57177e tests: timer_api: Use busy slew threshold when checking remaining ticks
On Nordic SoCs, the clock that drives the system timer and the one that
is used in busy-waiting may be significantly skewed, so the test cases
that compare durations derived from those two clocks need to take into
account a proper threshold. After the `z_timeout_expires` function was
corrected in 3d29c9fe54, it turned out
that the threshold was missing in one check and the related test case
started to fail on nRF platforms. This patch adds that threshold there.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-06-13 20:22:08 -04:00
frei tycho
77a3aec34e lib: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-13 20:21:08 -04:00
Andreas Klinger
c98760df44 boards: fix openocd deprecated configuration
Replace deprecated settings:
  adapter_khz  -->  adapter speed
  adapter_nsrst  -->  adapter srst delay

Tested on olimex stm32_e407 board with olimex arm-usb-tiny-h adapter

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2024-06-13 20:18:37 -04:00
Ayush Singh
cab48b0743 ieee802154: ieee802154_cc13xx_cc26xx_subg: Fix tcp timeout
- If status == PROP_ERROR_RXBUF, that means rx buffer head is not empty.
  In case of this, RF_EventRxEntryDone is never triggered and thus we
  enter an infinite loop of nothing happening. Due to this, TCP socket
  times out.
- To fix this, we need to free rx buffer current head. However, it seems
  better to free all the elements that are already finished instead of
  just head.
- Before 128354ae17, the buffer was reset
  every time drv_rx_start was called. However, that also seems wrong for
  a ring buffer. So I am freeing the finished buffers instead.
- Tested on Beagleconnect Freedom.
- Fixes https://github.com/zephyrproject-rtos/zephyr/issues/71191

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-06-13 20:18:12 -04:00
Sadik Ozer
ae5a15ab0e tests: drivers: gpio: Enable gpio driver tests for max32672 boards
Enable gpio driver test for max32672evkit and fthr boards

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-13 20:17:49 -04:00
Sadik Ozer
63009d7a72 boards: Add MAX32672EVKIT board
Add MAX32672EVKIT board files
For more information about this board please check
https://www.analog.com/

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-13 20:17:49 -04:00
Sadik Ozer
16dda2c092 boards: Add MAX32672FTHR board
Added MAX32672FTHR board
For more information about this board please check
https://www.analog.com/

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-13 20:17:49 -04:00
Sadik Ozer
406764aec6 soc: Add the MAX32672 SoC
Add MAX32672 Kconfig and dts files

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-13 20:17:49 -04:00
Ioannis Karachalios
774ed60280 drivers: spi: smartbond: Add async API support
This commit should deal with adding support
for asynchronous operations. It also adds
support for DMA acceleration via a Kconfig
variable (enaled by default as DMA should
be considered scales faster than the
interrupt-driven approach).

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-13 20:17:04 -04:00
Rubin Gerritsen
f78c51d99d checkpatch: Add exception to BRACKED_SPACE rule for macros
When brackets are used in macros, there may sometimes be a space in
front of them. The checkpatch script should allow this.
The change includes the example that triggered the need for this
change.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-13 20:16:24 -04:00
Francois Ramu
301d24fd88 boards: st: stm32CubeProgrammer runner does not need hex-file path
Do not give the path to the zephyr.hex when flashing with the
STM32CubeProgrammer in MemoryMapped mode.
West flash can retrieve the path and file correctly. Twister cannot
find the build directory, the hex file is found correctly, though.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-13 20:16:05 -04:00
Grant Ramsay
5914c86931 arch: treewide: Remove unnessecary flash size/address defconfig when !XIP
FLASH_SIZE=0 and FLASH_BASE_ADDRESS=0 are now the default values
when XIP=n

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-06-13 20:15:35 -04:00
Grant Ramsay
c5642a7b4d arch: kconfig: Set flash size/address to 0 by default when !XIP
Many boards/SoCs in-tree do this:
    if !XIP
    config FLASH_SIZE
        default 0
    config FLASH_BASE_ADDRESS
        default 0
    endif

And many other boards are missing this configuration (e.g. stm32 series).
Making this the default helps get non-XIP just working

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-06-13 20:15:35 -04:00
Nicolas Pitre
13660dd7b9 demand_paging/backing_store/ram.c: misc fixups
First, do align the buffer. The slab code puts pointers in there and it
does not like it if those are not properly aligned.

And return the actual error code from k_mem_slab_alloc() even if errors
shouldn't happen (it did happen to me because of the above ... with
assertions disabled).

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 20:12:23 -04:00
Nicolas Pitre
baa70d8d36 arch/arm64/mmu: fix page table reference counting part 2
Commit f7e11649fd ("arch/arm64/mmu: fix page table reference
counting") missed a case where the freeing of a table wasn't propagated
properly to all domains. To fix this, the page freeing logic was removed
from set_mapping() and a del_mapping() was created instead, to be usedby
both by remove_map() and globalize_table().

A test covering this case should definitely be created but that'll come
later. Proper operation was verified through manual debug log
inspection for now.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 17:03:33 -04:00
Daniel DeGrasse
65d2ae6939 doc: releases: migration-guide-3.7: add note for SSD16XXX displays
Add note for SSD16XXX displays, which have been migrated to the MIPI DBI
API. This note describes how to define the MIPI DBI wrapper device
needed for the SSD16XXX display

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 17:01:16 -04:00
Daniel DeGrasse
323adb9f08 tests: drivers: display: build_all: add ssd16xx
Add ssd16xx to display build test

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 17:01:16 -04:00
Daniel DeGrasse
8d2dc2f9ef drivers: display: ssd16xx: convert to MIPI DBI API
Convert SSD16XX display driver to use MIPI DBI API. This commit also
updates in tree board devicetrees to include the emulated MIPI DBI SPI
driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 17:01:16 -04:00
Emil Gydesen
2690cacf65 samples: Bluetooth: CAP: Add missing argument to get_chan_allocation
The sample was missing a argument to the function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 16:58:37 -04:00
Marcin Szymczyk
1d9907a712 soc: common: riscv-privileged: align to no SW ISR table
In case of no SW ISR table, `_isr_wrapper` does not exist.
Do not use it for exception handling.
Future improvements might include setting it to a user-defined handler.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-06-13 16:57:32 -04:00
Marcin Szymczyk
0b20e2afa7 arch: riscv: skip isr.S when SW ISR table is not generated
`isr.S` depends on `CONFIG_GEN_SW_ISR_TABLE`.
Do not build it if SW ISR table is not present.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-06-13 16:57:32 -04:00
Andries Kruithof
7902457437 Bluetooth: audio: test: Unittests for broadcast reception start
Implement unit tests for the broadcast reception start procedure,
both with proper and with improper parameters.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-06-13 16:48:58 -04:00
Mahesh Mahadevan
b2d1e4505f boards: frdm_mcxn947: Add Display support
Add support for the LCD-PAR-S035 display over the
FlexIO interface.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Mahesh Mahadevan
3fbd689eaa boards: shield: Add a shield for the NXP LCD-PAR-S035 LCD module
NXP LCD-PAR-S035 LCD module will be used by FRDM-X evaluation
kits with a parallel LCD connector.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Mahesh Mahadevan
b219596cc1 drivers: mipi_dbi: Add controller driver for NXP FlexIO LCD
Add a driver to support the NXP FlexIO LCD controller that uses
8080/6800 bus protocol.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Mahesh Mahadevan
3dd5ffe20a drivers: display: st7796: Update the logic to invert RGB and BGR
1. Add a property for panels where the RGB is displayed as BGR.
2. Add a check for 8080 8-bit mode and invert RGB and BGR for
   this case.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Mahesh Mahadevan
6236779d32 drivers: display: Update setting the mode in the st7796s driver
MIPI mode is read from the device tree.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Mahesh Mahadevan
53b5dbfb88 include: mipi_dbi: Add defines for MIPI Type A and B
Add defines for MIPI DBI Type A based on Motorola 6800
and Type B baedon Intel 8080 bus

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Mahesh Mahadevan
c396d8bdbc drivers: clock_control: Update NXP LPC Syscon driver to add FlexIO
Add support to get FlexIO clock

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Björn Stenberg
1e3fd5361f modbus_serial: Disable rx interrupt if buffer fills up
Disable rx interrupt if the buffer fills up so that rtu_timer can fire and
process the buffer.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
2024-06-13 16:48:05 -04:00
Hess Nathan
f3679ab2c2 coding guidelines: comply with MISRA Rule 7.4
avoided to assign string literals to non-const char *

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-13 16:47:41 -04:00
Johann Fischer
0dc1414237 samples: usb: remove hid-cdc sample
We have some other simpler CDC ACM and HID samples in the tree.
Providing multiple functions is a core functionality of USB device
support, and we have other samples to demonstrate this as well. This
sample does not really provide anything unique, but has a few issues
such as unsafe HID buffer handling and calling uart_fifo_fill() outside
of the UART driver's IRQ context.
Remove the hid-cdc sample, as there is no value in this sample, and to
avoid spending time fixing and cleaning up the code.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-13 16:47:22 -04:00
Marek Matej
51e5f2d3e5 soc: espressif: esp32c3: reorder ROM sections
This covers the cases described in common-rom-common-kernel-devices.ld
Changing the order of .rodata and .text we prevents to create an
overlapped segments issue.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-13 16:47:05 -04:00
Marek Matej
7bf47f8e8f soc: espressif: esp32c3: improve memory utilization
Change the MCUboot segments layout to incread the memory
available in the application.
Add missing symbols to mcuboot.ld

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-13 16:47:05 -04:00
Yong Cong Sin
b98a60773b shell: kernel: add command to unwind a thread
Add a shell command to unwind a thread using its thread id.

uart:~$ kernel threads
Scheduler: 11 since last call
Threads:
*0x80017138 shell_uart
        options: 0x0, priority: 14 timeout: 0
        state: queued, entry: 0x800029ac
        stack size 3072, unused 1316, usage 1756 / 3072 (57 %)

 0x80017ca8 sysworkq
        options: 0x1, priority: -1 timeout: 0
        state: pending, entry: 0x80006842
        stack size 1024, unused 644, usage 380 / 1024 (37 %)

 0x800177e0 idle
        options: 0x1, priority: 15 timeout: 0
        state: , entry: 0x800065ae
        stack size 512, unused 180, usage 332 / 512 (64 %)

 0x80017950 main
        options: 0x1, priority: 0 timeout: 13
        state: suspended, entry: 0x80006326
        stack size 4096, unused 3604, usage 492 / 4096 (12 %)

uart:~$ kernel unwind 0x80017ca8
Unwinding 0x80017ca8 sysworkq
ra: 0x80007114 [z_swap+0x58]
ra: 0x80007ae8 [z_sched_wait+0x10]
ra: 0x8000689a [work_queue_main+0x58]
ra: 0x800006de [z_thread_entry+0x2e]

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-13 16:46:48 -04:00
Yong Cong Sin
61a0f9f1c0 arch: riscv: stop printing symbol name at mepc
Now that the unwind starts from mepc already, the symbol
name at the mepc reg is kinda redundant, so just remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-13 16:46:48 -04:00
Yong Cong Sin
726fefd12c arch: riscv: stacktrace: implement arch_stack_walk()
Created the `arch_stack_walk()` function out from the original
`z_riscv_unwind_stack()`, it's been updated to support
unwinding any thread.

Updated the stack_unwind test case accordingly.

Increased the delay in `test_fatal_on_smp`, to wait
for the the fatal thread to be terminated, as stacktrace can
take a bit more time.

Doubled the kernel/smp testcase timeout from 60 (default) to
120s, as some of the tests can take a little bit more than 60s
to finish.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-13 16:46:48 -04:00
Yong Cong Sin
5121de6e73 arch: introduce arch_stack_walk()
An architecture can indicate that it has an implementation for
the `arch_stack_walk()` function by selecting
`ARCH_HAS_STACKWALK`.

Set the default value of `EXCEPTION_STACK_TRACE_MAX_FRAMES` to
`ARCH_STACKWALK_MAX_FRAMES` if the latter is available.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-13 16:46:48 -04:00
Maciej Perkowski
3137829e72 boards: nrf: Update nrf54h and nrf54l yamls to use sysbuild in twister
Nrf54h's and nrf54l's targets are the first targets complex enough
that a sysbuild must be used on every build for them. This information
is reflected in their yamls. These entries tell twister to always use
sysbuild for those targets.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-13 16:46:25 -04:00
Maciej Perkowski
da1066fa4b twister: Add sysbuild boolean to platform definitions
More complex platforms require sysbuild to use always, even for
such "simple" samples like hello_world. Such platforms can have
`sysbuild: true` entry in their board_name.yaml used by twister.
Using such entry will tell twister, that sysbuild must always be used
on a given platform.
Twister is aligned to have information about need of sysbuild at
instance (platform + suite) level (was only at suite level before).
Instance.sysbuild is true whenever a test suite or a platform requires
sysbuild.
Twister pytest unit tests are aligned with changes.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-13 16:46:25 -04:00
Declan Snyder
e902a08832 boards: frdm_rw612: Simple enablements collection
A collection of simple enablements to match some of the enablement
done for rd_rw612_bga as closely as possible on the frdm_rw612 board.

- i2c
- spi
- dma
- mrt
- ctimer
- os timer
- dac
- adc
- trng (alread was enabled but now listed support)
- watchdog

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-13 16:44:12 -04:00
Bjarki Arge Andreasen
5c24c79a90 modem: pipe: simplify synchronization
The design of the pipe is overly complicated compared to the
in-tree and planned future use of the pipe module.

The pipe is currently designed to protect against multiple
threads calling any API simultaineously. This is not neccesary
as only one thread ever calls open/close/transmit/receive at
once, while the notification APIs are potentially called by a
different thread.

This commit removes the synchronization of calls to the open/
close/receive/transmit APIs. It also uses a k_event for thread
safe event and state handling instead of a k_mutex and k_condvar.

The callback is proteced by a k_sem as it modified using the
attach/release APIs, which can be called simultaneously to a
thread invoking the callback.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-13 16:43:49 -04:00
Luca Burelli
87e1ab83c9 llext: tests: fix "mps2/an385/*_mpu" OOM
With the ztest code added, tests were failing with -ENOMEM on the
mps2/an385/*_mpu platform due to alignment requirements.

Increase the llext test heap size to 32Kbytes to avoid this.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-13 16:43:26 -04:00
Luca Burelli
d25563f59a llext: tests: re-initialize variables
Some tests depend on global initialized variables, which are then
modified during the test. When enabling user mode, the functions are
called multiple times but the variables are not reinitialized, resulting
in a test failure.

This patch adds a run_id variable to the tests to reinitialize the
variables when the test is called multiple times. It is purposefully
initialized to 41 at startup to detect if the variable is not set up
properly by the llext loader.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-13 16:43:26 -04:00
Luca Burelli
42a0d18ecf llext: tests: add zassert macros everywhere
Most of the current llext tests did not actually check the results of
the tests, so the CI reported a pass even if something was wrong when
looking at the logs. This patch adds the appropriate zassert_* macros to
all the tests, to ensure that they actually perform correctly.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-13 16:43:26 -04:00
Marek Matej
0153b34c4c manifest: hal_espressif update
Update the hal_espressif to include latest esptool version.
Improve support for new SoCs as such as ESP32-C6.
Fix bugs related to segment alignment.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-13 16:43:07 -04:00
Aksel Skauge Mellbye
2a4417bb8e soc: silabs: Fix CMake test for soc family
Kconfig options need CONFIG_ prefix when tested for in CMakeLists.txt.

Fixes regression introduced in e90c89d453
that causes all apps to fail to initialize on Silabs socs.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-13 16:42:50 -04:00
Benjamin Cabé
94ded47fa7 drivers: crypto: make driver API and conf structs const
Save precious RAM by making sure driver API and config structs are
declared as const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 16:42:35 -04:00
David Schneider
0e830b3f10 doc: kernel: fix braces in code example
Add missing closing brace to `k_poll()` loop example.

Signed-off-by: David Schneider <david.schneider@chargepoint.com>
2024-06-13 16:42:04 -04:00
Phi Bang Nguyen
e2cdd92a52 boards: nxp: mimxrt1064: Remove display chosen node
As display stuffs have been moved to a shield, the display chosen node
must be removed as well as chosen node requires the node to be enabled.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-13 11:11:59 -05:00
Nikodem Kastelik
d67abdd02a tests: boards: nrf: add tests for dmm component
Added tests verify output and input buffers allocation
using dmm component.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-13 12:02:33 -04:00
Nikodem Kastelik
37e511bcbf soc: nordic: add dmm component
DMM stands for Device Memory Management and its role is to streamline
the process of allocating DMA buffer in correct memory region
and managing the data cache.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-13 12:02:33 -04:00
Nikodem Kastelik
ea361f095c boards: nordic: nrf54h20dk: add DMA attribute to RAM21 & RAM3x
This attribute denotes that DMA operation
can be performed from a given region.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-13 12:02:33 -04:00
Tomasz Moń
6d5edf9255 tests: usb: fix build all test on qemu_cortex_m3
Reduce RAM disk size from 192 sectors down to 1 sector to solve linking
issue due to qemu_cortex_m3 target having too little RAM. The RAM disk
size does not really matter in this test case and should be as small as
possible.

Enable test random generator to solve missing sys_rand_get() required by
networking subsystem.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-13 12:01:31 -04:00
Vinayak Kariappa Chettimada
a568acbfea Bluetooth: Controller: Fix regression due to use of TMR_START_DELAY_US
Fix regression due to use of HAL_RADIO_TMR_START_DELAY_US
introduced in commit 11bae5cfa9 ("Bluetooth: Controller:
Fix missing radio timer comp and range delay").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-13 12:01:22 -04:00
Mark Wang
1fabbe01f5 samples: usb: enable next usb device stack samples on NXP platforms
enable next usb device stack samples (cdc_acm, mass and shell)
on rt685 and mimxrt1060_evk

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Mark Wang
0c70a72ac7 boards: nxp: enable mcux udc on lpc55s69, rt1060 and rt685
set DT node as Okay in board device tree;
add board level's d-cal, txcal45dp and txcal45dm to usbphy node;
enable usb clock; set USB_STACK_USE_DEDICATED_RAM for lpc55s69 and rt685;
load usb.ld for lpc55s69 and rt685.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Mark Wang
b6b43c3ed7 drivers: udc: implement udc_mcux_ehci and udc_mcux_ip3511
udc_mcux_ehci is based on the MCUX USB controller driver
(usb_device_ehci.c); udc_mcux_ip3511 is based on the
MCUX USB controller driver (usb_device_lpcip3511.c);
add related Kconfig and CMake; include the usb_phy.h path in
modules/hal_nxp/usb/CMakeLists.txt because udc_mcux.c use it;
add related macros to usb_device_config.h;
update CMakeLists for udc_mcux_ehci and udc_mcux_ip3511.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Mark Wang
a4e411bd13 dts: arm: nxp: enable udc DT on lpc55s69, rt1060 and rt685
define usbphy in DT and controller DT node ref to usbphy node.
define the usbphy yaml and update ehci and ip3511 yaml for usbphy.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Jonathon Penix
97a734aa01 cmake: llvm: arm64: Set arm64 flags when building with clang
Ensure --target and -mcpu/-mfpu/-mtune are set appropriately when building
with clang targeting arm64/aarch64.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-06-13 17:58:04 +02:00
Jonathon Penix
fb98adc323 kconfig: llvm: arm64: Advertise TLS support when using llvm for arm64
clang and lld both support TLS for arm64/aarch64, so advertise this
support in Kconfig.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-06-13 17:58:04 +02:00
Luis Ubieda
253de6c7a2 samples: shell: shell_module: Add README
With basic description of registering different types of Shell commands.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-13 17:57:36 +02:00
Luis Ubieda
18b19150af doc: shell: Add section for commonly-used commands
With details on how to enable them.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-13 17:57:36 +02:00
Luis Ubieda
b831543137 doc: shell: Changes to restructure Backends documentation
- Unify shell backends in a dedicated section.
- Add documentation for the following backends: USB, BLE, RTT.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-13 17:57:36 +02:00
Emil Gydesen
e5df99082b MAINTAINERS: Add BT CAP samples to LE audio group
Add the CAP initiator and acceptor samples to the files
for Bluetooth Audio.

This will also automatically support a future
CAP Commander sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 17:56:58 +02:00
Emil Gydesen
c07a87abbb tests: Bluetooth: Audio: Add BSIM test of the CAP samples
Adds babblesim tests of the CAP Acceptor and the CAP Initiator
samples for unicast.

This simply checks if at least one stream is connected
and is sending (empty) data.

This modifies the samples to send data as well as counting the
receive ISO data packets.
Ideally the TX would be superflous to verify that ISO is working,
but a missing feature in the Zephyr LL makes it a requirement.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 17:56:58 +02:00
Emil Gydesen
daf7d8066a Samples: Bluetooth: Add CAP acceptor unicast sample
Adds a CAP acceptor unicast sample that simply
uses the CAP acceptor implementation to setup
streams with a CAP initiator.

To keep it simple no audio or encoding support
has been added.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 17:56:58 +02:00
Emil Gydesen
a712315793 Samples: Bluetooth: Add CAP initiator unicast sample
Adds a CAP initiator unicast sample that simply
uses the CAP initiator unicast API to setup
streams with a CAP acceptor.

To keep it simple no audio or encoding support
has been added.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 17:56:58 +02:00
Jeronimo Agullo
436f56646b boards: sparkfun: Add micromod nrf52840 board and asset tracker shield
Initial support of Sparkfun Micromod ecosystem with micromod nrf52840
board, asset tracker shield and micromod header definition.

Signed-off-by: Jeronimo Agullo <jeronimoagullo97@gmail.com>
2024-06-13 17:55:42 +02:00
Frederic Pillon
b7b7ce08cf board: st: enhance zephyr console support
Use Kconfig to properly select console interface.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
2024-06-13 17:54:18 +02:00
Ping Wang
57be858846 Bluetooth: audio: BAP Broadcast Assistant support for multiple connections
The current implementation of the BAP Broadcast Assistant only supports a
single connection. This PR makes broadcast assistant support multiple BAP
scan delegators.

Fixes: #67523

Signed-off-by: Ping Wang <pinw@demant.com>
2024-06-13 17:53:47 +02:00
Jamie McCrae
c0c51a8d40 scripts: west: flash: Fix issue with loading outdated domain file
Fixes an issue whereby the domains file in sysbuild projects
would be loaded and used with outdated information if sysbuild
configuration was changed then west flash was ran directly after
it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-13 17:53:00 +02:00
Ciprian Regus
9b2a8574ea boards: adi: Add AD-APARD32690-SL
Add board support for the ADI AD-APARD32690-SL. The platform is based on
a MAX32690 microcontroller, it has an Arduino-Mega compatible header and
2 PMOD connectors. Also, a 10 Mbps single-pair Ethernet link is enabled
by using the ADIN1110 10BASE-T1L MAC/PHY.

Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
2024-06-13 17:52:37 +02:00
Maureen Helm
595fdb6089 drivers: serial: Set default baud rate and data bits in max32 driver
The uart-controller devicetree binding declares current-speed and
data-bits properties as optional, but the max32 uart driver failed to
build if they weren't defined. Fix the driver by falling back to
commonly used values for these properties.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-06-13 17:52:37 +02:00
Alberto Escolar Piedras
c11fccdadd tests/bsim/run_parallel: Avoid escape sequences in xml
Let's filter out escape sequences from the tests
output (for ex. color escapes) as those corrupt
the xml.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00
Alberto Escolar Piedras
1a67e910b8 tests/bsim: Test also nrf54l15bsim
Also run the multiple_id test on the nrf54l15bsim target
to validate the controller when running on this
platform which has both a different RADIO and other
peripherals.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00
Alberto Escolar Piedras
0209fa4196 ci: bsim tests: Move CI steps to separate scripts
So they can be easily run locally by users.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00
Alberto Escolar Piedras
c734f11abc ci: bsim tests: Merge and publish results as in twister flow
Let's merge the results and publish them as in the
twister workflow.
It is nicer to not select files by hand and produces
a nicer report.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00
Alberto Escolar Piedras
1236269bbb tests/bsim/run_parallel.sh: Move filter to one place
Move the shell script filter to a single place,
and ignore also files starting with "ci."

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00
Abderrahmane Jarmouni
ed95cd9ab3 samples: boards: stm32: no need to configure button pin
The gpio pin that will be used as a source for PWR wake-up pins does not
actually need to be configured as input, hence input_gpio_keys driver does
not need to be involved. As far as GPIO controller is concerned, the pin
can be in analog state.

Also, it's clearer & safer to call gpio_pin_configure_dt directly in the
application with the STM32_GPIO_WKUP flag, just before calling Poweroff,
instead of relying on a driver, like input_gpio_keys to do it just after
boot behind the scenes, & risk not having the correct wake-up pins config
when Poweroff is finally called.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-13 17:51:43 +02:00
Torsten Rasmussen
5722576186 sysbuild: clear local scope EXTRA_CONF_FILE variable
Sysbuild sets the EXTRA_CONF_FILE before loading kconfig.cmake.
This hides any user defined EXTRA_CONF_FILE added to the sysbuild cache.

Clear the local sysbuild EXTRA_CONF_FILE so that the hidden cache
variable re-enters current scope.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-13 17:51:14 +02:00
Robert Lubos
0d3a021379 net: dhcpv4: Reset Renewal/Rebinding times on ACK
In case no Renewal/Rebinding times have been provided the server via
DHCP options, we should reset their values on ACK, so that the client
can recalculate the defaults. This is important, as the lease time may
change, so we should recalculate default T1/T2 timeout based on the new
lease time value.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-13 17:50:52 +02:00
Robert Lubos
4d4391bf1c net: dhcpv4: Reimplement RENEW/REBIND logic according to RFC2131
DHCP Request retransmission in RENEW and REBIND states was not
compliant with RFC2131.

The retransmission interval should not be calculated as in REQUESTING
state in such case, but rather calculated based on the remaining T2
or lease time (depending on current state).

RFC doesn't also mention any retransmission count limit for those
states. The client should retransmit the REQUEST until T2 or lease
expiry time are reached.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-13 17:50:52 +02:00
Erik Tamlin
27ca9bf103 manifest: update percepio
Update the percepio module to use TraceRecorder v4.9.1.hotfix1.
Fixed pointer cast warning.

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
2024-06-13 17:50:29 +02:00
Erik Tamlin
157c364f6e manifest: update percepio
Update the percepio module to use TraceRecorder v4.9.1.hotfix1

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
2024-06-13 17:50:29 +02:00
barry batsbak
2b7a39e83c drivers: wifi: add bssid/mac to wifi_scan result
copy bssid in wifi scan result if set

Signed-off-by: barry batsbak <sonofviking@protonmail.com>
2024-06-13 17:50:08 +02:00
Bjarki Arge Andreasen
494fab8ea4 modem: chat: patch unintended behavior in modem_chat_run_script()
Trying to start a chat script using either modem_chat_run_script()
or modem_chat_run_script_async() should result in returning -EBUSY
without affecting the currently running script and thread waiting
on the current script to stop.

The current behavior causes the thread waiting for the current
script to stop to return with error -EAGAIN, and the thread trying
to start the new script to return with error -EBUSY.

This commit moves the reset of the sem the current thread is
waiting on, to after the check of whether a script is currently
running, leaving the current thread unaffected as is intended.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-13 17:49:23 +02:00
Dong Wang
22061bd7a8 drivers: loapic: move 'z_loapic_int_vec_set()' into pinned section
Move it out of boot section because it's also called by none-boot function
'loapic_resume()' at runtime. Better to keep boot-only things in boot
section to avoid paging in boot section things at runtime.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-13 17:49:01 +02:00
Alberto Escolar Piedras
5d1afa1a3b tests: Bluetooth: bap_broadcast_source: Fix call
bt_audio_codec_cfg_get_chan_allocation() now takes an
extra parameter.
Let's set it to the value which keeps the old behaviour.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 11:47:14 -04:00
Valerio Setti
3f3c2cf0f7 bsim: fix missing parameter in BT audio source test
PR #72571 added fallback functions to BT audio, but not all bsim
tests were properly updated to use new functions signatures. This
commit fixes a remaining error with the same pattern as the
original PR did for "bap_broadcast_sink_test.c".

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-13 11:47:14 -04:00
Francois Ramu
df788d0b41 samples: drivers: flash_shell does not run on stm32h745/m4 boards
Do not run the samples/drivers/flash_shell application on the
stm32h745i_disco//m4 as the flash controller is not supported yet
on the M4 core (only M7). Just like the nucleo stm32h745//m4
is excluded.
Also exclude stm32h7rs disco at the moment (still TODO).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-13 08:23:16 -04:00
Alberto Escolar Piedras
ed84b2993a boards apollo4p*: Provisionally disable in twister
These boards fail to build for several samples & tests
which is blocking CI.
Let's provisionally disable them until the matter is properly
resolved.

See
https://github.com/zephyrproject-rtos/zephyr/issues/72775
https://github.com/zephyrproject-rtos/zephyr/issues/73443
https://github.com/zephyrproject-rtos/zephyr/issues/74212
for more information.

Once these issues are fixed, this change should be reverted.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 08:19:45 -04:00
Timothy Keys
570c86d1ef Bluetooth: Controller: Add Kconfigs to enable Connection Subrating
Add Kconfigs to enable experimental subrating HCI commands.

Signed-off-by: Timothy Keys <timothy.keys@nordicsemi.no>
2024-06-13 08:06:11 -04:00
Erwan Gouriou
0a8c3a6e27 soc: stm32: Enable prefecth when missing
Enable ART prefetch when not already done.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-13 08:05:04 -04:00
Erwan Gouriou
a4fc1b2cfa soc: stm32c0 Enable ART acceleration
Enable instruction cache as well as prefetch.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-13 08:05:04 -04:00
Erwan Gouriou
a9fb2c4dff soc: stm32g4: Enable ART acceleration
Enable instruction and data cache as well as prefetch.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-13 08:05:04 -04:00
Erwan Gouriou
76d8be4fe6 soc: stm32: stm32wb: Enable ART accelerations
Enable instruction and data cache as well as prefetch.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-13 08:05:04 -04:00
Rubin Gerritsen
9984adf24e Bluetooth: Host: Support concurrent initiating and scanning
The HCI command LE Read Supported States command returns
if the controller supports running the scanner and initiator
roles in parallel.

This commit utilizes this information in the host:
- It does not prevent initiating a connection when the scanner is
  running
- It does not prevent the host from restarting the background
  scanner when there the host wants to auto-initiate a connection.
- It does not stop the scanner when the host wants to auto-initiate
  a connection.

To support this feature, the scanner and initiator
always have to use the same address.
This because the HCI command LE Set Random Address
cannot be issued after the initiator or scanner has started.
1. When privacy is disabled, the scanner has to use its identity
   address to ensure it uses the same address as the initiator.
2. Only one identity is supported.

To simplify the implementation, it is a requirement to use
extended advertising commands to avoid interfering with
the random address used by the advertiser(s).

Also, it is a requirement to never use time-limited scanning,
as RPA this feature does not work when privacy is being used.
See https://github.com/zephyrproject-rtos/zephyr/issues/73634.

The changes in this commit will be tested out of tree as the
Zephyr Bluetooth Controller does not support this functionality.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-13 08:04:42 -04:00
Nithin Ramesh Myliattil
df45858d0f Bluetooth: BAP: Broadcast Source: Update stream codec config data
When creating a BAP broadcast source with bt_bap_broadcast_source_create
only the subgroup information is stored in the streams and the remaining
BIS specific information is not stored in the stream->codec_cfg,
which it should.
Fix is to store bis specific information also in stream codec config.
Updated broadcast source BSIM test to verify above usecase.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-06-13 08:04:27 -04:00
Juha Kuikka
14c2be6d9d twister: Capture qemu launch stdout and stderr
Currently we launch qemu (well, "ninja run" usually) using Popen and
request stdout and stderr to be redirected into a pipe. However we never
read that pipe so the information is not captured.

Instead log directly into files that can be inspected after a failed
to to find out why qemu run failed.

Note that this is really only useful in cases where qemu either fails to
launch or crashes.

Regular test data is still handled via the qemu fifo.

Signed-off-by: Juha Kuikka <juha.kuikka@gmail.com>
2024-06-13 08:04:07 -04:00
Fabio Baltieri
2c5b09cbda usb: device_next: rename the rate properties to use the correct unit
The polling properties are a period in us but are named as "-rate" right
now, which would imply that that's a frequency. Rename them to
"period-us" to make that unambiguous.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-13 08:03:49 -04:00
Rubin Gerritsen
5098bf3539 Bluetooth: Host: Callback registering functions to return status
Returning a status code will allow the application developer
to detect logic issues.

We consider this as not breaking the API.
If `-Werror -Wunused-result` is enabled, the application developer needs
to validate the return code.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-13 08:03:28 -04:00
Rubin Gerritsen
3eb975deb2 Bluetooth: Host: Rename callback_list -> conn_cbs
This improves consistency with other callback lists like
scan_cbs and pa_sync_cbs.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-13 08:03:28 -04:00
Rubin Gerritsen
2ec3cd307c Bluetooth: Host: Avoid registering callback twice
Callbacks can only be registered once. Otherwise the slist
will become circular.

In this commit we have choosen to ignore the second registration
call if the callback has already been registed. The alternative
is to trigger an assertion. That doesn't work if the assertions
are turned off.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-13 08:03:28 -04:00
Rubin Gerritsen
6e6bb26107 Bluetooth: Host: Conn callback list to use slist
This allows us to use functionality provided by slist.
First use case: Avoid adding an element twice.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-13 08:03:28 -04:00
Marc Herbert
d3a1ce8791 doc: languages: add new section "headers and C/C++ compatibility"
Writing headers compatible with both C and C++ _and_ a range of
toolchains can be very challenging, see for instance long discussions in
commit c15f029a71 ("init.h: restore designated initializers in
SYS_INIT_NAMED()"), PR #69411 and a few others linked from there.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-06-13 08:03:13 -04:00
Andries Kruithof
d3f91adb25 Bluetooth: audio: BAP broadcast assistant magic numbers and minor fixes
There are some hardcoded numbers in the test, which here are replaced
with the proper defines.

The test will now also FAIL if we go in an inapropriate state

A guard has been added around the call to bt_le_per_adv_sync_transfer,
so that it only gets called when PAST support is available

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-06-13 08:02:59 -04:00
Benjamin Cabé
a156b619d4 doc: develop: tools: Exclude webp images from PDF
Until Sphinx 7.4.0 is out, it's not possible to use .webp in Latex/PDF
See https://github.com/sphinx-doc/sphinx/pull/12224

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 08:02:45 -04:00
Benjamin Cabé
22535a99ab drivers: clock_control: litex: declare unmuttable map as const
Save precious RAM by declaring DRP reg->size map as const as it's
immutable

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 08:02:26 -04:00
Benjamin Cabé
6403280142 drivers: clock_control: make driver API and conf structs const
Save precious RAM by making sure driver API and config structs are
declared as const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 08:02:26 -04:00
Knut Eldhuset
db9308d180 Bluetooth: doc: Add missing doc in bt_gatt_attr
Adds missing doc on public member.

Signed-off-by: Knut Eldhuset <knut.eldhuset@nordicsemi.no>
2024-06-13 08:02:08 -04:00
Nazar Palamar
17889d23b9 driver/bluetooth: Added initial version of hci cyw208xx driver
Added initial version of hci cyw208xx driver

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-13 05:52:19 -04:00
Adrien Ricciardi
61474ac99e doc: storage: nvs: Tell about optional data CRC
The CONFIG_NVS_DATA_CRC configuration item allows to enable a CRC-32
on the data part of the NVS items.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-13 05:51:56 -04:00
Adrien Ricciardi
e13840c872 tests: fs: nvs: Add a test scenario for data CRC
Adapt the test_nvs_gc_corrupt_close_ate test to forge the data CRC.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-13 05:51:56 -04:00
Adrien Ricciardi
b76d630682 fs: nvs: Add CRC-32 to protect data
Allow to protect the data part of each NVS item with a 32-bit CRC.
This uses 4 more bytes per NVS item.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-13 05:51:56 -04:00
Nicolas Pitre
6cc9d7ec20 tests: arm64: exercize MMU page table allocation and recycling
This code was never formally tested before... and without the preceding
commit it obviously didn't work either.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 05:47:24 -04:00
Nicolas Pitre
f7e11649fd arch/arm64/mmu: fix page table reference counting
Existing code confused table usage and table reference counts together.
This obviously doesn't work. A table with one reference to it and one
populated PTE is not the same as a table with 2 references to it and
no PTe in use.

So split the two concepts and adjust the code accordingly. A page needs
to have its PTE usage count drop to zero before the last reference is
released. When both counts are 0 then the page is free.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 05:47:24 -04:00
Lothar Felten
0a2e4d1b5f boards: lilygo: ttgo_lora32: initial support
adds initial support for Lilygo TTGO LoRa32 board
dts: vendor-prefixes: add vendor lilygo

Co-authored-by: Benjamin Cabé <kartben@gmail.com>

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-06-13 05:46:10 -04:00
Lyle Zhu
c4df21e8bd Samples: bluetooth: hf_ag: Add board specific configuration
Overlay sram when BT is enabled on board MIMXRT1170 EVKB.

Select NXP NW612 chipset for Handsfree_ag example

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Lyle Zhu
6c01c0c13a module: hal_nxp: bt_controller: Verify if Blob is valid
Use zephyr_blobs_verify to check the blob file is valid
or not.

The function zephyr_blobs_verify will check if the file
exists. And it checks if the file is valid.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Lyle Zhu
35204de197 boards: mimxrt1170_evk: doc: add blobs support
Add `fetch Binary Blobs` section to guide how to
fetch binary blobs.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Lyle Zhu
79e1b48ab1 Samples: bluetooth: hf: Add board specific configuration
Overlay sram when BT is enabled on board MIMXRT1170 EVKB.

Select NXP NW612 chipset.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Lyle Zhu
d74698a36b driver: bluetooth: hci: Support NXP BT CTLR FW blobs
Add Kconfig.nxp to support NXP Bluetooth Chipset.
Current only NXP IW612 Chipset (BT_NXP_NW612) has
been supported.

Add modules/hal_nxp/bt_controller/CMakeLists.txt to
determine whether any firmware is selected, and
check whether the firmware exists.

If the firmware exists, copy the firmware to the
temporary folder ${ZEPHYR_BINARY_DIR}/include/
generated/bt_nxp_ctlr_fw.h. OR, raise a fatal error.

In file hci_nxp_setup.c, includes the temporary file
bt_nxp_ctlr_fw.h.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Lyle Zhu
d164f9c0bb driver: bluetooth: hci: Add NXP BT module support
Implement UART firmware download driver for NXP
BT module.

Only support Murata 2EL M.2 module on RT1170EVKB.

And only one instance can be supported now.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Simon Hein
02577afe3a doc: safety: Requirment repo and guidelines
Add documentation to point to the requirements repository
and give the contributors a guideline how to add requirements
to that repository.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-06-13 05:45:02 -04:00
Konrad Derda
cb3c087350 net: ipv6: mcast_routing: hop limit handling
While forwarding a multicast packet decrement hop limit in a common net
buffer. Also, packets with hop limit equal to 0 should not be forwarded.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-06-13 05:44:30 -04:00
Emil Gydesen
a62ee400dc tests: Bluetooth: CAP: Add initial CAP initiator unit tests
These test only test the basic functionality of
bt_cap_initiator_unicast_discover so far, but will be expanded.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 05:42:04 -04:00
Emil Gydesen
db4d4cfda2 Bluetooth: Audio: Add fallback to cfg_meta_get_pref_context
Added a fallback parameter to
bt_audio_codec_cfg_meta_get_pref_context
as absence of pref context in BAP implicitly means a unspecified
for LC3.

In the case that it is absent BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED
is the returned value.

While the metadata for codec cfg and codec cap are similar,
this only applies for codec cfg as per BAP.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 05:41:47 -04:00
Emil Gydesen
c4b3b72b07 Bluetooth: Audio: Add fallback to max_codec_frames_per_sdu
Added a fallback parameter to
bt_audio_codec_cap_get_max_codec_frames_per_sdu
as absence of max codec frames per SDU in BAP implicitly
means a single frame for LC3.

In the case that it is absent 1 is the returned value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 05:41:47 -04:00
Emil Gydesen
579b4f7e37 Bluetooth: Audio: Add fallback to supported_audio_chan_counts
Added a fallback parameter to
bt_audio_codec_cap_get_supported_audio_chan_counts
as absence of channel count in BAP implicitly means a single channel
for Lc3.

In the case that it is absent 1 is the returned value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 05:41:47 -04:00
Emil Gydesen
a33543f02e tests: Bluetooth: Audio: Fix bad values in codec cap unit tests
Some codec cap unit tests were using codec cfg values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 05:41:47 -04:00
Emil Gydesen
c6cc034b5c Bluetooth: Audio: Add fallback to get_chan_allocation
Added a fallback parameter to
bt_audio_codec_cfg_get_chan_allocation as absence of
channel allocation in BAP implicitly means Mono.
In the case that it is absent,
BT_AUDIO_LOCATION_MONO_AUDIO is the returned value.

This commit also fixes the implementation of
bt_audio_codec_cfg_get_frame_blocks_per_sdu as it only applies to
LC3 (as per the BAP spec). It also adds additional testing of it

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 05:41:47 -04:00
Adam Wojasinski
f16d556e04 MAINTAINERS: ptp: Add PTP entry to the maintenance list
Introducing a new PTP maintenance entry with awojasinski
as maintainer.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
3684294a64 samples: net: ptp: Add sample for PTP
This application demonstrates PTP functionality

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
34c1fcc939 drivers: eth: native: Align to support ptp_clock driver for PTP subsys
Add conditions to enable ptp_clock driver implementation
for native_posix when PTP subsystem is enabled.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
4a989b736e doc: net: ptp: Add PTP library documentation
Add documentation page for IEEE 1588-2019 (PTP) library.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
08689e1a20 net: ptp: Network interface status check in PTP thread
Adding network interface status monitor function. Depending
on the interface operation state and change of the state
events are generated and handled by the function.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
28111ba254 net: ptp: Implement PTP thread
This commit adds implementation of the PTP thread that will
poll sockets descriptors and PTP Port's timeres for timeouts,
generate events and handle them and trigger STATE_DECISION_EVENT
handling when needed.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
db07aa2c00 net: ptp: Add handler for STATE_DECISION_EVENT
The STATE_DECISION_EVENT in PTP is a pivotal mechanism that
facilitates dynamic state management within the protocol,
allowing devices to adapt their operational states based on the BTCA's
recommendations and the health of the network.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
edfe4cd8cc net: ptp: Add event generation and event handler for PTP Port
Introduction of PTP stack's core functions responsible for
event generation and handling of these events. Events are generated
base on timeouts and/or PTP messages received via BSD sockets
assigned to a specific PTP Port. These function will be used
in PTP thread.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
f22f36dd90 net: ptp: Implement PTP Port enabling and disabling functions
The commit adds functions that enable and disable PTP Port.
This is going to be used by event handling routine.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
e14e878084 net: ptp: Add timers processing for PTP Port
Timers are used to trigger message transmission and detect
inactivity of other PTP Clocks what should result in an action
of the PTP Port.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
73eaab29a0 net: ptp: Add functions for messages transmission
This commit introduces routines for PTP message transmission.
It includes transmission of three types of messages (Announce,
Sync, Delay_Req) that should be send periodically depending
on the PTP Port's state.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
cb35cc919a net: ptp: Add management message processing
Introduction of routines processing received PTP Management messages.
The processing is split into clock-oriented and port-oriented parts.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
fe0cc7dd26 net: ptp: Implement Best TimeTransmitter Clock algorithm for PTP stack
Add handler for STATE_DECISION_EVENT it consists of following routines:
- state decision algorithm
- best timeTransmitter clock algorithm
- data sets comparison algorithm

Based on IEEE 1588-2019 section 9.3.3

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
577e58cb17 net: ptp: Implement PTP message processing for ports
This commit adds routines for handling incoming messages
needed for correct operation of the PTP stack in end to end
mode with multicast operation mode.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
5c4be2be8c net: ptp: Introduce routines for PTP Hardware Clock adjustment
Initial implementation of the clock adjustment and delay calculation.
Timestamp values used for calculations will be obtained from
proper PTP messages (Sync, Follow_Up, Delay_Req, and Delay_Resp)

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
9aabe2e477 net: ptp: Add foreign timeTransmitter records
Foreign timeTransmitters are other PTP Clocks in a domain. They announce
their parameters via announce messages. PTP Ports should record
these foreign timeTransmitters.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
0575a500ce net: ptp: Add PTP Port ID comparison function
Based on Port ID decision about message processing can be made.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
3d7dd0d6fa net: ptp: Add sockets to PTP stack
This commit introduces module responsible for sending and receiving
messages. It is based on BSD Sockets API.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
8016fa1de1 net: ptp: Extend TLV with Management TLVs
This commit adds handling of Management TLVs

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
806ba0dcd3 net: ptp: Add TLV extension to PTP
Add allocation of container used for TLVs and dummy functions for
preparing correct byte order of data. TLV stands for Type, Length,
Value, and it is extension of PTP messages that's used to transmit
extra information. This data is attached at the end of PTP message.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
8f00c5f4de net: ptp: Add byte order manipulation for PTP messages
Add functions preparing messages to network byte order before sending
and changing to host byte order after reception and before processing
by PTP stack.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
e17cf5868d net: ptp: Add PTP message allocation and management
Add dynamic memory allocation for PTP messages. Memory allocation
is done with Zephyr's memory slab. It's size can be configured
with `PTP_MSG_POLL_SIZE` Kconfig symbol.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
7e45be1bf2 net: ptp: Add definition of PTP messages types
Introduces definition of structures for all types of PTP messages
defined in the IEEE 1588-2019 standard.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
af09e4abfb net: ptp: Add Kconfig symbols and preprocessor guards for some states
Based on IEEE 1588-2019 some of PTP Port states might not be used
if the option of 17.7 is implemented. This patch prepares state
machine implementation for such scenario.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
2e7dbf1091 net: ptp: Add TIME_RECEIVER_ONLY feature
Implement possibility to configure PTP stack in TIME_RECEIVER_ONLY mode.
This restrics stack behaviour and doesn't allow for any PTP Port
of the PTP Clock become a TimeTransmitter Clock.

The change includes:
- Kconfig option
- Additional field in `struct ptp_port` structure
- New state machine function for a timeReceiver-only PTP Port.
- Extra steps in PTP Clock and PTP Port initialization.

New finite state machine is based on the figure 31
in section 9.2.5 of the IEEE 1588-2019.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
74a25772c5 net: ptp: Add PTP Clock and PTP Port initialization
This commit introduces PTP Clock and PTP Port structures
and API for initializing PTP Clock and PTP Ports. Configuration
options has been added as Kconfig symbols to configure parameters
of the Clock and Ports at compile time.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
70e3183c40 net: ptp: Add definitions for PTP datasets
Datasets defined in the header file are going to be used
in PTP Clock's structure and PTP Port's structure. They
gather data into structures defined in IEEE 1588-2019.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
424c3706d1 net: ptp: Add finite state machine implementation for PTP stack
The patch brings implementationof a state machine for full
PTP implementation. It returns new PTP Port's state based
on event that occured and previous state.

Based on the figure 30 in section 9.2.5 of the IEEE 1588-2019.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
6a40371790 net: ptp: Add derived data type header
The header's file content is based on 5.3 section of
the IEEE 1588-2019 standard describing Precise Time Protocol (PTP)
used to synchronize devices in the network.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
58a611d814 net: ptp: Initial PTP library implementation
This is an initial commit that introduces PTP library in the Zephyr.
It adds basic Kconfig symbols for enabling library, CMakeLists.txt
for compiling it, public header file, and initial PTP thread definition
and library initialization. Implementation of the functional PTP stack
will be introduced in following commits.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
ee06da545d net: socket: Add SO_TIMESTAMPING data to messages received via socket
Add returning timestamp of received packet in ancillary data buffer
in `msghdr` structure. This commit enables getting timestamp of
the received packet by calling `recvmsg()` function. The function
returns in the `msg_control` field timestamp if following criteria
are met:
- `CONFIG_NET_CONTEXT_TIMESTAMPING` is set
- `SO_TIMESTAMPING` socket option has `SOF_TIMESTAMPING_RX_HARDWARE`
  option enabled for that socket
- driver used by sockets supports packet timestamping

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
50cfe12f90 drivers: eth: eth_stm32_hal: Add support for rx/tx timestamping
Add handling of net_pkt flags that can be used to indicate that the
network packet should be timestamped.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
cf89e1ca29 net: socket: Add support for SO_TIMESTAMPING socket level option
This is the last commit of the set of patches that introduces
`SO_TIMESTAMPING` socket level optino in Zephyr. The patch
adds `SOF_TIMESTAMPING_RX_HARDWARE` and `SOF_TIMESTAMPING_TX_HARDWARE`
bitmasks. It can be extedned in the future to cover more timestamping
features. Currently the feature can be used with ptp_clock driver.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
7ef4f470e2 net: context: Add support for timestamping in network context
This is next commit from the set of patches that brings to the
Zephyr, SO_TIMESTAMPING socket level option. It stores timestamping
option bitmask that can be transfered to the net_pkt.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
56338de16a net: pkt: Add flags to indicate the pkt should be timestamped
This is the first commit from the set of patches that brings to the
Zephyr, SO_TIMESTAMPING socket level option. This enables to pass to
the network driver information whether given network packet should
be timestamped or not.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
c87c36d313 net: if: Increment the packet ref count when adding to timestamp queue
Added incrementation of the packet reference count when puting
the packet on the queue used in tx timestamping thread. This fixes
an issue when user wants to access the packet data in the timestamp
callback context. Before the fix was introduced if sockets were used
packet has been unreferenced before execution reached timestamp callback
context.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Chris Friedt
8281e869f4 posix: features: do not define _XOPEN_STREAMS if unconfigured
Rather than defining _XOPEN_STREAMS to -1 when not configured,
simply do not define it. This is consistent with other libcs.

This minor bit was overlooked in a recent commit.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-13 05:35:31 -04:00
Chris Friedt
e4ca6ff706 doc: posix: clean up xopen streams docs
This documentation was a bit unappealing. Add a
paragraph at the top to describe the level of support.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-13 05:35:31 -04:00
Chris Friedt
8b61b71818 posix: streams: add stub for missing putpmsg() function
The putpmsg() function was left unimplemented when other
functions in the _XOPEN_STREAMS Option.

Add a stub to complete the Option.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-13 05:35:31 -04:00
Pisit Sawangvonganan
fea0859b86 drivers: flash: stm32_qspi: make cmd_write_en definition as static const
Refactor the `QSPI_CommandTypeDef cmd_write_en` definition to
a `static const` local variable to eliminate redundant definitions.

This change enhances performance by reducing runtime overhead associated
with initializing `cmd_write_en` in multiple functions.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-13 05:34:29 -04:00
Théo Battrel
7c3a5d5c3a Bluetooth: Host: Add Per Adv Sync handle getter
The same way as `bt_hci_get_adv_handle` and `bt_hci_get_conn_handle` add
a function to get the handle of a periodic advertising sync.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-06-13 05:34:14 -04:00
Torsten Rasmussen
087dd96a34 cmake: use SOC_ROOT for SoCs instead of BOARD_ROOT
kconfig_soc_root was mistakenly set to value of BOARD_ROOT.
Fix this by correctly set kconfig_soc_root to the value of SOC_ROOT.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-13 05:33:38 -04:00
Thomas Stranger
ee923b538b tests: drivers: can: timing: enable all bitrates on stm32h5 boards
Enable testing of all CiA recommended bitrates on the nucleo_h563zi,
where I can test, and the stm32h573i_dk, which is the testing platform
for the stm32h5 series.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-06-13 05:33:06 -04:00
Thomas Stranger
042d9ea38a boards: arm: stm32: nucleo_h563zi enable can
Enable the FDCAN1 using pll1_q as clock source on pins TX/RX PD1/PD0.

Using 160MHz pll1_q output with an additional can clk-divider, to allow
other peripheral to use such a high clock source and to increase test
coverage.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-06-13 05:33:06 -04:00
Thomas Stranger
26f44a6d92 boards: nucleo_h563zi: change pll1 pllq frequency to 160MHz
In preparation for CAN support, this commit changes the q divier of PLL1
from 2 to 3 to result in a output frequency of 160MHz.
Using a can clk-divider of 2 a 80MHz Core clock frequency can be configured
which is recommended for can bit rates over 2MHz for good interoperability
between nodes.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-06-13 05:33:06 -04:00
Emil Gydesen
edbe34eaf2 Bluetooth: BAP: Add check for num_subgroups in parse_recv_state
In the parse_recv_state we did not verify that we can handle all
the subgroups before we started parsing them.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 05:32:43 -04:00
Jamie McCrae
49a05389b8 doc: release: 3.7: Add note on sysbuild UTF-8 fix
Adds a note that UTF-8 support for Kconfig passing has been
fixed in sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-13 05:31:50 -04:00
Jamie McCrae
0a590e62e5 cmake: kconfig: Treat Kconfig source paths as UTF-8
These may reside on systems that have unicode characters in the
filenames, treat them as such

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-13 05:31:50 -04:00
Jamie McCrae
4fcde701ec sysbuild: Use UTF-8 encoding for cache
Fixes an issue whereby strings are placed in UTF-8 format but the
application doesn't read them in when configured using sysbuild
and another issue whereby sysbuild then reads the application's
cache and did not treat them as UTF-8

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-13 05:31:50 -04:00
Daniel DeGrasse
c37e46c906 tests: drivers: display: display_read_write: add support for ILI9340
Add support for ILI9340 to display_read_write test. This support was
verified with the adafruit_2_8_tft_touch_v2 shield.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 09:23:40 +02:00
Daniel DeGrasse
f59156356d drivers: display: ili9xxx: support display_read API
Add support for display_read API with ili9xxx controller. This
functionality is opt-in, since the required bitshifting makes the
read not very performant, and the implementation adds otherwise unused
code overhead.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 09:23:40 +02:00
Hess Nathan
96fdbcab70 coding guidelines: comply with MISRA Rule 15.2
- moved switch clause to avoid backward jump

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-13 09:23:19 +02:00
Daniel DeGrasse
ebacd80c7b tests: drivers: build_all: display: add st7789v display
Add st7789v display to the display build all test

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 09:22:54 +02:00
Daniel DeGrasse
0784a8684c doc: releases: migration-guide: add migration note for ST7789V display
Add migration note to ST7789V display, which has been converted to the
MIPI DBI API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 09:22:54 +02:00
Daniel DeGrasse
a0e3dd1f87 drivers: display: st7789v: convert to MIPI DBI API
Convert ST7789V display driver to use MIPI DBI API. This commit also
updates in tree boards to use the new devicetree syntax needed to enable
this display with the MIPI DBI API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 09:22:54 +02:00
Nicolas Pitre
d8a891b563 tests: demand_paging: add a test for k_mem_unmap()
Make sure k_mem_unmap() completes successfully on memory that is half
paged-out and such memory is no longer accessible afterwards.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 09:22:39 +02:00
Nicolas Pitre
0313091287 kernel: mmu: make k_mem_unmap() work with demand paging
If a page is paged out or paged in but unaccessible for the purpose of
tracking the "accessed" flag then k_mem_unmap() may fails. Add the code
needed to support those cases.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 09:22:39 +02:00
Valerio Setti
30c9f5eaa5 net: add proper PSA_WANT kconfigs for TLS sockets and RSA key exchanges
Add proper PSA_WANT kconfigs for TLS sockets and RSA key exchanges
when CONFIG_PSA_CRYPTO_CLIENT is set.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-13 09:22:20 +02:00
Valerio Setti
30717437f5 jwt: add missing PSA_WANT dependencies to RSA signature
This commit add the proper PSA_WANT kconfigs which are required
to perform an RSA signature when a PSA crypto provider is
available in the system (i.e. CONFIG_PSA_CRYPTO_CLIENT is set).

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-13 09:22:20 +02:00
Nazar Palamar
e18c4fe654 boards: infineon: cyw20829m2evk_02: update memory partitions map
With current memory map configuration we have build error
with some samples where enabled no_optimization option.

So update memory partitions map as following:

ram:
sram:            : 244k  (addr 0x20000000)
sram_bootstrap   : 12k   (addr 0x2003D000)

flash:
toc2_region      : 80b   (addr 0x60000000)
bootstrap_region : 12k   (addr 0x60000050)
app_region       : 435k  (addr 0x60003050)
storage_partition: 64k   (addr 0x60070000)

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-13 09:21:59 +02:00
Eric Holmberg
2477b699ed boards: luatos: esp32s3: update USB serial to use board variant
Replace reference to separate USB config to use the HWMv2 board variant
instead.

Fixes #74041
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2024-06-13 09:21:40 +02:00
Fin Maaß
d18fd46e99 tests: json: add a test for JSON_TOK_ENCODED_OBJ
add a test for JSON_TOK_ENCODED_OBJ

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 21:15:27 -04:00
Fin Maaß
01c40dda1f json: add JSON_TOK_ENCODED_OBJ
add support to include a already encoded object
to a object

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 21:15:27 -04:00
Lothar Felten
7fef853015 boards: lilygo: ttgo_t8c3: initial support
adds initial support for Lilygo TTGO T8-C3 board

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-06-12 21:15:09 -04:00
Mykola Kvach
79d32aa0c1 tests: sd: sdmmc: add rcar_h3ulcb_r8a77951_a57 board to test
Add RCar h3ulcb Cortex A57 board to test.

Signed-off-by: Mykola Kvach <xakep.amatop@gmail.com>
2024-06-12 21:14:49 -04:00
Mykola Kvach
10363eb898 boards: rcar_h3ulcb_r8a77951_a57: add SD node to dts and describe SD pins
Add SD node to dts and describe SD pins.

Signed-off-by: Mykola Kvach <xakep.amatop@gmail.com>
2024-06-12 21:14:49 -04:00
Mykola Kvach
701c278eeb boards: rcar_spider_s4: add MMC node to dts and describe MMC pins
Add MMC node to dts and describe MMC pins.

Signed-off-by: Mykola Kvach <xakep.amatop@gmail.com>
2024-06-12 21:14:49 -04:00
Mykola Kvach
636091adb8 boards: renesas: set power-source property for MMC pins
Set power-source property for MMC pins for h3ulcb (a57) and
Salvator XS boards.

Signed-off-by: Mykola Kvach <xakep.amatop@gmail.com>
2024-06-12 21:14:49 -04:00
Lyle Zhu
6458c5ab1f Bluetooth: HFP_AG: fix building warning
Give `err` a initialization value 0.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
bbfa3bc1b9 Bluetooth: HFP_AG: Optimize lock/unlock of the SCO creating
When testing https://github.com/zephyrproject-rtos/zephyr/pull/72090/,
there is an issue found.

The change in the previous commit is to put all data sending
operations into the work queue context, and lock the current
AG before sending data.

And in change of #72090, the HCI TX thread is removed. All
sending sequence are happened in work queue context.

There is a possible problem when AG creates a SCO connection
by calling the function bt_conn_create_sco. Before the
function bt_conn_create_sco is called, AG will be locked to
avoid creating repeated SCO connection.
And the execution of the function bt_conn_create_sco
depends on the work queue. Because the HCI command of
function bt_conn_create_sco is sent in work queue context.

In the normal case, there is not any issue.
But there is a case that when the function
bt_conn_create_sco is being executed, there is a pending AG
TX waiting to be executed.

Once the work queue starts executing the handler, the AG TX
handler is executed first. Since the lock has been acquired
by other threads, the AG TX handler cannot acquire the lock.
As a result, the SCO connection creation fails.

Remove the AG lock from SCO creating. Instead, use a flag
to mark whether a SCO connection is be created.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
6939c8c02d Bluetooth: HFP_AG: Optimize the TX process
Due to the sent callback of RFCOMM is changed, the
sending buf need to be primed waiting for the
previous one to be completed. Add a worker for
this purpose.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
f055fe7165 bluetooth: hfp_hf: update channel sent callback prototype
Due to the parameter `buf` has been removed by rfcomm,
update the prototype of channel sent callback hfp_hf_sent.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
17e2564ff2 bluetooth: rfcomm: remove tx meta
Due to the sending buf cannot be referred
by sending layer.
It is unsafe to use `buf` identification
for a transmission, because the buf may
have been newly transmitted when the
sent callback is triggered.

Now instead, when the send completion
callback is received, the upper layer
is notified that a transfer is completed.
If multiple bufs are sent at the same
time, there is no guarantee which buf
is completed when the sent callback
triggered. Therefore, it is recommended
that the caller transfers the next data
block after the previous transfer is
completed.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
7f71ad38cc bluetooth: rfcomm: fix issue of sending buf invalid
There is a change (commit no.: 93d0eac834) that if
the `ref` of sending buf is not 1, the error code
`-EINVAL` will be returned from bt_conn_send_cb.

It causes the RFCOMM functionality cannot work
properly.

Remove the ref operation from the buf to be sent
to fix the issue.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Daniel Leung
7f6d600dd6 kernel: mm: rename z_num_pagefaults_get to k_mem_num_*
This is part of a series of moving memory management related
stuff out of the Z_ namespace and into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
564ca11631 kernel: mm: rename z_page_fault() to k_mem_page_fault()
This is part of a series of move memory management related
stuff out of Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
9064652db9 tests: mem_protect/syscalls: exclude board numaker_m2l31ki
The board defconfig forces CONFIG_USERSPACE to be disabled
due to small number of available MPU regions which are not
enough for userspace testing.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
54af5dda84 kernel: mm: rename z_page_frame_* to k_mem_page_frame_*
Also any demand paging and page frame related bits are
renamed.

This is part of a series to move memory management related
stuff out of the Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
7715aa3341 kernel: mm: rename Z_SCRATCH_PAGE to K_MEM_SCRATCH_PAGE
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
01682756b6 kernel: mm: rename Z_VM_RESERVED to K_MEM_VM_RESERVED
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
a459cdf51e kernel: mm: rename Z_FREE_VM_START to K_MEM_VM_FREE_START
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
b2784c9145 kernel: mm: rename Z_KERNEL_VIRT_* to K_MEM_KERNEL_VIRT_*
Renames:
  Z_KERNEL_VIRT_START to K_MEM_KERNEL_VIRT_START
  Z_KERNEL_VIRT_SIZE to K_MEM_KERNEL_VIRT_SIZE
  Z_KERNEL_VIRT_END to K_MEM_KERNEL_VIRT_END

This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
03eded1ed6 kernel: mm: rename Z_VIRT_RAM_* to K_MEM_VIRT_*
Renames:
  Z_VIRT_RAM_START to K_MEM_VIRT_RAM_START
  Z_VIRT_RAM_SIZE to K_MEM_VIRT_RAM_SIZE
  Z_VIRT_RAM_END to K_MEM_VIRT_RAM_END

This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
3fd66de508 kernel: mm: rename Z_PHYS_RAM_* to K_MEM_PHYS_*
Renames:
  Z_PHYS_RAM_START to K_MEM_PHYS_RAM_START
  Z_PHYS_RAM_SIZE to K_MEM_PHYS_RAM_SIZE
  Z_PHYS_RAM_END to K_MEM_PHYS_RAM_END

This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
b6f951b99e kernel: mm: rename Z_VM_OFFSET to K_MEM_VM_OFFSET
This is part of a series to move memory management related
stuff from the Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
def364ab08 kernel: mm: rename Z_BOOT_* to K_MEM_BOOT_*
Rename Z_BOOT_VIRT_TO_PHYS() and Z_BOOT_PHYS_TO_VIRT() to
K_MEM_BOOT_VIRT_TO_PHYS() and K_MEM_BOOT_PHYS_TO_VIRT()
respectively. This is part of a series to move memory management
functions away from the Z_ namespace and into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
2d2bbc05d6 kernel: mm: rename Z_VM_KERNEL to K_MEM_IS_VM_KERNEL
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
db9d3134c5 kernel: mm: rename Z_MEM_PHYS/VIRT_ADDR to K_MEM_*
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace. Also
make documentation available via doxygen.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
50640cb1b8 kernel: mm: rename Z_MEM_VM_OFFSET to K_MEM_VIRT_OFFSET
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace. Also
make documentation available via doxygen.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
552e29790d kernel: mm: rename z_phys_un/map to k_mem_*_phys_bare
This renames z_phys_map() and z_phys_unmap() to
k_mem_map_phys_bare() and k_mem_unmap_phys_bare()
respectively. This is part of the series to move memory
management functions away from the z_ namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
295254a96b kernel: mm: remove k_mem_phys_un/map()
These functions were introduced alongside with the memory mapped
stack feature, and are currently only being used there only.
To avoid potential confusion with k_mem_un/map(), remove them
and use k_mem_map/unmap_phys_guard() directly instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
9f9dd264d8 kernel: mm: rename k_mem_un/map_impl to k_mem_*_phys_guard
The internal functions k_mem_map_impl() and k_mem_unmap_impl()
are renamed to k_mem_map_phys_guard() and
k_mem_unmap_phys_guard() respectively to better clarify
their usage.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Tom Burdick
98b26c6ca8 rtio: Remove builtin iodev mpsc queue
I/O Devices were meant to be handles of sorts and had a built in mpsc queue
as this made sense initially. As time has gone on it turned out that often
we wanted the mpsc queue to be an implementation detail hidden in a driver.
In fact pretty much all drivers work this way now.

Keeping the struct mpsc queue as a member of rtio_iodev meant wasted memory
in cases where it wasn't used. It also meant a bit of confusion as the
queue might be accidently used in places where it shouldn't be.

Remove the mpsc queue member from struct rtio_iodev and the last remaining
usages of it. Will ensure RTIO for 3.7 LTS avoids causing unneeded churn
for future users.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-12 21:12:54 -04:00
Flavio Ceolin
9e623fa9ac doc: relnotes/3.7: Add info about CVE-2024-5931
Information about CVE-2024-5931 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-12 21:12:33 -04:00
Flavio Ceolin
7c0863d9fd doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-5931

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-12 21:12:33 -04:00
Flavio Ceolin
fe867b3e49 doc: relnotes/3.7: Add info about CVE-2024-5754
Information about CVE-2024-5754 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-12 21:12:33 -04:00
Anas Nashif
eaafd30b56 twister: cleanup how we capture results of handlers
we use reason for a failure to indicate state and then set the status
later and reason for the failure, in case of the failure is taken from
the handler status. Clean this up by setting status and reason coming
from the handler very early, so we do not have to go through replacing
meaning later.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 21:12:13 -04:00
Dong Wang
749566ac48 kernel/init: use zephyr's stack size macro for main/idle thread creation
As their stacks are defined by zephyr's kernel/thread stack definition
macro, better use zephyr's kernel/thread stack size macro for their stack
size, ensuring consistency and preventing potenial issues related to stack
size misconfiguration.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-12 21:11:02 -04:00
Wilfried Chauveau
fef0e8a211 arch: arm: cortex_m: update inline comment pointing to isr_wrapper.*
isr_wrapper has been converted to C but this inline comment was not
updated. This fixes the out-of-sync comment.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-06-12 18:29:12 -04:00
Wilfried Chauveau
e09a68b8f3 doc: hardware: arm: Update links to various source files
These files have been moved/renamed as the project grew but this part of
the documentation has gotten out of sync.
This fixes the most obvious discrepancies.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-06-12 18:29:12 -04:00
Wilfried Chauveau
42ce6d1b90 doc: develop: optimizations: make pahole example independent from arch
The paths in the output snippet no longer reflect realistic paths in
zephyr.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-06-12 18:29:12 -04:00
Kai Vehmanen
1bc51640d3 shell: shell_adsp_memory_window: fix invalid cast in struct init
Fix invalid cast in SHELL_ADSP_MEMORY_WINDOW_DEFINE(). The type used in
the cast (struct shell_memwindow) refers to a non-existant type. As the
initialized struct field is of type "void *", compiler does not complain
about it, so there were no build warning/errors seen.

Reported-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-06-12 18:28:20 -04:00
Jamie McCrae
f1410959fd doc: sysbuild: Add tag for application configuration section
Adds a tag to the sysbuild application configuration section so it
can be referenced in other documentation

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-12 18:27:14 -04:00
Félix Piédallu
52c92159cd scripts: More explicit error in west_commands for NRF flashing
Instead of suggesting a python dep is missing, tell the user intelhex is
missing.

Signed-off-by: Félix Piédallu <felix@piedallu.me>
2024-06-12 18:26:29 -04:00
Declan Snyder
84f622c7d1 boards: frdm_rw612: Enable ethernet
Enable the ethernet on the FRDM_RW612 board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
55607f6d5d boards: rd_rw612_bga: Enable ethernet on board
Enable ethernet on the NXP board RD_RW612_BGA.
This requires a variant because it requires a board rework,
which will disable some other features. The variant allows
us to use an overlay to represent this.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
29d6d36794 soc: rw6xx: Add ENET to DT and suppport
Add NXP ENET DT nodes to RW6XX DT, and reset
the clock roots for the ENET IPG in soc.c.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
a5a2dbacbd drivers: nxp_enet: Support RW6XX series
Support RW6xx series in NXP ENET driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
572433538d drivers: nxp_enet: Fix Kconfig dependency DCACHE
The NOCACHE symbol should be dependent on CPU_HAS_DCACHE here.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
430f3a448a drivers: clock_control_mcux_syscon: Support ENET
Support NXP ENET clock control in the LPC syscon clk driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
a84335eedf boards: rd_rw612_bga: Move compatible to dtsi
Move compatible property and model to dtsi file
of rd_rw612_bga board since it will be the same
for all variants.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Anas Nashif
c20e798646 arch: call arch_smp_init() directly, do not use SYS_INIT
Move this to a call in the init process. arch_* calls are no services
and should be called consistently during initialization.

Place it between PRE_KERNEL_1 and PRE_KERNEL_2 as some drivers
initialized in PRE_KERNEL_2 might depend on SMP being setup.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 18:23:54 -04:00
Daniel DeGrasse
9f4c849ac0 samples: add rt1064 to display samples with shield
Add RT1064 EVK to platform-allow list for display sample tests with
RK043* based shields.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-12 18:18:39 -04:00
Daniel DeGrasse
5d62e87d9d boards: nxp: mimxrt1064: remove display, document usable shields
Remove display definition from MIMXRT1064 EVK, and document the shields
that can be used with the board's FPC 40+6 pin parallel display
interface.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-12 18:18:39 -04:00
Daniel DeGrasse
d27a352ac1 samples: add rt1040 to display samples with shield
Add RT1040 EVK to platform-allow list for display sample tests with
RK043* based shields.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-12 18:18:15 -04:00
Daniel DeGrasse
0d0e47377b boards: nxp: mimxrt1040_evk: add display support
Add display support for the RT1040 EVK, using the RK043* series panels
defined as shields in Zephyr.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-12 18:18:15 -04:00
Michał Barnaś
0b4365ef29 usbc: add support for TCPC control of vbus sourcing
Adds calls to the set_src_ctrl of TCPC driver to enable and disable
the VBUS sourcing. If the TCPC doesn't support these functions,
no errors should be printed.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2024-06-12 18:17:17 -04:00
Michał Barnaś
44e4270a28 usbc: add setter function for sink and source control
Add set_snk_ctrl and set_src_ctrl functions to TCPC API to allow
controlling the sourcing and sinking vbus.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2024-06-12 18:17:17 -04:00
Gerard Marull-Paretas
bf574a0854 soc: add deprecation warning if using HWMv1 SoCs
While all in-tree SoCs have been ported to HWMv2, Zephyr still supports
out-of-tree SoCs in HWMv1 format, including boards. Add a clear
deprecation message so that users get notified that this is a deprecated
feature to be removed in the future.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-12 17:16:40 -05:00
Krystian Dolatowski
317abcc589 sensor: fix fallthrough on sample_channel_get on AQI
fixed fallthrough on getting channel AQI value from ENS160

Signed-off-by: Krystian Dolatowski <kryqpl1@gmail.com>
2024-06-12 18:16:29 -04:00
Benjamin Cabé
c44b777221 drivers: display: make driver API structs const
Save precious RAM by making sure driver API structs are declared as
const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 17:16:17 -05:00
Henrik Brix Andersen
6a29c79d4e drivers: usb: native posix: add option for enabling high speed support
Add Kconfig option for enabling high speed USB support for the native posix
USB controller driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-06-12 17:15:58 -05:00
Andries Kruithof
a435dd3ee0 Bluetooth: Audio: CAP broadcast reception start bugfix
When validating the parameters for broadcast reception start some
return statements were missing, they have been added, as well as
proper initialisation of a variable

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-06-12 18:15:38 -04:00
Torsten Rasmussen
0d51cb08c4 cmake: remove dead 'soc_legacy' folder handling
During HWMv2 migration, non-ported SoCs were placed in a 'soc_legacy'
folder and sourced from there instead of 'soc' folder.

Remove the no-longer needed soc_legacy folder.

CMake oot SoCs in old hardware model are sourced from
'<soc-root>/soc/<arch>/<soc-path>' which has always been the case, also
before HWMv2.

Remove the 'osource "soc/soc_legacy/...' generation in Kconfig, because
the source is relative to Zephyr base.
All SoCs in Zephyr repository has been ported to the new hardware model
and therefore there is no need for this line.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-12 17:15:28 -05:00
Luis Ubieda
ae833cd04f MAINTAINERS: Add ubieda to RTIO
Add self as a RTIO collaborator.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-12 18:15:12 -04:00
Emil Gydesen
4c31e4b337 Bluetooth: BAP: Fix missing len increment when merging non-LC3 data
If we are merging subgroup and BIS codec configuration data
for a codec other than LC3, then we just append them, but
did not properly update the length.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-12 17:15:00 -05:00
Rubin Gerritsen
2712b32941 Bluetooth: Document that bt_disable() doesn't touch callbacks
A naive implementation would look like

```c
void bt_init()
{
  bt_le_conn_cb_register();
  bt_enable();
}
```

When the app later adds the possibility to enable and disable
Bluetooth, it may happen that the application developer calls
`bt_init()` instead of `bt_enable()`. This results in invalid
behavior. This kind of bug is currently a bit harder to debug
as the callback register APIs do not reject registering a
callback twice.

Improving the API documentation is the first step towards making
this a bit more user friendly.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-12 17:13:13 -05:00
Jaroslaw Stelter
6070e693ab intel_adsp: Fix data cache flush before D3
Fix sys_cache_data_flush_range() calls during D3 entrance.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 17:12:41 -05:00
Anas Nashif
a1ee7f9d41 intel_adsp: kconfig: remove duplicate line
duplicate line in kconfig.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 17:12:41 -05:00
Anas Nashif
db6bbb90ee intel_adsp: ace30: use correct toolchain
xcc-clang is deprecated, use xt-clang.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 17:12:41 -05:00
Fin Maaß
bed5d8f6f8 riscv: linker: try to use name of register
get the address of a memory mapped
jedec,spi-nor flash by name and as a fallback
use the second register.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 17:12:23 -05:00
Fin Maaß
77bdc31bc9 tests: devicetree: add tests for DT_REG_HAS_NAME
Add tests for
DT_REG_HAS_NAME,
DT_REG_ADDR_BY_NAME_OR,
DT_REG_SIZE_BY_NAME_OR,
DT_INST_REG_HAS_NAME,
DT_INST_REG_SIZE_BY_NAME_OR and
DT_INST_REG_ADDR_BY_NAME_OR.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 17:12:23 -05:00
Fin Maaß
fb8b30d8d0 dts: devicetree.h: add DT_REG_HAS_NAME
Add DT_REG_HAS_NAME,
DT_REG_ADDR_BY_NAME_OR,
DT_REG_SIZE_BY_NAME_OR,
DT_INST_REG_HAS_NAME,
DT_INST_REG_SIZE_BY_NAME_OR and
DT_INST_REG_ADDR_BY_NAME_OR.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 17:12:23 -05:00
Adrien MARTIN
88760196c6 dt-bindings: pinctrl: pinctrl_gecko: fix misleading GECKO_FUN_MSK mask val
In the 32-bit bitfield pinctrl, the bits from b31 to b24 are representing
the PIN function. The correct mask value then must be 0xFFu.

Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
2024-06-12 17:11:26 -05:00
Jérémy LOCHE - MAKEEN Energy
2e9c30aed3 sample: openamp_rsc_table: enable colibri_imx7d
Enable openamp sample for Toradex Colibri IMX7D.
Tested with LTS BSP 6.6.0 on kernel 6.1.83.

Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
2024-06-12 17:11:04 -05:00
Jérémy LOCHE - MAKEEN Energy
75d65821ce arch: arm: add rom_start_relocation prompts
Add a prompt to ROMSTART_RELOCATION_ROM configs to allow
projects config file selection.
This simplifies the usage in samples/app for board porting.

Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
2024-06-12 17:11:04 -05:00
Jérémy LOCHE - MAKEEN Energy
3e3fc86bad nxp: imx7d: add .ressource_table definitions
Add RPMSG/OpenAMP ressource table definition for the
IMX7d SOC.

Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
2024-06-12 17:11:04 -05:00
Dong Wang
521a5ca958 soc: intel_ish: Make ISH support APIC timer with TSC time source.
This commit enables ISH boards to use APIC timer with TSC time source as
their system timer by replacing CONFIG_HPET with CONFIG_APIC_TIMER_TSC.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-12 17:10:25 -05:00
Tim Lovett
216a1d95ed boards: seeed: Add xiao_rp2040 board
Adds xiao_rp2040 board built off rpi_pico
Currently only uf2 flash supported

Signed-off-by: Tim Lovett <timo614@gmail.com>
2024-06-12 17:10:04 -05:00
Hou Zhiqiang
fd584b4727 snippets: add ram-console snippet support
The ram-console snippet disabled UART console and enabled the
RAM console with the option link the RAM console buffer to a
dedicate section in a new added memory-region.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Hou Zhiqiang
1cd37f21f3 drivers: ram_console: add option to link console buffer to given section
Currently, the ram_console buffer is defined as a global var, its
address is determined during the building and may be changed when
code update. This is not a problem if the ram_console is just used
in debug purpose.

While in the heterogeneous SoCs, there can be multiple MPU Cores
and several MCU cores, it can run multiple OS/bare-metal instances
on these cores, but the UART ports may be not enough, so the
ram_console can be leveraged. To make it easy to use, it's better
make the console buffer fixed and predefined.

This patch adds a option to link the console buffer to a given
section, through the "zephyr,memory-region" device tree node, then
the address can be known from the device tree node and easy to
check from other cores running Linux/U-Boot.

To use this option, the chosen property 'zephyr,ram-console' must
be added, the following is a example:

	chosen {
		zephyr,ram-console = &ram_console;
	};

	ram_console: memory@93d00000 {
		compatible = "zephyr,memory-region";
		reg = <0x93d00000 DT_SIZE_K(4)>;
		zephyr,memory-region = "RAM_CONSOLE";
	};

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Hou Zhiqiang
209568eabe driver: ram_console: leave one byte from the defined buffer size
Leave one byte from the CONFIG_RAM_CONSOLE_BUFFER_SIZE to ensure
the NULL-termination.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Hou Zhiqiang
c1765ff690 soc: imx9: a55: create region and section from the zephyr,memory-region
It has been added in the arm64 common linker script, so also update
the one of mimx9 SoCs.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Hou Zhiqiang
abf90d4ad7 arm64: linker: create region and section from zephyr,memory-region
In arm64 linker script, create a memory region and section for each
device tree node with compatible string "zephyr,memory-region".

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Emil Gydesen
be307f8ad9 Bluetooth: Audio: Change lang to 3-byte value from uint32_t
The 3-byte value suits the assigned number much better,
and also allows for less memory copies when getting and
setting the values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-12 12:54:16 -04:00
Emil Gydesen
f08bc644a1 Bluetooth: Audio: Rename stream_lang to lang
Remove the "stream" part of the value and functions to
better fit with the name in the assigned numbers document.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-12 12:54:16 -04:00
Nikolay Agishev
57af793bb4 ARC: nSIM: Add RMX100 platform
This PR adds support for new Synopsys nSIM RMX100 platform.
New platform based on RISC-V ISA instead of classic ARC.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-12 12:54:03 -04:00
Nikolay Agishev
ea7a876cff ARC: nSIM: Make reorganization of board and SoC structure
Change source tree organization for Synopsys nSIM platform.
Classical ARC architectures arc_v2 arc_v3 moved to arc_classic
SoC and boards family.
nSIM SoCs were separated regarding series: EM, HS, SEM, VPX2.
This PR sould be seeing as the preparation for
addition new nSIM platform based on the RISC-V architecture.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-12 12:54:03 -04:00
Francois Ramu
b04cd038ca samples: drivers: spi_flash includes the dma for stm32 xspi node
The stm32 xspi node is another possible multi-spi for connecting
with gpDMA channels for Rx and Tx, same request.
Channels 4 and 5 are preferred for AHB periph to/from ext. Mem.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 12:53:41 -04:00
Francois Ramu
ac48369731 drivers: flash: stm32 xspi driver with DMA support
Add the commands to read and write to/from the xSPI with gpDMA
On the stm32h5 device, the one request for xspi instance

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 12:53:41 -04:00
Francois Ramu
be55b2c263 drivers: flash: stm32 xspi flash driver with clock domain
Configure the xspi clocks domain by the clock domain
as defined by the DTS
Up to 3 possible clock confg : xspix, xspi_ker, xspi_mgr

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 12:53:41 -04:00
Javad Rahimipetroudi
1662c0ac8f boards: arm: stm32wb5mm_dk: update test runner yaml file
this patch adds support for vl53l0x and ism330dhcx
sensors in test runner yaml file

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-06-12 18:53:05 +02:00
Javad Rahimipetroudi
bfdd05161a docs: stm32wb5mm_dk: update supported features table
Update the supported features for stm32wbmm_dk and
add support for I2C bus.

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-06-12 18:53:05 +02:00
Javad Rahimipetroudi
2eb5513f3e board: arm: stm32wb5mm_dk: add ism330dhcx sensor
This patch add device tree node for ism330dhcx
3D accelerometer and 3D gyroscope sensor.

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-06-12 18:53:05 +02:00
Javad Rahimipetroudi
57509b8eb5 boards: arm: stm32wb5mm_dk:add support for vl53l0x
This patch add VL53L0CXV0DH node in the device tree
for STM32WB5MM_DK board.

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-06-12 18:53:05 +02:00
Chun-Chieh Li
55a988ef44 lib: smf: fix ctx->executing in smf_execute_all_entry_actions
Fix ctx->executing is not updated in smf_execute_all_entry_actions()

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-06-12 12:52:46 -04:00
Chun-Chieh Li
eae0900122 lib: smf: add NULL check in smf_execute_all_exit_actions
Like in smf_execute_all_entry_actions(), add NULL check
in smf_execute_all_exit_actions().

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-06-12 12:52:46 -04:00
Aksel Skauge Mellbye
09a6849a1b doc: boards: silabs: Document board naming scheme
Update Sphinx documentation to explain how Silicon Labs boards
are named in Zephyr, now that all boards are consistently
named.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
45e49aaca2 boards: silabs: Consistently name starter kits
Rename all Silicon Labs starter kits to always use the official kit name
as board target name. Previous kit names used various naming schemes,
including putting part of the SoC name in the board name. With HWMv2,
SoC names (if needed) should go in the SoC board qualifier.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
fee86aecaa boards: silabs: Consistently name radio boards
Rename all Silicon Labs radio boards to always use the official kit name of
the kit containing only the radio board as board target name. Disentangle
boards using Series 1 and Series 2 SoCs that have almost nothing in common
in terms of devicetree content, but still occupied the same directory.

As part of the initial HWMv2 port, all radio boards were merged into a
single target efr32_radio, using the SoC as a board qualifier to target
specific boards. This was unfortunate, as the SoC name is not sufficient
to identify a specific board -- the same SoC may be used on multiple
different boards. This commit reinstates every radio board as an individual
board target.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
bc6c363bc9 boards: silabs: Consistently name dev kits
Rename all Silicon Labs dev kits to always use the official kit name
as board target name. Previous kit names used various naming schemes,
including putting part of the SoC name in the board name. With HWMv2,
SoC names (if needed) should go in the SoC board qualifier.

Use HWMv2 revisions for the two variants of SLTB010A.

Split the xG27 Dev Kit from the EFR32BG22 Thunderboard. This attempt
at deduplication is confusing due to the very different kit names
and use of different ICs (BG22 vs BG27), and was not continued with
the xG24 Dev Kit, meaning that it wasn't consistent.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
7df94e4128 boards: silabs: Create subcategories for different board types
Introduce three subcategories for Silabs boards: dev_kits, radio_boards
and starter_kits. The dev_kits category contains small form-factor
standalone boards branded as "Dev Kit" or "Thunderboard". The
radio_boards category contains radio boards to be used with a wireless
mainboard, and the starter_kits category contains larger form-factor
standalone boards branded as "Starter Kit".

Structure the Sphinx documentation the same way as the directory tree.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
d35eac2326 drivers: spi: gecko: Respect frequency configuration
This commit adds support for configuring SPI frequency per transaction.
The "clock-frequency" devicetree property is used as the default
frequency unless the peripheral being communicated with has a lower
"max-spi-frequency" (passed to the driver as spi_config::frequency).

An error is returned if the requested frequency is higher than the
hardware can support. This limit is half the peripheral clock (PCLK on
Series 2, HFPERCLK on Series 0/1) for SPI in controller mode.

Previously, the driver hard-coded 1 MHz operation. For backwards
compatibility, default to 1 MHz if the "clock-frequency" property is not
set in devicetree.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 18:52:17 +02:00
Aksel Skauge Mellbye
5513657e10 drivers: spi: gecko: Add support for devices with a single USART
This commit adds support for devices such as EFR32xG24 in the SPI
driver, as these devices only have a single USART peripheral.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 18:52:17 +02:00
Jonathan Rico
9b3f41de55 Bluetooth: host: don't pull data if no view bufs
View buffers are now also a limited resource. Acquire them before
attempting to pull data. `CONFIG_BT_CONN_FRAG_COUNT` should be tuned on
a per-application basis to avoid this.

A possible optimization, that was present before, is to not create a
frag when the original buffer fits the controller's HCI size.

I prefer deferring this optimization to a future patchset.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
5a7ef422bb Bluetooth: host: use __maybe_unused for convenience variables
In order to suppress compiler warnings w/o using void/ifdef.

Suggested in #72854

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
b6cdf10310 Bluetooth: L2CAP: remove seg_pool
We can get rid of the view pool for SDU segments :)
We have to make the code slightly more complex :'(

The basic idea is always giving the original SDU buffer to `conn.c` for it
to pull ACL fragments from.

In order to do this, we need to add the PDU headers just-in-time.
`bt_l2cap_send_pdu()` does not add them before putting the PDU on the queue
anymore. They are added by `l2cap_data_pull()` right before the data leaves
`l2cap.c` for `conn.c`.

We also have to inform `conn.c` "out of band" of the real L2CAP PDU size so
it doesn't fragment across segment boundaries. This oob is the new `length`
parameter to the `.pull()` method.

This is the added complexity mentioned above.

Since SDU segmentation concerns only LE-L2CAP, ISO and Classic L2CAP don't
need this extra logic.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
28be8909a6 Bluetooth: host: remove TX thread
We don't need the TX thread anymore.

Generalizing the pull-based architecture (ie. `tx_processor`) to HCI
commands makes it possible to run the whole TX path from the the system
workqueue, or any workqueue really.

There is an edge-case, where we call `bt_hci_cmd_send_sync()` from the
syswq, stalling the system. The proposed mitigation is to attempt to drain
the command queue from within `bt_hci_cmd_send_sync()`.

My spidey sense tingles however, and it would be better to just remove the
capability of calling this fn from the syswq. But doing this requires
refactoring a bunch of synchronous procedures in the stack (e.g. stack
init, connection establishment, address setting etc), dragging in more
work. I will do it, but in a later patch.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
48d1cffb4d Bluetooth: L2CAP: remove CONFIG_BT_L2CAP_RESCHED_MS
We don't need it thanks to the new TX architecture.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
38820efd8d Bluetooth: L2CAP: Make bt_l2cap_send_pdu()
This API replaces `bt_l2cap_send()` and `bt_l2cap_send_cb()`.

The difference is that it takes the `struct bt_l2cap_le_chan` object
directly instead of a connection + CID.

We need the channel object in order to put the PDU on the TX queue. It
is inefficient to do a search for every PDU when the caller knows the
channel object's address and can just pass it down.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
28535fe2f2 Bluetooth: host: Change TX pattern (push -> pull)
The current TX pattern in the host is to try to push a buffer through all
the layers up until it is ingested by the controller.

Since sending can fail at any layer, we need error-handling and separate
retry logic on pretty much all layers. That logic obscures the "happy path"
for people trying ot understand the code.

This commit inverts the control, in a way that doesn't require changing the
host or HCI driver API (yet):

Layers don't send buffers synchronously, they instead put their buffer in a
private queue of their own and raise a TX flag on the lower layer. Think of
it as a `READY` interrupt line that has to be serviced by the lower layer.

Sending is now non-blocking, rate depends on the size of buffer pools.

There is a single TX processing function. This can be thought as the
Interrupt Service Routine that will handle the `READY` interrupt from the
layers above.

That `tx_processor()` will then attempt to allocate enough resources in
order to send the buffer through to the controller. This allocation logic
does not block.

After acquiring all the resources, the TX processor will attempt to pull
data from the upper layer. The upper layer has to figure out which buffer
to pass to the controller. This is a good spot to put scheduling or QoS
logic in the upper layer.

Notes:

- user-facing API for tuning QoS will be implemented in a future patch

- this scheme could (and probably will) be extended to upper layers (e.g.
  ATT, L2CAP CoC segmentation).

- this patch removes the `pending_no_cb()` memory optimization for
  clarity/correctness. It might get re-implemented after a stabilization
  period. Hopefully with more documentation.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
1c8cae30a8 Bluetooth: host: Introduce "view" buffer concept
Instead of allocating segments/fragments and copying data into them, we
allocate segments as "views" (or slices) into the original buffer.

The view also gives access to the headroom of the original buffer, allowing
lower layers to push their headers.

We choose not to allow multiple views into the same buffer as the headroom
of a view would overlap with the data of the previous view.

We mark a buffer as locked (or "in-view") by temporarily setting its
headroom to zero. This effectively stops create_view because the requested
headroom is not available.

Each layer that does some kind of fragmentation and wants to use views for
that needs to maintain a buffer pool (bufsize 0, count = max views) and a
metadata array (size = max views) for the view mechanism to work.

Maximum number of views: number of parallel buffers from the upper layer,
e.g. number of L2CAP channels for L2CAP segmentation or number of ACL
connections for HCI fragmentation.

Reason for the change:
1. prevent deadlocks or (ATT/SMP) requests timing out
2. save time (zero-copy)
3. save memory (gets rid of frag pools)

L2CAP CoC: would either allocate from the `alloc_seg` application callback,
or worse _steal_ from the same pool, or allocate from the global ACL pool.

Conn/HCI: would either allocate from `frag_pool` or the global ACL pool.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Aleksander Wasaznik
52dc64f0d9 Bluetooth: conn: Allocate TX context JIT
`bt_conn_send_cb` used to allocate a TX context (K_FOREVER).
Instead, we now put the context in the userdata of the buffer.

This means that now this fn will never block and always succeed since the
tx_queue is a FIFO (infinite size). It just puts the buf on the queue.

The metadata is stored safely in there until we have acquired all the
necessary resources to send it to the controller without failing: TX
context and controller buffer.

I.e. when `bt_conn_process_tx` is called, that's when a TX context is
try-allocated and the contents of `buf->userdata` is moved into it.
The buffer is now ready to be sent to the lower layer.

`bt_conn_process_tx` will return -EWOULDBLOCK if it's not able to acquire a
TX context, this PR modifies `bt_conn_prepare_events` to respond to this by
also waiting on the TX context pool.

Unfortunately, this increases the required userdata size for any buffers
handed to `bt_conn_send_cb`. This will be fixed in a later commit.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Joakim Andersson
04e56f72c7 drivers: flash: Fix stm32 ospi and xpsi reset gpios handling
Fix compilation error when reset-gpios is enabled.
Undefined reference to dev_cfg variable.
Reset gpio duration needs to be defined, but is not in binding file.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-06-12 12:51:06 -04:00
Seppo Takalo
441d970417 net: lwm2m: Bypass send_queue when sending empty Ack
In case we want to immediately send empty Ack to server,
we should bypass all send queues.

This is required when we try to send Ack from callbacks
that happen from socket-loop context. On those cases
the Ack would have not been send because the callback
might be blocking the socket-loop while processing
a request (like write callbacks).

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-06-12 12:50:46 -04:00
Nazar Palamar
c0be06be02 soc: psoc6: fix build error when CONFIG_UART_INTERRUPT_DRIVEN
Fix build error when CONFIG_UART_INTERRUPT_DRIVEN is enabled
see details: issues/74004

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-12 12:50:28 -04:00
Carles Cufi
37ec117386 scripts: west: blobs: Check for existence of modules
Instead of blindly using the module names provided by the user via
command-line arguments, check if those actually exist in the current
manifest, and error out if any of them does not.

Fixes #73901.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-12 12:50:12 -04:00
Martí Bolívar
b93fe6ad2d shell: device_service: print DT metadata
Example output on qemu_cortex_m3:

  devices:
  - uart@4000e000 (READY)
    DT node labels: uart2
  - uart@4000d000 (READY)
    DT node labels: uart1
  - uart@4000c000 (READY)
    DT node labels: uart0
  - gpio@40026000 (READY)
    DT node labels: gpio6
  - gpio@40025000 (READY)
    DT node labels: gpio5
  - gpio@40024000 (READY)
    DT node labels: gpio4
  - gpio@40007000 (READY)
    DT node labels: gpio3
  - gpio@40006000 (READY)
    DT node labels: gpio2
  - gpio@40005000 (READY)
    DT node labels: gpio1
  - gpio@40004000 (READY)
    DT node labels: gpio0

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2024-06-12 18:49:54 +02:00
Martí Bolívar
48a14dc17e gpio: add support for node label based lookup in the shell
Use some new kernel features to make the experience of finding and
dealing with GPIO devices much more ergonomic by allowing the use of
devicetree node labels to identify GPIO devices by default.

Users who wish to avoid the associated footprint penalty can set
CONFIG_DEVICE_DT_METADATA=n by hand, but I think the convenience is
worth the price as a default. If we're running a shell, then we've
already paid a heavy footprint penalty.

Example output for qemu_cortex_m3:

    uart:~$ gpio devices
    Device           Other names
    gpio@40004000    gpio0
    gpio@40005000    gpio1
    gpio@40006000    gpio2
    gpio@40007000    gpio3
    gpio@40024000    gpio4
    gpio@40025000    gpio5
    gpio@40026000    gpio6

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2024-06-12 18:49:54 +02:00
Martí Bolívar
15c9d3711c kernel: add CONFIG_DEVICE_DT_METADATA and helpers
This option allows you to look up a struct device from any of the
node labels that were attached to the devicetree node used to create
the device, etc.

This is helpful because node labels are a much more human-friendly set
of unique identifiers than the node names we are currently relying on
for use with device_get_binding(). Adding this infrastructure in the
device core allows anyone to make use of it without having to
replicate node label storage and search functions in various places in
the tree. The main use case, however, is for looking up devices by
node label in the shell.

Since there is a footprint penalty associated with storing the node
label metadata, leave this option disabled by default.

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2024-06-12 18:49:54 +02:00
Martí Bolívar
74abb2bf95 devicetree: add first-class node label helpers
Add the following new macros:

- DT_FOREACH_NODELABEL
- DT_FOREACH_NODELABEL_VARGS
- DT_INST_FOREACH_NODELABEL
- DT_INST_FOREACH_NODELABEL_VARGS

These are for-each helpers for iterating over the node labels of a
devicetree node. Since node labels are unique in the entire
devicetree, their token representations can be useful as unique IDs in
code as well.

As a first user of these, add:

- DT_NODELABEL_STRING_ARRAY
- DT_INST_NODELABEL_STRING_ARRAY

The motivating use case for these macros is to allow looking up a
struct device by devicetree node label in Zephyr shell utilities.
The work on the shells themselves is deferred to other patches.

To make working with the string array helpers easier, add:

- DT_NUM_NODELABELS
- DT_INST_NUM_NODELABELS

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2024-06-12 18:49:54 +02:00
Yong Cong Sin
131e6bf494 logging: allow OOT backend to enable LOG_BACKEND_FORMAT_TIMESTAMP
The `LOG_BACKEND_FORMAT_TIMESTAMP` Kconfig currently depends on
a list of hardcoded backends.

Let's modify it to depend on an intermediary Kconfig
`LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP` instead, which can be
selected by a OOT log backend.

Updated all exisitng supported backends to select this new
Kconfig.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-12 12:49:32 -04:00
Benjamin Cabé
a048fee8e7 samples: canopennode: fix HTTP 404 errors
fix can-cia.org URLs as some resources have apparently moved.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
6d915f8e51 doc: boards: fix dead link in boards doc
Serpente board lives in "boards/others/", not "boards/arturo182"

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
a3fcfa90b3 doc: boards: olimex: fix dead links in boards doc
Fixed a couple file references that were missed during PR #71441.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
9a73c32852 doc: boards: nxp: fix dead links in boards doc
Fixed a few file references that were missed during hwmv2 refactoring.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
355a864d81 doc: samples: tracing: fix dead link to sample overlay
Fixed bad reference to mp2_an521 overlay file.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
7e7dbc7d88 doc: boards: st: fix dead links in boards doc
Fixed a few file references that were missed during hwmv2 refactoring.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
0c42131776 doc: boards: infineon: fix bad references to defconfig files
Fixed a few occurences of file references using "cypress" instead of
"infineon"

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
30ebe33f5a docs: pm: fix broken link to power domain tests
fix README to link to Power domain *tests*, not samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
352d90df32 doc: shields: lmp90100_evb: fix dead link to evaluation board docs
Replace dead ti.com link with a link to Farnell hosted datasheet.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
6db7c2aeb3 doc: boards: fix dead link to i.MX 8M reference manual
Fix deadlink using standard NXP download URL

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé
cd5be454c6 doc: boards: fix deadlink to RT685 datasheet
Fixed a 404 link (resource has eitrher moved or link has always been
dead)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Tomasz Moń
fb27c36ad5 drivers: udc_dwc2: Fix control OUT buffer leak
Release buffer allocated in dwc2_ctrl_feed_dout() on endpoint deactivate
to prevent the buffer from leaking on USB stack disable.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-12 12:48:45 -04:00
Gerard Marull-Paretas
238d113185 samples: modules: canopennode: set bootloader in sample.yaml
Set the bootloader choice for the
sample.modules.canopennode.program_download test case in the sample.yaml
file instead of sysbuild.conf. The reason for this change is to avoid
building MCUboot by default when using the --sysbuild option, as it may
not be compatible with all platforms. This is currently causing issues
on platforms like nRF54H20 where sysbuild is always used.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-12 12:48:28 -04:00
Benjamin Cabé
3898cbeafc doc: kernel: do not start doxygen comment with #
Comment starting with "#" was causing incorrect rendering (as well as
LaTeX warnings)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:47:46 -04:00
Pisit Sawangvonganan
9a0283d5e2 drivers: gnss: make gnss_xxx_config and gnss_driver_api as const
This change marks each instance of the `gnss_xxx_config` and
`gnss_driver_api` as `const`.

By using `const`, we ensure immutability, leading to usage of only
`.rodata` and a reduction in the `.data` area.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-12 12:47:34 -04:00
Anas Nashif
b7182cf082 tests: uoscore: increase main stack
Increase main stack size to 4096.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 12:47:18 -04:00
Anas Nashif
7b2ccf4dfe kernel: increase main stack size for ztests on nios2
ztest now needs to more main stack size.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 12:47:18 -04:00
Francois Ramu
dfb240f37c samples: boards: stm32 I2C config and gives V2 timing calculation
This sample reports the I2C configuration of the selected I2C node
from the board DTS : bitrate property of the I2C node
In case of I2C V2, it also gives the TIMINGS which has to be written
in the DTS <timings> property of the I2C V2 node.
Uses the i2c_get_config function with CONFIG_I2C_STM32_V2_TIMING.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 14:35:48 +03:00
Francois Ramu
29afef1e7d drivers: i2c: stm32 for V2 driver get_config with timings
Change the get_config API for the stm32 I2C V2 driver.
It will also return the value of the content of TIMING register
for the I2C V2 bus.
This is hold by a i2c_config_timing structure of the device data

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 14:35:48 +03:00
Francois Ramu
e5048c0c6d drivers: i2c: stm32 I2C v2 driver fix compliance with a Macro
Define Macro to fix the compliance check warning :
"DEEP_INDENTATION: Too many leading tabs - consider code refactoring
in the i2c_compute_scll_sclh() function
in the i2c_compute_presc_scldel_sdadel() function

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 14:35:48 +03:00
Francois Ramu
3aea45053c drivers: i2c: stm32 driver V2 new timing calculation
This PR is implementing a new formula to calculate the I2C timing
value from the I2C clock source and the bit rate.
This is done under flag CONFIG_I2C_STM32_V2_TIMING.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 14:35:48 +03:00
Benjamin Cabé
01604acc51 samples: cmsis_dsp: add moving average sample
This adds a basic example demonstrating how to enable and use the CMSIS-DSP
module in Zephyr.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 14:35:17 +03:00
TOKITA Hiroshi
fbe912395c dts: bindings: dma: raspberrypi: Correcting typo
A `GPIO` word is in the description section.
Correcting it to `DMA`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-12 14:34:09 +03:00
TOKITA Hiroshi
8b49895de6 dts: bindings: dma: raspberrypi: Fix irq0-channels definition
`irq0-channels` defines even-numbered channels as the default value.
Since 6 was dropped from this definition, it is added.
Also, since the maximum number of channels is 12,
remove the ones that are exceeded.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-12 14:34:09 +03:00
Peter Mitsis
886098a6c8 tests: latency_measure: Restructure configurations
Restructures the latency_measure benchmark configurations. Most of them
do not need to be executed by default by CI. However, we still want to
make it easy to run the benchmark with various configurations so that
they can be easily compared against the default.

The updated documentation shows how this can be done.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-12 14:33:47 +03:00
Adrian Warecki
3de2ce59bc adsp: hda: Extend buffers allowed address space
Changed asserts to allow buffers to be placed in the entire allowed address
space.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-06-12 14:32:35 +03:00
Roman Studenikin
fdd81f87c2 testsuite: coverage: Add CONFIG_ZTEST_COVERAGE_RESET_BEFORE_TESTS
Add an option to reset gcov counters before running tests.
This ensures that only code lines triggered by test itself are counted in
the coverage report and all the board initialization code and pre-test
bootstrap is not counted. This is useful when, for example, you are
testing code that is also executed during bootup

Test Plan:
west build -p always -b qemu_x86_64 tests/ztest/base/ -- \
-DCONFIG_COVERAGE=y -DCONFIG_COVERAGE_GCOV=y -DCONFIG_COVERAGE_DUMP=y \
-DCONFIG_ZTEST_COVERAGE_RESET_BEFORE_TESTS=y
ninja -Cbuild run | tee log.log

Signed-off-by: Roman Studenikin <srv@meta.com>
2024-06-12 14:32:04 +03:00
Roman Studenikin
179585e54b testsuite: coveerage: support counters reset
Ability to reset gcov counters allows better isolation of tests
coverage. Specifically it allows to:
1. Not include counters for any code that was executed prior running the
   test, which includes all the code executed during the board boot.
2. Run multiple tests without firmware reload by resetting counters
   between each.

Signed-off-by: Roman Studenikin <srv@meta.com>
2024-06-12 14:32:04 +03:00
Johann Fischer
ed8c99977f usb: device: allow uneven SN to be obtained from HWINFO
If the length of the string literal reserved for the serial number
descriptor is odd, the string is not used because its length is always
even and therefore one character longer. Fix this by using the shortest
length for the copy.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-12 14:31:11 +03:00
Thorsten Spätling
486d109e7e dts: stm32h5: Add backup sram DT node to STM32H56xx
I also added an overlay file for the nucleo_h563zi board to the
samples/boards/stm32/backup_sram example.

Signed-off-by: Thorsten Spätling <thorsten.spaetling@vierling.de>
2024-06-12 14:30:45 +03:00
Jordan Yates
b666262a62 doc: _scripts: gen_devicetree_rest: extra folders
Add an option to specify particular folders to pull bindings from
when generating documentation. This is useful for downstream projects
that may want to document their own bindings, but don't want to pull in
every Zephyr binding.

This is not currently possible as almost every binding depends on
`base.yaml`, which exists in the Zephyr repository. This is now enabled
by adding the following to `DTS_ARGS` in the downstream `CMakeLists.txt`
file: `--dts-folder ${ZEPHYR_BASE}/dts/bindings/base`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-12 14:30:14 +03:00
Jordan Yates
ae25d606c9 doc: _scripts: gen_devicetree_rest: skip empty vendors
Don't create output sections for vendors without bindings. This only
affects the `Unknown vendor` and `Generic or vendor-independent`
vendors, which are populated by default but do not necessarily contain
any entries.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-12 14:30:14 +03:00
Ren Chen
1264a9a163 usb: it82xx2: return the available data length in the ep read function
According to the Zephyr documentation, the number of bytes available
for read should be returned if the input data and length parameters are
NULL and zero, respectively. This commit corrects this behavior.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-06-12 14:29:42 +03:00
Ren Chen
d9099efc02 usb: it82xx2: lock irq when accessing fifo ctrl register and ready bit
Since the fifo control register and ready bit are checked in ISR
function, this commit locks IRQ when accessing these registers to
prevent racing conditions.

Tested with: Google spikyrock project

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-06-12 14:29:42 +03:00
Ren Chen
4fa5cb8dfc usb: it82xx2: fix some issues related to extended endpoint enablement
This commit addresses some issues during the extended endpoint(ep
number is larger than 4) access. There are enable and ready bits for
each endpoint on the IT82xx2 chip. The transaction completion should be
determined by the ready and enable bits of the corresponding endpoint.
Additioinally, for non-control endpoint, the FIFO control register is
selected before writing data and cleared when the IN transaction is
completed. When an IN token interrupts, the FIFO control register
should be checked if it's selected to prevent fake tokens.

Tested with: Google spikyrock project

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-06-12 14:29:42 +03:00
Ren Chen
21c4c169ab usb: it82xx2: remove the unnecessary explicit conversion
This change cleans up the unnecessary explicit conversion.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-06-12 14:29:42 +03:00
Robert Lubos
57ef64d27d manifest: Update uoscore-uedhoc revision
Update usocore-uedhoc repository revision to the latest version.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-12 14:28:51 +03:00
Abderrahmane Jarmouni
924206e083 test: drivers: spi: loopback: stm32: add more boards to CI
Add more STM32 boards to run in DMA & IRQ test cases.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-12 14:28:35 +03:00
Abderrahmane Jarmouni
533ade504d drivers: spi: stm32: minor fixes
Minor fixes & code improvements.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-12 14:28:35 +03:00
IBEN EL HADJ MESSAOUD Marwa
99cf32e9c7 west.yml: hal_stm32: STM32Cube packages update
Update stm32f0 to cube version V1.11.5
Update stm32f3 to cube version V1.11.5
Update stm32f7 to cube version V1.17.2
Update stm32wb to cube version V1.19.1

Update of lib/stm32/stm32wb package to version V1.19.1

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-06-12 14:28:06 +03:00
Erwan Gouriou
1c8312bcc8 CODEOWNERS: Clean up for STM32
Remove ABOSTM as not active anymore.
Remove erwango and FRASTM as already in MAINTAINERS files so we'll
be added in reviews anyway.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-12 14:27:48 +03:00
Erwan Gouriou
298d603e0c MAINTAINERS: Remove no more active users for STM32
Remove ABOSTM and Desvauxm-st which don't contribute anymore.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-12 14:27:48 +03:00
Erwan Gouriou
9036c32a5e MAINTAINERS: Add marwaiehm-st as STM32 collaborator
Add @marwaiehm-st as STM32 and hal_stm32 collaborator.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-12 14:27:48 +03:00
frei tycho
5d1be67e83 shell: change controlling expressions in while to Boolean
Use `do { ... } while (false)` instead of `do { ... } while (0)`.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-12 14:22:36 +03:00
Adam Berlinger
a427f42772 drivers: clock_control: clock_stm32_ll_u5 add get_status API callback
Adds get_status API for clock_stm32_ll_u5 driver

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-12 14:22:13 +03:00
Tomasz Moń
fa0a6e2274 drivers: udc_dwc2: Allocate at least 8 bytes for control OUT
Make sure to feed control OUT endpoint with at least 8 bytes buffer to
make it possible to always receive SETUP data. This solves the assertion
failure in net_buf_add() called inside dwc2_handle_evt_setup() when a
host decides to start new control transfer immediately after it has
issued control transfer with Data Stage from host to device with wLength
less than 8.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-12 14:21:37 +03:00
Tomasz Moń
42c9f79e4e usb: device_next: Clarify UAC2 send buffer requirements
The original intention was that the audio buffers supplied by
application to the UAC2 API can be directly used by UDC driver.
The buffer alignment requirement was explicitly stated with regards
to the receive buffer, but was mistakenly omitted on transmit buffer.

While the missing comment is added, mention also that the buffer has to
be otherwise suitable for use by UDC driver, because alignment might not
be the only UDC driver requirement. For example, the UDC driver can
require the buffer to reside in memory region that it can access with
DMA.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-12 14:21:14 +03:00
Nazar Palamar
cc4e12e09b drivers: serial: Update Infineon CAT1 UART driver
Set RTS/CTS flow control pins as NC in cyhal
UART object so cyhal will skip to try initialize
those pins.

Initialization of RTS/CTS is done via
PINCNTRL driver.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-12 14:21:01 +03:00
Vidar Lillebø
6607c73425 nordic: dts: Fix grtc interrupt line for secure nRF54L
When TF-M is used, zephyr must use a different interrupt line for
GRTC.

Signed-off-by: Vidar Lillebø <vidar.lillebo@nordicsemi.no>
2024-06-12 14:20:42 +03:00
Lars Knudsen
0923750895 MAINTAINERS: Add jthm-ot to Bluetooth Audio
Jens has contributed the following PRs

https://github.com/zephyrproject-rtos/zephyr/pull/68678
https://github.com/zephyrproject-rtos/zephyr/pull/72409
https://github.com/zephyrproject-rtos/zephyr/pull/72915
https://github.com/zephyrproject-rtos/zephyr/pull/73564
https://github.com/zephyrproject-rtos/zephyr/pull/73656

and is attending the weekly LE Audio Zephyr meetings.

Signed-off-by: Lars Knudsen <LAKD@Demant.com>
2024-06-12 14:20:29 +03:00
Henrik Brix Andersen
51e52eaeab Revert "boards: imx93_evk: enable flexcan driver"
This reverts commit 07f132b1b5 which is
causing CI build errors.

Fixes: #73955

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-12 11:54:38 +02:00
Henrik Brix Andersen
58db527d31 Revert "soc: imx93: enable flexcan driver"
This reverts commit 69360d2f38 which is
causing CI build errors.

Fixes: #73955

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-12 11:54:38 +02:00
Valerio Setti
41389fbb81 mbedtls: add a kconfig to use the p256-m directly (without PSA interface)
For sake of memory footprint it might be required to shrink
down the memory footprint as much as possible. Unfortunately Mbed TLS
PSA interface brings in some extra code for key management which makes
it larger than the TinyCrypt counterpart when it comes to p256-m
interfacing. For this reason it might be useful to directly access
the p256-m driver directly.

This commit adds this support and it also updates the corresponding
test in order to make use of this condition.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-12 01:53:58 -07:00
Valerio Setti
47640572ef doc: update release notes
Update release-notes document in order to present the new Kconfig
symbol used to enable p256-m driver support.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-12 01:53:58 -07:00
Valerio Setti
e8e7579c93 test: Add an MbedTLS vs TinyCrypt comparison on secp256r1
Add a simple test to compare the footprint of MbedTLS vs
TinyCrypt for the secp256r1 curve. On the MbedTLS side
the test uses the P256M driver developed by the MbedTLS
team. This is an optimized implementation which targets
the secp256r1 curve.

The example itself is pretty easy:
- generate 2 EC keys
- perform key agreement

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-12 01:53:58 -07:00
Valerio Setti
69fa93bb79 mbedtls: add psa_crypto_init() when Mbed TLS acts a PSA crypto client
Ensure psa_crypto_init() is called during initialization when
Mbed TLS acts as a PSA crypto client. This will setup the PSA
crypto server for further calls.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-12 01:53:58 -07:00
Valerio Setti
185ec2bf78 mbedtls: add support for the P256M driver
Add support for the CortexM optimized implementation of secp256r1
code. It supports:
- import & export
- key agreement
- sign & verify

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-12 01:53:58 -07:00
Nicolas Pitre
2871c87aae tests: poll: fix misconstructed k_poll_event test
Since commit 0c23cf94a4 ("include/kernel: check type of object passed
to K_POLL_EVENT_INITIALIZER") it is no longer possible to use arbitrary
type literals with the initializer macro. Misconstructing a k_poll_event
type for test purpose must be done explicitly.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-12 10:24:21 +02:00
Lauren Murphy
0a3f2f0397 sensors: bme280: update sample to new async api
Updates BME280 sample to new async sensor API.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-06-11 20:28:24 -05:00
Lauren Murphy
f9db6ed414 drivers: sensor: update bme280 to new async api
Updates BME280 driver to new async API.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-06-11 20:28:24 -05:00
Marek Matej
1b77d0f596 drivers: clock: esp32: fix ROM baudrate
Allow to update ROM Uart baudrate each time the
clocks are reconfigured.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-11 20:27:58 -05:00
Chris Friedt
598b2e11b2 posix: conditionally generate posix_clock syscall header
If POSIX_TIMERS is not configured, there is no reason to
generate syscall headers from posix_clock.h .

Make header generation conditional on POSIX_TIMERS in
this case.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-11 20:27:32 -05:00
Mateusz Holenko
85f9bf9f1c dts: nxp: Fix sramx offset for LPC51U68
The current value is wrong and overlaps with `syscon`.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-06-11 20:27:10 -05:00
Juliane Schulze
3c1590cbad drivers: tmag5273: fix documentation of tmag5273_check_device_status
Typos and invalid doxygen documentation.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-06-11 19:47:02 -04:00
Juliane Schulze
7ddbdb23df drivers: tmag5273: remove unneccessary check
If an immediate return on error is used, an additional result check in
sample_fetch can be neglected. Since they are now treated as errors,
also changed logging type.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-06-11 19:47:02 -04:00
Ederson de Souza
ba0eef375c cmake: Flag for EDK Makefile.flags was being used on cmake.flags
Another case of subtle typo.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-11 19:46:42 -04:00
Ederson de Souza
3caaa19c4b cmake: Remove dead code from EDK generation
This code was supposed to be gone on the patch that handled imacros, but
it was forgotten.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-11 19:46:42 -04:00
Ederson de Souza
a7ac049406 cmake: Pass path list in a Windows friendly way
When invoking cmake/llext-edk.cmake, CMakeLists.txt was sending the list
of includes as a colon separated list. On Windows, this list was
actually a single item, so it wasn't being parsed properly.

This patch sends the list as a cmake list and uses separate_arguments()
on the receiving side to fix it.

Fixes #73069

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-11 19:46:42 -04:00
Ederson de Souza
bc9a1be976 cmake: Fix variable casing mixup
A variable called llext_cflags was mixed up with another called
LLEXT_CFLAGS, and that caused some host directories to end up leaking
unnecessarily into the EDK.

Fix by using only the lower case version.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-11 19:46:42 -04:00
Daniel DeGrasse
7277c85462 drivers: display: st7796s: remove unused gpio pins
Remove unused includes and gpio pins from st7796s driver, which were
leftover from before this driver used the MIPI DBI API class.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-11 19:46:21 -04:00
Jose Alberto Meza
02272f9b0e doc: releases: Update eSPI section in migration and release
Indicate KConfig and enum value changes with respect to new inclusive
term in eSPI specification 1.5.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-06-11 19:46:08 -04:00
Jose Alberto Meza
f854b8b799 drivers: samples: espi: Adjust terms per eSPI specification 1.5
Replace CONFIG_ESPI_SLAVE by CONFIG_ESPI_TARGET
Replace CONFIG_ESPI_SAF by CONFIG_ESPI_TAF
Replace ESPI_BUS_SAF_NOTIFICATION with ESPI_TAF_BUS_NOTIFICATION in API

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-06-11 19:46:08 -04:00
Daniel DeGrasse
eff681d50d doc: flash_debug: update NXP flash debug probes section
Update NXP flash debug probes section, to attempt to clarify the
differences between OpenSDA, LPC-Link2, and MCU-Link probes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-11 19:45:34 -04:00
Johan Hedberg
bf363d7c3e Bluetooth: Host: Avoid processing "no change" encryption changes
If the new encryption state is the same as the old one, there's no point in
doing additional processing or callbacks. Simply log a warning and ignore
the HCI event in such a case.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 19:45:09 -04:00
Marc Herbert
bab7df9f9e .gitignore: do not ignore .\#* files
I just wasted dozens of failed build attempts and more than 5 minutes
staring at this cryptic build error:

```
Traceback (most recent call last):
  File "scripts/build/parse_syscalls.py", line 216, in <module>
    main()
  File "scripts/build/parse_syscalls.py", line 194, in main
    syscalls, tagged = analyze_headers(args.include, args.scan,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "scripts/build/parse_syscalls.py", line 118, in analyze_headers
    with open(one_file, "r", encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory:

                  'zephyr/include/zephyr/pm/.#device.h'
```

Because this file didn't show in `git status`, I kept believing that
building from scratch would make it go away.

`git status` should never hide source files that the build system uses.
Maybe `parse_syscalls.py` should be "Emacs-aware"? Or maybe not. As long
as it's not, `git status` must show every spurious file that might
affect the build and break it.

This is the first time that I see an error like this; so Emacs does not
leave files like this behind on a regular basis. Only when there
is a some sort of glitch; and then we definitely want to know about it.

More generally speaking, the choice of an editor is a personal
preference. So patterns matching Emacs files belong to personal
$HOME/.gitignore files; they shouldn't be mass-duplicated into every
single git repo instead. Stuffing every project with editor-specific
configuration of every editor obviously does not scale. But that's
probably for another day.

This is a partial revert of commit 3f4159c5c7 ("gitignore: Ignore
emacs temporary edit files")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-06-11 19:44:54 -04:00
Pisit Sawangvonganan
748367d118 drivers: gpio: stm32: clean up unnecessary code
Removed the unnecessary initialization of the `ret` variable in
`gpio_stm32_clock_request` where its value is guaranteed to be
overwritten by subsequent operations, then simply returned `ret`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-11 19:44:19 -04:00
Pisit Sawangvonganan
944305dc3a drivers: gpio: stm32: improve device instantiation macro
Introduced `GPIO_DEVICE_INIT_STM32_IF_OKAY` which utilizes `COND_CODE_1`
to reduce the chain of #if DT_NODE_HAS_STATUS(...) #endif

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-11 19:44:19 -04:00
Glenn Andrews
d5b653a805 Driver: Sensor: HTS221: Remove log message when trigger disabled
My students are using a disco_l475_iot1 board with HTS221 sensor.
When logging is enabled, the following log message is always emitted:
"HTS221: Cannot enable trigger without drdy-gpios"

This message is confusing to my students as they are not using the
HTS221 sensor in their projects. However since HTS221 is enabled in
the devicetree it gets initialized on boot and the log message
appears.

It doesn't seem necessary to tell people that they haven't enabled
CONFIG_HTS221_TRIGGER at log level INF. I'd be amenable to changing
this to LOG_DBG, but I don't think it needs to exist at all.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-06-11 19:43:36 -04:00
Nick Ward
2576458dce drivers: led: shell: print color as string
Human readable.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-06-11 19:43:15 -04:00
Johan Hedberg
4b8aa82801 doc: migration-guide-3.7: Add information about new HCI API
Document the changes coming with the new HCI driver API, and provide
information for how to migrate existing drivers.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
0b8e56120c Bluetooth: doc: Update documentation for the new HCI API
Update references to devicetree chosen properties and how devicetree nodes
should be defined in order to enable the new HCI drivers.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
21356bc7f6 Bluetooth: deprecate old HCI driver APIs
Deprecate the bt_recv() and bt_hci_driver_register() APIs. There are no
more users in the tree itself, but we should let any out of tree users
migrate before removing these APIs completely.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
3ecd7dbd4c Bluetooth: drivers: Convert Silabs HCI driver to new API
Convert the slz_hci.c HCI driver to use the new HCI driver API. This also
fixes the HCI bus type to correctly indicate VIRTUAL instead of UART.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
fcddefd7f0 Bluetooth: drivers: Convert NXP HCI driver to new API
Convert the hci_nxp.c HCI driver to use the new HCI driver API. Also move
the driver binding under dts/bindings/bluetooth, like all other HCI driver
bindings.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
f33aab9889 Bluetooth: drivers: Convert DA1469X HCI driver to new API
Convert the Renesas DA1469X HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
501e7158a8 Bluetooth: drivers: Convert STM32 IPM driver to new API
Convert the ipm_stm32wb.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
b7b606bdaf Bluetooth: drivers: Convert ST STM32WBA driver to new API
Convert the hci_stm32wba.c driver to the new HCI API. Unlike in most cases,
the devicetree node is already enabled on the SoC level (rather than board
level). This is in order to mirror how the Kconfig option was originally
enabled, i.e. on the SoC level.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
5a09c17746 Bluetooth: drivers: Convert SPI drivers to use new HCI API
Convert the spi.c and hci_spi_st.c drivers to use the new HCI driver API.
Both drivers are converted in one go since one derives from the other's
devicetree binding.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
8953b4eb63 Bluetooth: drivers: Convert ESP32 HCI driver to new API
Convert the hci_esp32.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
e7637413b6 Bluetooth: drivers: Convert psoc6_bless driver to new API
Convert the hci_psoc6_bless.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
6e584a4773 Bluetooth: drivers: Convert IPC driver to new API
Convert the ipc.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
af750cd5a6 Bluetooth: Use device tree to indicate vendor exension support
Introduce a new bt-hci-vs-ext device tree boolean property to indicate
device tree support.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
589b92baaf Bluetooth: Kconfig: Remove BT_NO_DRIVER
There are no actual users in the main tree anymore, so just remove this
option.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
130ae9e120 Bluetooth: drivers: Convert Ambiq Apollo driver to new API
Convert the Ambiq Apollo HCI driver to the new HCI API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
eddac27c4e Bluetooth: samples: Fix PAwR samples to match board capabilities
These samples were enabled for an nRF board, even though there is no
upstream support for the feature. Additionally the sample.yaml files
were forcefully disabling any in-tree HCI drivers, making it impossible
to use e.g. qemu with an external HCI controller. Simply remove the nRF
board from the list, as well as the odd Kconfig HCI driver options.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
c68770eda8 qemu: Use BT_UART instead of BT_NO_DRIVER to enable serial port
The CONFIG_BT_NO_DRIVER option will be going away. Use the
CONFIG_BT_UART option instead (selected by UART HCI drivers) to
determine whether to enable the qemu serial port for Bluetooth.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
1824dcda7c Bluetooth: tests: Convert to new HCI driver API
Convert all Bluetooth tests that define dummy HCI driver instances to use
the new HCI driver API. This requires both a custom DTS binding as well
as an app-specific overlay file.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
66b53866a7 Bluetooth: drivers: userchan: don't fail everything if driver init fails
With the new HCI driver model it's not always critical if a single
instance fails to initialize. This is especially true for many test
applications which provide their own HCI drivers. Instead of causing a
complete failure, simply fail to initialize the driver instance.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
bb91aa0b7f Bluetooth: drivers: Convert userchan driver to new API
Convert the HCI User Channel driver to use the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
db753c1474 boards: nrf52_bsim: Add support for using UART as HCI
Add support for using an UART instead of the native controller. This is
accomplished with a custom DTS overlay for the tests that require it.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
97c3a1e4be Bluetooth: drivers: hci: Get rid of Kconfig choice
The drivers should be independent after the move to the new HCI driver
API. Having them as a choice also has unexpected consequences with some
drivers being unexpectedly enabled.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
00d66339fc Bluetooth: drivers: h5: Convert to new HCI driver API
Convert the H:5 HCI driver to use the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
f8befbd67a Bluetooth: host: hci_raw: Use existing H4 defines from hci_types.h
Use existing defines instead of redefining our own.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
7a4cd81376 Bluetooth: samples: hci_uart_async: Remove bt_recv() dependency
Apps shouldn't try to call bt_recv() since that's not a public API and
is going completely away with the new HCI driver API. Just inject the
buffer directly into the k_fifo which we anyway have access to in this
app.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
44e0f5fee3 Bluetooth: controller: Update to new HCI driver API
Update the native controller to the new HCI driver API. The devicetree
node is placed under existing `radio` nodes, which seemed like the most
intuitive option.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
3482a3be53 Bluetooth: drivers: Convert H4 (UART) HCI driver to new API
Convert the H4 driver to the new HCI driver API. This includes updating
also any boards that use the driver, i.e. adding the appropriate
devicetree node and chosen property to them.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
dcff0be792 Bluetooth: host: Add support for new-style HCI drivers
Add support for HCI drivers which use the newly defined HCI driver API.
Since Zephyr (currently) only supports a single HCI driver instance,
boards are expected to indicate the instance using a new devicetree
chosen property `zephyr,bt_hci`.

In order to maintain compatibility with not-yet-converted drivers the
code has been placed behind `#if DT_HAS_CHOSEN(zephyr_bt_hci)`
conditionals.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
7fb39a627b Bluetooth: include: Add initial HCI driver API definition
Add the initial HCI driver header file and driver API definition. This
is distinct from drivers/bluetooth/hci_driver.h in order to support
legacy (unconverted) drivers for the time being.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
8ae074ec18 Bluetooth: Add devicetree base binding for Bluetooth HCI drivers
Add a base binding for Bluetooth HCI drivers. All HCI drivers should
extend this binding (through an include directive) to create their own
binding files.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Lauren Murphy
9ac63390db samples: sensor: update dht_polling to new API
Updates dht_polling sample to new sensor API.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-06-11 19:42:24 -04:00
Johan Hedberg
aca152a941 manifest: Update hal_silabs version
Update the hal_silabs version. The only change is an added explicit name
for the module, so that it behaves consistently with other HAL modules.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 10:32:21 -07:00
Flavio Ceolin
826cbb4522 doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-5754

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-11 20:31:28 +03:00
Anas Nashif
1370216ea3 doc: tsc role and working group definition
- Define TSC member role and add rights & responsibilities section.
- Document elected TSC member process
- Document working groups, membership and decision making processes in
  TSC working groups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-11 20:24:02 +03:00
Anas Nashif
911df45d8e doc: update charter link
Update link to charter and use something more recent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-11 20:24:02 +03:00
Thomas Stranger
19ded99c92 doc: migration-guide: sensor: sensirion: shtcx: chip property
Add release notes for removed chip dts property of the
sensirion shtcx binding.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-06-11 20:12:15 +03:00
Thomas Stranger
34cac05775 drivers: sensor: sensirion: shtcx: remove chip property
Removes the dts "chip" property, the compatible should be used instead.

Any existing dts should be converted from something like:

test_i2c_shtc3: shtc3@70 {
	compatible = "sensirion,shtcx";
	reg = <0x70>;
	chip = "shtc3";
	measure-mode = "normal";
	clock-stretching;
};

to something like:

test_i2c_shtc3: shtc3@70 {
	compatible = "sensirion,shtc3", "sensirion,shtcx";
	reg = <0x70>;
	measure-mode = "normal";
	clock-stretching;
};

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-06-11 20:12:15 +03:00
Nick Ward
49d09ecb28 sensor: current_amp: fix fractional value
It needs to be x1000

Also correct the units used in the log

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-06-11 20:11:53 +03:00
Daniel DeGrasse
5525c16c45 samples: add rt1050 to display samples with shield
Add RT1050 EVK to platform-allow list for display sample tests with
RK043* based shields.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-11 20:07:38 +03:00
Daniel DeGrasse
2061e60a78 boards: nxp: mimxrt1050: remove display, document usable shields
Remove display definition from MIMXRT1050 EVK, and document the shields
that can be used with the board's FPC 40+6 pin parallel display
interface.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-11 20:07:38 +03:00
Phi Bang Nguyen
59af15a219 boards: nxp: mimxrt1170_evk: Enable video feature
Enable video feature on cm7 evk and evkb which are tested with ov5640
camera.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-11 20:06:53 +03:00
Phi Bang Nguyen
67a3e71652 boards: shields: Add shield for NXP ov5640 camera modules
Add a shield for NXP ov5640 camera modules. This shield uses a 44-pin
board-to-board connector which is supported on NXP RT1170 and RT1160 EVKs.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-11 20:06:53 +03:00
Armin Brauns
0c23cf94a4 include/kernel: check type of object passed to K_POLL_EVENT_INITIALIZER
This prevents accidentally passing the wrong pointer type (e.g. one level
of indirection too many) as the object `void *`.

Co-authored-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-06-11 20:06:32 +03:00
Declan Snyder
45d3eb27b8 drivers: nxp_enet: Add fuse map address
Add functionality to use fused mac address

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-11 20:05:50 +03:00
Declan Snyder
f203a8b193 drivers: nxp_enet: Fix nxp,unique-mac
nxp,unique-mac actually is not meant to be universally
unique, the LAA bit should therefore be set, and fix the
description of the property in the binding to clarify
the intended usage of this property.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-11 20:05:50 +03:00
frei tycho
139f16702a lib: utils: avoid Boolean-to-integer type casts
Avoid casting expression to an inappropriate essential type.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-11 20:05:37 +03:00
Ruben Völl
9bb3853e67 tests: drivers: uart_emul: extend test case for async API
- Tests that the API of the uart-emul also works with the async API
- Tests that `uart_emul_set_release_buffer_on_timeout()` configures the
  behavior as expected
- The tests are now splited into three different configurations: only
  polling API enabled, additionally interrupt driven API enabled and
  additionally async API enabled
- Enabled `native_sim` board

Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
2024-06-11 20:05:24 +03:00
Ruben Völl
2c82681bec driver: uart: emul: Add support for async UART API
As it is up to a driver implementation if a partial filled buffer is
released, this behavior can be configured during runtime to allow testing
for this edge case.

Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
2024-06-11 20:05:24 +03:00
Ruben Völl
e5dd2376b3 drivers: uart: emul: Remove uart_emul_work struct
This structure is bad style and not needed. Instead get the surrounding
`struct uart_emul_data` with `CONTAINER_OF()` directly.

Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
2024-06-11 20:05:24 +03:00
Scott Worley
7c0b038d6b soc: microchip: mec: Common SoC init updated to MEC5 HAL v0.2
Microchip MEC5 HAL version 0.2 standardizes HAL API and register
define names. Updated the SoC common initialization code using
new HAL API names.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-06-11 20:04:46 +03:00
Scott Worley
ec1f760b6a manifest: hal_microchip: Update to version 0.2 of MEC5 HAL
Customers requested MEC5 HAL naming standardization.
Version 0.2 of MEC5 HAL completes majority part of
HAL API and register define renaming.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-06-11 20:04:46 +03:00
Nikolay Agishev
356dfa7e79 tests: Remove obsolete filter for ARC nSIM platform
Remove nSIM platform filter for tests/lib/heap. The filter is no
longer needed as nSIM performence was improved and test timeout
was increased because of another platforms.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-11 20:04:29 +03:00
Niek Ilmer
3bb95104e8 drivers: adc device: smartbond: Add power management
Add support for power management to the sdadc.

Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2024-06-11 20:04:02 +03:00
frei tycho
44782fd8af lib: change controlling expressions in if/while to Boolean
Use `do { ... } while (false)' instead of `do { ... } while (0)'.
Use comparisons with zero instead of implicitly testing integers.
Use comparisons with NULL instead of implicitly testing pointers.
Use comparisons with NUL instead of implicitly testing plain chars.
Use `bool' instead of `int' to represent Boolean values.
Use `while (true)' instead of `while (1)' to express infinite loops.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-11 20:03:34 +03:00
frei tycho
382670690c net: change controlling expressions in while to Boolean
Use `do { ... } while (false)` instead of `do { ... } while (0)`.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-11 20:03:16 +03:00
frei tycho
ac8620c791 tracing: change controlling expressions in while to Boolean
Use `do { ... } while (false)` instead of `do { ... } while (0)`.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-11 20:02:40 +03:00
Declan Snyder
421a6820e4 dts: ke1xz: Fix base address GPIOE
Base address of gpioe is typo ignoring ranges

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-11 20:02:23 +03:00
Emil Gydesen
038fc8b6ac samples: Bluetooth: Refactor TX for unicast audio client
Refactored the unicast audio client sample to use a
separate thread for TXing, rather than the system workqueue.

This allows us to do blocking waiting operations like
buf = net_buf_alloc(&tx_pool, K_FOREVER);
and also splits the responsibility of TXing to a new
file as well.

LC3 handling have also been moved to a new file, so
that it does not pollute the source code for non-LC3
supported builds. This also fixes various issues and
improves the LC3 handling in the sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-11 17:35:30 +03:00
Emil Gydesen
ea05d61c5f samples: Bluetooth: Fix stack size for unicast audio server
The unicast audio server is actually decoding in the RX
thread, and not the system workqueue.

This is a temporary fix, as ideally it would do the
decoding in a separate thread to avoid taking too much
time in the system threads.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-11 17:35:30 +03:00
Lothar Felten
3334b55207 scripts: twister: help - change help text to match hwmv2
fix the twister help text, boards are now organized as:
boards/<vendor>/<board_name>

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-06-11 16:18:15 +02:00
Rubin Gerritsen
9cf6839b18 Bluetooth: Host: Allow conn create timeout longer than RPA timeout
https://github.com/zephyrproject-rtos/zephyr/pull/72674 fixed
a bug where this configuration did not work.

Now that this configuration is tested, we should mark it
as supported.

The timeout check that was present in the code before
was useless and was not working because the check was
run before a default timeout of 0 was converted to a timeout.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-11 16:17:46 +02:00
Rubin Gerritsen
b30d2d1bf5 Bluetooth: Host: Add a test for connection creation timeout
It seemed like there was lacking test coverage for this
functionality.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-11 16:17:35 +02:00
Emilio Benavente
e8b500fd22 tests: drivers: counter: counter_basic_api: enabled lptmr testing
Enabled the counter_basic_api test to test lptmr.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-06-11 17:04:26 +03:00
Emilio Benavente
baf7df87d8 boards: nxp: frdm_mcxn947: Enable lpmtr for frdm_mcxn947
Enabled one instance of lptmr
running from the 16k FRO.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-06-11 17:04:26 +03:00
Emilio Benavente
d85cb222e4 drivers: timer: updated lptmr_timer binding
Updated the lptmr timer binding from
nxp,kinetis-lptmr to nxp,lptmr.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-06-11 17:04:26 +03:00
Emilio Benavente
c8d6f39e11 drivers: counter: counter_mcux_lptmr: Update to start with top value
Updated the driver to start with a value to compare the counter
with otherwise the counter will not start until the user sets
the top value manually, an issue that will occur inside the counter
test.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-06-11 17:04:26 +03:00
Emilio Benavente
1a29e67c91 dts: arm: nxp_mcxn947: Added lptmr Node in dts
Added a single instance lptmr node on the
mcxn947 soc dts. Updated counter lptmr to
have max value property.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-06-11 17:04:26 +03:00
Andrej Butok
59632d5bae boards: nxp: mimxrtxxx: fix non-optimal sector distribution
- Optimize slot sizes for MCUBoot swap move algorithm
  for mimxrt595/685_evk boards.
- Use DT_SIZE_K/M macros for slot sizes.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-11 16:38:45 +03:00
Troels Nilsson
bed717e2a5 Bluetooth: Controller: Refactor of ull_adv_sync_pdu_set_clear()
ull_adv_sync_pdu_set_clear does pretty much everything, causing
it to be very complex and awkward to use. In addition, it only handles
a single PDU, meaning callers have to handle the chain.
It has been replaced with simpler, more complete functions for handling
the relevant operations

Fixed issues include:

- Fragmentation of adv data over HCI is now decoupled from PDU
  fragmentation, fixing HCI/DDI/BI-13-C, LL/DDI/ADV/BV-26-C and
  LL/DDI/ADV/BV-55-C
- Adding BigInfo now preserves the PDU chain
- Enabling periodic advertising with ADI on would sometimes fail
  due to insufficient space in a single PDU to add ADI

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-06-11 16:38:05 +03:00
Jordan Yates
b1290cb86c scripts: twisterlib: filter coverage information
When dumping logs from the `--inline-logs` option, remove any coverage
information that may be contained in those logs. Coverage dumps are
unrelated to any test failures and make it harder to find the failing
test information. In extreme cases the relevant information is lost due
to terminal scrollback limits.

If the raw dump information is required, it is still present in the
original `handler.log` file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-11 16:37:31 +03:00
Niek Ilmer
be71be5db9 drivers: adc device: smartbond: Add power management
Add support for power management to the gpadc.

Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2024-06-11 16:36:25 +03:00
Alberto Escolar Piedras
e34f29f9ea subsys/portability/CMSIS: Do not redefine TRUE & FALSE
These macros tend to be defined by too many headers.
Let's guard these definition with ifdefs to avoid
redefining them to practically the same.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-11 16:29:22 +03:00
Lucas Romero
8686c69118 tests: subsys: lorawan: add more test cases
for different numbers of lost fragments.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-06-11 16:09:23 +03:00
Lucas Romero
3a00ae48a3 tests: subsys: lorawan: run frag decoder test with both implementations
in order to make sure they work.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-06-11 16:09:23 +03:00
Lucas Romero
cad56e8005 lorawan: services: frag decoder: add lowmem implementation
that utilizes the fact that the ldpc recovery matrix is triangular and only
stores the half with non-zero values.

This implementation is hopefully going to make forward error correction
usable on lower memory devices.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-06-11 16:09:23 +03:00
Lucas Romero
69c5ef9665 lorawan: services: frag transport: prepare for pluggable decoder
by wrapping decoder implementation specific bits in #ifdefs

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-06-11 16:09:23 +03:00
Lucas Romero
ff906974b8 lorawan: services: frag transport: refactor status
to no longer be a long-lived status variable because we already map it into
is_active and this reduces the number of states the transport can be in.

It also helps us prepare for being able to plug in more decoders by
removing implementation specific bits from the general transport interface.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-06-11 16:09:23 +03:00
Ioannis Damigos
ff5df12af8 MAINTAINERS: Add ydamigos as collaborator for Renesas
Add ydamigos as collaborator for:
Renesas Smartbond Platforms
hal_renesas

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-11 16:08:18 +03:00
Rafał Kuźnia
6551492a3f soc: nordic: configure run once for nrf54h20
Erase and reset must run only once during flashing.
This prevents a situation, where the next flashed image erases the
previous one.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-06-11 14:01:35 +01:00
Rubin Gerritsen
a35d5e7851 ztest: Add macros for comparing strings
These macros allows us to compare strings in a simpler way.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-11 11:39:36 +01:00
Fabio Baltieri
4d2e46478d drivers: usb: stm32: add disconnect gpio support
Add support for GPIO controlled disconnect pullups. This is used in F1
based devices, copied from the legacy driver.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-11 11:39:19 +01:00
Krzysztof Chruściński
4d6c05928b tests: drivers: counter: counter_basic_api: Add nrf54h20 ppr
Add overlays for PPR core on nrf54h20.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-11 11:39:14 +01:00
Krzysztof Chruściński
331442f059 tests: drivers: counter: basic_api: Tweak test timing
For slow processors it is possible that setting 1 ms alarm and
then canceling it could lead to alarm expiring before it is canceled
and that was not expected in the test. Increasing timeout to 1.5ms.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-11 11:39:14 +01:00
Krzysztof Chruściński
c87ab8c566 tests: drivers: counter: nrf_rtc: fixed_top: Add nrf54h20 ppr
Add overlays for PPR core on nrf54h20.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-11 11:39:14 +01:00
Sumit Batra
8d790a8979 drivers: pwm: generate pwm with nxp flexio IP
This driver can be used for both mcux and
s32k series SoCs which have flexio IP.
PWM channel is automatically allocated by
flexio driver based on the available timers.

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2024-06-11 11:38:48 +01:00
Rahul Arasikere
63cf8e4b97 boards: arduino: portenta_h7: Updated docs.
Updated the docs to reflect changes to devicetree files.

Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
2024-06-11 11:38:41 +01:00
Rahul Arasikere
d86334365f boards: arduino: portenta_h7: Enable Ethernet and USB-HS Support.
Enable the mac node along with the necessary pinmuxing to enable the
ethernet and usb hs peripheral. I additionally defined the
`ethernet_phy_en` node the uses a fixed regulator to release
the PHY reset.

Additionally an usb_cdc_acm node was defined to enable serial over usb for
the console.

Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
2024-06-11 11:38:41 +01:00
Rahul Arasikere
68d0aaedb1 boards: arduino: portenta_h7: Add support for external QSPI Flash.
Enabled the QuadSPI node and necessary pin muxing to enable interfacing
with the external flash chip on the Portenta H7 board. The jedec data was
validated with the samples/drivers/jesd216 project to extract the
JEDEC data.
Additionally added `flash` to the list of ignored tags as the flash driver
should not be built on the M4 CPU domain.

Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
2024-06-11 11:38:41 +01:00
Rahul Arasikere
e98b0580de boards: arduino: portenta_h7: Add FMC and SDRAM1 nodes.
Enabled the flash memory controller node along with the necessary pin
muxing. This allows us to interface with the additional 8MB of external
SDRAM available on the Portenta H7 board.

This has been tested minimally with the tests/drivers/memc/ram test.

Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
2024-06-11 11:38:41 +01:00
Rahul Arasikere
27bb4bab93 boards: arduino: portenta_h7: Update clock tree to enable 400 MHz.
Previous clock frequencies were taken directly from the arduino example
and were limited to 96 MHz and 48 Mhz for the CM7 and CM4 respectively.
Updated the clock tree to take advantage of the faster clock speeds.

Introduced two board revisions as revision 1 of the portenta board does
not have the external LSE oscillator populated (default) and version 4.1
onwards does have the external oscillator populated. The user can choose
to build support for the required clock configuration using the revision
scheme built in to west. Updated the docs to reflect the same.

Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
2024-06-11 11:38:41 +01:00
Johann Fischer
1e5a501384 samples: usb: use new usbd test feature
Use new feature "usbd" to distinguish the dependency.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-11 11:38:09 +01:00
Johann Fischer
43c9176a3c tests: usb: remove feature usb_device dependency
The tests do not depend on the usb_device or usbd feature.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-11 11:38:09 +01:00
Johann Fischer
1695eed7c9 tests: udc: rework driver test configuration
Distinguish between test case dependencies where a board has a test
feature "usbd" and where no dependency is required other than the
devicetree overlay file, as here to build the UDC skeleton driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-11 11:38:09 +01:00
Johann Fischer
37fc9e26f2 boards: add new test supported feature usbd
We have recently added a new platform where the USB controller is only
supported in the new USB device support. This forces us to introduce a
new supported feature tag to distinguish the dependency. Use "usbd",
which is also the prefix of the new device support.

There are many boards that already have new driver support, but we will
replace the "usb_device" feature when the old device support is
deprecated.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-11 11:38:09 +01:00
Karol Lasończyk
a04b2ad093 boards: Enable adc node for nRF54H20 DK
Enables adc node to make it usable in tests/examples.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-11 11:37:59 +01:00
Karol Lasończyk
ba305170f6 tests: drivers: adc: Add overlay for nRF54H20 board
Adds configuration for making tests work.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-11 11:37:59 +01:00
Karol Lasończyk
3c4ea76f06 samples: drivers: adc: Add overlay for nRF54H20 PDK
Adds configuration to play with nRF54H20 PDK board.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-11 11:37:59 +01:00
Karol Lasończyk
15fa37d356 dts: Update SAADC compatible and expand nRF54H20 dtsi
Adds full description of the adc node and support for memory regions.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-11 11:37:59 +01:00
Karol Lasończyk
13196ec7c8 drivers: adc: Update adc driver to support nRF54H20 device
Expands driver to cover nRF54H20 features like 8bit sample width.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-11 11:37:59 +01:00
Karol Lasończyk
5f1fdc4b4d drivers: adc: Update adc driver to support nRF54L15 device
Expands driver to cover nRF54L15 features like AIN as GPIO configuration,
new reference voltage, different set of supported gain options.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-11 11:37:59 +01:00
Marcin Szymczyk
41071584a6 soc: nordic: vpr: remove Zifencei RISC-V extension
VPR does not implement Zifencei extension, remove it.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-06-11 03:37:03 -07:00
Cong Nguyen Huu
0781caf408 drivers: can: nxp_s32_canxl: calculate and set the TDCO
Calculate and set the Transceiver Delay Compensation Offset (TDCO).

Fixes #73824

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-06-11 10:05:24 +02:00
Przemyslaw Bida
7dc830e9db net: openthread: Add new kconfig OT options.
Adding:
	- `OPENTHREAD_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`
	- `OPENTHREAD_CHANNEL_MANAGER_CSL`
	- `OPENTHREAD_PLATFORM_LOG_CRASH_DUMP`
	- `OPENTHREAD_MULTICAST_DNS`
	- `OPENTHREAD_VERHOEFF_CHECKSUM`

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-06-11 10:05:04 +02:00
Przemyslaw Bida
4c34e95904 net: openthread: Add implementation of TCAT advertisement.
Adds implementation of tcat advertisement API.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-06-11 10:05:04 +02:00
Przemyslaw Bida
54d9fe36a1 manifest: net: openthread: Regular openthread upmerge to 3873c6f.
Regular openthread upmerge to `3873c6fcd5a8a9dd01b71e8efe32ef5dc7923bb1`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-06-11 10:05:04 +02:00
Jakub Topic
2efc447c1b drivers: rtc: add RV3028 RTC driver
Adds support for the Micro Crystal RV3028 RTC connected to the I2C bus.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-06-10 21:03:59 -04:00
Jakub Topic
660e8f690f dts: bindings: add binding for the RV3028 RTC
Adds a devicetree binding for the Micro Crystal RV3028 RTC connected to
the I2C bus.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-06-10 21:03:59 -04:00
Declan Snyder
2e4e9a9494 dts: bindings: Fix KSZ8081 property names
Fix KSZ8081 binding properties:
- reset-gpios and interrupt-gpios are generally standard
  properties and therefore should not be using a special name
- mc, is not the correct vendor prefix for microchip

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-10 21:03:35 -04:00
Declan Snyder
62b4e3e08e dts: ke1xz: Fix ranges warning on GPIO
Fix simple bus reg / ranges warning from GPIO
nodes by giving the parent nodes addresses
and describing a ranges other than empty.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-10 21:03:18 -04:00
Jose Alberto Meza
5971867fad include: zephyr: drivers: eSPI API clarifications
Clarify eSPI reset bus event convention, which follows eSPI
physical reset pin.
Clarify eSPI OOB packet length expectations for eSPI driver
clients and eSPI drivers implementation

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-06-10 19:45:46 -05:00
Maureen Helm
edaa52393e MAINTAINERS: Update ADI platform files for max32 family
Updates the `platform: ADI` area to match max32 drivers, dts, and soc
files that were recently introduced.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-06-10 19:44:35 -05:00
Aurelien Jarno
d78a942945 tests: drivers: bbram: add nucleo_g071rb as an integration platform
Add the nucleo_g071rb board as an integration platform to the bbram
test.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-10 15:16:59 -05:00
Aurelien Jarno
d388ff9719 boards: nucleo_g071rb: enable backup registers
Enable the backup registers on the nucleo_g071rb board for testing
purpose.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-10 15:16:59 -05:00
Aurelien Jarno
2bff395b87 dts: arm: st: g0: add stm32-bbram node
On STM32G0, the backup memory is defined as part of the TAMP peripheral.
Use the same workaround as on STM32WL to add the node as part of the
RTC.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-10 15:16:59 -05:00
Aurelien Jarno
326d6059c6 drivers: bbram: stm32-bbram: fix write for devices with TAMP
On devices where the backup memory is part of the TAMP peripheral, the
Backup Domain Protection prevents write to the backup registers. This
fix disables the protection before writing registers and re-enables it
afterwards.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-10 15:16:59 -05:00
Reto Schneider
e90c89d453 soc: silabs: Remove SOC_VENDOR_SILABS
Until now, the support for Silicon Labs SoCs is limited to the Gecko
families.

This commit allows upstreaming support for non-Gecko based SoCs produced
by Silicon Labs (i.e. SiM3U1xx).

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-06-10 15:15:34 -05:00
Reto Schneider
ce35fbfbb2 driver: Move away from SOC_VENDOR_SILABS
This allows to remove SOC_VENDOR_SILABS in a later commit.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-06-10 15:15:34 -05:00
Reto Schneider
d92e1e709e modules: Move away from SOC_VENDOR_SILABS
This allows to remove SOC_VENDOR_SILABS in a later commit.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-06-10 15:15:34 -05:00
Fin Maaß
0c073b409f docs: .gitignore: ignore coverage files
ignore files, that are generated when
making the API doc coverage report.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-10 15:13:16 -05:00
Bjarki Arge Andreasen
597b838e84 samples: net: cellular_modem: include at shell
Include new AT shell alongside the PM device shell to allow
for powering back up the modem after the sample has completed
to test out the at shell.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-10 15:12:34 -05:00
Bjarki Arge Andreasen
1dab746dc6 drivers: modem: add at shell
Add AT shell which uses the newly exposed pipes to
send/receive at commands from the modem identified by the
chosen node zephyr,at-shell.

To send an AT command, the shell command at is used, followed
by the command to send, and an optional response which
overwrites the default "OK"

For example, sending "AT", which returns "OK"
  modem at at <- command
  OK <- response

Enabling echo, then sending "AT" which will now return "AT" + "OK"
  modem at ati1 <- command
  OK <- response
  at at <- command
  at <- response
  OK <- response

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-10 15:12:34 -05:00
Bjarki Arge Andreasen
e878024a3d modem: drivers: add user pipes to cellular modem driver
Add two DLCI channels to the cellular modem driver, and expose
them using the modem pipelink module.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-10 15:12:34 -05:00
Bjarki Arge Andreasen
03596feda1 tests: subsys: modem: add test suite for pipelink
Add test suite for pipelink module

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-10 15:12:34 -05:00
Bjarki Arge Andreasen
1f7d0b6cb0 modem: add modem_pipelink module
Add modem pipelink module which exposes modem pipes globally.
The pipelink module implements a callback to inform when a
pipe becomes available to use by whichever modem is attached
to it. This could be a shell, or a network interface.

The module aims to allow modem drivers to be split into modules,
and allowing applications to implement their own custom logic
without altering the modem drivers.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-10 15:12:34 -05:00
Alessandro Manganaro
7b95c1a872 west.yml: STM32WBA Cube FW 1.3.1 updates
STM32WBA Cube FW 1.3.1 updates

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-06-10 15:04:36 -05:00
Alessandro Manganaro
57044d2d61 drivers: bluetooth: hci: STM32WBA driver updates according Cube FW 1.3.1
STM32WBA Bluetooth HCI driver updates according Cube FW 1.3.1

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-06-10 15:04:36 -05:00
Alessandro Manganaro
7e9d07537d soc: st: stm32: stm32wbax: Updating hci interface with Cube FW 1.3.1
Updating hci interface according STM32WBA Cube FW 1.3.1

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-06-10 15:04:36 -05:00
Jukka Rissanen
2b4e137656 tests: net: socket: Avoid macro error with zsock_sendto
The preprocessor gives this error when calling zsock_sendto
in user mode when there is a mismatch with amount of parameters
to the sendto wrapper call.

  tests/net/socket/udp/src/main.c: In function ‘comm_sendto_recvfrom’:
  tests/net/socket/udp/src/main.c:125:46: error: macro "zsock_sendto" \
                                 requires 6 arguments, but only 5 given
  125 |                             0, &addr, addrlen);
      |                                              ^
  In file included from include/zephyr/net/socket.h:1381,
                 from tests/net/socket/udp/src/main.c:15:
  include/generated/zephyr/syscalls/socket.h:266: note: \
                      macro "zsock_sendto" defined here
  266 | #define zsock_sendto(sock, buf, len, flags, dest_addr, addrlen)

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-10 15:03:20 -05:00
Jukka Rissanen
7bb4013d8e net: tracing: Add socket tracing support
If network socket tracing is enabled, then the system will track
various socket API calls for usage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-10 15:03:20 -05:00
Lucas Tamborrino
f071a26cca tests: spi: spi_loopback: organize esp32 based boards
Move esp32 based boards to `soc` folder to avoid repeated files.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-06-10 14:56:24 -05:00
Lucas Tamborrino
604ea9243a drivers: spi: esp32: Fix clock initialization
The clock should be initialised only once at the
drivers init function.

Check wether the subsys needs to be disabled in
peripheral initialization according to reset reason
in clock control.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-06-10 14:56:24 -05:00
Fin Maaß
54cb89b8d7 tracing: fix k_realloc trace functions
fix wrong amount of arguments for
k_realloc trace functions.

fixes #73996

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-10 14:54:49 -05:00
Fabio Baltieri
328365989f kernel: mem_slab: only define slab_ptr_is_good with assert enabled
Add a __ASSERT_ON guard around slab_ptr_is_good, as that is only used in
assertions and leaving it on seems to generate a build warning with some
clang versions:

kernel/mem_slab.c:207:20: error: unused function 'slab_ptr_is_good'
  207 | static inline bool slab_ptr_is_good(struct k_mem_slab *slab,...
      |                    ^~~~~~~~~~~~~~~~

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-10 17:46:10 +01:00
Tomasz Chyrowicz
f15a2e8ca8 scripts: nrf_common: Handle SUIT artifacts
Handle MPI and root manifest for radio core separately from the main
build system logic.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2024-06-10 17:03:14 +03:00
Ali Hozhabri
d500a3f35c samples: boards: stm32: Add a sample to support ST BlueNRG GUI app
Introduce a sample for BlueNRG-based devices to support interaction with
ST BlueNRG GUI application based on U(S)ART protocol.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-06-10 07:03:05 -07:00
Ali Hozhabri
569183bbad drivers: bluetooth: hci: Add BlueNRG reset API to ST HCI SPI BT driver
Add API to perform hardware reset optionally entering firmware updater
mode.

Remove redundant declaration for bt_spi_send_aci_config; otherwise, we will
have compiler warning if CONFIG_BT_BLUENRG_ACI is not set.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-06-10 07:03:05 -07:00
Ali Hozhabri
d99c4bdc46 include: drivers: bluetooth: Introduce BlueNRG reset API
Introduce BlueNRG reset API for ST HCI SPI BT driver.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-06-10 07:03:05 -07:00
Arunmani Alagarsamy
d12044dec5 boards: silabs: efr32_radio: Add USART pinctrl configuration node
this commit introduces a usart pinctrl node to enable the spi functionality
in the efr32_radio board. the location* properties have been deprecated
so pinctrl support has been added in the device tree included file.

Before this commit (using deprecated location properties):
- usart@40010400 (DISABLED)

After this commit (using pinctrl properties):
- usart@40010400 (READY)

Signed-off-by: Arunmani Alagarsamy <arunmani.a@capgemini.com>
2024-06-10 07:02:52 -07:00
Adrien MARTIN
6cecdb1e14 boards: silabs: efr32xg24_dk2601: fix flash partitions labels mismatch
This commit fix the mismatch between flash partition labels and node
roles on the efr32xg24_dk2601 board.

Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
2024-06-10 07:02:32 -07:00
Marcio Ribeiro
86ff968718 tests: drivers: adc
adds test case for esp32 adc with dma enabled

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-06-10 07:02:19 -07:00
Marcio Ribeiro
19d8ade5fa drivers: adc: esp32: dma enable
adc dma mode operation on ESP32S3 and ESP32C3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-06-10 07:02:19 -07:00
Yassine El Aissaoui
bb770c5965 samples: tests: bluetooth: Add support for frdm_rw612
Adding bt_tester support.

Adding bt_tester app build
with Twister for frdm_rw612 board

Fix failing tests/samples due to unsufficent MPU ressources
by releasing unnecessary MPU regions.

Twister builds added on peripheral/central ht and
enabled Power manager on those examples to cover
the CI builds with PM enabled.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-10 07:02:06 -07:00
Yassine El Aissaoui
c7c1e453ad boards: frdm_rw612: Update for BLE enablement
- Update Doc with BLE info
- Configure board for BLE
- Add pinctrl for flexcomm0 in usart mode
needed for BLE tester application

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-10 07:02:06 -07:00
Marek Matej
9f1a4e3e4f soc: espressif: esp32s3: add cross segment call check
Add build check that would detect unwanted calls
from the `iram0.loader_text`, which is the last
bootloader segment to be alive.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-10 16:58:28 +03:00
Marek Matej
61bb79c7ea soc: espressif: esp32s3: fix memory utilization
Fixed bootloader memory layout.
Improved memory utilization.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-10 16:58:28 +03:00
Benjamin Cabé
1f058383ae doc: security: improve ETSI 303645 table layout
Improve ETSI 303645 layout both for HTML (use more appropriate column
widths) and PDF (use landscape orientation).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-10 16:58:10 +03:00
Jakub Zymelka
502fcac821 arch: riscv: core: Enable RISCV IRQs for no multithreading
Enable MSTATUS.IEN to allow RISCV interrupts for
non-multithreaded applications.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-06-10 16:57:44 +03:00
Andrej Butok
0da71234e6 boards: nxp: kinetis: fix non-optimal sector distribution
- Optimize slot sizes for MCUBoot swap move algorithm
  for frdm_k22f/k64f/k82f, twr_ke18f/kv58f220m,
  hexiwear_mk64f12 and rddrone_fmuk66 boards.
- Use DT_SIZE_K/M macros for slot sizes.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-10 16:57:25 +03:00
Guennadi Liakhovetski
78d9abdab4 llext: disable EXPORT_SYMBOL() when CONFIG_LLEXT=n
EXPORT_SYMBOL() isn't needed when CONFIG_LLEXT is deselected, it only
needlessly creates objects, that make the resulting image larger.
Make it a NOP when CONFIG_LLEXT=n.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-06-10 16:57:09 +03:00
Celina Sophie Kalus
a5c67391bb soc: stm32h7: m4: Always enable hardware semaphore clock
When BCM4 bit is set to zero, the hardware semaphore clock is never
enabled on startup. The hardware semaphores might still randomly work,
but very unreliably, and the locking procedure will need several retries
despite no competition on the hardware semaphores. This leads to wasted
clock cycles on the M4 and sometimes even random kernel panics.

This can be solved by always enabling the hardware semaphore clock in
the init procedure of the M4, regardless of whether it is used within
the initialization or not. On the M7, it is already always enabled.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-06-10 16:56:59 +03:00
Daniel Nejezchleb
d6ed91795d net: tcp: Fix context leak during connect
Replaced tcp_out() with tcp_out_ext() when sending
SYN during tcp connect, so we can intercept error value,
beacuse in such case the packet would not be sent at all
and the stack would not trigger any mechanism to flush
this context so it ends up leaking. These scenarios can
arise when the underlaying interface is not properly
configured or is disconnected. The conn is marked to be
closed and is closed before exiting tcp_in().
Since we can now identify this case we can also exit
early in the net_tcp_connect() function and not wait
for any timeout.

Signed-off-by: Daniel Nejezchleb <dnejezchleb@hwg.cz>
2024-06-10 16:56:39 +03:00
Benjamin Cabé
c9a4386a92 doc: logging: fix LOG_INST_HEXDUMP_DBG link
fixed misspelled mention to LOG_INST_HEXDUMP_DBG

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-10 16:56:25 +03:00
Valerio Setti
f8ce4a8f00 doc: describe changes from PR 71827 and PR 72243
This commit updates migration-guide and release-notes docs with
the changes introduces by PR 71827 and PR 72243.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-10 15:01:06 +03:00
François Baldassari
e94af5b153 Litex: clock: Undefined behavior due to unchecked return code
Found via static analysis. Two separate error paths where failing to
check the return code leads to undefined behavior:
1. In `litex_clk_get_phase`, the divider stays set to 0 when
   `litex_clk_get_clkout_divider` errors out, which leads to a division
by 0.
2. In `litex_clk_calc_duty_normal`, the `duty` struct is used
   uninitialized if `litex_clk_get_duty_cycle` errors out.

In both case, checking the return code and returning early resolves the
issue.

Signed-off-by: François Baldassari <francois@memfault.com>
2024-06-10 15:00:33 +03:00
Piotr Koziar
9037a708ee drivers: ieee802154_nrf5: Use BLE.ADDR instead of FICR to create EUI64.
Use BLE.ADDR to create unique (to some extent) EUI64
on nRF54H20 in some cases inside the IEEE 802.15.4 driver.

The amount of EUI64-s available in such a way is very limited
(~16 million).
However, currently there does not seem to be another feasible way to
get device identifiers on nRF54H20 (such are kept in SICR, to which the
radio core has no access).

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar
17a3c6dc24 modules: hal_nordic: turn off temperature update by default for nRF54H20.
Adds an appropriate condition to the Kconfig as
the temperature driver is not supported for nRF54H20 devices yet.

Without this change, a build with NRF 802.15.4 libraries produces
Kconfig error.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar
e66b382639 ipc: fix return code of icbmsg backend send operation.
This commit fixes the issue where a serialization
error was reported after properly sending a data with 'icbmsg' backend.

The icbmsg send function's return code is set to
the sent data's len as in other backends.
The related docs were fixed and updated.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar
89c4afa3b8 modules: hal_nordic: implement hfclk start/stop for nRF54H20.
Clock_control is currently not supported on nRF54H20.
This commit adds new way of handling the hfclk targeted for nRF54H20.

This solution shall be replaced once the clock_control is supported
for nRF54H20.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar
cd5d5a64f5 dts: nrf54h20: add grtc channel 15 to the pool.
Adds channel 15 to the pool of grtc channels available
for allocation (i.e. with 'z_nrf_grtc_timer_chan_alloc')
on nRF54H20.

The change is motivated by lack of available channels
for the nrf_802154_timestamper when building for nRF54H20.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Georgij Cernysiov
6be31f5243 drivers: flash: stm32: move memmap config
Move STM32_MEMMAP outside of SOC_FLASH_STM32.

That allows memory-mapped application to
be built without internal flash controller.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-06-10 14:58:52 +03:00
Ioannis Karachalios
c8b2f2e2b6 drivers: dma: smartbond: Add missing direction case
This commit should deal with adding a missing
direction case  as memory-to-peripheral
and peripheral-to-memory transfers
should be considered the same.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-10 14:58:38 +03:00
Ioannis Karachalios
c61ccd9af0 dts: renesas: smartbond: Add missing #dma-cells binding
This commit should address the #73803 issue
where the DMA node does not provide support
for the #dma-cells binding. Peripherals should
specify one or more DMA channels via the dmas
and optionally dma-names DT properties.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-10 14:58:38 +03:00
Benjamin Cabé
9ee3bf221d doc: pdf: add ImageMagick converter extension
Our documentation uses image formats such as WebP that are not supported
by LaTeX. This commit enables Sphinx's sphinx.ext.imageconverter
extension, and updates the documentation to indicate ImageMagick is
required to build docs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-10 14:58:16 +03:00
Johan Hedberg
b46fb464cb MAINTAINERS: Add a maintainer and collaborators to hal_silabs
Update the status to maintained, add a maintainer and collaborators, and
also update the label to match the recent spelling change ("SiLabs" ->
"Silabs").

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-10 02:00:33 -07:00
Johan Hedberg
9ba4aab76e MAINTAINERS: Add a maintainer and collaborator for Silabs Platforms
Add Johan, Jérôme and Aksel to Silabs Platforms. Also update the subsystem
and GitHub label name from "SiLabs" to "Silabs", since this is the more
usual spelling.

Signed-off-by: Aksel Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-10 02:00:33 -07:00
Eve Redero
65154e644b doc: cmake: fix cmake config documentation
In new hardware model, the arch subfolder is no more: updating cmake config
documentation to reflect this change

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2024-06-10 00:59:50 -07:00
Georges Oates_Larsen
7fa6b53ac3 net: shell: Add IPv4 and IPv6 connectivity events
Add descriptions for recently introduced IPv4 and IPv6
connectivity events to the net event monitor.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Georges Oates_Larsen
976e0a49e4 test: net: conn_mgr: Add IPv4/IPv6 notif test coverage
Modify the test cycle routines to verify recently added IPv4- and
IPv6-specific events.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Georges Oates_Larsen
85c4cb9265 net: conn_mgr: Add IPv4 and IPv6 tracking
conn_mgr now fires:

- NET_EVENT_L4_IPV4_CONNECTED
- NET_EVENT_L4_IPV4_DISCONNECTED
- NET_EVENT_L4_IPV6_CONNECTED
- NET_EVENT_L4_IPV6_DISCONNECTED

These events track whether there are any ready ifaces offering
specifically IPv4 or specifically IPv6 connectivity.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Georges Oates_Larsen
32ae816d0b net: conn_mgr: Simplify blame handling
Don't track up/down blame separately.
Instead, track a single last-blame iface.

Don't track blame iface inside set_ready.
Instead, track directly inside handle_update.

These two changes will simplify the addition
of blame for IPv4- and IPv6-specific events.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Georges Oates_Larsen
875755fbb2 net: conn_mgr: Track ready count ephemerally
Instead of incrementing and decrementing global counter,
just recompute the ready-count from scratch every time
conn_mgr_mon_handle_update is called.

This will simplify the introduction of additional ready count types.

This should have no externally observable impact on the behavior of
conn_mgr.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Robert Lubos
3501d6e6d4 net: shell: ipv4: Add information about ACD
Print information in IPv4 shell whether address conflict detection is
enabled or not.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos
f3d6324bca tests: net: all: Enable IPv4 ACD in the test suite
Make sure ACD is enabled in the build-all configuration.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos
c0161c8052 net: l2: ethernet: arp: Simplify ACD case
In case of ACD Probe/Announcement, all we need is to generate ARP
packet, we don't really want any cache entries to be created or searched
for. There was a bug, that a cache entry was created for the
Announcement sent, resulting in skipped ARP packet generation and
malformed packet being sent by the ACD module.

Therefore, simplify all this, by simply returning early in case of
conflict detection packets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos
cc53826cc9 net: ipv4: autoconf: Integrate with the ACD module
The autoconf module can now reuse generic address conflict detection,
which was added for all address types.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos
80339ac4ee net: dhcpv4: Add support for conflict detection
In case a conflict was detected on a DHCP-assigned address, send a
Decline message to the server and start over.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos
7352aaa841 net: config: Add support for IPv4 ACD
In case IPv4 conflict detection is enabled, monitor network events to
determine whether IPv4 address is ready to use or not, so that the
library returns only after the network setup is fully complete.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos
c281db0f7e net: conn_mgr: Add support for ACD events
Connection manager needs to monitor ACD events as well to determine
whether a preferred IPv4 address is available.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos
a89dd1a6f6 net: shell: Add ACD events to the event monitor
Include new ACD events in the shell event monitor.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos
0a95423421 net: ipv4: Implement IPv4 address conflict detection
Add support for IPv4 conflict detection, as specified in RFC 5227.
The new feature is optional and disabled by default.

Address conflict detection was implemented as a part of the IPv4
autoconf feature can be generalized to be available for all address
types.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Krzysztof Sychla
87946a8996 kernel: banner: fix disabling boot banner
When the CONFIG_BOOT_BANNER flag is set to "n", but CONFIG_BOOT_DELAY
is enabled, there is a delay message printed at boot time.
This allows for the whole boot banner to be disabled.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
2024-06-10 00:59:10 -07:00
Rodrigo Peixoto
453ab8a9a3 zbus: vded: msg_sub: Improve channel ref copy
The VDED was adding the channel information per clone. But it could be
done in the original buffer. This commit fixes that by adding the
channel information to the original buffer and not for each clone. As a
result, we have a more straightforward VDED execution with fewer copies.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-06-09 09:07:21 -05:00
Emil Gydesen
8136f740df tests: Bluetooth: Move audio related BTP files
Move the audio related files to a new subdirectory called
audio.

The purpose of this is to clean up the file structure a bit,
and also allow for better filtering of the files.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-07 22:08:59 -05:00
Krzysztof Chruściński
79c93dd5ec drivers: serial: Add gpio management to low power mode
When low power mode is enabled then whenever UARTE is not active,
driver attempts to put the peripheral into the lowest power state
by stopping and disabling UARTE. However, it did not put pins into
sleep state which could lead to increased current consumption.
Adding pins state handling to the low power mode.

Pins are put into sleep state only if CONFIG_PM_DEVICE=y.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-07 19:07:56 -04:00
Vincent Geneves
e21a021ed6 drivers: gpio: pcal64xxa: give semaphore in case of error
In function pcal64xxa_process_input, lock was not released in case of
error when calling inputs_read.
This was causing an infinite wait in the following calls of functions
using I2C bus.

Signed-off-by: Vincent Geneves <vgeneves@kalray.eu>
2024-06-07 19:06:42 -04:00
Flavio Ceolin
9ba65abcb3 doc: pm: Add information about device and system constraint
Add information about device power management and system power
management constarints.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-07 19:06:23 -04:00
Flavio Ceolin
73b755d817 pm: Add a symbol for device power state constraints
Add a symbol to enable device power state constraints this
saves resources when this feature is not needed.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-07 19:06:23 -04:00
Flavio Ceolin
39544299fc tests: pm/power_states_api: Test device constraints
Test that device pm state constraints work as expected.
It declares a device in DT that specify that two pm states cause
power loss and use this information when the device is in the middle
of an action.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-07 19:06:23 -04:00
Flavio Ceolin
02a14d75fc pm: Declare pm state constraints for a device
Declare power state constraints for a device in devicetree.
It allows a map between device instances and power states that disable
their power. This information is used by a new API
(pm_policy_device_power_lock_put/get) that automically set/release
pm state constraints.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-07 19:06:23 -04:00
nagendra modadugu
161c56fa31 soc: opentitan: update manifest format
Fix calculation of the app entry point.

Signed-off-by: nagendra modadugu <ngm@meta.com>
2024-06-07 19:05:34 -04:00
Lars-Ove Karlsson
b48aeedf77 arch: common: Removed unnecessary cast
Removed an unnecessary cast to void * from a function that already
had the correct signature.
This makes for more portable code as casting between code and data
pointers are frowned upon by the C standard.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2024-06-07 19:05:08 -04:00
Daniel DeGrasse
6cdb9a0c9e samples: ipc: openamp: remove pre HWMV2 overlays for RT11xx boards
Remove pre hardware model v2 overlays present for RT11xx boards, that
were missed in the HWMv2 migration

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 19:04:44 -04:00
Daniel DeGrasse
bb3eb967c8 boards: nuvoton: numaker_m2l31ki: reenable userspace
In commit a30c5731ae (tests: drivers: can: api:
support numaker_m2l31ki, 2024-05-31), CONFIG_USERSPACE was disabled for
the numaker_m2l31ki. This fix is valid to support running the CAN API
testsuite, but Zephyr's infrastructure does not properly support
disabling userspace at the board level.

As a temporary workaround, reenable userspace to fix failing CI tests
on this board.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 19:04:20 -04:00
Grzegorz Swiderski
76c623806d devicetree: Use UTIL_AND in DT_NODE_HAS_COMPAT_STATUS
Replace the leftover `&&` operator with UTIL_AND(), so that this DT API
can be evaluated at C preprocessor time.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-06-07 19:03:27 -04:00
Grzegorz Swiderski
45ba038aac devicetree: Remove DT_INST_NODE_HAS_PROP_AND_OR
This undocumented helper macro is unused as of:
4c8ed7dd9a

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-06-07 19:03:27 -04:00
Anas Nashif
0c0475ff62 soc: xlnx: remove duplicate soc entry
xc7z010 is duplicated.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-07 19:02:59 -04:00
Nicolas Pitre
5f2620fece kernel: mem_slab: extend slab pointer validation
Abstract slab pointer validation and apply it to block dequeue during
allocation in addition to the existing block freeing. This should help
catching some buffer overflow induced corruptions.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-07 21:43:28 +02:00
Nicolas Pitre
67706a1802 kernel: mem_slab: reverse free list initialization
As it is, blocks are allocated going backward within the buffer.
There is nothing fundamentally wrong with that, but it makes debugging
unnatural with the successively descending addresses. Create the free
list so pointers are oriented forward, at least initially.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-07 21:43:28 +02:00
Adrien Ricciardi
9f6451d086 drivers: gpio: gecko: Use SIZEOF_FIELD() macro
Use the utility macro instead of bare code.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-07 21:43:07 +02:00
Adrien Ricciardi
bf8b1d67d6 sys: util: Add SIZEOF_FIELD() macro
This macro allows to know the size of a struct member at compile time.

Several parts of the Zephyr code are currently using directly the macro
code.

Also added a unit test.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-07 21:43:07 +02:00
Aurelien Jarno
34f4a0f6bc drivers: rtc: rtc_shell: Add devices as sub commands
This commit adds support for <device> entry tab completion and device
lookup if enabled.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-07 21:42:54 +02:00
Benjamin Cabé
35e04ef6f3 doc: ztest: fix reference to kconfig options
Use proper identifiers and sphinx roles to reference Kconfigs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-07 21:42:46 +02:00
Daniel DeGrasse
f414400b8f samples: fs: unmount and remount filesystem during init
Unmount and remount filesystem during init, to verify that filesystem
remount works as expected.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
Daniel DeGrasse
7981ea0056 fs: fat_fs: make IOCTL call to de-initialize disk in fatfs_unmount()
Make call to de-initialize disk in fatfs_unmount(). This will permit the
disk to be reinitialized when it is mounted with fatfs_mount().

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
Daniel DeGrasse
93ebf1c48f doc: services: disk_access: add documentation for INIT/DEINIT IOCTLs
Add documentation for disk INIT/DEINIT IOCTLs to the disk access API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
Daniel DeGrasse
d18cbb60b2 drivers: disk: add DISK_IOCTL_CTRL_DEINIT command to supported IOCTLs
Add DISK_IOCTL_CTRL_DEINIT ioctl command to disk subsystem. When
disk_access_ioctl() is called with this command, the disk will be
de-initialized. After this IOCTL completes, the disk can safely be
reinitialized.

Fixes #60628

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
Daniel DeGrasse
fb2d5c338b drivers: disk: add DISK_IOCTL_CTRL_INIT macro to initialize a disk
Add DISK_IOCTL_CTRL_INIT IOCTL to initialize a disk. This IOCTL is
intended to replace disk_access_init() for new applications, but
disk_access_init() is kept for legacy compatibility. The INIT IOCTL is
added to better match the path that will be used for disk
de-initialization. Like the disk_access_init() calls,
DISK_IOCTL_CTRL_INIT calls are reference counted

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
Daniel DeGrasse
3386a43a51 disk_access: reference count initialization calls for disks
Reference count initialization calls for disks. This changes the
behavior of the disk_access_init() function, such that disks will no
longer be initialized again if the first disk access init call
succeeds.

Disk access is reference counted in preparation for supporting disk
de-initialization, where a balanced number of disk de-initialization
calls with disk initialization calls will de-initialize the disk.

Also, remove code in disk drivers that was already checking against
duplicate disk_access_init() calls.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
cyliang tw
3c41820d06 manifest: update hal_nuvoton revision
To fix redefined warnings of TRUE/FALSE.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-06-07 18:12:30 +01:00
Fabio Baltieri
87379793f5 posix: add a missing include prefix
Add the missing prefix so this builds with
CONFIG_LEGACY_GENERATED_INCLUDE_PATH=n

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-07 18:10:13 +01:00
Ayush Singh
3e349bf475 samples: blinky_pwm: fix overlay for beagleconnect_freedom
- Add missing flags
- Fixes https://github.com/zephyrproject-rtos/zephyr/pull/73628

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-06-07 18:08:44 +01:00
Benjamin Cabé
2c112ce519 doc: bluetooth: fix Sphinx C domain roles usage
use the proper types for referencing C elements from Bluetooth docs

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-07 18:08:31 +01:00
Krzysztof Chruściński
8f3989412f testsuite: ztest: ztress: Add missing static keywords
Add static to local timers definition.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-07 18:08:22 +01:00
Reto Schneider
3ceed632f9 drivers: hwinfo: Prevent conflicts
By sorting the lines alphabetically, conflicts can be reduced.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-06-07 18:08:04 +01:00
Luca Burelli
1a2f6ae381 llext: refact: move ELF loading and linking to separate files
This commit moves ELF loading and linking code to separate files. This
is done to make the code more manageable and to make it easier to add
new features in the future.

No functional changes are introduced by this commit, except for a few
static functions now made public to allow this file split to occur.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-07 18:07:53 +01:00
Luca Burelli
9c5412f79e llext: refact: move memory code to llext_mem.c
Move all memory management code to a separate file, llext_mem.c, to
allow for better separation of concerns and to make the code more
readable.

No functional changes are introduced by this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-07 18:07:53 +01:00
Luca Burelli
35ef089cb1 llext: move basic ELF checks to llext_load_elf_data()
This patch moves the initial checks performed on the ELF file, that were
split between llext_load() and do_llext_load(), to the newly defined
llext_load_elf_data() function.

This way:

- only one function deals with ELF internal data checks;
- do_llext_load() is reduced to a list of tasks;
- llext_load() only focuses on the extension management.

One totally misplaced line initializing the number of symbols has been
moved to llext_count_export_syms().

No functional change except that the `struct llext` allocation may be
performed unnecessarily if the ELF file is not valid.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-07 18:07:53 +01:00
Luca Burelli
cefeae0048 llext: add llext heap management functions
Add llext_alloc(), llext_aligned_alloc() and llext_free() wrapper
functions to manage memory allocation and deallocation from the llext
heap. Also add a helper to free all memory regions allocated by an
extension.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-07 18:07:53 +01:00
Vinayak Kariappa Chettimada
cdab35a118 samples: Bluetooth: hci_uart: Use lower IRQ priority SoC peripherals
Use lower IRQ proirities for SoC peripherals, example UART,
to reduce ISR latencies on the IRQs processed by the
Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Alberto Escolar Piedras
510e1ba6af Bluetooth: Controller: Treat nrf54l15bsim like a real platform
Use the compatible kconfig option so that for the simulated
nRF54L15 we build the same code as for the real platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Alberto Escolar Piedras
a3218b0de5 Bluetooth: Controller: Fix BT_CTLR_DATA_LEN_UPDATE_SUPPORT selection
For the Nordic HW, the BT_CTLR_DATA_LEN_UPDATE_SUPPORT
does not require CCM HW enabled, hence support Data Length
Update if Encryption Support is disabled.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Alberto Escolar Piedras
35773882c2 Bluetooth: Controller: Use HAL to modify renamed registers in nRF54
In some nRF54 devices, DATAWHITEIV was renamed to
DATAWHITE,
and the CRCCNF SKIADDR field was renamed OFFSET.
The nrf HAL hid this change internally,
so let's use it so we don't need to ifdef these
in the Bluetooth Controller HAL code.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
3d24a3ca8e samples: Bluetooth: hci_uart: Add preliminary support for nrf54l15pdk
Add preliminary support for building hci_uart sample
for nrf54l15pdk.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
04f2e1171e boards: nordic: nrf54l15pdk: Bind Bluetooth C2H and monitor uart
Bind Bluetooth Controller to Host and Monitor UART.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
f59c3fafe8 Bluetooth: Controller: Preliminary support for nRF54L15 SoC
Add preliminary support for nRF54L15 SoC. This commit does
not support Controller Random Number Generation and
Controller Cryptography (AES-128 encryption) commands, nor
does it support encrypted connections.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
0bbbef3a8c Bluetooth: Controller: Use NRF_RTC and RADIO_SHORTS_TRX_END_DISABLE_Msk
Use NRF_RTC and NRF_RADIO_SHORTS_TRX_END_DISABLE_Msk instead
to prepare towards using configurable use of RTC and Radio
hardware defines.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
d6f2bc9669 Bluetooth: Controller: Add explicit LLCP error code check
Add unit tests to cover explicit LLCP error code check and
cover the same in the Controller implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
78466c8f52 Bluetooth: Controller: Use BT_HCI_ERR_UNSPECIFIED as needed
A Host shall consider any error code that it does not
explicitly understand equivalent to the error code
Unspecified Error (0x1F).

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
fe205a598e Bluetooth: Controller: Refactor BT_CTLR_LE_ENC implementation
Refactor reused function in BT_CTLR_LE_ENC feature.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
2d49080cb8 Bluetooth: Controller: Fix BT_CTLR_LE_ENC conditional compilation
Fix BT_CTLR_LE_ENC conditional compilation when feature is
disabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
a66baa1101 Bluetooth: Controller: Introduce BT_CTLR_CRYPTO_SUPPORT
Introduce BT_CTLR_CRYPTO_SUPPORT so that preliminary port to
support nRF54L15 SoC can be upstreamed without encryption
support.

ENTROPY_GENERATOR now selected when BT_CTLR_CRYPTO enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Vinayak Kariappa Chettimada
073e627e3b Bluetooth: Controller: Fix ENTROPY_NRF5_RNG conditional compile
Fix ENTROPY_NRF5_RNG conditional compile when not enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 18:07:48 +01:00
Fin Maaß
e1246ccb65 mgmt: hawkbit: some Kconfig improvements
some hawkbit Kconfig improvements.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-07 18:06:45 +01:00
Karol Lasończyk
bb4c92af7c boards: nordic: Add PWM support for LEDs on nRF54 DKs
Adds support for first possible LED to be connected with HW PWM.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-07 18:06:39 +01:00
Fabio Baltieri
f30b414bbc build: drop the CONFIG_LEGACY_GENERATED_INCLUDE_PATH message
Does not make much sense to ship the project with a config that by
default print a warning for a not-yet-deprecated feature. Let's drop it
for now, we can reintroduce it once the default is changed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-07 18:05:52 +01:00
Benjamin Cabé
593dfe1385 doc: kernel: fix improper Sphinx C domain usage
fixed usage of wrong C roles (e.g. `:c:struct:` instead of `:c:type:`)
which Breathe tolerates but can cause trouble when using other systems.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-07 16:48:14 +03:00
Siddharth Chandrasekaran
45085ba647 mgmt/osdp: cp: disallow unexpected SC responses
When CP has a secure channel active, it should never receive a
REPLY_CCRYPT or REPLY_RMAC_I. Since these responses change the SC state,
let's also make sure that they are accepted only when they are
expected: in response to commands CMD_CHLNG and CMD_SCRYPT respectively.

Reported-by: Eran Jacob <eran.jacob@otorio.com>
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2024-06-07 16:47:55 +03:00
Helmut Lord
3b4c458815 shields: waveshare_epaper: add 2.13in epaper
Adds support for WaveShare's 2.13in epaper display
with the ssd1680 display driver.
Good Display part number gdey0213b74

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2024-06-07 16:47:25 +03:00
Maxin John
b08dfe436d boards: sipeed: longan_nano: update SPI documentation
Update SPI documentation for longan_nano. In longan_nano board, spi1
is connected to sdhc0. Verified the functionality using
"samples/subsys/fs/fs_sample".

Fixes: #64759

Signed-off-by: Maxin John <maxin.john@gmail.com>
2024-06-07 16:47:03 +03:00
frei tycho
8124d064e9 include: zephyr: coding guidelines: add explicit cast to void
- added explicit cast to void when returned value is expectedly ignored

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-07 16:46:32 +03:00
Yuxuan Cai
0a5e7f8589 samples: Bluetooth: use correct periodic advertising intervals
BT_GAP_ADV_SLOW_INT_MIN and BT_GAP_ADV_SLOW_INT_MAX represent 1s and 1.2s,
respectively, in the extended advertising context, where the bit interval
is 0.625 ms. Using them for periodic advertising will result in a range
of [2s, 2.4s], as the bit interval for periodic advertising is 1.25ms.

Instead, BT_GAP_PER_ADV_SLOW_INT_MIN and BT_GAP_PER_ADV_SLOW_INT_MAX
should be used in this sample, and the range will become [1s, 1.2s].

Signed-off-by: Yuxuan Cai <yuxuan.cai@nordicsemi.no>
2024-06-07 16:45:44 +03:00
Francois Ramu
b5c5e0e4b6 boards: st: higher sysclock for the stm32h743/h753 nucleo boards
Configure the DTS to increase the sysclock to its max value
480MHz for the nucleo_h743zi and nucleo_h753zi boards
Max Hclock is 240MHz
The Pll source is HSE is 8MHz clock source from the STLink.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-07 16:45:25 +03:00
Robert Lubos
0163ae5332 samples: net: sockets: http_server: Disable PSA crypto
The sample won't build with PSA crypto enabled on non-secure platform,
causing disturbances in the CI.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-07 16:45:05 +03:00
Robert Lubos
c26f1bef49 samples: net: sockets: Add netif dependency where missing
A few samples were not limiting the CI execution scope in any reasonable
way, they should at least limit the execution to platforms that support
netif capability.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-07 16:45:05 +03:00
Benjamin Cabé
5a5fd7c96f doc: mcumgr: fix mixed up occurrences of :c:enum: and :c:enumerator:
While Breathe seems to not care and creates hyperlinks either way, the
proper role to mention a C enumerator is :c:enumerator:. :c:enum: is to
be used to refer to the enum itself.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-07 16:44:49 +03:00
Alberto Escolar Piedras
6289332829 manifest: Update EDTT to latest
Update the EDTT module to:
8d7b543d4d2f2be0f78481e4e1d8d73a88024803

Including the following:
* 8d7b543 Fix some issues found during CIS Central testing
* fb426f1 Fix crash due to race when creating simulation folder

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-07 15:08:44 +02:00
Alberto Escolar Piedras
211221a102 manifest: Update bsim to version v2.2.1
Includes just changes for the phy dump conversion scripts,
to add support in the csv2pcap conversion for coded phy.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-07 15:08:44 +02:00
Krzysztof Chruściński
17c3a23157 modules: hal_nordic: nrfx: nrfx_glue: Improve GPIOTE_CHANNELS_USED
Channels owned by a child core shall also be included in the mask of
used channels (channels that cannot be allocated by the GPIOTE channel
allocator).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-07 15:08:04 +02:00
Jamie McCrae
1c4dbf7f87 doc: release: 3.7: Add note on MCUmgr go tool instruction removal
Adds a note that these instructions have been removed and list
the available replacement tools

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-07 15:07:07 +02:00
Jamie McCrae
7e91257805 samples: mgmt: mcumgr: smp_svr: Remove documentation for go tool
Removes references to old tool documentation and refers users to
the list of supported applications instead

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-07 15:07:07 +02:00
Jamie McCrae
1906ab33da doc: services: device_mgmt: mcumgr: Remove references to go tool
The go tool documentation is very old, and the tool is not
recommended for use, therefore remove all documentation relating
to it to prevent people from using it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-07 15:07:07 +02:00
Théo Battrel
57d62ca6a4 Samples: Bluetooth: Remove unnecessary signal
The `sec_update_signal` was raised but never waited on. It could be
confusing, remove it.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-06-07 15:06:48 +02:00
Benjamin Cabé
1a59033ea3 doc: Bluetooth: Mesh: fix :c:enum: used in lieu of :c:enumerator:
While Breathe seems to not care and creates hyperlinks either way, the
proper role to mention a C enumerator is :c:enumerator:. :c:enum: is to
be used to refer to the enum itself.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-07 15:06:25 +02:00
Benjamin Cabé
61ec745b49 irq: doc: fix misspelled reference to k_spinlock
k_spinlock_t might have actually never existed (?) Rename to k_spinlock.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-07 15:05:56 +02:00
Seppo Takalo
80385a1180 tests: lwm2m: Allow server address to be changed
Allow changing the target server address on interoperability
tests.
This allows running same testcases against public Leshan
instance. It is a first requirement to run same tests
on a real HW.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-06-07 15:05:09 +02:00
Jens Rehhoff Thomsen
2d7528dc93 Bluetooth samples: Handle broadcast source gone
When the broadcast source unexpectedly disappears then the broadcast
sink does a remove source command and resets.

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-06-07 15:04:38 +02:00
Sean Madigan
0b327db097 Bluetooth: Add support for Path Loss Monitoring feature
This commit adds host support for the Path Loss Monitoring
feature see Bluetooth Core specification, Version 5.4,
Vol 6, Part B, Section 4.6.32.

Limited logic is required, just adding a wrapper around the
HCI command and callback for HCI event.

Add new zone - BT_CONN_LE_PATH_LOSS_ZONE_UNAVAILABLE, to
convert 0xFF path loss to a useful zone.

Add new Kconfigs and functionality to the bt shell.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-06-07 15:04:11 +02:00
Gustavo Silva
9e2c773137 doc: improvements to Contribution Guidelines
Restructure the Contribution Guidelines page in the documentation.

Create the 'Pull Request Guidelines' section containing the best
practices for creating Pull Requests.

Improve commit message guidelines: instruct contributors to refer to
GitHub issue in the PR message instead of commit message when
submitting a fix; add a description of `Link:` tags for refering to
other relevant information.

Move 'clang-format' and 'twister' subsections to the new PR
Guidelines section.

Delete outdated/incorrect information about how to run tests locally
with twister.

Describe the `check_compliance.py` script as the recommended tool for
checking compliance of changes and how to run the script locally.
Remove 'gitlint' subsection.

Add a list of recommended steps for getting a new PR accepted quickly.

Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
2024-06-07 15:03:35 +02:00
Sebastian Głąb
7a5f2ad46e samples: drivers: adc: Add nrf54l15 to platform_allow
Enable execution of ADC driver tests on nrf54l15.
Overlay file for nrf54l15 already exists.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-07 15:01:22 +02:00
Gerard Marull-Paretas
28ed877f53 boards: nordic: nrf54h20dk: add custom JLink reset scheme
A custom reset scheme is required for the nRF54H20 SoC so that debug
works out of the box. This magic will eventually be part of JLink.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-07 15:01:07 +02:00
Furkan Akkiz
2d44b48cec tests: drivers: i2c: i2c_target_api: Add MAX32690EVKIT
Enable I2C target API test for MAX32690EVKIT board.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-06-07 13:01:50 +02:00
Furkan Akkiz
f560336812 boards: adi: max32690evkit: Enable I2C driver
Add I2C in list of supported peripherals.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-06-07 13:01:50 +02:00
Tahsin Mutlugun
f037b95549 drivers: i2c: Add MAX32690 I2C driver
Add I2C driver for Analog Devices MAX32690 MCU. Supports target mode.

Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
Co-Authored-By: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-06-07 13:01:50 +02:00
Tahsin Mutlugun
11a038518a dts: arm: adi: Add I2C nodes for MAX32 SoCs.
Enable I2C nodes on MAX32 SoCs.

Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
Co-Authored-By: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-06-07 13:01:50 +02:00
Benjamin Cabé
b9ad339a5b mqtt: doc: remove Unicode fullwidth left parenthesis
Fix Doxygen comment for shell_mqtt_get_devid which contained a funky
Unicode char (U+FF08) for a left parenthesis that can cause issues with
some documentation tools.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-07 13:01:22 +02:00
Emil Gydesen
5c9032019c Bluetooth: CAP: Fix linker issue in cap_stream.c for x86
The existing code in the cap_stream.c that handled the
check before calling CAP initiator unicast functions
seemingly did not work for x86 targets such as native_sim
or native_posix.

Modified the check so that IS_ENABLED is used directly.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-07 13:01:13 +02:00
Emil Gydesen
620708b9e0 Bluetooth: Audio: Shell: Add additional test cases for CAP
Add additional test cases for CAP where only a single CAP
role is enabled.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-07 13:01:13 +02:00
Francois Ramu
f55391745b drivers: ethernet: stm32 eth hal driver align PTP Config Status
Align the name of the ETH PTP Config Status values
depending on the stm32HAL serie
to be the HAL_ETH_PTP_NOT_CONFIGURATED/HAL_ETH_PTP_CONFIGURATED
or HAL_ETH_PTP_NOT_CONFIGURED/HAL_ETH_PTP_CONFIGURED

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-07 13:00:44 +02:00
frei tycho
4c2938a295 kernel: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-07 12:59:46 +02:00
Vinayak Kariappa Chettimada
0e7c25fee4 drivers: flash: flash_shell: Fix unused variables
Fix unused variable compilation warnings.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 12:59:07 +02:00
Alberto Escolar Piedras
fd236ee991 manifest: Update nRF hw models to latest
Update the HW models module to:
6c389b9b5fa0a079cd4502e69d375da4c0c289b7

Including the following:
* 6c389b9 PPI (52): Connect CCM TASK_RATEOVERRIDE
* 2056253 CCM: Change TASK RATEOVERRIDE warning to info

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-07 09:57:40 +02:00
Magdalena Pastula
92b56e2d3f manifest: update hal_nordic with nrfx_gpiote fix
Update hal_nordic with fix in nrfx_gpiote.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-06-07 09:57:26 +02:00
Anke Xiao
495b90eadc tests: drivers: gpio: gpio_basic_api: add overlay for ke17z512
The gpio_basic_api sample for gpio driver was tested for frdm_ke17z512

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-07 09:55:56 +02:00
Anke Xiao
2b2791e2ed boards: nxp: frdm_ke17z512: add new board support
Added basic support for frdm_ke17z512 board

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-07 09:55:56 +02:00
Anke Xiao
37e8c47650 drivers: clock_control: add a macro for mke17z9 to wrap flexbus clock
The flexbus clock-related macro is not defined in mke17z9 clock.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-07 09:55:56 +02:00
Anke Xiao
4873de287a soc: nxp: kinetis: add mke17z9 soc support
Updated the soc.yml and kconfig.soc to support mke17z9

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-07 09:55:56 +02:00
Ioannis Damigos
b7fbd91d9e soc/da1469x: Fix CONFIG_SYS_CLOCK_*_PER_SEC defines
The following configuration options:

SYS_CLOCK_HW_CYCLES_PER_SEC
SYS_CLOCK_TICKS_PER_SEC

should get their values according to lp_clock node's
clock-src property.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-07 09:54:30 +02:00
Pisit Sawangvonganan
aca97a0bef fs: fcb: refactor fcb_get_len() for improved readability
Introduced temporary variables `buf0_xor` and `buf1_xor` to store
XOR results and added an explicit cast to `uint16_t` for
the `*len` variable.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-07 09:53:56 +02:00
Pisit Sawangvonganan
06177833d8 fs: fcb: correct FCB_MAX_LEN boundary condition
Correct the boundary condition in `fcb_put_len` function to
properly include `FCB_MAX_LEN` and change the #define to address
the potential flaw where `CHAR_MAX` might be treated as unsigned by
the compiler flag `-funsigned-char`, which would yield `FCB_MAX_LEN`
to 0x7fff instead of 0x3fff.

Fixes #73868

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-07 09:53:56 +02:00
cyliang tw
6293daa438 tests: drivers: watchdog: wdt_basic_api: support numaker_m2l31ki
Add support for Nuvoton numaker board numaker_m2l31ki.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-06-07 09:52:58 +02:00
cyliang tw
87ef371fec dts: arm: nuvoton: add wdt node of numaker m2l31x
Update m2l31x.dtsi, to add wdt node for wdt driver support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-06-07 09:52:58 +02:00
Flavio Ceolin
8100871856 soc: intel_adsp: Avoid duplicate adsp_memory_regions
This header is the same for all ACE platforms. Move it
a common folder.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-07 09:52:42 +02:00
Flavio Ceolin
6069f946be soc: intel_adsp: Avoid duplicate header
adsp_memory.h is pretty much the same for all ace platforms.

Generalize it getting register address from devicetree and
and move it to a common place.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-07 09:52:42 +02:00
Tom Burdick
87fc25afc1 sensing: Fix build warning on invalid array index
The assert was verifying that the current sensor address was greater
or equal than the start of the iterable section - 1 which isn't quite
right as the start is inclusive.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-07 09:52:09 +02:00
Stanislav Poboril
db57c43bbb boards: nxp: Adjusted device tree on vmu_rt1170 for updated ENET_1G.
Adjusted the board's device tree after ENET_1G compatible changed
from "nxp,kinetis-ethernet" to "nxp,enet1g".

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Stanislav Poboril
684885a7f3 boards: nxp: Support NXP ENET_1G on mimxrt1170_evk
Support NXP ENET_1G on mimxrt1170_evk/mimxrt1176/cm7 platform.
Added test configuration sample.net.zperf.nxp_enet1g and
documented the usage of the ethernet driver with ENET_1G
peripheral.

Fixes: #66348

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Stanislav Poboril
d124eec3c9 drivers: ethernet: phy: Add Realtek RTL8211F PHY driver
Add driver for Realtek RTL8211F 10/100/1000M ethernet PHY.
This driver implements vendor specific behaviour like
detecting link state change by GPIO interrupt, which is not
present in the generic MII driver.

Fixes: #66348

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Declan Snyder
ca6adbba61 scripts: kconfig: Add dt_compat_any_has_prop
Add a kconfig preprocessor function to check if
any node of a certain compatible has a specific property in DT.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-06 20:08:27 -04:00
Stanislav Poboril
cbb5c5b444 drivers: nxp_enet: Support RGMII mode for ENET_1G
- Added nxp,enet1g compatible to distinguish between ENET (nxp,enet)
and ENET_1G (nxp,enet1g) peripherals within the same driver.
- Added config ETH_NXP_ENET_1G to enable 1G mode of operation on ENET_1G.
- Support RGMII mode of connection between MDIO and PHY to be
able to work with ENET_1G peripheral and support 1000M speed.
- Removed performing of PHY reset before configuring link - it is
not desirable for RTL8211F PHY connected to ENET_1G on RT1170.
Reset of other PHYs can be performed by PHY driver itself if required.

Fixes: #66348

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Stanislav Poboril
c2dc897d22 dts: bindings: Add RGMII mode definition to NXP ENET bindings
Add RGMII mode definition to be used in bindings related to NXP ENET_1G IP.

Fixes: #66348

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Stanislav Poboril
57a788880e dts: bindings: ethernet-controller: Add RGMII mode
Add option for RGMII connection type between the MAC and the PHY
device into the ethernet controller binding.

Fixes: #66348

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Stanislav Poboril
5774f47e89 soc: rt11xx: support nxp_enet in soc
Support NXP ENET_1G on RT11xx soc.

Fixes: #66348

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Stanislav Poboril
6b0a4b0c85 drivers: clock_control: mcux_ccm_rev2: Add ENET_1G clock
Add ENET_1G clock value to the RT11XX CCM version.
Implemented enabling ENET_1G clock and getting its frequency.

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Dmitrii Golovanov
eebbd5c411 twister: footprint: Add optional detailed JSON report on symbols
New Twister option `--footprint-report` is introduced to collect and
write detailed memory footprint results for symbols as an additional
JSON file. By default, the new option is disabled.

The new option implies and extends `--create-rom-ram-report`, so there
are three choices: 'ROM', 'RAM', and 'all' to select what memory area
symbols to report in `twister_footprint.json`.
In case of the custom report name, or per-platform report, it is always
composed with the rightmost '_footprint.json' suffix.

The memory footprint report has similar structure as `twister.json`
and compelements it having reduced set of test suite properties:
- instead of `testcases` it contains `footprint` object with
  `rom.json` and `ram.json` artifacts embedded there;
- other properites are limited to represent only the essential test
  suite context, thus to allow further data processing consistently
  and independently from the `twister.json`.
- 'filtered' test instances are not included into the footprint report.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-06 20:08:11 -04:00
Dmitrii Golovanov
a425db20b1 twister: Add test suite filtering on twister.json compose
When Twister composes resulting twister.json reports, add optional
filtering by a test instance resulting status and/or its individual
properties to be allowed/denied on output to the JSON file.
This internal feature is introduced to facilitate JSON reports with
a custom data schema.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-06 20:08:11 -04:00
Daniel DeGrasse
1ef42731fd test: drivers: build_all: video: add ov7670 to build test
Add ov7670 camera driver to build test for video drivers

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 20:07:57 -04:00
Daniel DeGrasse
3ce3ed38ba drivers: video: ov7670: introduce driver for ov7670 camera
Introduce driver for ov7670 camera, supporting QCIF,QVGA,CIF, and VGA
resolution in YUV and RGB mode.

Support was verified on the FRDM-MCXN947, using the SmartDMA camera
engine, which is enabled in the following PR:
https://github.com/zephyrproject-rtos/zephyr/pull/72827

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 20:07:57 -04:00
Fengming Ye
edd0ed7339 mbedtls: add kconfig options
Add MBEDTLS_NIST_KW_C, MBEDTLS_DHM_C and X509 CRL, CSR options.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-06 20:07:38 -04:00
Fengming Ye
1bfa73d036 hostap: add enterprise source files in cmake
Add enterprise needed source files.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-06 20:07:38 -04:00
Fengming Ye
bdb0768882 hostap: remove CONFIG_NO_PBKDF2 and CONFIG_NO_CONFIG_BLOBS in cmake
Remove CONFIG_NO_PBKDF2 and CONFIG_NO_CONFIG_BLOBS definition
and let them be decided in kconfig.
CONFIG_NO_PBKDF2 is default y when crypto backend is
WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE.
CONFIG_NO_CONFIG_BLOBS is default y when both DPP and enterprise disable.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-06 20:07:38 -04:00
Fengming Ye
271d7084b5 hostap: add DPP support
Add kconfig and cmake to support DPP (Easy Connect).

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-06 20:07:38 -04:00
Fengming Ye
d3b3aa1c35 hostap: add PSA apis support for mbedtls 3.x
Add Platform Secure Architecture support support to use
HW acceleration, which needs to be called under PSA driver wrapper
in mbedtls 3.x.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-06 20:07:38 -04:00
Fengming Ye
6f0c836337 hostap: add crypto backend alt for enterprise and DPP
Add kconfig CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT to get more mbedtls
functionality for enterprise and DPP.
Split cmake sources related to hostap SME and crypto backend.
Default backend CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO use internal crypto
and some mbedtls apis.
Backend CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT use most mbedtls apis
and PSA apis, except some apis no longer supported in mbedtls 3.x,
or called in the middle of hostap and mbedtls.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-06 20:07:38 -04:00
Jordan Yates
dc5f27395f testsuite: add dependency to COVERAGE_GCOV_HEAP_SIZE
Add missing dependency on `COVERAGE_GCOV` to prevent the symbol from
appearing in every application.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-06 20:07:20 -04:00
David Leach
6f7fd7a306 doc: project roles: reviewer and assignee clarification
Clarification of reviewer expectations and role. Emphasis
on clarifying when a PR can be closed.

Highlighting reviewers and assignee objective to guide PR
to a mergeable state, if possible.

Signed-off-by: David Leach <david.leach@nxp.com>
2024-06-06 20:07:06 -04:00
Martin Jäger
c1a3bfb5f4 scripts: set_assignees.py: Use "size: XS" label for one-liners
Previously, one-line changes were tagged as "Trivial".

The description of the "Trivial" label states:
"Changes that can be reviewed by anyone, i.e. doc changes, minor build
system tweaks, etc.".

Just because a change only affects a single line of code, it does not
mean that it is a trivial change. It may have difficult to understand
implications which require approval of the responsible maintainer.

For this reason, change the label to "size: XS" and let humans judge
if a PR is trivial or not.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-06-06 20:06:47 -04:00
Anas Nashif
5df1df2e7a Revert "drivers/console/xtensa_sim_console: force \r\n byte sequence"
This reverts commit 99aa65c725.

With this change, various simulators fail with no output with this
change.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-06 20:06:26 -04:00
Daniel Leung
86a63627b0 tests: kernel/queue: config overlay for intel_adsp/ace30_ptl
This sets CONFIG_MAX_THREAD_BYTES to 3 as the tests need a few
more bits to build for board intel_adsp/ace30_ptl.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-06 20:06:11 -04:00
Daniel Leung
f50ac58b1d tests: mutex/sys_mutex: config overlay for intel_adsp/ace30_ptl
This sets CONFIG_MAX_THREAD_BYTES to 3 as the tests need a few
more bits to build for board intel_adsp/ace30_ptl.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-06 20:06:11 -04:00
Daniel Leung
1a93191f45 tests: mem_protect/sys_sem: config for intel_adsp/ace30_ptl
This sets CONFIG_MAX_THREAD_BYTES to 3 as the tests need a few
more bits to build for board intel_adsp/ace30_ptl.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-06 20:06:11 -04:00
Daniel Leung
8c65c73cf8 tests: lib/c_lib/thrd: config overlay for intel_adsp/ace30_ptl
This sets CONFIG_MAX_THREAD_BYTES to 3 as the tests need a few
more bits to build for board intel_adsp/ace30_ptl.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-06 20:06:11 -04:00
Peter van der Perk
e017006be4 drivers: input: sbus remote controller support
Add support SBUS RC controller connected through UART

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-06-06 15:56:38 -05:00
Chauncy Liu
1b47a1b75c include: posix: Avoid compiler warning about return type mismatched
Cast variables to correct type to avoid compilation warnings.

Signed-off-by: Chauncy Liu <chauncy@beechwoods.com>
2024-06-06 15:25:13 -05:00
Rico Ganahl
45795d35b6 boards: introduce bytesatwork byteSENSI-L
The byteSENSI-L is a fun LoRa device based on nRF52 MCU that integrates
many sensors.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
2024-06-06 15:23:53 -05:00
Francois Ramu
a9be65bec5 samples: code relocation in external memory of stm32H7 disco kit
Define the configuration to run the code_relocation
application on the external memory dual quad flash
of the stm32h745i/stm32h750b disco kits in XIP

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 15:22:06 -05:00
Francois Ramu
ffca987cee boards: arm: stm32H7 disco kit can flash on external NOR
Change the board.cmake to add the external loader option
to the STM32CubeProgrammer to flash the external NOR
flash and internal memory
The address of the external flash is not needed
when flashing a hex file.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 15:22:06 -05:00
Francois Ramu
81baad1480 boards: arm: stm32h7xx disco kits can flash external dual-quad NOR
Change the board.cmake to add the external loader option
to the STM32CubeProgrammer to flash the external NOR
flash and internal memory
The address of the external flash is not needed
when flashing a hex file.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 15:22:06 -05:00
Francois Ramu
f6a9e0aef2 drivers: flash: stm32 qspi driver in Dual Flash Mode when MemoryMapped
Configure the quad-spi in DualFlash Mode when enabling the MemoryMapped
then reading is possible with memcopy.
DUAL flash mode is possible on stm32 series with QUADSPI_CR_DFM

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 15:22:06 -05:00
Francois Ramu
4fe57de7df bindings: qspi: stm32 qspi supporting Dual Flash Mode
Configure the quad-spi in DualFlash Mode
This property of the stm32 boards will access simultaneously
two identical quad-flash external memories connected to
2 quad-spi banks (pins).
Dual Flash Mode is possible on stm32 series with QUADSPI_CR_DFM

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 15:22:06 -05:00
Karsten Koenig
16e7e46478 soc: nordic: nrf54h: Retrigger TASK_FREQ_CHANGE
A single trigger of the TASK_FREQ_CHANGE task might not be enough, so
trigger twice to make sure the frequency gets updated.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2024-06-06 15:21:51 -05:00
Jordan Yates
90bbf19d6a boards: remove spi-flash0 alias
As `samples/drivers/spi_flash` no longer needs this alias, there is no
use for it on boards.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-06 15:21:18 -05:00
Jordan Yates
54e61b025e samples: spi_flash: node from compat, not alias
Get the flash device from the node compatible, instead of an alias.
This removes the need for the `spi-flash0` alias on every board with one
of these drivers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-06 15:21:18 -05:00
Jordan Yates
fd8d9336ee Revert "samples: drivers: spi_flash: Add nRF54H20DK support"
This reverts commit 29f81872ce.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-06 15:21:18 -05:00
Jordan Yates
1e96b3bc8f Revert "samples: drivers: jesd216: add nRF54H20 overlay"
This reverts commit b1de9a6c46.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-06 15:21:18 -05:00
Phi Bang Nguyen
70c0c334a4 samples: video: tcpserversink: Add support for software generator
Add support for video software generator in case of a real video capture
device is missing.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-06 15:20:37 -05:00
Phi Bang Nguyen
020ffe6104 samples: video: tcpserversink: Use mt9m114 camera shield
Update the sample to use a camera shield with a camera chosen node.
This is not only because the camera nodes in the mimxrt1064 device
tree has been now moved to a separate mt9m114 shield but also to
make the sample more generic.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-06 15:20:37 -05:00
Phi Bang Nguyen
7ece993029 samples: video: tcpserversink: Update default camera resolution
The default resolution of mt9m114 camera is now changed to 480x272.
Update the sample documentation to reflect this change.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-06 15:20:37 -05:00
Phi Bang Nguyen
ba1d5fcc86 samples: video: tcpserversink: Add a new line after printk
Add a new line so that logs are easier to be read.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-06 15:20:37 -05:00
Phi Bang Nguyen
3bf11d19dc samples: video: tcpserversink: Run clang-format
Run clang-format before making any changes

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-06 15:20:37 -05:00
Marcin Niestroj
f726905969 drivers: nsos: handle connect() blocking call
Use poll() to wait for connect attempt to complete or timeout. That way
connect() does not block Native Simulator on host syscall.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
66c966f0bd drivers: nsos: handle setsockopt(SO_SNDTIMEO)
Handle SO_SNDTIMEO similar to how SO_RCVTIMEO is handled.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
a150458d35 drivers: nsos: handle sendmsg() blocking call
Use poll(), similar to sendto() and accept() APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
b5e16b1380 drivers: nsos: handle sendto() blocking call
Use poll(), similar to accept() and recvfrom() APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
f45d3c81cc drivers: nsos: handle multiple blocking APIs on single socket
So far only a single blocking API could be handled simultaneously, due to
epoll_ctl(..., EPOLL_CTL_ADD, ...) returning -EEXIST when same file
descriptor was added twice.

Follow 'man epoll' advice about using dup() syscall to create a duplicate
file descriptor, which can be used with different events masks. Use such
duplicate for each blocking API except ioctl() (for handling Zephyr poll()
syscall).

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
59a2d84f45 drivers: nsos: introduce nsos_poll_if_blocking() helper function
Introduce nsos_poll_if_blocking(), which replaces common code in:
 * nsos_accept_with_poll()
 * nsos_recvfrom_with_poll()

This will allow to introduce similar behavior for other blocking APIs in
subsequent commits.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Glenn Andrews
d1d45b65b7 maintainers: add glenn-andrews as SMF collaborator
Add myself as a collaborator to help with the
State Machine Framework PRs

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-06-06 15:19:45 -05:00
Bartosz Bilas
2c08e9698d drivers: spi: remove deprecated functions
`spi_transceive_async`, `spi_read_async` and `spi_write_async`
are deprecated since v3.2.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2024-06-06 15:19:29 -05:00
Henrik Brix Andersen
06f02eb384 tests: drivers: can: timing: enable full timing test on frdm_mcxn947
Enable the full range of CAN timing tests on the NXP FRDM-MCXN947 board.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-06 15:46:57 +01:00
Henrik Brix Andersen
0c3114cc01 boards: nxp: frdm_mcxn947: enable flexcan0
Enable FlexCAN0 on the NXP FRDM-MCXN947 board.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-06 15:46:57 +01:00
Henrik Brix Andersen
12fdac4c91 dts: arm: nxp: mcxn94x: add flexcan0 and flexcan1 devicetree nodes
Add devicetree nodes for the two FlexCAN instances present on the
MCXN94x. Only CAN classic is enabled for now due to issues with FlexCAN FD
in relation to the implementation on this SoC.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-06 15:46:57 +01:00
Henrik Brix Andersen
f9c630f7c4 drivers: clock control: mcux: syscon: add FlexCAN clock support
Add support for FlexCAN0 and FlexCAN1 clocks present on the MCXN94x.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-06 15:46:57 +01:00
Fin Maaß
1d88d7d139 soc: riscv: litex: add reboot
this makes it possible to reboot a
litex SoC.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-06 15:46:40 +01:00
Lorenz Clijnen
d7e5451799 modules: lvgl: input: Fix invalid encoder readout
When the encoder button was pressed, it would send a LV_KEY_LEFT/RIGHT
instead of a LV_KEY_ENTER event.
This clears the enc_diff field, and set the key field to LV_KEY_ENTER
for button events.

Fixes #73529

Signed-off-by: Lorenz Clijnen <lorenz_reclame@outlook.be>
2024-06-06 15:46:20 +01:00
Nelson Ferragut
0d56a3c3f4 doc: unittest: add instructions
Implemented suggestions from Benjamin Cabé.

Signed-off-by: Nelson Ferragut <nelson_ferragut@whirlpool.com>
2024-06-06 07:54:31 -04:00
Nelson Ferragut
7054d01dc8 doc: unittest: add instructions
Add instructions for implementing unit testing.

Signed-off-by: Nelson Ferragut <nelson_ferragut@whirlpool.com>
2024-06-06 07:54:31 -04:00
Fin Maaß
3ba44c9bdd boards: esp32: don't enable spiram for mcuboot
don't enable ESP_SPIRAM for mcuboot.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-06 07:53:38 -04:00
Tomasz Moń
e2afcafca5 drivers: udc_dwc2: Abort wait when PHY is not clocked
On nRF54H20DK the USB PHY is powered from VBUS. When the USB cable is
not connected, the PHY is not powered and the PHY clock disappears.

Because the GOUTNAKEFF and INEPNAKEFF can only ever be set when PHY
clock is active, the waits for these bits do timeout if cable is
disconnected. Workaround the issue by aborting the wait if vendor quirk
indicates that PHY clock has abruptly vanished.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-06 07:53:17 -04:00
Tomáš Juřena
5ac6335505 drivers: pinctrl: esp32: Use BIT macro when writing pin value
GPIO registers w1ts and w1tc expects bitfield of pins to set/clean.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-06-06 07:52:55 -04:00
Zhengwei Wang
96ff0f1e04 drivers: timer: Optimized the ambiq stimer driver
The original driver has two defects: 1. When setting the next timeout
value the original implementation simply sets a delta value equal to
ticks * CYC_PER_TICK. This operation is reckless and may incorrectly
"reset" the fractional tick, causing clock skew. 2. The original
implementation doesn't handle the counter overflow situation. When the
counter overflows from 0xffffffff to 0x0, the uptimer counter becomes
incorrect. We have fixed above issue by rewriting most of the functions in
this driver and verified it by running all tests under
tests/kernel/timer folder.

Signed-off-by: Zhengwei Wang <zwang@ambiq.com>
2024-06-06 07:52:32 -04:00
Benjamin Cabé
d8b4ff5531 samples: drivers: clock_control_litex: clean up DTS snippet in README
Clean up the DTS snippet in the README file to make it more readable.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-06 07:51:58 -04:00
Andrej Butok
5df6aa8efa boards: nxp: mimxrt11xx: fix non-optimal sector distribution
- Optimize slot sizes for MCUBoot swap move algorithm
  for mimxrt1160/70 boards.
- Use DT_SIZE_K/M macros for slot sizes.
- Limit mcuboot max size to 128KB.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-06 07:51:38 -04:00
Declan Snyder
a42ada8426 drivers: nxp_enet: Disable hw accel with IPV6
As far as I can tell it appears that the hardware
does not support acceleration of ICMPV6 checksums.
For now, the easiest way to fix the runtime failure of
IPV6 is just to disable the hardware acceleration if
IPV6 is expected to be used.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-06 07:51:16 -04:00
Henrik Brix Andersen
331b404185 twister: hardwaremap: avoid exceptions when generating hardware map
Avoid exceptions when generating persistent hardware maps on Linux with no
devices available.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-06 07:50:51 -04:00
Anas Nashif
94b9790941 ci: test_plan: fix handling of v2 boards
Handling of board changes was broken and did not support v2 boards, fix
this to optimize CI execution on localized changes of board files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-06 07:50:34 -04:00
Fabio Baltieri
19bf8c3631 MAINTAINERS: add the test path to the sensing area
Make sure sensing test changes are assigned.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-06 04:44:49 -07:00
Fabio Baltieri
92c459a9bc tests: subsys: sensing: set CONFIG_EMUL=y
The test is broken in CI because the emulated spi bus is not built in,
adding an explicit CONFIG_EMUL=y to the test config.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-06 04:44:49 -07:00
Grzegorz Swiderski
1f05b22acb boards: nordic: nrf54h20dk: Add aliases for RESETINFO
Each local RESETINFO instance can be used in samples.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-06-06 10:03:15 +02:00
Grzegorz Swiderski
742c728c7e dts: nordic: Add RESETINFO
Add devicetree nodes for the Reset Information registers on nRF54H20,
along with a new binding.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-06-06 10:03:15 +02:00
Sebastian Bøe
e1347ded48 soc: nordic: nrf53: Remove broken PM_S2RAM support
Remove dead code that cannot be enabled.

Kconfig prevents us from enabling PM_S2RAM on 53 because it is not
supported any more.

But we still have some dead code left over in soc.c, so we delete this
code.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-06-06 10:02:58 +02:00
Tom Burdick
c5e591bf44 sys: MPSC doc comment cleanup
The doc comment relating to mpsc atomics was worded poorly. Remove
the poorly worded doc comment related to atomics and caches.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-06 00:42:29 -07:00
Tom Burdick
d95caa51a4 sys: Add a lockfree mpsc and spsc queues
Moves the rtio_ prefixed lockfree queues to sys alongside existing
mpsc/spsc pbuf, ringbuf, and similar queue-like data structures.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-06 00:42:29 -07:00
Tom Burdick
f32a41d4dd rtio: Exclude platforms from CI testing
Running lock free algorithms on renode seem to cause timeouts so exclude
renode platforms.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-06 00:42:29 -07:00
Sreeram Tatapudi
69f9d73197 boards: infineon: cyw920829m2evk_02: Fix index.rst
Update index.rst to use the right description for code

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-06-06 09:42:20 +02:00
Sreeram Tatapudi
0b599c6600 tests: drivers: Enable driver tests for cyw20829
Add overlays to enable GPIO and I2C driver tests

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-06-06 09:42:20 +02:00
Sreeram Tatapudi
0f2aead57d driver: watchdog: infineon: cyw20829 watchdog
- Enable watchdog for the cyw920829m2evk_02 board

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-06-06 09:42:20 +02:00
Grzegorz Swiderski
46572f797f dtlib: Allow deleting the root node
Previously, dtlib would fail to parse the following:

   /delete-node/ &{/};

This is accepted by dtc, so dtlib should be aligned.

The expected behavior is that the contents of the "deleted" root node
are emptied, but the node itself remains in the tree. This means that
it's possible to put that statement at the end of a DTS file and still
get a valid output. A small test case for this scenario is included.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-06-06 00:42:10 -07:00
Qianru Huang
a736f150f7 tests: subsys: sensing: add sensing test skeleton
Add the test cases for Sensing(Sensing Subsystem) to verify the
functionality of sensing portion of subsystem.
The test cases are based on native_sim platform.

Signed-off-by: Qianru Huang <qianru.huang@intel.com>
2024-06-06 00:42:04 -07:00
Francois Ramu
8cd4d8aa7e boards: arm: stm32h7s78 disco kit
Introduce the stm32h7s78_dk disco kit from STMicroelectronics
Based on the stm32H7S7 mcu
Use STM32CubeProgrammer v2.16.0 as runner.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 00:41:43 -07:00
Francois Ramu
bde663f484 drivers: gpio: stm32 gpio driver supporting the stm32H7RS
Introduce the stm32h7RS serie to the gpio driver,
based on the stm32h7
The SBS controller is used to configure the EXTI line among
the different GPIO port.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 00:41:43 -07:00
Francois Ramu
c0750e9867 drivers: pinctrl: stm32 pinctrl driver supporting the stm32H7RS
Introduce the stm32h7RS serie to the pin control driver,
New GPIO port M, N, O, P
Then add the complete list and from A to P (16 port
coded on 5 bits)

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 00:41:43 -07:00
Francois Ramu
e6ebb044ac drivers: clock: stm32 clock driver supporting the stm32H7RS
Introduce the stm32h7RS serie to the clock_controller,
based on the stm32h7 clock driver
Datasheet DS14359 rev 1 gives CPU max freq of 500MHz

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 00:41:43 -07:00
Francois Ramu
332eb17995 dts: arm: stm32h7 introduce stm32h7R/h7S devices
Add the new stm32h7rs serie with stm32H7R3, stm32H7R7,
stm32H7S3, stm32H7S7 devices from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 00:41:43 -07:00
Francois Ramu
715b246a2a include: reset bindings add the stm32h7rs serie
Add the support of the STM32H7RSX to the
include/zephyr/dt-bindings/reset/stm32h7_reset.h
which differs from the stm32h7 with an APB5 bus

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 00:41:43 -07:00
Francois Ramu
c08f27d84d dts: bindings: stm32 rcc and exti controller for the stm32H7RS
Introduce the stm32h7RS serie to the clock rcc controller,
and the exti interrupt controller based on the stm32h7 rcc bindings.
Three PLL clocks are available.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 00:41:43 -07:00
Francois Ramu
f909c4aee2 soc: st: stm32 common soc config introduce stm32h7R/h7S devices
Add the new STM32HRSX serie from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 00:41:43 -07:00
Francois Ramu
4f995bd0ff soc: arm: stm32h7RS introduce stm32h7R/h7S devices
Add the new STM32HRSX serie with stm32H7R3, stm32H7R7,
stm32H7S3, stm32H7S7 devices from STMicroelectronics
Same MPU regions as stm32h7 device.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 00:41:43 -07:00
Tim Lin
76ced4a82d drivers: pinctrl: ITE: Add a property configure pin current strength
Add the property of drive-strength to drive a high or low current
selection. If this property is not configured, it is the default
setting. According to the SPEC, the default drive current selection
varies from different pins.
Define the high level 0b: 8mA
           low  level 1b: 4mA or 2mA

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-06-06 00:41:35 -07:00
Peter van der Perk
388ca7febd vmu_rt1170: update docs
Add QTMR and FlexTimer peripherals, update pinmuxing

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-06-06 09:41:22 +02:00
Peter van der Perk
0eee622621 boards: nxp: vmu_rt1170: Add Buzzer and QTMR entries
Allows to control buzzer with QTMR PWM

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-06-06 09:41:22 +02:00
Peter van der Perk
49e7944d59 soc: nxp: rt11xx: Enable NXP QTMR
Adds QTMR dts entries

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-06-06 09:41:22 +02:00
Peter van der Perk
af52f1b290 clock: mcux_ccm: add qtmr clock
Add defines for QTMR peripheral

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-06-06 09:41:22 +02:00
Peter van der Perk
9addbe77fc drivers: pwm: pwm_mcux_qtmr: Add QTMR driver.
PWM driver for QTMR peripheral

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-06-06 09:41:22 +02:00
Daniel DeGrasse
c77b956de5 soc: nxp: imxrt11xx: support configuration of ARM PLL
Add support for configuration of the ARM PLL on the iMXRT1170/1160
series SOCs. This PLL is used to generate the M7 core frequency, and is
an integer pll. Provide default configurations for the RT1160 and RT1170
targeting 600MHz and 1GHz respectively.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 00:41:17 -07:00
Daniel DeGrasse
026d0507ea boards: shields: adafruit_2_8_tft_touch_v2: fix RW612 board overlay
RW612 board overlay should remove the MIPI DBI nodes defined at the
board and at the shield level, because the LCDIC peripheral on this SOC
can support the MIPI DBI protocol directly without the emulated Zephyr
driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 00:41:11 -07:00
Pekka Niskanen
6844016d9d doc: update Infocenter links to TechDocs links
As the Infocenter will soon be taken offline, updating
links to point to TechDocs.

Signed-off-by: Pekka Niskanen <pekka.niskanen@nordicsemi.no>
2024-06-06 00:41:04 -07:00
Jeppe Odgaard
1635ad5a4d dts: boards: stm32h562: add timers 15, 16 and 17
Add the remaining timer nodes for stm32h562.

Tested with a Logic Analyzer and `samples/drivers/led_pwm` with added
`nucleo_h563zi.overlay`:

```

&timers15 {
	status = "okay";
	st,prescaler = <1000>;

	pwm15: pwm {
		status = "okay";
		pinctrl-0 = <&tim15_ch2_pa3 /* CN10.34 */>;
		pinctrl-names = "default";
	};
};

&timers16 {
	status = "okay";
	st,prescaler = <1000>;

	pwm16: pwm {
		status = "okay";
		pinctrl-0 = <&tim16_ch1n_pb6 /* CN10.14 */>;
		pinctrl-names = "default";
	};
};

&timers17 {
	st,prescaler = <1000>;
	status = "okay";

	pwm17: pwm {
		status = "okay";
		pinctrl-0 = <&tim17_ch1n_pb7 /* CN10.16 */>;
		pinctrl-names = "default";
	};
};

&pwmleds {
	status = "okay";

	pwm_led_1: green_led_1 {
		pwms = <&pwm15 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
		label = "green led";
	};

	pwm_led_2: red_led_1 {
		pwms = <&pwm16 1 PWM_MSEC(20)
		        (PWM_POLARITY_NORMAL | STM32_PWM_COMPLEMENTARY)>;
		label = "red led";
	};

	pwm_led_3: blue_led_1 {
		pwms = <&pwm17 1 PWM_MSEC(20)
		        (PWM_POLARITY_NORMAL | STM32_PWM_COMPLEMENTARY)>;
		label = "blue led";
	};
};
```

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-06-06 00:40:59 -07:00
Balaji Srinivasan
16fc8f5295 task_wdt: Feed hardware watchdog only when its started
Previously the schedule_next_timeout() function was feeding the hardware
watchdog irrespective of whether or not it was started. This is now
fixed.

Signed-off-by: Balaji Srinivasan <balaji.srinivasan@nordicsemi.no>
2024-06-06 00:40:53 -07:00
Henrik Brix Andersen
633065ec3b drivers: can: mcux: flexcan: calculate and set proper TDCO
Calculate and set a proper Transceiver Delay Compensation Offset (TDCO)
based on FlexCAN FD timing.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-06 00:40:45 -07:00
Daniel DeGrasse
7b207e309f samples: add testcases for rk043fn02h_ct and rk043fn66hs_ctg shields
Add testcases for rk043fn02h_ct and rk043fn66hs_ctg shields to display
and LVGL samples, so these testcases will be built by CI.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 09:37:16 +02:00
Daniel DeGrasse
6c95c82604 boards: nxp: mimxrt1060_evk: remove display definition
Remove display definition for the RT1060 EVK. This display panel is now
supported as the RK043FN02H-CT shield. Add this information to the
documentation for the board, along with other tested shields.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 09:37:16 +02:00
Daniel DeGrasse
7d441d5c81 boards: shields: rk043fn66hs_ctg: add shield for rk043fn66hs_ctg
Add a shield for the RK043FN66HS-CTG panel, a Rocktech display panel with
an GT911 touch controller. This panel uses a 40+6 FPC interface for
parallel displays, which is supported by many NXP iMX RT EVKs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 09:37:16 +02:00
Daniel DeGrasse
a98faf2567 boards: shields: rk043fn02h_ct: add shield for rk043fn02h_ct
Add a shield for the RK043FN02H-CT panel, a Rocktech display panel with
an FT5336 touch controller. This panel uses a 40+6 FPC interface for
parallel displays, which is supported by many NXP iMX RT EVKs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 09:37:16 +02:00
Daniel DeGrasse
98c82cea8f boards: nxp: mimxrt1060_evk: define parallel and i2c FPC interfaces
Define parallel and i2c FPC display interfaces for the RT1060 EVK. These
interfaces are used by multiple displays for the EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 09:37:16 +02:00
Daniel DeGrasse
6906c2f878 dts: bindings: gpio: add bindings for NXP display interfaces
Add bindings for nxp display interfaces. These bindings describe the 6
and 40 pin FPC connectors used for displays on several NXP EVKs using
gpio nexus nodes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 09:37:16 +02:00
Fabio Baltieri
c250c330c6 posix: re-introduce PTHREAD_RWLOCK_INITIALIZER
Rename the POSIX_RWLOCK_INITIALIZER back to PTHREAD_RWLOCK_INITIALIZER.
This was changed in 70e2b02c8e, but PTHREAD_RWLOCK_INITIALIZER is the
standard name used by external libraries.

Change it back to restore compatibility.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-05 19:31:59 -04:00
frei tycho
ec9f71e237 kernel: avoid Boolean-to-integer type casts
Avoid casting expression to an inappropriate essential type.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-05 17:40:52 -05:00
Seppo Takalo
21d4d49925 test: lwm2m: Increase FDS for native_sim
After last refactoring of POSIX Kconfig options
default is again dropped below what we need.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-06-05 17:39:57 -05:00
Pieter De Gendt
17acb4defe MAINTAINERS: add pdgendt as ethernet collaborator
Propose to help out for ethernet driver subsystem.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-06-05 17:39:44 -05:00
Aaron Ye
10457879d3 doc: release-notes-3.7: Update release notes for Ambiq changes
Added the SoC, board and drivers changes for Ambiq platform.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-06-05 17:39:11 -05:00
Tom Burdick
753f8ff0c7 docs: Move sensor.rst to sensor/index.rst
Looking to expand the sensor docs and break out significant sections.
First though to move this to a directory to allow for multiple sensor
related rst docs.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-05 17:38:56 -05:00
Dmitrii Golovanov
4dc2a98d0c twister: Ensure serial-pty process termination
Make sure Twster DeviceHandler serial-pty process is terminated
with all its remaining children to avoid Twister hanging on it
infinitely.
The reolved issue occurs sometimes, for example when serial-pty
script is used for serial port tunneling over network.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-06-05 17:38:42 -05:00
Anas Nashif
584a99f6ab tracing: add missing calls for k_wakeup/k_thread_user_mode_enter
Add missing hooks for k_wakeup/k_thread_user_mode_enter to CTF backend.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-05 17:38:22 -05:00
Ryan Erickson
0ea95390a5 migration: 3.7: lairdconnect boards are now ezurio
Laird Connectivity has rebranded to Ezurio.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-06-05 17:37:54 -05:00
Ryan Erickson
b1cfc10344 maintainers: update Laird Connectivity to Ezurio
Laird Connectivity is now Ezurio.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-06-05 17:37:54 -05:00
Ryan Erickson
b980e444f0 codeowners: fix ezurio boards owner
Update codeowner for all Ezurio boards.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-06-05 17:37:54 -05:00
Ryan Erickson
d4c15c76ec boards: ezurio: pinnacle_100_dvk: update software links
Highlight Canvas Software Suite platform.
Update web links.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-06-05 17:37:54 -05:00
Ryan Erickson
163afed89e boards: ezurio: mg100: update software links
Highlight Canvas Software Suite platform.
Update web links.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-06-05 17:37:54 -05:00
Ryan Erickson
35a45aa9ec boards: ezurio: change Laird Connectivity references to Ezurio
Update Laird Connectivity references to Ezurio.
Update web links.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-06-05 17:37:54 -05:00
Ryan Erickson
2eef28a624 drivers: change Laird references to Ezurio
Laird is now Ezurio.
Update web links.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-06-05 17:37:54 -05:00
Ryan Erickson
647efdc6c2 dts: bindings: change lairdconnect vendor prefix to ezurio
lairdconnect is now ezurio.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-06-05 17:37:54 -05:00
Ryan Erickson
38c7503532 boards: rebrand lairdconnect to ezurio
Rename boards/lairdconnect to boards/ezurio.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-06-05 17:37:54 -05:00
Ilhan Ates
ee4a20de15 modules: hal_nordic: nrfx: Use soc compatible definition
CONFIG_SOC_SERIES_NRF53X is replaced with SOC_COMPATIBLE_NRF53X
to have support for nrf5340bsim

Signed-off-by: Ilhan Ates <ilhan.ates@nordicsemi.no>
2024-06-05 17:37:31 -05:00
Alberto Escolar Piedras
c9491a818f Bluetooth: Controller: Correct power levels for bsim targets
The simulated targets support the same power levels as the
real targets. Let's correct the kconfig dependencies
accordingly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-05 17:36:57 -05:00
IBEN EL HADJ MESSAOUD Marwa
1e556a85df soc: st: stm32: add stm32h533xx support
Add STM32H533XX familly support

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-06-05 17:36:43 -05:00
IBEN EL HADJ MESSAOUD Marwa
44a5198a99 boards: st: add stm32h533re board support
Add board support for stm32h533re

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-06-05 17:36:43 -05:00
IBEN EL HADJ MESSAOUD Marwa
413eb8ad1d tests: drivers: rtc: rtc_api: Add nucleo_h533re
Adds necessary overlay nucleo_h533re in rtc_api test case
to enables the board.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-06-05 17:36:43 -05:00
IBEN EL HADJ MESSAOUD Marwa
198cee44d5 dts: arm: st: h5: Add node gpiof
Add the node gpiof to the stm32h5 dtsi file.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-06-05 17:36:43 -05:00
IBEN EL HADJ MESSAOUD Marwa
eb49f1ba31 dts: arm: st: add stm32h533Xe support
Provide support for STM32H533XE family support

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-06-05 17:36:43 -05:00
Flavio Ceolin
64b1ac831b arm: pm: Don't use deprecated function
Use pm_system_resume instead of z_pm_save_idle_exit

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-05 17:36:22 -05:00
Flavio Ceolin
a3de27fce9 x86: pm: Don't use deprecated function
Use pm_system_resume instead of z_pm_save_idle_exit

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-05 17:36:22 -05:00
Flavio Ceolin
9a869ef33a arc: pm: Don't use deprecated function
Use pm_system_resume instead of z_pm_save_idle_exit

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-05 17:36:22 -05:00
Abderrahmane Jarmouni
80180188b1 samples: boards: stm32: exit Poweroff using wkup pins & gpios
This sample demonstrates how gpio pins can be used to power on
the system after a Poweroff, just like a reset pin.
The user only needs to add the STM32_GPIO_WKUP flag to the gpio pin
in "gpios" property of a DT device such a button or a sensor.
The samples Powers off the system after a delay then the user can power it
on with the user button that has the STM32_GPIO_WKUP flag in DT.
Only works on STM32 boards that support Zephyr POWEROFF
(U5, WL, WB, & L4 SoC series), & also have a user button whose GPIO pin
is associated with a wake-up pin (see PWR node in SoC dtsi file).

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-05 17:35:55 -05:00
Abderrahmane Jarmouni
323fcf94f9 soc: st: stm32: complete wkup pins cfg before poweroff
Complete wake-up pins configuration before powering off
the system when the CONFIG_STM32_WKUP_PINS flag is enabled.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-05 17:35:55 -05:00
Abderrahmane Jarmouni
efc209b47f drivers: gpio: stm32: support wkup pins configuration
Introduce a custom STM32_GPIO_WKUP GPIO flag.
Use the newly introduced stm32_pwr_wkup_pin_cfg_gpio() public
function to configure GPIO pins, that have the STM32_GPIO_WKUP
flag in DT, as sources for STM32 PWR wake-up pins, on the condition
that there is a wake-up pin that corresponds to each of them.
These GPIO pins can then be used to power on the system after Poweroff
like a reset pin.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-05 17:35:55 -05:00
Abderrahmane Jarmouni
559c72d7a6 include: drivers: misc: introduce stm32 wkup pins public cfg API
Introduce public functions for GPIO pins configuration as sources for
STM32 PWR wake-up pins, in stm32 drivers & routines such gpio_stm32
& poweroff.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-05 17:35:55 -05:00
Abderrahmane Jarmouni
ae17e48036 soc: st: stm32: common: introduce a wake-up pins driver
Implement GPIO pins configuration as sources for STM32 PWR wake-up pins
behind the scenes exclusively from devicetree information for all series
using the public stm32_pwr_wkup_pin_cfg_gpio() function.
Introduce macros for parsing & storing DT wake-up pins config in C structs.
Introduce user-configurable STM32_WKUP_PINS Kconfig flag.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-05 17:35:55 -05:00
Abderrahmane Jarmouni
ede21b54d0 dts: arm: st: add pwr peripheral & wake-up pins nodes
Add devicetree node of stm32 PWR peripheral that controlls wake-up pins.
The new node includes child nodes for wake-up pins configuration.
We only add these nodes for STM32 SoC series that support Poweroff.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-05 17:35:55 -05:00
Abderrahmane Jarmouni
8bae146a60 dts: bindings: power: stm32 pwr peripheral & wake-up pins
Add DT binding for stm32 PWR peripheral that controlls wake-up pins.
This binding primarily introduces wake-up pins configuration in
a unifed way that takes into consideration the variations between
STM32 SoC series & facilitates the association of GPIO pins with
their corresponding wake-up pins.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-05 17:35:55 -05:00
Frode van der Meeren
e414acfabc Bluetooth: Tester: Adjust bap ext adv options
This change removes the BT_LE_PER_ADV_OPT_USE_TX_POWER option for
extended advertisement in BLE Audio PTS tests.

The Broadcaster setup options was hardcoded to include the
BT_LE_PER_ADV_OPT_USE_TX_POWER option. This causes incompabilities
for any controller not support it, and since the option is not
required for the audio tests it should not be used here.

signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
2024-06-05 23:39:45 +03:00
Ioannis Damigos
9c8fd3745c kconfigfunctions.py: Fix used-before-assignment error with pylint 3.2
CI reports error:
kconfigfunctions.py:143:11: E0601: Using variable 'edtlib' before
assignment (used-before-assignment)

Initialize edtlib to none when there is no edt.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-05 13:49:09 -05:00
Ioannis Damigos
285969c98c scripts/kconfig: Introduce dt_node_ph_prop_path function
Introduce dt_node_ph_prop_path function.
It  takes a node 'path' and a phandle property name
and returns the path to the pointed-to node.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-05 13:49:09 -05:00
Henrik Brix Andersen
72715531e4 boards: nxp: imx93_evk: remove deprecated CAN controller properties
Remove the deprecated CAN controller properties "bus-speed" and
"bus-speed-data" and rely on the Kconfig defaults.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-05 13:42:06 -05:00
Seppo Takalo
d3081e2f30 net: lwm2m: On write, use server selected block size
When we receive CoAP packets, it is in input buffer
that is size of NET_IPV6_MTU.
So in reality, we can handle bigger Block-Wise writes
than CONFIG_LWM2M_COAP_BLOCK_SIZE.

So if parsing of CoAP packet has passed, continue
with the same block-size instead of going to default.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-06-05 14:43:14 +01:00
Henrik Brix Andersen
68096cedae drivers: can: rename struct can_driver_config fields
Rename the "bus_speed" and "bus_speed_data" fields of struct
can_driver_config to "bitrate" and "bitrate_data" to match the
corresponding devicetree properties and the terminology used in the rest of
the CAN subsystem API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-05 14:43:00 +01:00
Henrik Brix Andersen
695e704b5d dts: bindings: can: rename bus-speed/bus-speed-data properties
Deprecate the CAN controller bus-speed/bus-speed-data properties and rename
them to bitrate/bitrate-data to match the terminology used in other CAN
devicetree properties and the CAN subsystem API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-05 14:43:00 +01:00
Nikodem Kastelik
23b4706e47 tests: drivers: spi: nordic: add fast SPI to overlays
SPIM12x have more capabilities than SPIM13x,
so it should be tested separately.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-05 14:42:50 +01:00
Nikodem Kastelik
b1506dfda8 boards: nordic: nrf54h20: cpuppr: add SPI to supported features
SPI is now supported on nRF54H20 PPR CPU.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-05 14:42:50 +01:00
Nikodem Kastelik
fc0718ed46 drivers: spi: nrf: add support for spim12x instances
SPIM12x instances can perform DMA only from memory region
that is cacheable by default.
SPIM12x instances pins are configured via CTRLSEL mechanism,
which prevents the GPIO registers from ensuring correct bus
state when peripheral does not drive the bus lines.
External configuration of SPIM12x ENABLE register fixes this issue.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-05 14:42:50 +01:00
Nikodem Kastelik
dd91c89d2f manifest: update hal_nordic revision
Updated hal_nordic revision brings update to nrfx SPIM driver,
allowing external configuration of ENABLE register needed
to mitigate SPI bus glitches when using CTRLSEL pins.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-05 14:42:50 +01:00
Nikodem Kastelik
7080f0f83f drivers: spi: nrf: fix async cs deactivation
Chip Select signal must be deactivated only after transaction
is finalized. In async case this means it cannot be done from
`transceive` call context, as this context is left as soon as
transfer is initialized.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-05 14:42:50 +01:00
Nikodem Kastelik
77e875a0b7 tests: drivers: spi_controller_peripheral: improve async test case
In test cases checking async API, use async API
for both controller and peripheral devices.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-05 14:42:50 +01:00
Nikodem Kastelik
41ad1f3ddb drivers: pinctrl: nrf: use CLOCKPIN for slow SPIM MOSI
Fast SPIM instances must not have CLOCKPIN setting applied to MOSI.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-05 14:42:50 +01:00
Nikodem Kastelik
8b8c0a7bf0 boards: nrf54h20dk: add ram21 memory region
This memory region is used for not only but also DMA transfers
of the fast peripherals.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-05 14:42:50 +01:00
Nikodem Kastelik
12142f72ec arch: arm: core: mpu: allow non-ARM memory attributes
Memory region defined in devicetree can have attributes
that are not intended to be parsed by MPU library,
but might be valid for other components.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-05 14:42:50 +01:00
Ayush Singh
d9e2b0c707 samples: blinky_pwm: add overlay for bcf
- Add and test pwm for beagleconnect freedom

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-06-05 04:24:38 -07:00
Ayush Singh
02d71a135c drivers: cc13xx_cc26xx: pwm: Fix building blinky_pwm
- Add channel, flags to pwm-cells
- Replace __ASSERT_UNREACHABLE with CODE_UNREACHABLE

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-06-05 04:24:38 -07:00
Declan Snyder
90986e7e22 drivers: mcux_lptmr_timer: Fix compat string error
Fix error due to compatible string changing in DT and
forgetting to update this driver with the change.

Also make the counter symbol hidden.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-05 04:24:30 -07:00
Piotr Kosycarz
5a4fa06c67 samples: basic: fade_led: add testing base on console output
Extend automated testing on HW by veryfing console output.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-05 04:24:22 -07:00
Valerio Setti
9360b6e1aa mbedtls: remove unused kconfigs for Blowfish, ARC4 and MD4
As of Mbed TLS 3.6 (which is the currently used version in Zephyr)
Blowfish, ARC4 and MD4 are no more supported so existing kconfigs
have no effect at all. Moreover they are not even used anywhere
in Zephyr.
This commit just removes them all and it also updates the migration
guide document.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-05 01:39:04 -07:00
Kai Vehmanen
a4fdd915d5 drivers: dma: intel_adsp_hda: change L1 exit defaults
DMA_INTEL_ADSP_HDA_TIMING_L1_EXIT should be set by default
for both Intel ACE15 and ACE20 platforms.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-06-05 01:38:54 -07:00
Lukasz Mrugala
5f4d330db6 scripts: twister: Do not report filtered test instances by default
Filtered testcases are removed by default from Twister tests.
Older functionality is preserved via a new Twister flag:
--report-filtered.
Old tests were adjusted and a new test for that flag added.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-06-05 01:38:47 -07:00
Daniel Kampert
246e614ac3 drivers: rtc: rtc_mc146818: Patch incorrect field comparisons
Minutes and hour values are incorrectly compared with MAX_SEC.

Compare minutes and hour to MAX_MIN and MAX_HOUR respectively.

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-06-05 01:38:33 -07:00
Valerio Setti
87dbd81168 tfm: do not enable all PSA features by default when BUILD_WITH_TFM
Do not enable all PSA features by default when BUILD_WITH_TFM

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-05 01:38:22 -07:00
Karol Lasończyk
955dbf47f8 tests: nordic: Enable I2C tests
Add i2c to supported peripheral to enable i2c testing.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-05 01:38:09 -07:00
Krzysztof Chruściński
d07b13dbc2 drivers: serial: nrfx_uarte: Allow use of legacy shim on RISCV cores
Legacy shim takes less flash so it should be a first choice on cores
with less code memory (like RISCV cores on nrf54h20). Adding new
instances support to the legacy shim.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-05 01:37:57 -07:00
Stephanos Ioannidis
7975db44b2 SDK_VERSION: Use Zephyr SDK 0.16.8
This commit updates SDK_VERSION to point to the Zephyr SDK 0.16.8 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-06-04 22:59:31 -04:00
Stephanos Ioannidis
b8f7ae5a4c ci: Switch to CI image v0.26.13
This commit updates the CI workflows to use the CI image v0.26.13, which
includes Zephyr SDK 0.16.8.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-06-04 22:59:31 -04:00
Sven Ginka
c3d7b1c978 soc: atmel: sam: Add invalidate d-cache at z_arm_platform_init
Before that fix, the SOC was unable to boot properly.
Starting turned directly into z_arm_usage_fault().
Fixes zephyrproject-rtos#73485

Signed-off-by: Sven Ginka <sven.ginka@gmail.com>
2024-06-04 22:41:06 -04:00
Stephanos Ioannidis
c74445d694 ci: doc-build: Reduce parallel job count to 14
This commit reduces the parallel job count for building the documentation
from the default value of 16 (i.e. `-j auto` aka. the vCPU count) to 14
because the total available RAM in the runners is 32GiB and each
sphinx-build process may use more than 2GiB of RAM, which can lead to
out-of-memory conditions.

Note that the HTML doc build process was parallelised prior to this change
in spite of the lack of `-j auto` in the CI workflow because the default
`SPHINXOPTS` includes `-j auto` and only `SPHINXOPTS_EXTRA` was specified
-- this commit explicitly adds the `SPHINXOPTS` for it with the default
value specified in doc/CMakeLists.txt to make the job count configurable
while ensuring the previous behaviour is preserved.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-06-04 22:37:44 -04:00
Yong Cong Sin
3cb2c04fc1 subsys/debug: relocate symtab Kconfig
Move the symtab Kcofig into the symtab folder.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 22:36:51 -04:00
Yong Cong Sin
9d9576b442 subsys/debug: relocate gdbstub stuff into its folder
Move the gdbstub files into the gdbstub folder, and relocated
its Kconfig as well.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 22:36:51 -04:00
Flavio Ceolin
0b3d7eb3e7 doc: vulnerabilities: Info about CVE-2024-3332
Add an entry for CVE-2024-3332.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 22:36:09 -04:00
Flavio Ceolin
ee92645e9c doc: relnotes/3.7: Add info about CVE-2024-3332
Information about CVE-2024-3332 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 22:36:09 -04:00
Peter Mitsis
48285cb6b8 tests: Add IPI_OPTIMIZE tests
Adds several tests to verify that IPIs can be appropriately
targeted to specific CPUs.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-04 22:35:54 -04:00
Peter Mitsis
1753a0dabe manifest: optional: Update revision for arch_sched_ipi()
Updates the sof revision. This is needed for it to pick up a
change to the arch_sched_ipi() which has been renamed to
arch_sched_broadcast_ipi().

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-04 22:35:54 -04:00
Peter Mitsis
0bcdae2c62 kernel: Add CONFIG_ARCH_HAS_DIRECTED_IPIS
Platforms that support IPIs allow them to be broadcast via the
new arch_sched_broadcast_ipi() routine (replacing arch_sched_ipi()).
Those that also allow IPIs to be directed to specific CPUs may
use arch_sched_directed_ipi() to do so.

As the kernel has the capability to track which CPUs may need an IPI
(see CONFIG_IPI_OPTIMIZE), this commit updates the signalling of
tracked IPIs to use the directed version if supported; otherwise
they continue to use the broadcast version.

Platforms that allow directed IPIs may see a significant reduction
in the number of IPI related ISRs when CONFIG_IPI_OPTIMIZE is
enabled and the number of CPUs increases.  These platforms can be
identified by the Kconfig option CONFIG_ARCH_HAS_DIRECTED_IPIS.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-04 22:35:54 -04:00
Peter Mitsis
d8a4c8a90c kernel: Add CONFIG_IPI_OPTIMIZE
The CONFIG_IPI_OPTIMIZE configuration option allows for the flagging
and subsequent signaling of IPIs to be optimized.

It does this by making each bit in the kernel's pending_ipi field
a flag that indicates whether the corresponding CPU might need an IPI
to trigger the scheduling of a new thread on that CPU.

When a new thread is made ready, we compare that thread against each
of the threads currently executing on the other CPUs. If there is a
chance that that thread should preempt the thread on the other CPU
then we flag that an IPI is needed for that CPU. That is, a clear bit
indicates that the CPU absolutely will not need to reschedule, while a
set bit indicates that the target CPU must make that determination for
itself.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-04 22:35:54 -04:00
Peter Mitsis
9ff5221d23 kernel: Update IPI usage in k_thread_priority_set()
1. The flagging of IPIs is moved out of k_thread_priority_set() into
z_thread_prio_set(). This allows for an IPI to be done for a thread
that had its priority bumped due to the handling of priority
inheritance from a mutex.

2. k_thread_priority_set()'s check for sched_locked only applies to
non-SMP builds that are using the old arch_swap() framework to switch
between threads.

Incidentally, nearly all calls to flag_ipi() are now performed with
sched_spinlock being locked. The only exception is in slice_timeout().

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-04 22:35:54 -04:00
Henrik Brix Andersen
afb2791ccf tests: drivers: can: host: allow specifying context along with fixture
Allow specifying the python-can configuration context to use along with the
"can" fixture. This opens up for specifying board-specific contexts in the
twister hardware map file.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-04 21:27:35 -05:00
Henrik Brix Andersen
3eb3c33096 scripts: twister: allow fixtures to contain extra configuration
Allow twister fixtures to contain extra information, which can be used for
test suite configuration. The extra information can be appended to existing
fixtures separated by a colon (i.e. <fixture>:<configuration>).

This is especially useful for the pytest harness, where a fixture of a
given type may need to refer to an instance of a particular piece of host
hardware needed by the pytest suite (e.g. a network interface, a UART, or a
CAN interface connected to the device under test).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-04 21:27:35 -05:00
Henrik Brix Andersen
a7d55cfa13 twister: harness: pytest: list available fixtures in device config
Pass the list of supported twister fixtures for a given platform to pytest
via DeviceConfig. This allows for the pytest suites to use knowledge of the
fixtures for test suite configuration.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-04 21:27:35 -05:00
Chekhov Ma
07f132b1b5 boards: imx93_evk: enable flexcan driver
Add pinctrl for flexcan2
Add EXP_SEL gpio hog for board mux selection during boot.
Add TJA1057 CAN PHY driver.
Update supported features in board document

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-06-04 19:14:16 -04:00
Chekhov Ma
69360d2f38 soc: imx93: enable flexcan driver
- Add flexcan dts node and pinctrl.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-06-04 19:14:16 -04:00
Flavio Ceolin
4ffefed23a tests: power_mgmt: Test system-managed disabled per state
Check that a power state that has system-managed device power
management disabled does not trigger device power management
when the system sleeps.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
2dfacadd04 tests: pm: Replace depracated build option
Replace the usage of CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE with
CONFIG_PM_DEVICE_SYSTEM_MANAGED.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
1359eb9308 tests: power_mgmt: Add test for PM_DEVICE_SYSTEM_MANAGED
Add a new test that disables PM_DEVICE_SYSTEM_MANAGED, since this
option is enabled by default.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
dcf22a66de doc: pm: Update system device pm
Add new information about new property to
enable/disable device power management per
power state.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
7dcec56601 tests: device_wakeup_api: Use DTS overlay for power state
Define the power state needed in the test in DT.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
45e9c2eed3 tests: power_mgmt: Use DTS overlay for power state
Define the power state needed in the test in DT.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
1c2e988021 pm: device: De-couple device pm from system pm
PM_DEVICE is not attached to system managed device power management.
It is a very common use case targets with device runtime power
management that don't want system device power management enabled.

We introduce a new symbol (PM_DEVICE_SYSTEM_MANAGED) to explicit
control whether or not system device power management should be
globally enabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
c65be0cfb9 pm: Exclude device pm path when it is not needed
Remove device pm path when there is no is no power state in DT with
device pm enabled. This basically does the same thing that was done
by PM_DEVICE_RUNTIME_EXCLUSIVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
2f99ff51cc pm: Disable device pm per power state
Make it possible to disble device power management individually per
power state.  This allows targets tuning which states should
(and which should not) trigger device power management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
94af630b22 pm: Deprecate PM_DEVICE_RUNTIME_EXCLUSIVE
That is option has shown confusing on it is attempt to prevent
system pm doing device power management. Lets address this
problem properly.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin
1a6bdb2e3e doc: crypto: Add PSA Crypto documentation
Add PSA Crypto in the cryptographic services
section.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:36 -04:00
Flavio Ceolin
c1bcf3c72f doc: crypto: Remove TinyCrypt from documentation
TinyCrypt is being removed from Zephyr in favor of PSA Crypto.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:36 -04:00
Flavio Ceolin
9751f78ce5 doc: security-overview: Update cryptographic information
Zephyr's transition to PSA Crypto API and demoting TinyCrypt.
Lets not promote TinyCrypt in the overview.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:36 -04:00
Sven Depoorter
cabeaf1436 drivers: display: ili9xxx: add justification for default rotation
To align with udpated ssd16xx bindings.

Signed-off-by: Sven Depoorter <svndepoorter@gmail.com>
2024-06-04 19:13:18 -04:00
Sven Depoorter
dda604c96f drivers: display: ssd16xx: performance improvement
The driver writes the scan entry mode to the display controller on each
set_window call. Multiple calls to set_window can be needed to update
a single frame buffer in the controller.

There's a performance improvement by only setting the scan mode when
the orientation is changed (set_orientation, see previous commit)
and when the profile has changed.
For the latter the scan_mode is lost on the controller
due to a software reset.

Signed-off-by: Sven Depoorter <svndepoorter@gmail.com>
2024-06-04 19:13:18 -04:00
Sven Depoorter
e01f422b02 drivers: display: ssd16xx: implement display_set_orientation API
I chose this approach instead of software rotation because I need it for
an ultra low power project.
Rotation in steps of 0, 90, 180, 270 degrees is done by changing
the data entry modes.
This commit removes the orientation-flipped property as it is redundant.

I made the assumption that the current driver implementation is right
about controller X/Y versus display width/height. The display controller X
parameter matches with the display height (dts) and display controller Y
parameter matches with the display width (dts). It looks like display
manufacturers choose to have it like this because a wider screen probably
makes more sense.

Tested on the reel_board with a 250x122 display (ssd1673 controller)
and a custom PCB with a 200x200 display (ssd1681 controller).
Also tested all orientations with various width/height dts overrides.

Signed-off-by: Sven Depoorter <svndepoorter@gmail.com>
2024-06-04 19:13:18 -04:00
Yassine El Aissaoui
cb85932488 boards: rd_rw612_bga: Update board documentation
Add information about BLE.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-04 19:12:45 -04:00
Yassine El Aissaoui
ffa3f168ec samples: tests: Create dedicated test section for rd_rw612_bga
Monolithic build is enabled by default and it
requires the presence of the binary blobs.
CI will fail since it doesn't fetch them
to the environment. To avoid this
monolithic for BT app is disabled.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-04 19:12:45 -04:00
Axel Le Bourhis
bb6669418a boards: rd_rw612_bga: flash size with monolithic feature
When building with monolithic feature enabled, the firmwares binaries
will be linked during the build with the application. This means we can
remove the application size limit due to the firmware storage in flash
not useful anymore.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-04 19:12:45 -04:00
Axel Le Bourhis
ca53f5ee8e soc: rw6xx: Enable NXP_BLE_MONOLITHIC
Enable monolithic build for all BLE apps.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-04 19:12:45 -04:00
Axel Le Bourhis
8f5892a830 mcux: add Kconfig to configure NXP BLE monolithic feature
The monolithic feature allows to link the binary blobs with
the application during the build.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-04 19:12:45 -04:00
Tahsin Mutlugun
859c733b01 tests: drivers: gpio: Enable gpio driver tests for MAX32680EVKIT
Enable GPIO driver tests for MAX32680EVKIT.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-06-04 19:12:21 -04:00
Sadik Ozer
191b9ca096 boards: Add MAX32680EVKit board
Added MAX32680EVKit board
For more information about this board please check
https://www.analog.com/

Co-authored-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-04 19:12:21 -04:00
Sadik Ozer
6a8674ce12 soc: Add the MAX32680 SoC
Add MAX32680 Kconfig and dts files

Co-authored-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-04 19:12:21 -04:00
Peter Mitsis
46e3cfa665 doc: kernel: Fix pipes configuration option link
Updates the pipes documentation to generate a link to CONFIG_PIPES
Kconfig option description instead of merely listing the name of
this option.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-04 19:10:56 -04:00
Peter Mitsis
ed7a5f31c2 kernel: Update CONFIG_PIPES Kconfig description
Updates the CONFIG_PIPES Kconfig description to add a note that
enabling it will cause a slight increase to the thread structure.
This mirrors a similar comment in CONFIG_EVENTS.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-06-04 19:10:56 -04:00
Dominik Ermel
c9a21363a1 fs: Improved CONFIG_FILE_SYSTEM_MAX_FILE_NAME processing
The processing of CONFIG_FILE_SYSTEM_MAX_FILE_NAME override for
MAX_FILE_NAME has been improved to limit possibility to set it to
value that is not allowed by any of the in-tree subsystems, when
such subsystem is enabled.
When no in-tree subsystem is allowed the value is still not limited.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 19:10:39 -04:00
Dominik Ermel
02dfda818d fs: Fix MAX_FILE_NAME setting for LittleFS
Fix MAX_FILE_NAME for LittleFS, which was set to 255, while currently
allowed is 255.

Fixes #72394

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 19:10:39 -04:00
Yassine El Aissaoui
5c308e0344 bluetooth: hci_nxp: move vendor specific setup to its dedicated place
Some vendor specific setup was done inside
the open() HCI function, those should be
inside setup() function instead.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-04 19:10:22 -04:00
Andrej Butok
26d56eb0a5 boards: nxp: frdm_k22f: fix the flash size value
- The MK22FN512VLH12 chip, installed on frdm_k22f,
  has 512 KB of Program Flash and 128KB SRAM
  according to the K22P121M120SF7RM.pdf manual (page 55).
- Fix the flash size to 512KB (was 1MB).
- Add nxp_k22fn512.dtsi with correct flash size value.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-04 19:09:36 -04:00
Dominik Ermel
459517badc drivers/flash/spi_nor: Fix DPD exit
Incorrectly placed preprocessor conditions caused exit_dpd
when there has been no instance of a device with
dpd_wakeup_sequence parameter.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
2024-06-04 16:28:59 -05:00
Flavio Ceolin
f74a84b251 xtensa: mmu: MMU re-initialization API
With power managment is enabled, depending on the SoC power state
used when idle, the MMU may lose context and may need to be re-initialized.
When re-initializing the MMU, we must not re-create the page table
because it may overwrite changes done during the execution, but we still
need to set the asid and page table for the current context.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 16:27:55 -05:00
Chris Friedt
fe1e7f8d37 doc: release: posix: deprecate non-normative POSIX Kconfig
Add release notes for the deprecation of a number of POSIX
Kconfig options. These have been deprecated so that we can
use more normative Kconfig variable identifiers, based on
the Options and Option Groups of IEEE 1003.1-2017.

To simplify migration, use

python $ZEPHYR_BASE/scripts/utils/migrate_posix_kconfigs.py \
    -r root_path

Additionally, document the removal of PTHREAD_BARRIER_DEFINE(),
EFD_IN_USE, EFD_FLAGS_SET, which were previously deprecated
>= 2 release cycles before.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
0fa97326c7 posix: create kconfig options for pse51, pse52, pse53
Create Kconfig "shortcuts" for PSE51, PSE52, and PSE53.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
487a8756c3 posix: eventfd: fix dependency cycle between net and posix
Until recently, the posix api was purely a consumer of the
network subsystem. However, a dependency cycle was added as
a stop-gap solution for challenges with the native platform.

Specifically,

1. eventfd symbols conflict with those of the host
2. eventfd was excluded from native libc builds via cmake

If any part of the posix were then to select the network
subsystem (which is a legitimate use case, given that networking
is a part of the posix api), we would get a build error due to
the Kconfig dependency cycle.

As usual, with dependency cycles, the cycle can be broken
via a third, mutual dependency.

What is the third mutual dependency? Naturally, it is ZVFS
which was planned some time ago. ZVFS will be where we
collect file-descriptor and FILE-pointer APIs so that we can
ensure consistency for Zephyr users.

This change deprecates EVENTFD_MAX in favour of
ZVFS_EVENTFD_MAX.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
b3e36ad6e8 posix: eventfd: remove deprecated eventfd macros
Remove the EFD_IN_USE and EFD_FLAGS_SET macros as they were not
part of the public API.

Rename the internal versions, accordingly.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
b003636b2b doc: posix: misc cleanup and add links to system interfaces
memlock, memlock range, shared memory objects, and synchronized
io were missing links.

Also, vdisable is '\0' (not 0).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
3949e89330 posix: net: update for POSIX_NETWORKING
Add a link to the Kconfig option CONFIG_POSIX_NETWORKING in
the documentation.

Additionally, add Kconfig options for other Network
dependencies in an effort to make POSIX Kconfig options
consistent with the specification.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
1640967173 doc: posix: clean up some Kconfig options
Add links to POSIX-related Kconfig options that are related to
POSIX Options and Option Groups.

These include limits that might not have an associated standard
name and related Kconfig variables in other subsystems.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
b051bcee25 posix: move getpid() to Kconfig.procN and doc MULTI_PROCESS
Create a Kconfig option for POSIX_MULTI_PROCESS Option Group
and mark it as experimental.

Currently, Zephyr has two functions that belong to this
Option Group:
- sleep()
- getpid()

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
2e429f1b9d posix: reword aio and sched options. add experimental
The asynchronous I/O and (process) scheduling options needed
minor rewording.

Additionally, add the experimental flag to each of them since
they are not yet supported.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
3f29b17bd1 posix: deprecate POSIX_SIGNAL in favour of POSIX_SIGNALS
This change deprecates CONFIG_POSIX_SIGNAL in favour of
the plural CONFIG_POSIX_SIGNALS, which maps directly to the
name of the standard POSIX Option Group POSIX_SIGNALS.

Additionally, mark signals as experimental.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
2642eaa4e9 posix: relocate Kconfig.eventfd to Kconfig.compat
While event file descriptors (eventfd) are extremely useful, the
API has still not been formalized as part of the POSIX
specification.

Therefore, move this to a separate Kconfig menu for "compat"
(compatibility) features.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
fcebe60090 posix: deprecate PTHREAD_IPC _MUTEX _COND and _KEY
Zephyr's POSIX API is moving toward using the standard
nomenclature from IEEE 1003.1-2017 for as much as possible. In
particular, we want to have consistent naming between Zephyr's
POSIX API Kconfig options and the naming for POSIX Options and
Option Groups.

The Kconfig option CONFIG_PTHREAD_IPC has been (ab)used for a
very long time for a variety of different purposes. However,
the standard Option / feature test macro for POSIX Threads is,
intuitively _POSIX_THREADS. There is a corresponding sysconf()
key named _SC_POSIX_THREADS.

Annoyingly, the POSIX Option Group that corresponds to the
Option is POSIX_THREADS_BASE, which is a minor inconsistency
in the standard.

The _POSIX_THREADS Option already includes mutexes, condition
variables, and thread-specific storage (keys). So with this
change, we also deprecate the redundant Kconfig variables that
do not have a corresponding match in the standard.

- CONFIG_PTHREAD_IPC
- CONFIG_PTHREAD
- CONFIG_PTHREAD_COND
- CONFIG_PTHREAD_MUTEX
- CONFIG_PTHREAD_KEY

Additionally, create Kconfig variables for those configurables
which we are lacking:

- CONFIG_POSIX_THREADS_EXT
- CONFIG_POSIX_THREAD_ATTR_STACKSIZE
- CONFIG_POSIX_THREAD_ATTR_STACKADDR
- CONFIG_POSIX_THREAD_PRIORITY_SCHEDULING
- CONFIG_POSIX_THREAD_PRIO_INHERIT
- CONFIG_POSIX_THREAD_PRIO_PROTECT
- CONFIG_POSIX_THREAD_SAFE_FUNCTIONS

Some Kconfig variables were renamed to more properly match the spec:

- CONFIG_MAX_PTHREAD_COUNT -> CONFIG_POSIX_THREAD_THREADS_MAX
- CONFIG_MAX_PTHREAD_KEY_COUNT -> CONFIG_POSIX_THREAD_KEYS_MAX

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
2f2cad742e posix: deprecate POSIX_PUTMSG for XOPEN_STREAMS
This change deprecates CONFIG_POSIX_PUTMSG and introduces a new
Kconfig option CONFIG_XOPEN_STREAMS which maps directly to the
standard POSIX Option, _XOPEN_STREAMS.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
0711d603f7 posix: deprecate POSIX_SYSLOG for XSI_SYSTEM_LOGGING
This change deprecates the CONFIG_POSIX_SYSLOG Kconfig
variable for CONFIG_XSI_SYSTEM_LOGGING, which has a
direct mapping to the POSIX Option Group XSI_SYSTEM_LOGGING.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
23f9119176 doc: posix: add kconfig link for async io
Update documentation so that there is a link to
CONFIG_POSIX_ASYNCHRONOUS_IO as it was previously missing.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
842a7b7ba1 posix: deprecate SEM_VALUE_MAX and SEM_NAMELEN_MAX
This change deprecates CONFIG_SEM_VALUE_MAX in favour of
CONFIG_POSIX_SEM_VALUE_MAX which maps directly to
_POSIX_SEM_VALUE_MAX.

Additionally, we add the Kconfig option
CONFIG_POSIX_SEMAPHORES which maps directly to the
POSIX Option _POSIX_SEMAPHORES.

For consistence, deprecate CONFIG_SEM_NAMELEN_MAX
in favour of CONFIG_POSIX_SEM_NAMELEN_MAX.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
9f6590c7b7 posix: deprecate POSIX_FS for POSIX_FILE_SYSTEM
This change deprecates CONFIG_POSIX_FS in favour of
CONFIG_POSIX_FILE_SYSTEM, which maps directly to the name of the
standard POSIX Option Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
2bc722a97e posix: deprecate POSIX_FNMATCH GETOPT GETENTROPY
The functions fnmatch(), getopt(), getentropy()
and others are grouped into the standard Option Group
POSIX_C_LIB_EXT.

The getentropy() function is currently in-draft for
Issue 8 as of 2021.

https://www.opengroup.org/austin/docs/austin_1110.pdf

Not surprisingly, the POSIX_C_LIB_EXT Option Group
also includes the highly debated strnlen() function.

Moving that function will be deferred until later.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
70e2b02c8e posix: deprecate PTHREAD_RWLOCK for POSIX_READER_WRITER_LOCKS
This change deprecates CONFIG_PTHREAD_RWLOCK in favour of
CONFIG_POSIX_READER_WRITER_LOCKS, which maps directly to the
name of the standard POSIX Option.

Annoyingly, the POSIX_RW_LOCKS Option Group is inconsistently
named. However, it is more convenient for us to use the Option
name since it is also the format used by the sysconf() variable
(_SC_READER_WRITER_LOCKS).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
f270de7362 posix: deprecate POSIX_MQUEUE in favour of POSIX_MESSAGE_PASSING
This change deprecates CONFIG_POSIX_MQUEUE in favour of
CONFIG_POSIX_MESSAGE_PASSING, which maps directly to the name of the
standard POSIX Option.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
4e181f7031 posix: deprecate PTHREAD_SPINLOCK for POSIX_SPIN_LOCKS
This change deprecates CONFIG_PTHREAD_SPINLOCK in favour of
CONFIG_POSIX_SPIN_LOCKS, which maps directly to the name of the
standard POSIX Option Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
2fe9d6cd68 posix: deprecate POSIX_ENV _CONFSTR _SYSCONF and _UNAME
This change deprecates the following Kconfig options
* CONFIG_POSIX_ENV
* CONFIG_POSIX_CONFSTR
* CONFIG_POSIX_SYSCONF
* CONFIG_POSIX_UNAME

and instead groups them into a single Kconfig option that maps
directly to the standard. Namely, CONFIG_POSIX_SINGLE_PROCESS.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
b639604833 posix: deprecate PTHREAD_BARRIER for POSIX_BARRIERS
The standard specifies _POSIX_BARRIERS as an Option so let's
use CONFIG_POSIX_BARRIERS for consistence.

This change deprecates CONFIG_PTHREAD_BARRIER. Users should
instead choose CONFIG_POSIX_BARRIERS.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
bc4374b5fe posix: deprecate POSIX_MAX_FDS and add POSIX_DEVICE_IO
The POSIX_MAX_FDS option does not correspond to any standard
POSIX option. It was used to define the size of the file
descriptor table, which is by no means exclusively used by
POSIX (also net, fs, ...).

POSIX_MAX_FDS is being deprecated in order to ensure that
Zephyr's POSIX Kconfig variables correspond to those defined in
the specification, as of IEEE 1003.1-2017. Namely,
POSIX_OPEN_MAX. CONFIG_POSIX_MAX_OPEN_FILES is being deprecated
for the same reason.

To mitigate any possible layering violations, that option is
not user selectable. It tracks the newly added
CONFIG_ZVFS_OPEN_MAX option, which is native to Zephyr.

With this deprecation, we introduce the following Kconfig
options that map directly to standard POSIX Option Groups by
simply removing "CONFIG_":

* CONFIG_POSIX_DEVICE_IO

Similarly, with this deprecation, we introduce the following
Kconfig options that map directly to standard POSIX Options by
simply removing "CONFIG":

* CONFIG_POSIX_OPEN_MAX

In order to maintain parity with the current feature set, we
introduce the following Kconfig options.

* CONFIG_POSIX_DEVICE_IO_ALIAS_CLOSE
* CONFIG_POSIX_DEVICE_IO_ALIAS_OPEN
* CONFIG_POSIX_DEVICE_IO_ALIAS_READ
* CONFIG_POSIX_DEVICE_IO_ALIAS_WRITE

Gate open(), close(), read(), and write() via the
CONFIG_POSIX_DEVICE_IO Kconfig option and move
implementations into device_io.c, to be conformant with the
spec.

Lastly, stage function names for upcoming ZVFS work, to be
completed as part of the LTSv3 Roadmap (e.g. zvfs_open(), ..).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
3f469665f4 posix: fd_mgmt: add fd_mgmt option group
With this change, we collect implementations of functions that are
part of the POSIX_FD_MGMT Option Group into one compilation unit
(fd_mgmt.c) and provide a matching Kconfig symbol that is
reflective of the standard.

Additionally, provide Kconfig options for aliases of those functions
since Newlib-based toolchains internally use an underscore-prefixed
alias for many POSIX functions (in this case _lseek).

Prefix Zephyr-native implementations with zvfs_ to prepare for the
up-coming changes in that area.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
4a5c4e5f73 posix: timers: deprecate CONFIG_POSIX_CLOCK and TIMER
The POSIX_CLOCK option does not correspond to any standard
option. It was used to active features of several distinct
POSIX Options and Option Groups, which complicated API and
application configuration as a result.

POSIX_CLOCK is being deprecated in order to ensure that Zephyr's
POSIX Kconfig variables correspond to those defined in the
specification, as of IEEE 1003.1-2017.

Additionally, CONFIG_TIMER is being deprecated because it does
not match the corresponding POSIX Option (_POSIX_TIMERS).

With this deprecation, we introduce the following Kconfig
options that map directly to standard POSIX Option Groups by
simply removing "CONFIG_":

* CONFIG_POSIX_TIMERS

Similarly, we introduce the following Kconfig options that
map directly to standard POSIX Options by simply removing
"CONFIG":

* CONFIG_POSIX_CLOCK_SELECTION
* CONFIG_POSIX_CPUTIME
* CONFIG_POSIX_DELAYTIMER_MAX
* CONFIG_POSIX_MONOTONIC_CLOCK
* CONFIG_POSIX_TIMEOUTS
* CONFIG_POSIX_TIMER_MAX

In order to maintain parity with the current feature set, we
introduce the following Kconfig options that map directly to
standard POSIX Option Groups by simply removing "CONFIG_":

* CONFIG_POSIX_MULTI_PROCESS - sleep()

Similarly, in order to maintain parity with the current feature
set, we introduce the following additional Kconfig options that
map directly to standard POSIX Options by simply removing
"CONFIG":

* CONFIG_XSI_SINGLE_PROCESS - gettimeofday()

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
e2fc78af23 posix: signals: deprecate CONFIG_POSIX_LIMITS_RTSIG_MAX
There were two Kconfig constants defined for (effectively) the
same thing in Zephyr. Namely, RTSIG_MAX - the highest valued
real-time signal.

Deprecate CONFIG_POSIX_LIMITS_RTSIG_MAX in favour of
CONFIG_POSIX_RTSIG_MAX since the latter more closely matches
convention.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
feb841a0f7 posix: add Kconfig.deprecated
There will be some POSIX Kconfig symbols that will be deprecated
in favour of Kconfig symbols that are exact matches for those in
the POSIX specification (1003.1-2017).

Create the empty Kconfig file now, and then incrementally add to
it as non-standard POSIX Kconfig options are replaced with
standard-like POSIX Kconfig options.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
aa6a472355 posix: sysconf: define z sysconf macros with COND_CODE_1
It's sort of more conventient to do the opposite of what was
done with the __z_sysconf_ macros, and use them for both the
full implementation and the macro implementation.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
49ef0df67d posix: features: leave feature test macros undefined if unimpl
Rather than forcing the macro to -1, simply leave it undefined
if the particular feature in question is unimplemented. This is
the convention used by external libcs.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
2dad733012 posix: unistd: move posix features to separate header file
Move posix features to a separate header file and include that
header file from unistd.h.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
c1dd480823 tests: posix: headers: enable checks for confstr() constants
For some reason, even though confstr() is implemented in Zephyr,
the header tests were not checking for the existence of _CS_
constants.

Uncomment the tests so that they can be run regularly.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
e83c374015 tests: posix: headers: enable checks for sysconf() constants
For some reason, even though sysconf() has multiple
implementations in Zephyr, the header tests were not checking
for the existence of _SC_ constants.

Uncomment the checks - they should be run on a regular basis.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
1426350bcf posix: sysconf: correct typo on _SC_MAPPED_FILE(S)
The standard macro is plural - so _SC_MAPPED_FILES - which
corresponds to _POSIX_MAPPED_FILES.

In Zephyr, we previously had _SC_MAPPED_FILE and
_POSIX_MAPPED_FILE, so it's a simple correction.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
f4be0ee859 tests: posix: headers: check some structs only when posix_api=y
Some POSIX header tests assumed that various structures would be
declared even if POSIX_API=n. Actually most meaningful POSIX
structures are guarded by feature test macros defined by
the implementation (i.e. implementation conformance macros).

So only run tests on those structures when CONFIG_POSIX_API=y.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt
ddd49f32d9 tests: posix: headers: remove tests for varying features
The header tests for the existence of constants like
_POSIX_SPIN_LOCKS are bound to fail in one circumstance or
another because each of those options are (theoretically)
features which can be enabled or disabled.

Moreover, some implementations (e.g. external libc) might
not implement one particular subset or option group.

These tests are poorly conditioned, so remove them.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Mike Szczys
7bf6e8bb97 boards: rak5010: add blackmagicprobe runner
Add blackmagicprobe as a supported runner.

Signed-off-by: Mike Szczys <mike@golioth.io>
2024-06-04 15:46:52 -05:00
Pieter De Gendt
54733aa2cb submanifests: optional: Sync upstream nanopb
Set the latest version for nanopb.
This fixes searching for the nanopb_generator.py script in the module
instead of system wide.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-06-04 14:08:23 -05:00
Fabian Blatz
81bc939553 modules: lvgl: lvgl_fs: Free file on close
Add missing call to LV_MEM_CUSTOM_FREE when closing a file to prevent
memory from leaking.

Resolves issue #73148.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-04 14:07:16 -05:00
Torsten Rasmussen
ed954bf638 doc: describe Kconfig tracking symbol
Fixes: #73132

Add a subsection on tracking Kconfig symbols whose default values is
obtained from another Kconfig symbol.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-04 14:06:13 -05:00
Alberto Escolar Piedras
4b64e001fe boards nrf54l15bsim: DT: Set radio status as ok
Set the radio status as ok as the SOC/CPU DT include
does not do it for us.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-04 14:04:57 -05:00
Alberto Escolar Piedras
329dbeae0a boards: nrf54l15bsim: Mention CLOCK
As now we have a sufficient model of the CLOCK peripheral,
let's mention it in the docs, and correct the warning
about not supporting the BLE stack.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-04 14:04:57 -05:00
Alberto Escolar Piedras
e998741427 boards nrf54l15bsim: Default to build BT Controller if BT
Just as for the other simulated targets.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-04 14:04:57 -05:00
Alberto Escolar Piedras
038b7b8c41 drivers/clock_control nrf: Treat simulated nRF54L15 like real
Default the clock accuracy for the simulated 54L15 target
just as for the real target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-04 14:04:57 -05:00
Alberto Escolar Piedras
61db56915f boards nrf54l15bsim: Set clock status as ok in DT
So the nRF clock driver is built in as in real
targets.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-04 14:04:57 -05:00
Alberto Escolar Piedras
8d6d700375 manifest: Update nRF hw models to latest
Update the HW models module to:
4447a22aea5e791c9bd18e7d71cc092623ddd2bb

Including the following:
* 4447a22a CLOCK,POWER,RESET: Add stubs for the 54L

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-04 14:04:57 -05:00
Declan Snyder
e8a71d9d83 soc: renesas: Fix linker error from multiple IRQ17
Fix linker error caused by the smartbond timer driver
being enabled at the same time as the smartbond timer counter
driver. For some reason putting SMARTBOND_TIMER=n in a conf
file does not fix this, this change has to be made to the
Kconfig.defconfig to not add this default y case in order
to fix the error. At least that is all I could figure out,
and not sure why the .conf doesn't override it.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-04 14:04:09 -05:00
Declan Snyder
e4cf90faa3 drivers: counter_smartbond_timer: Fix warning
Fix the warning about control reaching end of non void
function by adding a default to the switch statement.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-04 14:04:09 -05:00
Kai Vehmanen
6ad9b6ccab soc: intel_adsp: tools: add intel_adsp_ace30 support to cavstool.py
Add support for intel_adsp_ace30 platforms into cavstool.py.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-06-04 14:03:32 -05:00
Yong Cong Sin
a2b0c2c467 include: stop breaking the compilation of OOT architectures
Zephyr support out-of-tree architectures so we shouldn't
throw error for archs not listed here.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 14:02:51 -05:00
Yong Cong Sin
f18af662c5 include: optimize the order of includes for x86
x86 32bit defines `CONFIG_X86` while its 64bit counterpart
defines an additional `CONFIG_X86_64`, by reordering the
include order we can make it look a bit cleaner.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 14:02:51 -05:00
Yong Cong Sin
3fc0e022f4 manifest: update sof git revision
Update the git revision of the `sof` module.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 14:02:51 -05:00
Yong Cong Sin
e0efc2cd4c doc: releases: update migration guide for the struct arch_esf
Add a note about the introduction of `struct arch_esf` and the
deprecation of `z_arch_esf_t`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 14:02:51 -05:00
Yong Cong Sin
6a3cb93d88 arch: remove the use of z_arch_esf_t completely from internal
Created `GEN_OFFSET_STRUCT` & `GEN_NAMED_OFFSET_STRUCT` that
works for `struct`, and remove the use of `z_arch_esf_t`
completely.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 14:02:51 -05:00
Yong Cong Sin
e54b27b967 arch: define struct arch_esf and deprecate z_arch_esf_t
Make `struct arch_esf` compulsory for all architectures by
declaring it in the `arch_interface.h` header.

After this commit, the named struct `z_arch_esf_t` is only used
internally to generate offsets, and is slated to be removed
from the `arch_interface.h` header in the future.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 14:02:51 -05:00
Yong Cong Sin
3998e18ec4 arch: rename all esf struct to struct arch_esf
Rename every architecture's esf struct to `struct esf`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 14:02:51 -05:00
Yong Cong Sin
31742d0294 include: include exception.h in fatal.h
`fatal.h` has 2 functions that use the `z_arch_esf_t` type.

Include `exception.h`, which should have the `z_arch_esf_t`
defined.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 14:02:51 -05:00
Yong Cong Sin
1cd6dd16c1 arch: Create include/zephyr/arch/exception.h
Create `zephyr/include/zephyr/arch/exception.h`, which will
redirect to the corrent architecture-specific exception header
based on Kconfig.

Some of the architectures define their esf struct in
architecture-specific `arch.h`, refactor them out into a
separate `exception.h`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-04 14:02:51 -05:00
Ian Morris
422a709d92 soc: renesas: ra: added support for segger rtt
Added support for Segger RTT to Renesas RA family of Microcontrollers.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-06-04 14:00:30 -05:00
Chris Braissant
61536c1096 drivers/sensor: lps22hh: Enable fetching individual sensor channels
Add the possibility to fetch specific sensor channels independently,
either pressure data with SENSOR_CHAN_PRESS or temperature data
with SENSOR_CHAN_AMBIENT_TEMP.
Additionally, the option to fetch both channels simultaneously remains
available using SENSOR_CHAN_ALL, thus not breaking any samples.

Signed-off-by: Chris Braissant <chrisbraissant@gmail.com>
2024-06-04 16:38:00 +02:00
Aurelien Jarno
460169df75 samples: sensors: nucleo_h7a3zi_q board added to die_temp_polling
Added board nucleo_h7a3zi_q overlay file to permit testing the STM32
Digital Temperature Sensor.

Also added the board as integration platform to the sample.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-04 16:37:19 +02:00
Aurelien Jarno
fe8c100252 dts: arm: st: h723/h7a3: add digi_dietemp node into DTSI file
Add a digi_dietemp node for the STM32 Digital Temperature Sensor into
stm32h723.dtsi (used as a base for H723, H725, H730 and H735) and
stm32h7a3.dtsi (used as a base for H7A3, H7B0 and H7B3).

The sensor is not available on other H7 SoCs.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-04 16:37:19 +02:00
Aurelien Jarno
371f22b937 drivers: sensor: st: add driver for the STM32 Digital Temperature Sensor
This add basic support for the STM32 Digital Temperature Sensor found
notably on the STM32H7 series. It work in interrupt mode and support
basic power device management.

It does not support the more advanced features like using the
temperature threshold, triggers from LPTIM or using the LSE clock in
during sleep or stop.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-04 16:37:19 +02:00
Jeppe Odgaard
052eb6180d drivers: adc: adc_ad559x: fix 5593 adc read
The AD5593 conversion result also contains the channel read and not just a
value:
| adc channel (3 bits) | adc value (12 bits) |

This value was not removed from the result before using it as an adc value.

Reuse the AD5592 code to fix the issue.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-06-04 16:36:14 +02:00
Nazar Palamar
7c3b66eac8 soc: psoc6: update pinctrl for PSoC6 MCU (legacy)
update pinctrl for PSoC6 MCU (legacy)

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-04 16:35:39 +02:00
Ioannis Karachalios
c11a08648b west: Update manifest revision
Update the manifest SHA to point to the HAL PR
that removes the USB check from the DIV1 clock
evaluation. This is because the USB block should
be evaluated explicitly by the clock manager
as a virtual USB clock is introduced in #73458.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-04 16:34:34 +02:00
Anders Storrø
cee8080117 Bluetooth: Mesh: Fix PB GATT adv name
Fixes issue where PB GATT Server will drop
advertising device name if optional provisioning
URI is not provided.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2024-06-04 05:18:28 -07:00
Vivekananda Uppunda
ca19e6bbaa net: wifi_shell: Resolve filter settings mismatch
The control and data settings are set improperly for packet filter
operation for sniffer operation. The change sets them properly.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-06-04 13:46:37 +02:00
Piotr Wojnarowski
0f3fe4daab riscv: Align _isr_wrapper to 64 bytes for CLIC
The CLIC requires that mtvec.base is aligned to 64 bytes.
_isr_wrapper is used as mtvec.base, so align it to 64 bytes.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2024-06-04 13:41:49 +02:00
Grzegorz Chwierut
adfe3129d3 tests: boot: Add nrf54l15pdk to platform_allow list in with_mcumgr tests
Extend platform_allow list for with_mcumgr tests with nRF54L board.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-06-04 13:41:29 +02:00
Grzegorz Chwierut
209fc2e947 MAINTAINERS: extend test area for boot tests
Take all tests from tests/boot to mcuboot maintainer list

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-06-04 13:41:29 +02:00
Tomasz Chyrowicz
3929e3fbc9 boards: nrf54h20dk: Add default DFU partition
Define the default DFU partition.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2024-06-04 13:41:01 +02:00
Sadik Ozer
b9f8bd26d8 tests: drivers: gpio: Enable gpio driver tests for max32655fthr board
Enable gpio driver test for max32655fthr board

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-04 13:40:44 +02:00
Sadik Ozer
7204e24aa1 boards: Add MAX32655FTHR board
Added MAX32655FTHR boards.
For more information about this board please check
https://www.analog.com/MAX32655FTHR

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-04 13:40:44 +02:00
Sadik Ozer
ff89fc98ea tests: drivers: gpio: Enable gpio driver tests for max32655evkit board
Enable gpio driver test for max32655evkit board

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-04 13:40:44 +02:00
Sadik Ozer
7bb48a7d45 boards: Add MAX32655EVKit board
Added MAX32655EVKit boards.
For more information about this board please check
https://www.analog.com/

Co-authored-by: Kevin Townsend <kevin.townsend@analog.com>
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-04 13:40:44 +02:00
Sadik Ozer
84a0dee00b soc: Add the MAX32655 SoC
Add MAX32655 Kconfig and dts files

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-06-04 13:40:44 +02:00
Henrik Brix Andersen
a9f5382861 boards: add more details to atmel,at24 compatibles where known
Add more specific compatible strings to existing atmel,at24 compatible I2C
EEPROMs where known. This is strictly for documentation purposes, no
functional changes introduced.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-04 13:40:14 +02:00
Henrik Brix Andersen
b711caea6d drivers: eeprom: atmel_at2x: improve Kconfig help descriptions
Improve the Kconfig descriptions for the atmel,at2x EEPROM driver. This
driver works for a number of different EEPROM families manufactured by
vendors other than Atmel.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-04 13:40:14 +02:00
Henrik Brix Andersen
dd7f48ef4a dts: bindings: mtd: atmel,at2x: improve binding descriptions
Improve the binding descriptions for the atmel,at24 and atmel,at25 EEPROM
compatibles. These compatibles work for a number of different EEPROM
families manufactured by vendors other than Atmel.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-04 13:40:14 +02:00
Flavio Ceolin
adabe57f4d soc: intel_adsp/ace: Fix SOC_TOOLCHAIN_NAME symbol
Set the appropriated toolchain name for each ace target.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 13:40:04 +02:00
Anas Nashif
07fb31c31e drivers: dai/ssp: Support dynamic SSP management
This commit refactors the Intel SSP DAI driver to support dynamic
management of SSP IP. This change additionally separates the
management of the DAI part from the management part of the SSP IP.

Key changes:
- Add new static functions to manage SSP IP power.
- Update the DAI SSP configuration functions to use the new management
  approach.
- Update device tree bindings and instances to reflect the new SSP IP
  management mechanism.
- ace30 (PTL) support.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2024-06-04 13:40:04 +02:00
Jaroslaw Stelter
74b53df064 drivers: mm/intel_adsp: Add MMU support to MM driver
In the Intel platforms most of HPSRAM is used by modules when
are required. By default all these banks are powered off and are
enabled by L2 MM driver only when needed.

At the driver initialisation each unused page is unmaped and
when whole HPSRAM bank is unused the power is switched off.

Since mapping memory in MMU TLB and flushing it at system start is
not needed and time consuming, this patch modifies the init
sequence to avoid it.

Additionally it adds MMU maping and unmaping for pages allocated
from unused pool.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-04 13:40:04 +02:00
Anas Nashif
d35a2b89f3 intel_adsp: dmic: enable support for ptl use new headers
headers for dmic are now part of the SoC and maintained per generation,
so create one header for PTL and build the code for PTL in some of the
drivers (dmic_nhlt).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-04 13:40:04 +02:00
Jaroslaw Stelter
b0abe57bc5 drivers: dai/dmic: Add support for ace30 (PTL)
Add dmic support in PTL.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2024-06-04 13:40:04 +02:00
Flavio Ceolin
9637b8b0bc intel_adsp: ace30: Bring up ACE 3.0 (PTL)
This commit adds definition of ACE 3.0 Panther Lake board.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 13:40:04 +02:00
Furkan Akkiz
2d4b8a413b tests: drivers: spi: spi_loopback: Add MAX32690EVKIT
Enable SPI loopback test for MAX32690EVKIT board.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-06-04 13:39:51 +02:00
Furkan Akkiz
e034ea5989 boards: adi: max32690evkit: Enable SPI driver
Add SPI in supported driver list.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-06-04 13:39:51 +02:00
Tahsin Mutlugun
21723941a2 drivers: spi: Add MAX32690 SPI driver
Add SPI driver for Analog Devices MAX32690 MCU. Supports interrupt-based
transfers.

Co-Authored-By: Mert Vatansever <mert.vatansever@analog.com>
Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
Co-Authored-By: Rob Cornall <rob.cornall@analog.com>
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-06-04 13:39:51 +02:00
Furkan Akkiz
fcaae696e4 dts: arm: adi: Add SPI nodes for MAX32690
Enable SPI nodes on MAX32690 SoC.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-06-04 13:39:51 +02:00
Aaron Ye
30c41e9559 drivers: bluetooth: hci_ambiq: add necessary SPI CS control
Before sending packet to controller the host needs to poll the status of
controller to know it's ready, or before reading packets from controller
the host needs to get the payload size of coming packets by sending
specific command and putting the status or size to the rx buffer, the CS
should be held at this moment to continue to send or receive packets.
This change is needed for the based SPI driver update.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-06-04 13:39:27 +02:00
Hao Luo
524ea22952 drivers: spi: Add support for Apollo3 SoCs SPI
This commit adds support for the SPI which
can be found in Apollo3 SoCs, it can work in
both DMA and non-DMA modes

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-06-04 13:39:27 +02:00
Guillaume Gautier
ccc570f0c1 boards: st: nucleo f1,f3: add adc prescaler values
Add ADC prescaler values in the RCC nodes to check that compilation with
these properties works. The values set in the dts are the default values
of the registers.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-06-04 13:39:14 +02:00
Guillaume Gautier
425452bddc drivers: clock: stm32f1,f3: fix adc prescaler
Fix a compilation error occurring when a prescaler was set for ADC on F1
and F3 family.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-06-04 13:39:14 +02:00
Robert Lubos
3f9d21e721 samples: net: cloud: mqtt_azzure: Add missing mbed TLS configs
Due to the recent changes in mbed TLS area, and due to adding new
certificates to the sample, the mbed TLS configuration has to be update
to be able to support them all.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-04 13:38:45 +02:00
Robert Lubos
0749043ff4 samples: net: cloud: mqtt_azure: Update sample certificates
Baltimore certificate expires in 2025 and Azure is in the transition
period for the time being to the new certificates. Add support for all
certificates needed in the sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-04 13:38:45 +02:00
Adam Matus
9ebf99b57b boards: nxp: mimxrt1020evk: Fix enet dts
Re-enable enet on mimxrt1020 board using the new devicetree.
Build and execution of zperf sample on this board is successful.

Signed-off-by: Adam Matus <adam.matus@nxp.com>
2024-06-04 13:38:09 +02:00
Emil Gydesen
ebadb11645 Bluetooth: Audio: Spring cleaning
Adds, removes and modifies includes in all LE audio
files.

Fixes any found spelling mistakes as well.

Fixes a few places where incorrect types were used.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-04 13:37:53 +02:00
Jens Rehhoff Thomsen
06bb9f258a Bluetooth: BAP: Shell: Add endpoint state info
The bap list command now also shows the states of each endpoint.

Fixes #70838

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-06-04 13:37:39 +02:00
Luca Burelli
709b2e44bf llext: automatically merge sections by type
This patch changes the way sections are mapped to memories. Instead of
looking at the section name, each section in the ELF file is mapped to
the llext_mem enum by looking at the section type and flags.

This allows for a more generic mapping that works for both the ARM and
Xtensa cases, and also allows for sections to be merged if they are
contiguous and non-overlapping in the ELF file.

This patch also fixes a number of corner cases, such as in the logging
test where a section with read-only data was being ignored (not copied
and not relinked).

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-04 13:37:22 +02:00
Francois Ramu
447bdea7ff drivers: entropy: stm32 entropy driver add semaphore protection
Add a semaphore to protect the disable access to the RNG peripheral
when the PM is going to suspend mode.
The change does not affect other stm32 than CONFIG_SOC_SERIES_STM32WBX
or CONFIG_STM32H7_DUAL_CORE

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-04 13:37:05 +02:00
Piotr Kosycarz
c9c9c9797f samples: basic: blinky_pwm: add testing base on console output
Extend automated testing on HW by veryfing console output.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-04 13:36:10 +02:00
Henrik Brix Andersen
c56134ebff drivers: flash: flash_util: params may be unused
The params variable may be unused depending on the Kconfig options enabled.

Fixes: #73697

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-04 10:14:01 +02:00
Dominik Ermel
e3866a9690 samples/fs/littlefs: Allow building for nrf54l15pdk
The commit adds nrf54l15pdk/nrf54l15/cpuapp target platfomr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
9ea5aee810 tests/fs/littlefs: Allow tests to run on the nrf54l15pdk
The commit adds nrf54l15pdk/nrf54l15/cpuapp to list of allowed
platforms for default test configuration.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
12bfefd087 tests/flash/common: Add nrf54l15pdk to list of allowed platforms
Allows running tests on nrf54l15pdk/nrf54l15/cpuapp.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
12fa2944c9 sample/fs: Add nrf54l15pdk/nrf54l15/cpuapp to fs_sample
Adds custom overlay and config allowing the sample to run on
the nrf54l15pdk.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
7e658607fc drivers: flash: shell: Add support for devices without erase
Shell will now work with devices that do not implement erase callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
56142dcc73 drivers: flash: Mark numaker series RMC as no_explicit_erase
The device is based on ReRAM and does not require erase.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
856d7709bb samples/usb/imass: Use flash_area_flatten to wipe storage
The commit replaces flash_area_erase with flash_area_flatten,
as it allows to emulate erase and scramble data stored
on devices that do not provide erase callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
e31b8c8edf samples/fs/littlefs: Use flash_area_flatten to wipe storage
The commit replaces flash_area_erase with flash_area_flatten,
as it allows to emulate erase and scramble data stored
on devices that do not require explicit erase before write
or do not provide erase callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
c7037532b8 samples/soc_flash_nrf: Adjust for non-Flash SoC devices
The sample has been modified to work with devices that have
no explicit erase capability.
For that purpose printf messages have been modified to use
"Internal storage" rather than "Flash" when reporting status.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
8dc1fcec03 tests: Bluetooth: Mesh: Use flash_area_flatten for erase
The flash_area_erase is replaced with flash_area_flatten that
is also able to erase/scramble devices that do not require
explicit call to erase procedure before write.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
7b36d34504 tests/dfu: Replace flash_area_erase with flash_area_flatten
Use flash_area_flatten instead of flash_area_erase; this allows
to run tests on devices that do not require explicit erase
before write or do not provide the callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
c4c7e15ba1 dfu/mcuboot: Use flash_area_flatten instead of flash_area_erase
The invocation of flash_area_erase, in boot_erase_img_bank,
has been replaced by flash_area_flatten.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
bce06a64c4 mgmt/mcumgr: Replace use of flash_area_erase with flash_area_flatten
The commit replaces flash_area_erase with flash_area_flatten.
The function is used in to places:
 1) in image management commands IMG_MGMT_ID_UPLOAD
    and IMG_MGMT_ID_ERASE: to erase an image in secondary slot
    or to scramble trailer part of image, which could be misunderstood
    by MCUboot as valid image operation request;
 2) in command ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE to
    erase/scramble data partition.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
27f5291b94 tests/storage/stream_flash: Support for devices without explicit erase
Adds code that runs erase only when needed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
95dfd1210d storage/stream_flash: Support for devices without explicit erase
Support for devices not requiring erase with Stream Flash API.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
7894474cf9 tests/settings: Move from flash_area_erase to flash_area_flatten
The Settings test wipe out areas to have a start clean,
so flash_arae_flatten will do that form them for program-erase
and no-erase devices.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
1ae352a760 tests/fs: Replace flash_area_erase with flash_area_flatten
Test of file systems use flash_area_erase to erase device
to have a clear start for tests; switching to flash_area_flatten
allows them to do the same with devices that do not explicit
call to erase procedure before write.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
bf7d25117a fs/nvs: Switch to use flash_flatten instead of flash_erase
The NVS currently requires explict erase capability of
a device to work, so usage of flash_erase has been replaced
with flash_flatten.
There has been additional LOG_WRN added to warn user that
NVS may not efficiently work with device that do not really
have erase.

Currently NVS relies on devices that require erase.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
64ccfb0479 fs/fcb: Replace flash_area_erase with flash_area_flatten
FCB depends on explicit erase characteristics of a device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
9da26eda5e fs/littlefs: Use flash_area_flatten in lfs_api_erase
LittleFS is based on program-erase devices and require that
characteristics to work; the commit replaces flash_area_erase
with flash_area_flatten to allow LFS work on devices that
do not provide erase callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
743d66a7e5 debug/coredump/flash_backend: Switch to flash_area_flatten
Replace usage of flash_area_erase with flash_area_flatten to
allow code to work with devices that do not provide erase
callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
def4f060c1 storage/settings: Replace flash_area_erase with flash_area_flatten
Replace flash_area_erase with flash_area_flatten to allow FCB
Settings backend to work on devices that do not provide erase
callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
5da7df4e7c Bluetooth: Mesh: Switch erase to flash_area_flatten
The flash_area_erase has been replaced with flash_area_flatten,
allowing code to work with devices that do not provide
erase callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
0c10b20cc8 drivers: nrf_qspi_nor: Mark driver with FLASH_HAS_EXPLICIT_ERASE
All QSPI connected NOR Flash devices require erase prior to
write.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
d7a4b634f2 tests/flash_disk: Expand scenarios to cover no erase device
The commit adds overlay for native_posix and modifies testcase.yaml
to allow testing CONFIG_DISK_DRIVER_FLASH with device that
do not have erase requirement.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
4fd503adac drivers/flashdisk: Remove erase for devices that do not require it
No erase when not needed by device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
294187b576 flash/spi_nor: Mark driver with FLASH_HAS_EXPLICIT_ERASE
Sets the Kconfig CONFIG_FLASH_HAS_EXPLICIT_ERASE.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
3c24e1a530 drivers/flash/Ambiq: Set erase capabilities, depending on SoC
The commit selects HAS_NO_EXPLICIT_ERASE for Apollo4,
with MRAM, and HAS_EXPLICIT_ERASE for Apollo3 which has Flash,
for a driver that shares code between SoCs.

In case of Apollo4 the no_explicit_erase capability is set to
true, while it remains false for Apollo3.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
ea627fda7e drivers/flash: Add explict erase capability with proper values
Add explicit_erase capability and set proper value to it,
depending on type of a device.
Select FLASH_HAS_EXPLICIT_ERASE by devices that have program-erase
characteristics and FLASH_HAS_NO_EXPLICIT_ERASE, where needed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
0e970c8362 drivers/flash/nrf_mram: Set no explicit erase capability to true
NRF MRAM does not require erase prior to re-programming already
written area.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
127bc5e35e drivers/flash/nrf_rram: Set no explicit erase capability to true
NRF RRAM does not require erase prior to re-programming already
written area.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
6d75bc519b drivers/flash/nrf: Mark driver as FLASH_HAS_EXPLICIT_ERASE
Select CONFIG_FLASH_HAS_EXPLICIT_ERASE for the NRF driver.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
bbb7bbe46d tests/flash_simulator: Test scenario for flash_flatten()
The commit adds test scenarios for flash_fill() and flash_flatten()
Flash API calls.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
ff81b52448 drivers/flash_simulator: Add support for non-erase device
The commit adds support for testing non-explicite-erase
device on Flash Simulator. This is addition to already supported
explicit erase before write, aka Flash, type of device behaviour.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
a5f7ceff81 storage/flash_map: Add flash_area_flatten
Add equivalent of flash_erase, from Flash API, to Flash Map API;
idea is the same: function tries to erase area if driver provides
erase function, otherwise writes erase_value across the defined
area.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
b8d073c572 drivers/flash: Add flash_fill() and flash_flatten()
The commit adds two new API calls:
 - flash_fill - that allows to fill selected part of device with
   specified value;
 - flash_flatten - that allows to erase or fill device with
   erase_value, depending on whether driver for the device provides
   erase callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
010b8d19e9 tests/drivers/flash: Make tests check for explicit erase capability
Test now check whether device has requirement for explicit erase
before call or not, before performing various actions.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Dominik Ermel
b3c9f957c6 drivers/flash: Add explicit_erase property
The commit adds and no_explicit_erase capability to flash_parameters,
that indicates whether device is program-erase type device; such
devices, like Flash type devices, require erase prior to writing
random data at any previously programmed location.
This capability should only be set by drivers.

The flash_params_get_erase_cap() function has been added, for parsing
flash_parameters object to obtain erase capabilities of device.
The function returns capabilities as combination of bits representing
them. Currently it will return:
 0 -- no erase capabilities
 FLASH_ERASE_C_EXPLICIT -- erase required before write of random data.
Additional capabilities have been reserved but are not yet used.

There are following Kconfig options added:
 FLASH_HAS_EXPLICIT_ERASE
 FLASH_HAS_NO_EXPLICIT_ERASE
that should be selected by device driver to indicate whether
devices served by driver needs erase prior to write.
The above Kconfigs are used to figure out whether app is built
for hardware that requires erase prior to write.
They can be also used to detect that it is attempted to build
some subsystem that will not work with provided hardware, for example
file system that has not been prepared to work with devices that
do not require erase.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-04 08:00:46 +02:00
Krystof Sadlik
fb61c7b360 tests: i2c: Fixed overlay for frdm board
Fixed overlay for frdm board as well.

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-06-04 07:59:21 +02:00
Krystof Sadlik
fe60a49c67 tests: i2c: i2c_target_api: fixed sizes in ovelay
Fixed sizes in ovelay files.

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-06-04 07:59:21 +02:00
Krystof Sadlik
d05cad1784 tests: i2c: i2c_target_api: added single mode testcase
Some drivers do not support dual mode testcase. It would be great to test
both signle and dual mode, even when the drivers do support this feature.

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-06-04 07:59:21 +02:00
Anas Nashif
d877d29913 twister: abort on execution and retun 0 on exceptions
When something goes wrong with execution, due to twister issues and
bugs, do not continue with execution and abort the process and report
and return an error code.

Fixes #72807

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-04 07:58:31 +02:00
Ederson de Souza
7f0b5edd8c arch/x86: Make irq_offload SMP-safe on x86_64
The irq_offload mechanism was using the same entry of the IDT vector for
all CPUs on SMP systems. This caused race conditions when two CPUs were
doing irq_offload() calls.

This patch addresses that by adding one indirection layer: the
irq_offload() now sets a per CPU entry with the routine and parameter to
be run. Then a software interrupt is generated, and a default handler
will do the appropriate dispatching.

Finally, test "kernel/smp_abort" is enabled for x86 as it should work
now.

Fixes #72172.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-04 07:57:06 +02:00
Johann Fischer
af63e488f0 usb: device_next: hid: fix Get Report buffer handling
After the get_report() callback, we need to determine how many bytes the
HID device wrote to the report buffer. Use the callback return value to
do this, and modify the net_buf data length value if get_report was
successful.

Reported-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-04 07:56:45 +02:00
Tom Chang
a33341ac66 drivers: espi: npcx: add support 66MHz eSPI clock
This CL adds support 66MHz eSPI clock for NPCX4.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-06-04 07:56:19 +02:00
alperen sener
c93859c659 bluetooth: mesh: fix lpn receive window timing error
APIs for enabling and disabling the scanner may take larger time than
expected and scheduling of the lpn state machine is affected by it.
Since these type of latencies are factored into timeouts and scheduling
times, we need to call scan enable/disable APIs after scheduling the
next event time for LPN state machine to be more accurate.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-06-04 07:55:59 +02:00
Evgeniy Paltsev
f33306ab2f MAINTAINERS: add hostlink channel sources to Synopsys Platforms
Virtual UART over ARC hostlink channel driver is used on
Synopsys platforms and maintained by Synopsys.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-06-04 07:55:35 +02:00
Marek Pieta
059643062c usb: device_next: Update remote wakeup log level
The `Remote wakeup feature not enabled or not suspended` log is not
related to an actual error (connected host might not enable USB remote
wakeup feature). Use warning log level.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-06-04 07:55:22 +02:00
Valerio Setti
4fc6506a8a random: enable AES support CTR_DRBG CSPRNG when it relies on Mbed TLS
PR #72475 disabled default enabling of many Mbed TLS features
including AES. This means that now it must be explicitly added
when required.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-03 16:13:05 -04:00
Yassine El Aissaoui
73bf6f6371 samples: bluetooth: Enable PM on rd_rw612_bga
Enable PM by default for rd_rw612_bga
on peripheral_ht and central_ht
samples

Those are the BLE samples running on
the CI, so it will be better to also
check the builds with PM and also
have some BLE apps to try PM with.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-03 16:11:49 -04:00
Luis Ubieda
3f90957e36 snippets: cdc-acm-console: Redirect Shell target to USB
To easily enable Shell over USB. Tested with:
```
west build -b nrf52840dk/nrf52840 \
           -S cdc-acm-console` \
           samples/subsys/shell/shell_module
```

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-03 16:11:18 -04:00
Hess Nathan
aaec285cd5 coding guidelines: comply with MISRA Rule 12.1.
-added parentheses verifying lack of ambiguities

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-03 16:10:33 -04:00
Hess Nathan
209a3bd40a coding guidelines: comply with MISRA Rule 11.8
- modified parameter types to receive a const pointer when a
  non-const pointer is not needed

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-03 16:09:51 -04:00
Maciej Perkowski
a9565f7a96 docs: Add pytest files to a scope triggering doc-build workflow
Those files are used with autoclass to use their docstrings
in docs.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-03 16:08:50 -04:00
Tom Burdick
90c1aaad69 tests: i2c_ram: Add fixture for i2c_ram testing
i2c_ram expects that a ram-like part is connected to an i2c bus and
therefore requires a hardware fixture setup much like spi_loopback.

Adds a fixture that must be designated when running twister tests on a
board with -X i2c_ram.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-03 16:07:59 -04:00
Henrik Brix Andersen
e087d1bbb3 tests: drivers: can: api: add test for frame without data
Add test for sending/receing a CAN classic frame with no data.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-03 16:07:47 -04:00
Kai Vehmanen
1541fe9e2f intel_adsp/ace: power: fix address space annotation for powerdown
power_down() expects a cached pointer. Fix the sparse annotation
to match the implementation (sys_cache_cached_ptr_get() returns a cached
pointer so this is correct).

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-06-03 16:07:28 -04:00
Luca Burelli
0d2b3e1f36 samples: add IS31FL3194 RGB LED driver sample
This sample app cycles several colors on an RGB LED forever using the LED
API. It can be built and executed on an Arduino Nicla Sense ME, or on any
board where the devicetree has a similar compatible I2C device node.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-03 15:30:01 -04:00
Luca Burelli
5fea5c4358 arduino_nicla_sense_me: add RGB LED support to the device tree
This patch enables the user to control the RGB LED on the Arduino Nicla
Sense ME board. The RGB LED is controlled by the IS31FL3194 LED driver
and is connected to the I2C0 bus.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-03 15:30:01 -04:00
Luca Burelli
912a581a95 drivers/led: add IS31FL3194 LED driver
Add support for the IS31FL3194 3-channel LED driver. This driver can be
configured to handle its outputs as either a single RGB LED or (up to)
three independent LEDs.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-03 15:30:01 -04:00
Mathieu Choplain
8aa6ae43ce llext: add support for SLID-based linking
This commit introduces support for an alternate linking method in the
LLEXT subsystem, called "SLID" (short for Symbol Link Identifier),
enabled by the CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID Kconfig option.

SLID-based linking uses a unique identifier (integer) to identify
exported symbols, instead of using the symbol name as done currently.
This approach provides several benefits:
 * linking is faster because the comparison operation to determine
   whether we found the correct symbol in the export table is now an
   integer compare, instead of a string compare
 * binary size is reduced as symbol names can be dropped from the binary
 * confidentiality is improved as a side-effect, as symbol names are no
   longer present in the binary

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-06-03 15:29:34 -04:00
Joel Guittet
05ad2565fa llext: add _POSIX_C_SOURCE definition to build shell
Fix implicit-function-declaration warning while building the llext shell.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2024-06-03 15:28:33 -04:00
Luca Burelli
435b72dc18 llext: add a test for the pre_located feature
This test checks that the pre_located feature works as expected. It
creates a new extension that is manually relocated to a specific address
via the add_llext_command() CMake function invoking a custom linker
command. The test then loads the extension setting the pre_located
option and checks that the symbol is resolved properly.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-03 15:28:18 -04:00
Emil Gydesen
92002b2dff Bluetooth: CAP: Implement bt_cap_initiator_unregister_cb
Implement function to unregisterd the CAP initiator callbacks.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 15:28:05 -04:00
Alberto Escolar Piedras
68adc77cbd boards nrf_bsim: Add NVIC_GetEnableIRQ()
Provide a replacement for CMSIS' NVIC_GetEnableIRQ()
as some applications use it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-03 15:27:48 -04:00
Francois Ramu
5bd1689ac8 boards: st: stm32c0116_dk defines the select pin with zephyr,code
Define the select_key with the correct zephyr,code
which is <INPUT_KEY_ENTER>

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-03 15:27:36 -04:00
Henrik Brix Andersen
64e9ba3742 dts: bindings: can: native linux: the CAN Linux driver supports CAN FD
The native Linux CAN driver supports CAN FD. Change the binding to reflect
this. No functional changes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-03 15:27:17 -04:00
Henrik Brix Andersen
8edbbdf332 dts: bindings: can: loopback: the CAN loopback driver supports CAN FD
The CAN loopback driver supports CAN FD. Change the binding to reflect
this. No functional changes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-03 15:27:17 -04:00
Maureen Helm
6305c17d6e manifest: Update hal_adi to pick up newlib compatibility fix
Updates the hal_adi module to pick up a fix for building with newlib.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-06-03 15:27:00 -04:00
Tomasz Moń
8d344cc9d8 usb: device_next: Rename usbd_contex to usbd_context
Add the missing "t" to struct usbd_contex. No functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-03 06:43:20 -07:00
frei tycho
b76fde64a1 include: kernel: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-03 15:43:09 +02:00
Emil Gydesen
d2fbeffaa9 Bluetooth: BAP: Unicast client Split start and connect
Removes the CIS connection establishment from bt_bap_stream_start
and move the behavior to a new funciton bt_bap_stream_connect.

This has 2 advantages:
1) The behavior of bt_bap_stream_start is much more clear and more aligned
with the spec's behavior for the receiver start ready opcode.
2) It is possible to connect streams in both the enabling
and the QoS configured state with bt_bap_stream_connect as
per the spec. This allows us to pass additional PTS test cases.

To implement this new behavior, samples and tests have been updated.

The CAP Initiator implementation has also been updated
to accomodate for the change in BAP, but the CAP
initiator implementation should work the same for application, except
that it's now possible to do unicast start on ASEs in any order
(https://github.com/zephyrproject-rtos/zephyr/issues/72138).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 15:42:33 +02:00
Ioannis Karachalios
5b0cc42968 drivers: clock_control: smartbond: Update clock control driver
This commit should deal with the followings:

1. PLL requires that VDD level be changed to 1V2 and then released
   to 0V9 when it's turned off. Changing the VDD level should be
   done when the regulator driver is available. Otherwise, the VDD
   level will be fixed to 1V2 (reset value).

2. Check if PLL is allowed to be turned off as it might happen that
   USB is enabled which is clocked by PLL.

3. Do not wait for the PLL to lock. This is now performed silently
   when PLL is requested.

4. Before switching to PLL we should check if PLL is already enabled
   as it might happen that PLL node is initially disabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-03 15:41:20 +02:00
Ioannis Karachalios
570a508633 drivers: regulator: smartbond: Regulator driver update
This commit should deal with the followings:

1. Change regulator's driver priority as it should now
   be used by the clock control driver.
2. Check if the VDD level is permitted to change when PLL
   is the system clock. This is because the PLL requires
   that VDD be 1.2V.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-03 15:41:20 +02:00
Ioannis Karachalios
c1fecdc2e3 west: Update manifest revision
Update the manifest SHA to point to the HAL PR
that introduces the PLL clock handling updates.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-03 15:41:20 +02:00
Ioannis Karachalios
8c651be4ef drivers: counter: smartbond: Add support for PM
This commit should add all the functionality needed for the counter
driver to work when PM is enabled. The sleep state is bound to the
counter start/stop functionality. TIMER3/4 block instances are
powered by PD_SYS and so sleep should be constrained when they are
up and running. On the other hand TIMER1/2 block instances are
powered by PD_TMR which is always on (used to generate the os tick).

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-03 15:40:24 +02:00
Erwan Gouriou
a8b04606af west.yml: hal_stm32: Don't include legacy headers anymore
We're not supposed to rely on symbols provided by these files.
In case it is required stm32 zephyr code base should be updated rather
than relying on legacy definitions.

Additionally:
Fixes #70136

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-03 15:39:51 +02:00
Rubin Gerritsen
3609d97c95 Bluetooth: Document reasons for HCI command timeouts
When reading the error message:
"ASSERTION_FAIL: command opcode 0x0c03 timeout with err -11" it may not be
obvious what is wrong with their setup unless you are very familiar
with HCI.

This commit adds some more documentation to make this more obvious.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-03 15:39:23 +02:00
Jukka Rissanen
a124dd2596 net: http_server: Send chunked response correctly
The chunked response was not sent properly. There were extra
"\r\n" before the chunk lenght and the length of the string
to be sent was calculated incorrectly.

Fixes #72887

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 15:39:09 +02:00
Alexander Kozhinov
0f1d69d21a drivers: can_mcan: can_mcan_line_1_isr: add more debug outputs
In some cases CAN-Bus communication may be
disturbed by other parts of SoC. For example USB
may disturb CAN communication if electircal wiring
of the board is not done properly or the system is
in development stage.
This change adds debug-prints s.t. CAN-Bus protocol
errors in arbitration or data phases can be
detected while in CAN-Bus ISR.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-06-03 15:38:38 +02:00
Tomasz Moń
a1afd349a1 usb: device_next: initialize BOS device caps number
Explicitly initialize bNumDeviceCaps to 0 because the bos descriptor is
stored on stack.

Fixes: b0d7d70834 ("usb: device_next: add initial BOS support")
Coverity-CID: 368798

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-03 15:38:23 +02:00
Daniel DeGrasse
814403a4f5 boards: nxp: vmu_rt1170: fix dummy cycle value in flash configuration
The VMURT1170 board configures the FLEXSPI to run at 200MHz serial clock
in DDR mode, via the flash configuration block passed to the ROM API.
Per the datasheet of the MX25UM51345G flash present on the board, 20
dummy cycles are required before reading data in OPI DTR mode. Correct
the dummy cycle value used for read commands to 0x28 (40 DDR dummy
cycles, equivalent to 20 dummy cycles of the clock) to resolve this
issue.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-03 15:38:05 +02:00
Henrik Brix Andersen
beb5b676f3 scripts: requirements: run-tests: add python-can
Add python-can dependency for the newly introduced tests/drivers/can/host
test suite.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-03 15:37:49 +02:00
Grant Ramsay
1e0a882f0d boards: shields: arceli_eth_w5500: Fix spelling and broken link
The URL in the documentation no longer exists

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-06-03 15:37:41 +02:00
Seppo Takalo
9e615429d5 net: lwm2m: Block-Wise response NUM field fix
When calculating the offset for blockwise writes,
we should not advance the block_ctx->current field
past the block boundary.
It causes CoAP layer to reply with the next NUM field
instead of the current one being processed.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-06-03 15:37:21 +02:00
Chris Wilson
365187e63c boards: shields: Add nRF9160 DK overlay for arduino_uno_click shield
The original Arduino Uno provides the same SCL/SDA on two sets of pins,
but the nRF9160 DK maps these pins to two different pairs of GPIO. When
using the Arduino Uno Click Shield board with the nRF9160 DK, the
P0.18/P0.19 pair must be used.

Also, the default pin group for the nRF9160 DK includes RTS/CTS HW flow
control, but the Arduino Uno Click Shield board does not connect these
pins (only TX/RX are connected on the shield). This keeps RX/TX on the
same pins, but just removes RTS/CTS from the pin groups.

References:

 - Arduino Uno R3 pinout:
   https://docs.arduino.cc/resources/pinouts/A000066-full-pinout.pdf

 - Arduino Uno R3 schematic:
   https://www.arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

 - Arduino UNO click shield schematic:
   https://download.mikroe.com/documents/add-on-boards/click-shields/arduino-uno/arduino-uno-click-shield-schematic-v101.pdf

Signed-off-by: Chris Wilson <chris@cgnd.dev>
2024-06-03 06:21:03 -07:00
Dominik Ermel
e801f1a9ad tests/fs/littlefs: Fix mimxrt1060_evk QSPI overlay
Changes to contents of boards directory for the board cause duplicate
definitions when combined with test overlay; the commit removes
duplicate partitions from overlay in test.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-03 05:06:29 -07:00
Tomasz Moń
88dc03618b scripts: west_commands: runners: nrf_common: adjust json output
Make the generated json file match the contents generated with:
  * nrfutil device erase --uicr --core Application --x-operation-id 1
    --x-family nrf54h --x-append-batch batch.json
  * nrfutil device program --firmware uicr_merged.hex
    --options chip_erase_mode=ERASE_NONE,verify=VERIFY_READ
    --core Application --x-operation-id 2 --x-family nrf54h
    --x-append-batch batch.json
  * nrfutil device reset --reset-kind RESET_PIN --x-operation-id 3
    --x-append-batch batch.json

The erase options are supposed to be placed under "option" subkey.
Without the "option" subkey, nrfutil defaulted to ERASE_ALL.

Remove the firmware file format field because it is auto detected by
nrfutil when executing the batch script.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-03 04:45:59 -07:00
Jordan Yates
924db97724 usb: cdc_acm: add locks around ring_buf_put
The ring buffer API is explicitly not thread safe, with users needing to
implement their own locking. As `poll_out` and `fifo_fill` are operating
on the same ringbuffer, these locks are needed.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-03 03:44:45 -07:00
Gerard Marull-Paretas
71dcbdd29c drivers: clock_control: nrf_auxpll: add lock timeout
This patch adds a timeout to the clock_control_on() implementation. The
reason for this timeout is to prevent system freezes when the PLL is
configured incorrectly, or, if BICR is wrong. The locking time of the
AUXPLL is <30us, however, when it starts it also starts other
dependencies which take much longer to become ready. The locking time
has been experimentally measured to be around 2ms, so a 10x bound has
been added.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-03 03:39:26 -07:00
Aurelien Jarno
19827b9be5 drivers: rtc: rtc_shell: fix milliseconds display
The RTC shell get command displays the time according to the ISO8601
standard. Fix the milliseconds field to be displayed on 3 digits instead
of 6 like if they were microseconds. In addition change the separator
between seconds and milliseconds to a dot like specified in the ISO8601
standard.

Before:
2024-06-02T22:33:10:000667

After:
2024-06-02T22:33:10.667

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-03 03:39:17 -07:00
Emil Gydesen
1af717430a Bluetooth: CAP: Do not require CAS unless necessary
Removes the requirement that CAS is found on the remove
device for ad-hoc sets. This makes the CAP API more
versatile as it allows applications to use it with
remote non-CAP devices.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 03:39:07 -07:00
Ioannis Damigos
90974248ec west/ezflashcli: add dev_id capability
Add dev_id capability

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-03 03:02:11 -07:00
Ioannis Damigos
5ad5ac6414 west/ezflashcli: add tool_opt capability
Add tool_opt capability

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-03 03:02:11 -07:00
Yong Cong Sin
02770ad963 debug: EXCEPTION_STACK_TRACE should depend on arch Kconfigs
Fix the dependencies of `CONFIG_EXCEPTION_STACK_TRACE`:
- Architecture-specific Kconfig, i.e.
  `X86_EXCEPTION_STACK_TRACE`, will be enabled automatically
  when all the dependencies are met.
- `EXCEPTION_STACK_TRACE` depends on architecture-specific
  Kconfig to be enabled.
- The stack trace implementations should be compiled only if
  user enables `CONFIG_EXCEPTION_STACK_TRACE`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
190777dccf arch: arm64: create ARM64_EXCEPTION_STACK_TRACE
Currently, the stack trace in ARM64 implementation depends on
frame pointer Kconfigs combo to be enabled. Create a dedicated
Kconfig for that instead, so that it is consistent with x86 and
riscv, and update the source accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
ea00e04382 arch: x86: select DEBUG_INFO in X86_EXCEPTION_STACK_TRACE
Select `DEBUG_INFO` instead of depending on it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
8a5823b474 debug: remove !OMIT_FRAME_POINTER from EXCEPTION_STACK_TRACE
Not all stack trace implementation requires frame pointer, move
that dependency to architecture Kconfig.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
413b1cf409 debug: remove DEBUG_INFO from EXCEPTION_STACK_TRACE
The `DEBUG_INFO` in the `EXCEPTION_STACK_TRACE` is only
required by x86. Move that to `X86_EXCEPTION_STACK_TRACE`
instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
1570ef2863 debug: remove PRINTK from EXCEPTION_STACK_TRACE
The `PRINTK` was required for `EXCEPTION_STACK_TRACE` because
it's initial implementation for x86 in #6653 uses `printk()`.
We are using `LOG_ERR()` now, so this is not required anymore.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Håvard Reierstad
d4a59a8655 tests: Bluetooth: Mesh: Default to ext adv
Changes twister tests and nrf samples from using legacy adv to ext adv
since this is the default for Mesh. Legacy adv is still tested in bsim.

Removes redundant test configuration testing ext adv.

Removes redundant config for ext_adv in `multi_ext_adv.conf`.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-06-03 03:01:55 -07:00
Aleksandr Khromykh
86b68000b2 tests: Bluetooth: Mesh: move semaphores out bsim initializations
It is not correctly to call Zephyr API from bsim
HW thread.
Commit moves friendship test suite semaphores
initialization into test bodies.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-06-03 03:01:49 -07:00
Jukka Rissanen
5740997f7c doc: net: Fix DHCPv4 info as server is also supported
The DHCPv4 information was not mentioning server support
which is currently supported.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 03:01:42 -07:00
Jukka Rissanen
6fae78eb31 doc: net: Add DHCPv6 information
DHCPv6 description was missing from the documentation.

Fixes #73290

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 03:01:42 -07:00
Vinayak Kariappa Chettimada
fb774fef74 soc: nordic: Select new nrf54lx compatible kconfig option
Select the newly introduced nrf54lx compatible kconfig
option.

This is common both for real HW and for simulated HW,
allowing SW to behave appropriately for both.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-03 03:01:36 -07:00
Sean Nyekjaer
ede866440d dts: arm: st: mp1: fix exti interrupt numbering
Align interrupt numbering with RM0436 for STM32MP157.
This will allow EXTI interrupt for line 6, 7, 8, 9, 10 and 11.

Fixes: ff231fa20a ("dts: stm32: Populate new properties for exti nodes")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2024-06-03 03:01:31 -07:00
Gerard Marull-Paretas
e2f8f5b131 drivers: can: mcan: skip read/write to mram if data length is 0
can_mcan_send/can_mcan_get_message issued a message ram write/read even
when data length was 0. This caused some issues on systems where data
cache is enabled, because the cache invd/flushing calls present in the
mcan driver can fail if provided length is 0.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-03 03:01:22 -07:00
Valerio Setti
a15af0be9f mbedtls: fix Mbed TLS Kconfig options
PR #72475 disabled default enabling of most Mbed TLS features.
This means that:

- CONFIG_MBEDTLS_CIPHER_AES_ENABLED needs to be manually enabled
  when required;
- CONFIG_PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC does not need to
  be (almost) always added because there is no default RSA
  key-exchange enabled, so PSA can be built without RSA support.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-03 09:55:58 +02:00
Emil Gydesen
a2f354cabd Bluetooth: Audio: Update documentation for bt_audio_codec_qos
The struct and its fields were poorly documented.
The new documentation should she some light on when the fields
can be modified.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 09:49:39 +02:00
cyliang tw
a30c5731ae tests: drivers: can: api: support numaker_m2l31ki
Add support for Nuvoton numaker board numaker_m2l31ki.
m2l31x has 4 MPU regions and can't afford one more region
for USERSPACE, so set CONFIG_USERSPACE=n in m2l31ki_defconfig.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-06-03 09:49:17 +02:00
cyliang tw
9bb6e2d6f4 drivers: can: support for numaker m2l31x
Add Nuvoton numaker m2l31x series can-fd controller in Kconfig.numaker
Add can-fd nodes in m2l31x.dtsi

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-06-03 09:49:17 +02:00
Jukka Rissanen
8363b8cfd9 samples: net: Increase CONFIG_NET_SOCKETS_POLL_MAX to pass checks
The number of suitable network IPv6/4 configurations in interfaces
affect the number of pollable sockets. So need to increase the value
from the default value of 3.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
b95821f809 net: dns: llmnr_responder: Print query type properly
Instead of printing either A or AAAA resource query type,
print the correct query type value.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
b305be037c net: Start socket service thread by net core init
Do not depend on init level but start the socket service
already in net core init because DNS init code depends on
socket service API to be ready to serve. And we call DNS
init at the net core init.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
1eb4a709e8 net: dns: Allow using resolver and responder at the same time
Allow mDNS resolver and responder to to be used at the same
time so that both can use the port 5353. This requires
a DNS traffic dispatcher which affects also the normal DNS
resolver.

Fixes #72553

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
63e6a83510 net: dns: Add helper for figuring out the query type
Add helper function that returns the name of the query type
so that we can print it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
434e290649 net: dns: Add ANY query resource type
Don't give an error for ANY type record.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Emil Gydesen
f93b9dee5c Bluetooth: CSIP: Make set_member_by_conn a public function
The function is useful for application to lookup set
members from bt_conn pointers, e.g. when iterating on
connected devices.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 09:48:48 +02:00
Fengming Ye
4f8c2e8f58 net: conn: fix supplicant l2 recv unexpected frame
Supplicant create AF_PACKET proto ETH_P_PAE socket but receive other
frames like ICMP, UDP and causes following issues.
1. When frame len exceeds MTU, net_pkt_clone cannot clone pkt.
   Thus dropped it and print warning log.
2. It will lower throughput performance as every packet is cloned.

Fix it by conn_raw_socket does not deliver pkts protocol not macted,
after l2 processed, unless conn is all packets.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-03 09:48:32 +02:00
Fengming Ye
a3034d1802 tests: net: socket: af_packet: fix TSN socket recv IP pkt
test_packet_sockets_dgram create ETH_P_TSN sockets but
send and recv ETH_P_IP packet.

Fix it by sending ETH_P_TSN packet.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-03 09:48:32 +02:00
Caldeira Quentin
68527f5506 boards: stm32wb5mmg_dk: add button support
This patch add buttons support for the two user buttons

Signed-off-by: Caldeira Quentin <QuentinCaldeira@eaton.com>
2024-06-03 09:48:19 +02:00
Hake Huang
83d087caa3 samples: net: mqtt_publisher: increase num of thread to allowed
according to the latest build log, we need increase the MAX_THREEED

/usr/bin/python3 scripts/build/gen_kobject_list.py \
--kernel twister-out/frdm_k64f/samples/net/mqtt_publisher/\
sample.net.mqtt_publisher.userspace/zephyr/zephyr_pre0.elf \
--gperf-output kobject_prebuilt_hash.gperf --include-subsystem-list \
twister-out/frdm_k64f/samples/net/mqtt_publisher/\
sample.net.mqtt_publisher.userspace/zephyr/misc/generated/struct_tags.json
Too many thread objects (17)
Increase CONFIG_MAX_THREAD_BYTES to 3

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-06-03 09:48:07 +02:00
Chang Feng
fe03e0c4bb dts: gd: fix uart4 irq wrong
Fix IRQ number error of UART4 in DTS of gd32f4xx.

Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2024-06-02 00:43:44 +02:00
Florian Weber
8f852551e0 drivers: sensor: akm09918c: fix decoder api define
Decoder api was not defined and lead to build error
if it is used in userland.
Fix that by adding necessary DT_DRV_COMPAT #define
in akm09918c sensor decoder.

Signed-off-by: Florian Weber <florian.weber@live.de>
2024-06-02 00:43:08 +02:00
Grzegorz Chwierut
76ff3afffe tests: Update pytest scenarios with sysbuild paths
Updated sample to test DFU with mcumgr.
Use paths to default domain build dir from device_config.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-06-02 00:42:54 +02:00
Grzegorz Chwierut
f52f08f877 twister: pytest: Sysbuild support in pytest-twister-harness
Read default domain from domains.yaml file and update
paths to proper build directory. It fixes native and qemu
pytest scenarios, when application is build with sysbuild.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-06-02 00:42:54 +02:00
Chris Friedt
37e82fcb21 samples: video: tcpserversink: fix build failure
The nxp,imx-csi node was removed from dts in a previous commit
which caused a build failure / regression in CI.

Use DEVICE_DT_GET_ANY() instead of DEVICE_DT_GET_ONE(), since
the latter requires a DT node present, while the former does
not and returns NULL if no such compat exists.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-01 09:42:29 -07:00
Andy Ross
4a6b8f27b8 tests/boards: Add mtk_adsp device test
Simple test of device-specific functionality: cpu frequency control
and host interrupts.

Signed-off-by: Andy Ross <andyross@google.com>
2024-06-01 05:40:05 -07:00
Andy Ross
df8395e3d8 soc: boards: Add MediaTek MT8195 Audio DSP
This is a soc/board integration for the MediaTek Audio DSP device on
the MT8195 SOC, along with a Zephyr mtk_adsp soc integration that will
work to support similar 8186 and 8188 device shortly.

A python loader (similar to cavsload.py) is included that will run in
developer mode on current chromebooks (an HP x360 13b-ca000 was
tested) with an unmodified kernel.

Signed-off-by: Andy Ross <andyross@google.com>
2024-06-01 05:40:05 -07:00
Andy Ross
e0c56f1998 drivers/timer: MediaTek audio DSP timer device
These devices have a somewhat odd hybrid design, with a free-running
64 bit up counter but no comparator.  Instead interrupts are triggered
by (one of an array of) 32 bit down counters with reset (a-la SysTick,
but without the 24 bit precision issues).  The combination actually
results in a fairly simple driver as we can skip the comparator
rounding math.

Signed-off-by: Andy Ross <andyross@google.com>
2024-06-01 05:40:05 -07:00
Andy Ross
3f07d70cf3 drivers: MediaTek MT8195 Audio DSP interrupt controller
Add an interrupt controller driver for this device.  This is an
extremely simple second level controller with per-interrupt-bit
registers for "enable" and "status".  There is no internal latching,
so no "clear/ACK" process is needed.

Signed-off-by: Andy Ross <andyross@google.com>
2024-06-01 05:40:05 -07:00
Phi Bang Nguyen
c23132afdf boards: shields: Add a shield for DVP FPC-24 mt9m114 camera modules
Add a shield for DVP FPC 24-pins mt9m114 camera modules. These camera
modules are supported on i.MX RT10xx series, for example.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-01 10:29:19 +02:00
Phi Bang Nguyen
cf4495b196 boards: nxp: mixmxrt1064_evk: Drop camera sensor related stuffs
The mt9m114 camera module is not always attached to this board. Camera
stuffs should go into a seperate overlay / shield. Also, the CSI should
be enabled only if there is a camera sensor attached to it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-01 10:29:19 +02:00
Aleksandar Cecaric
0f1d93cb4f include: riscv: add RISC-V arch atomic instructions
Add RISC-V architecture specific atomic instructions, not present in
atomic_builtin.h

Signed-off-by: Aleksandar Cecaric <aleksandar.cecaric@nextsilicon.com>
2024-06-01 10:27:32 +02:00
Andrej Butok
03d1eabc32 boards: nxp: mimxrt10xx: fix non-optimal sector distribution
- Optimize slot sizes for MCUBoot swap move algorithm
  for mimxrt1010/15/20/24/40/50/60/64 boards.
- Save up to 64 wasted sectors.
- Use DT_SIZE_K/M macros for slot sizes.
- Fix partition size errors.
- Limit mcuboot max size to 128KB (was 256KB).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-01 10:26:31 +02:00
Eduardo Montoya
01b0d8736e drivers: ieee802154: nrf5: sleep if idle when RxOnWhenIdle=0
When RxOnWhenIdle is set to False, turn the radio off
if no operation is ongoing in order to save power.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2024-06-01 10:25:31 +02:00
Robert Zieba
4586388b3b charger: Change GRobertZieba collaborator to personal account
This account is my corporate account which I will lose access to. Change
to my personal account instead.

Signed-off-by: Robert Zieba <robertzieba@google.com>
2024-06-01 10:25:03 +02:00
Lars Knudsen
3fd01c5eed MAINTAINERS: Add niym-ot to Bluetooth Audio
Nithin has contributed the following PRs

https://github.com/zephyrproject-rtos/zephyr/pull/72908
https://github.com/zephyrproject-rtos/zephyr/pull/72333
https://github.com/zephyrproject-rtos/zephyr/pull/71798
https://github.com/zephyrproject-rtos/zephyr/pull/70373

and is attending the weekly LE Audio Zephyr meetings.

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
2024-06-01 10:24:45 +02:00
Sreeram Tatapudi
32ef6bfd7e boards: infineon: cyw20829m2evk_02: Remove the incorrect flash node
Delete the incorrect node declaration for flash-controller
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/73525

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-06-01 10:24:25 +02:00
Seppo Takalo
85b60fcc12 Revert "test: lwm2m: Raise POSIX_MAX_FDS for native_sim"
This reverts commit 9473f60b80.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-06-01 10:24:03 +02:00
Henrik Brix Andersen
127cb9edb6 tests: drivers: can: add host communication test suite
Add test suite using python-can for testing Controller Area Network (CAN)
communication between a host PC and a device under test running Zephyr.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-31 16:40:01 -05:00
Henrik Brix Andersen
c4c69606e6 drivers: can: shell: optionally bypass the shell when printing CAN frames
Optionally bypass the shell when printing received CAN frames in order not
to break up the line containing the frame. This allows for parsing the
printed CAN frames using Twisters pytest and console harnesses with the
cost of the shell ignoring input while the frame is being printed.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-31 16:40:01 -05:00
Mathieu Choplain
a07d493c9d llext: relocate all symbols regardless of type
In the current implementation, the LLEXT linker will only apply
relocations targeting a given symbol if it has a specfic symbol type.
This is overzealous and causes issues on some platforms, as some symbols
that need to be relocated are skipped due to being of a "bad" type.

Ignore the symbol type when performing relocation to solve this problem,
but also add checks to ensure we don't attempt to relocate symbols with
an invalid section index. If such a relocation is found, return an error
instead of ignoring the relocation entry to ensure that it is impossible
to execute code from a (partially) unrelocated LLEXT.

Also remove all hacks added to circumvent this issue:
* qemu_cortex_r5 exclusion from test cases
* unnecessary exclusion of some flags when building with LLEXT EDK

Fixes #72832.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-05-31 16:38:09 -05:00
Ian Morris
04e60be9bf boards: mikroe: add initial support for Mikroe RA4M1 Clicker
The RA4M1 Clicker is a basic development board for the Renesas RA4M1
Microcontroller. The board contains J-Link on board, two LEDs and push
buttons and several headers for interfacing with external devices.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-05-31 16:36:47 -05:00
Andrej Butok
a1ac84ca38 doc: Add upgrade flag to the install requirements command
- Adds -U upgrade flag to the install requirements command.
- Fixes a possible documentation generation issue,
  reported in https://github.com/zephyrproject-rtos/zephyr/issues/73082

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-05-31 16:36:04 -05:00
Tomi Fontanilles
c1342b3aa9 modules: mbedtls: remove the default enabling of features
In an effort to shave off code size, remove out-of-the-box
enabling of crypto features (except SHA-256).

Configurations are adjusted to enable what they need.

Bonuses:

- When enabled, AES now defaults to using a smaller version
(`CONFIG_MBEDTLS_AES_ROM_TABLES` isn't default enabled anymore,
and if enabled, `CONFIG_MBEDTLS_AES_FEWER_TABLES` defaults to y).

- Conditions around Mbed TLS Kconfig options have been improved
to reflect the reality of the dependencies.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-31 16:33:06 -05:00
Anke Xiao
598ba32856 tests: drivers: gpio: test gpio_basic_api for frdm_ke17z
Added frdm_ke17z.overlay to support testing gpio_basic_api sample

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-05-31 16:31:33 -05:00
Anke Xiao
13690daa34 drivers: clock_control: add a soc config macro wrap flexbus clock
ke17z7 platform does not define flexbus clock-related macros,
so comment it out.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-05-31 16:31:33 -05:00
Anke Xiao
2c695f2bed boards: nxp: frdm_ke17z: add the board support
Added configuration file to support frdm_ke17z board

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-05-31 16:31:33 -05:00
Anke Xiao
ee3b7427df dts: arm: nxp: add ke17z and ke17z512 dtsi file
Included the nxp_ke1xz.dtsi file to use the same peripheral info,
and overwrite it for different peripherals

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-05-31 16:31:33 -05:00
Anke Xiao
b84b6de76c soc: nxp: kinetis: add soc support for mke17z7
Added soc support for mke17z7

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-05-31 16:31:33 -05:00
Manuel Loew
c395e749be boards: corrects the Device Tree Source (DTS) files of Arm MPS3-AN547.
This PR corrects the base addresses and region names of some memories
present in the MPS3-AN547 hardware.

Fixes #71920

Signed-off-by: Manuel Loew <manuel.loew.infineon@gmail.com>
2024-05-31 16:30:09 -05:00
Gerard Marull-Paretas
598ab6b39a samples: sysbuild: hello_world: fix broken references/args
README for this sample had references to the initial sample name/target.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-31 09:59:36 -05:00
Daniel DeGrasse
6e138c1500 tests: drivers: uart: uart_async_api: enable support for lpcxpresso55s69
Enable support for running uart async API test on LPCXpresso55s69 EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-31 09:59:12 -05:00
Daniel DeGrasse
4fbd5032a6 dts: arm: nxp: lpc55s6x: add DMA channels at SOC level
Add DMA channels at SOC level for the LPC55S6x series SOCs, as the dma
requests are SOC specific properties and do not need to be modified at
the board level. Remove any DMA request definitions present at the board
level for the LPC55S69 evaluation board.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-31 09:59:12 -05:00
Robert Lubos
8a808c40cc net: if: Remove redundant ifdef slicing
Some IPv4/IPv6 functions were ifdef-sliced internally, despite being
compiled in conditionally in top-level #ifdef block under the same
condition.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-31 09:58:59 -05:00
Robert Lubos
c84444b681 net: if: Improve ifdef blocks matching
In some cases the comment after #endif did not match the opening #if, in
some cases it was missing.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-31 09:58:59 -05:00
Jukka Rissanen
ffbe0f2928 tests: net: http_server: Add wildcard resource path tests
Add tests that verify that wildcards in resource path strings
are matched correctly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-31 09:57:22 -05:00
Jukka Rissanen
08dc8f93fe net: http_server: Add wildcard support to resource strings
Allow user to specify resource string using wildcard characters
so that multiple URL paths can be served with just one handler.

Fixes #73367

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-31 09:57:22 -05:00
Emil Gydesen
1bcc3d8efa samples: Bluetooth: Audio: Change names to <profile>_<role>
Modify the BAP and PBP samples to start with the profile name
(BAP or PBP) and the role of the sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-31 09:56:11 -05:00
Emil Gydesen
38d201e063 Samples: Bluetooth: Add () to AUDIO_RING_BUF_BYTES for broadcast source
The BAP broadcast source sample did not properly use
parentheses for the macro, potentially causing issues.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-31 09:56:11 -05:00
Chaitanya Tata
40de2cbc0d lib: heap: Add dependency for asserts
There is no point in having heap validation enabled but without asserts,
as nothing is reported to the user.

Add this dependency to make sure this option is useful.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-05-31 09:55:28 -05:00
Patrick Patel
131a0fad04 Bluetooth: host: Update id.c to support id rst/del for CONFIG_BT_SMP=n
Currently calls to these two functions fail unnecessarily when
CONFIG_BT_SMP is disabled. This fix allows identity resets
without having the BT_SMP stack enabled. The primary use case
is enabling random mac address rotation for privacy in memory
constrained SOCs. Fixes #73313

Signed-off-by: Patrick Patel <ppatel@micro-design.com>
2024-05-31 09:55:06 -05:00
Wilfried Chauveau
7d7616214b arch: arm: cortex_m: restore comment lost in translation
The comment about ISB in swap.S was lost when translation to C.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-05-31 09:53:31 -05:00
Francois Ramu
4101948082 samples: code relocation in external memory of stm32 disco kit
Define the configuration to run the code_relocation
application on the external memory octo flash
of the stm32u585 or stm32h7b3i disco kit in XIP

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-31 09:52:54 -05:00
Francois Ramu
ae06f927aa boards: arm: stm32h7b3 disco with external memory region for XiP
Declare a sub-region of the whole ext_memory with attributes
ATTR_MPU_IO so that XiP becomes possible on this external
octo- NOR flash.  Use the STM32CubeProgrammer runner
with the external loader for flashing.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-31 09:52:54 -05:00
Francois Ramu
78fb2313c7 boards: arm: stm32u585 disco with external memory region for XiP
Declare a sub-region of the whole ext_memory with attributes
ATTR_MPU_IO so that XiP becomes possible on this external
octo- NOR flash. Use the STM32CubeProgrammer runner
with the external loader for flashing.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-31 09:52:54 -05:00
Francois Ramu
7b73a343cb drivers: flash: stm32 ospi driver aborts memmap before erase/write
This change is aborting the memoryMapped mode of the octo-flash
before erasing or writing the NOR. Operations are performed in
command mode.
Reading is always performed in MemoryMapped mode (memcopy)

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-31 09:52:54 -05:00
Francois Ramu
7593a14a0a drivers: flash: stm32 ospi drivers with Memorymapped mode
Enable the MemoryMapped Mode for the stm32 octoFlash driver
Configure the Flash in MemoryMapped to use in XiP mode.
With this mode the erase and write are not supported.
Address and size are given by the DTS register property.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-31 09:52:54 -05:00
Zhaoxiang Jin
1425ae1af9 samples: sensor/mcux_lpcmp: Add LPCMP use case
Add LPCMP use case.
Enable LPCMP use case on NXP frdm_mcxn947 board.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-31 09:51:29 -05:00
Zhaoxiang Jin
ea8eea4dc3 boards: nxp/frdm_mcxn947: Support LPCMP for NXP frdm_mcxn947 board
Support LPCMP for NXP frdm_mcxn947 board

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-31 09:51:29 -05:00
Zhaoxiang Jin
c4cba91d6c dts: arm/nxp: Add LPCMP nodes to NXP MCXN94x dtsi file
Add LPCMP nodes to NXP MCXN94x dtsi file

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-31 09:51:29 -05:00
Zhaoxiang Jin
0507021009 drivers: sensor/nxp: Add NXP LPCMP driver
Add NXP LPCMP driver

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-31 09:51:29 -05:00
Zhaoxiang Jin
76ae2bf234 include: drivers/sensor: Add NXP LPCMP Header
Add header for NXP LPCMP drivers

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-31 09:51:29 -05:00
Zhaoxiang Jin
79e134bc4b dts: bindings/sensor: Support NXP LPCMP bindings
Support NXP LPCMP bindings

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-31 09:51:29 -05:00
Vinayak Kariappa Chettimada
4b6d3f1e16 Bluetooth: Controller: Fix missing conn update ind PDU validation
Fix missing validation of Connection Update Ind PDU. Ignore
invalid connection update parameters and force a silent
local connection termination.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-31 04:39:34 -07:00
Lingao Meng
b50e1d5ec8 samples: bluetooth: Add support for hci 3wire
Add support 3wire hci uart.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-05-31 03:09:07 -07:00
Benjamin Cabé
adfa3346c2 doc: samples: philosophers: fix formatting and spelling
Improved the formatting of the overview and fixed minor
grammar issues

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-31 03:08:52 -07:00
Benjamin Cabé
02df234780 doc: samples: philosophers: reformat line length
Wrap at 100 characters

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-31 03:08:52 -07:00
Jeppe Odgaard
3c9d9a1260 dts: boards: stm32h562: Add usart6 node
Add the remaining usart node for stm32h562.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-31 03:08:40 -07:00
Markus Lassila
53ddff6395 samples: net: cellular_modem: Fix nRF9160
Add missing Kconfigs to nRF9160dk overlays.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
2024-05-31 09:04:03 +02:00
Derek Snell
fd20de5e3b boards: nxp: lpcxpresso55s16: Combine SRAMs 0-2
Combine into single memory region to enable larger data needs.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-05-31 09:03:44 +02:00
Derek Snell
63fcaee85d dts: arm: nxp: LPC55S1x add memory-region to SRAMs
Enable linker to allocate to these SRAM regions.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-05-31 09:03:44 +02:00
TaiJu Wu
18d9ba4b82 test: Add a testcase for cpu affinity
Pin thread to a specific cpu. Once thread gets cpu, check
the cpu id is correct and then thread will give up cpu.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2024-05-31 08:07:46 +02:00
Ricardo Rivera-Matos
49c1f97afd samples: charger: Adds additional context to README
Adds useful context to the charger sample README to help readers
understand what the sample application is doing.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2024-05-31 08:07:25 +02:00
Ricardo Rivera-Matos
d929fc513c doc: charger: Adds introductory context to documentation
Adds some introductory context to the charger documentation. This
is being aided to help developers understand what a charger device
is and how the charger_driver_api is relevant to system operation.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2024-05-31 08:07:25 +02:00
Kai Vehmanen
5a7600bec6 soc: intel_adsp: tools: add shell support to cavstool.py
Create a pseudo-terminal to access Zephyr shell on the audio DSP.
The shell terminal is enabled with "-p" command-line option.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-31 08:07:03 +02:00
Kai Vehmanen
6509b8199b shell: add shell backend for audio DSP using shared memory window
Add a new shell backend implemented over a shared memory window
on the Intel audio DSPs. The implementation uses the Zephyr winstream
to manage the data streaming.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-31 08:07:03 +02:00
Flavio Ceolin
65fc5b7f17 device: Remove z_device_is_ready
This duplicates the functionality of device_is_ready.

Calls for z_device_is_ready are being done in kernel mode, so it is
safe to call its implementation directly.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-31 08:06:44 +02:00
Anuj Pathak
ac49a21ccd Drivers: Serial: Generic [tx/rx]-invert properties yaml.
Refactored vendor-specific duplicates of uart tx/rx invert properties
into a common dts file uart-controller-pin-inversion.yaml

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-05-31 08:06:21 +02:00
RAJAGOPALAN GANGADHARAN
d2c0bd9d27 doc: release notes: Added truncate option addition to release notes 3.7
Added notes about the truncate option to release 3.7

Signed-off-by: RAJAGOPALAN GANGADHARAN <g.raju2000@gmail.com>
2024-05-31 08:06:05 +02:00
RAJAGOPALAN GANGADHARAN
65c4ca1f05 fs: open: Add Truncate flag to zfs open
This commit has added new flag FS_O_TRUNC to support truncation
during file open. Modified fs_open to handle truncation based on
provided flags. Included unit tests for flag behavior with common
filesystems.

Signed-off-by: RAJAGOPALAN GANGADHARAN <g.raju2000@gmail.com>
2024-05-31 08:06:05 +02:00
Valerio Setti
c36d9ec3a8 test: mbedtls: do not enable USE_PSA and all PSA features
Before #72243 Mbed TLS was not using
USE_PSA and all PSA features were not enabled. After #72243
if BUILD_WITH_TFM is set:
- USE_PSA in Mbed TLS is enabled by default and
- all PSA features are enabled.

This commits reverts both changes for tests/crypto/mbedtls
test case.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-31 08:05:37 +02:00
Emil Gydesen
6b6107ccd1 Bluetooth: Audio: Rename set_sirk to just sirk
The S in SIRK is for set, so set_sirk was effectively
"set set".

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-31 08:05:24 +02:00
Mark Wang
7a2b2d73ce doc: releases: release-notes-3.7: Add info for A2DP and AVDTP
Added information about implementing A2DP and AVDTP to
the Bluetooth section.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-05-31 08:05:01 +02:00
Dominik Ermel
4ae207ccac samples: Fix list formatting in README
Added missing newline.

Fixes: #72269

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-30 16:53:29 -05:00
Nikolay Agishev
03b2767f7e ARC: nSIM: Fix XIP config
Workaround for https://github.com/zephyrproject-rtos/zephyr/issues/72793.
Because of pointed issue CONFIG_XIP should be defined explicitly.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-05-30 16:53:18 -05:00
Lucas Tamborrino
aa692309bf drivers: wdt: espressif: Add 32K Xtal Watchdog
This WDT is responsible for monitoring the external
32.728 Hz crystal connected to pins XTAL_32K_P and
XTAL_32K_N. If an oscillation failure is detected
the hardware automatically switch to RTC_RC_SLOW
clock source and triggers an interrupt.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-05-30 16:52:37 -05:00
Yong Cong Sin
13a5c8aad7 debug: symtab: fix linking issue due to variable redefinition
Employs the same linkonce magic of sw_isr_table to fix the
multiple definition of the symtab variables issue that I
get in my application build that doesn't use `west`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Yong Cong Sin
db2f74555d doc: services: debugging: add documentation for symtab
Add a simple documentation for symbol table.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Yong Cong Sin
0a1a286a31 doc: services: debugging: mipi: fix heading
Fix heading level.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Yong Cong Sin
a27c6d7d0d MAINTAINERS: add Symtab
Add symtab to the list.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Yong Cong Sin
0f6272e5bc tests: debug: symtab: add test
Add test for symtab.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Yong Cong Sin
043f595279 debug: symtab: rename start_addr to first_addr
`start_addr` is the address of the first symbol, rename it to
`first_addr` instead as it seems more intuitive and relatable
to the comments.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Yong Cong Sin
29423eb17e build: symtab: prevent entries with the same address
Append new entry to the symtab list only if it has unique
address.

Added a bit more comments and move the debug print to after
the list is sorted.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Yong Cong Sin
f5934de8e5 build: symtab: Add a dummy entry at the end for the binary search
The `symtab_find_symbol_name()` is using an adapted binary
search function to get the entry between 2 addresses, we need
to add a dummy entry at the end so that the search function
can remain simple and straightforward without doing
out-of-bound checks:

   20  \
       |
       |
   50  x
       |
       |
   90  x
    .  |
    .  |
    .  |
dummy  /

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Yong Cong Sin
408d0be89f build: symtab: sanitize function name
Sanitize the function name and only store the valid part.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Charles Dias
020109842f boards: weact: mini_stm32h743: update ST7735R dts configuration
Update dts to use ST7735R via MIPI DBI API.

Also, remove the reset-gpios, as on this board the LCD RESET pin is
directly connected to the system reset. And add LCD backlight pin
connected to PE10.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-05-30 16:51:30 -05:00
Ioannis Karachalios
816cf7051b tests: crypto: crypto_hash: Add support for Smartbond Pro DevKit
This commit should add support for the DA1469x Pro DevKit.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-30 16:51:03 -05:00
Ioannis Karachalios
aca7f0d996 samples: drivers: crypto: Add support for Smartbond Pro DevKit
This commit should add support for the DA1469x Pro DevKit.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-30 16:51:03 -05:00
Ioannis Karachalios
44e9f2ca8f drivers: crypto: smartbond: Crypto Driver Update
This commit should fix the followings:
1. Suppress compiler warnings
2. Cryptographic mode should first be exercised before
   applying the secure key
3. In-memory word swap operations should be omitted as
   the key should reside in the flash memory and so any
   write access should raise a busfault exception

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-30 16:51:03 -05:00
Emil Gydesen
6ed90f65a5 Bluetooth: Audio: Remove empty Kconfig.bass
The kconfig file is empty.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-30 16:49:06 -05:00
Flavio Ceolin
8c5806472e tests: random: Move and rename rng test
Random number generator is a subsystem and although it is mostly used
in crypto, this is not its only utility.

Move the current random number generator test to it is own space
(tests/subsys/random) and rename it to rng.

We need more and better tests for rng, this is an initial commit
to organize it and get ready for further tests.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-30 16:48:31 -05:00
Emil Gydesen
c57c857f9b Bluetooth: CAP: Add check for member in common_get_client
The function did not check if `member` was NULL before
dereferencing it.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-30 16:47:04 -05:00
Reto Schneider
134523d90c tests: drivers: dma: scatter_gather: Make transfer size configurable
Various SoCs have different limitations when it comes to DMA buffer
sizes. This change allows to chose a suitable value for them.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-30 16:45:30 -05:00
Andries Kruithof
b5ecb21447 Bluetooth: CAP: shell: add command for broadcast reception start
A shell command has been added for the new CAP procedure
'broadcast_reception_start'

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-05-30 16:44:17 -05:00
Guennadi Liakhovetski
518a712db0 llext: zero is a valid relocation offset
Zero offset in a relocation entry is valid, shouldn't ignore it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-30 09:50:17 -05:00
Guennadi Liakhovetski
946fd3fda2 llext: (cosmetic) fix a misplaced space and re-use a variable
Use an existing variable instead of re-calculating and fix swapped
space and a paranthesis.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-30 09:50:17 -05:00
Guennadi Liakhovetski
ebde53904d llext: fix handling of non-standard sections in relocatable case
When building partially linked / relocatable objects no ELF segments
are created and it becomes more difficult to predict which sections
the compiler will build and use. In this case a .data.rel.local
section is created by the compiler and it is needed to link .rodata
strings in a twister test. We can handle arbitrary sections at run-
time if .peek() is supported. If it isn't we need to allocate and
copy the section. For now we simply error out in such cases. Fixing
that would represent a larger change and can be done incrementally.

This also fixes the relocation calculation to point to the correct
symbol address instead of the memory location, where it's currently
residing, because that can be a temporary buffer as is the case with
SOF.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-30 09:50:17 -05:00
Ioannis Karachalios
29026e8a89 drivers: i2c: smartbond: Update busy check condition
The controller should be considered
inactive when TX/RX FIFOs are empty
and there is no data in SPI_RX_TX_REG.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-30 09:48:31 -05:00
Lubos Koudelka
88de80b774 drivers: clock_control: stm32: adding config_regulator_voltage for L0
STM32 MCU shall set voltage regulator level with respect to set clock
frequency to reach optimal power consumption.
Voltage regulator is set prior to clock setting based on configuration
from dts/overlay file. Config_regulator_voltage is set as weak in
clock_stm32_ll_common - config_regulator_voltage can be
extended to other STM32 families without need to rewrite heavily
family clock driver, default one can be still used.

Signed-off-by: Lubos Koudelka <lubos.koudelka@st.com>
2024-05-30 09:47:12 -05:00
Georgij Cernysiov
048b7552eb modules: lvgl: fix pointer input for normal orientation
Add missing break statement for normal orientation.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-05-30 09:46:13 -05:00
Bram Vlerick
3ea5f799dd i2c: target: eeprom_target: add addressable size assert
Add build-time assert to check if the size defined is actually addressable.
i.e: if address-width is set to 8, the maximum addressable size is 256
bytes.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-05-30 05:31:40 -07:00
Bram Vlerick
52ee175be7 tests: i2c: i2c_target_api: fix test before size build assert addition
Fix the tests before a build time check is added to validate the
addressable size. Most tests have an eeprom size of 1024 defined but width
8-bit addressing, the majority of the eeprom cannot be addressed

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-05-30 05:31:40 -07:00
Bram Vlerick
935e8c4b13 i2c: target: eeprom_target: add address_width parameter
Add a parameter to allow the configuration of the number of address
bytes used by the I2C master. This allows the driver to expose larger
buffer sizes.

Tested with standard linux at24 driver.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-05-30 05:31:40 -07:00
Jonathan Rico
6e2bf1bf10 Bluetooth: Enable CI central_hr/peripheral_hr on bbc_microbit
Building for this target ensures we keep in mind resource-constrained
microcontrollers when making changes in Bluetooth.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-05-30 05:31:21 -07:00
Gerard Marull-Paretas
c0b0443f05 boards: nordic: nrf54h20dk: enable CAN
Enable canpll (required to clock CAN), and can120 instance, routed to
pins P9.4 and P9.5.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-30 05:20:50 -07:00
Gerard Marull-Paretas
cdcb05527d drivers: can: nrf: add driver
Add driver for the Nordic CAN peripheral, based on Bosch MCAN IP.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-30 05:20:50 -07:00
Gerard Marull-Paretas
0d4d4e7754 drivers: pinctrl: nrf: add support for CAN TX/RX
So that we can configure CAN pins.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-30 05:20:50 -07:00
Gerard Marull-Paretas
3731a137e7 soc: nordic: nrf54h: disable CAN120 MCAN cache
Configure CAN120 MCAN core registers as non-cachable to prevent D-Cache
from inhibiting volatile accesses to the CAN120 MCAN registers. Also
apply non-cachable attribute to the message ram region. Even though the
MCAN driver handles cache invalidation/flushing, MPU faults are still
triggered (to be investigated).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-30 05:20:50 -07:00
Gerard Marull-Paretas
8f27e49495 dts: common: nordic: nrf54h20: define can120
Define CAN120 instance.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-30 05:20:50 -07:00
Gerard Marull-Paretas
955f720829 dts: bindings: can: add nordic,nrf-can
Add binding for Nordic CAN peripheral, based on the Bosch MCAN IP.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-30 05:20:50 -07:00
Gerard Marull-Paretas
7ff30b6d9f modules: hal_nordic: require nrf-regtool 5.3.0
>=5.3.0 is required for proper CAN support.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-30 05:20:50 -07:00
Alberto Escolar Piedras
fa9a5962b5 boards nrf54l15bsim: Update docs as we now have RADIO
Mention that we have the RADIO peripheral,
but no encryption accelerators yet.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-30 04:49:22 -07:00
Alberto Escolar Piedras
64a53d0921 boards nrf54l15bsim//cpuapp: Don't remove RADIO in DT
The RADIO models now contain the radio,
let's stop removing it, but as they do not support DFE,
let's disable DFE.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-30 04:49:22 -07:00
Alberto Escolar Piedras
e91b336f40 manifest: Update nRF hw models to latest
Update the HW models module to:
53635212495e4575955fc717369be4362126456a

Including the following:
* 53635212 nRF54L15 MDK: Redefine NRF_RADIO_*_BASE to point to model
* 4a92c424 NHW_IPC: Fix out of bounds read
* 2dae79b5 RADIO: Add nRF54 support

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-30 04:49:22 -07:00
Emil Gydesen
3537c4614b Bluetooth: CAP: Shell: Fix minors bugs with unicast_stop
The cap_initiator unicast_stop shell command had the wrong
minimum parameter count (as it defaults to all).

Some indentation had also gone wrong for it in the
documentation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-30 04:08:37 -07:00
Mathieu Choplain
42731a04cb tests: subsys: llext: exclude apollo4 platform
Exclude the Apollo4 platform from LLEXT tests for now,
as they currently break CI due to #72775.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-05-30 11:55:35 +01:00
Kapil Bhatt
8a52b64875 net: shell: Add random MAC address generation
Add option for setting a random MAC address to
the net iface set_mac command. With random option
a random MAC address can be assigned to an interface.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-05-30 11:55:27 +01:00
Rafał Kuźnia
64bf17daad scripts: west_commands: runners: nrf_common: optional UICR cleanup
The flasher was unconditionally cleaning the UICR area, even when the
application didn't have a new configuration generated. This can happen,
when CONFIG_NRF_REGTOOL_GENERATE_UICR=n. In such case, keep the old UICR
configuration on the device.

A real scenario where we should set CONFIG_NRF_REGTOOL_GENERATE_UICR=n
is when building multiple firmware images that are meant to run one
domain. The primary application build generates the UICR configuration
and secondary images don't. Before this change, the flashing process of
the primary application would write new UICR configuration, but the
flashing process of secondary images would erase it.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-05-30 11:55:11 +01:00
Torsten Rasmussen
24acc7d43d sysbuild: introduce sysbuild_root for root adjustment
Fixes: #73066

Introduce sysbuild_root CMake module similar to the Zephyr root CMake
module. The sysbuild_root CMake module works similar to existing root
module, but with the difference that root paths are adjusted relative to
APP_DIR which is the main image, instead of relative to sysbuild.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-05-30 11:55:01 +01:00
Torsten Rasmussen
8b3d4c6f0d cmake: update zephyr_file to use cmake_path()
Since the introduction of zephyr_file() then the minimum required CMake
version has become 3.20.
Update zephyr_file() to use cmake_path insteasd of set().
This allows us to normalize the path and thereby also remove duplicates
in the list as paths are normalized.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-05-30 11:55:01 +01:00
Rubin Gerritsen
1aa33fe368 tests: bsim: Use the pre_init_f instead of post_init_f
When using the post_init_f to initialize the `bst_result`,
it is not possible to mark the test as
passed immediately as the `bst_result` will be
initialized after the test completes.

This change should overcome this limitation.

Bluetooth mesh tests are kept as is as we are not
sure if this will change the behavior.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-05-30 03:00:58 -07:00
Yong Cong Sin
94346d2441 arch: arm64: fatal: limit max number of stack traces
In some cases, the `fp` will never be `NULL` and the stack
unwinding can go on and on forever, limit the max depth so that
this will not happen.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 03:00:50 -07:00
Yong Cong Sin
c87dc641bc arch: generalize frame pointer via CONFIG_FRAME_POINTER introduction
Enabling `CONFIG_FRAME_POINTER` allows the users to build the
kernel with frame-pointer.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 03:00:40 -07:00
Seppo Takalo
9473f60b80 test: lwm2m: Raise POSIX_MAX_FDS for native_sim
LwM2M interoperability test binary requires a bit
more file descriptors than the default 4.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-05-30 02:59:29 -07:00
Ioannis Karachalios
99deccfe53 boards: renesas: da1469x_dk_pro: Update default settings
This commit should deal with optimizing device's
operation in terms of power consumption. In this
context:

1. Power and rail managers are enabled so that the
   device can enter the sleep state and power
   rails be set to the min. required levels.

2. Peripheral blocks should be enabled only when
   there is need to do so.

3. Define the internal RCX oscillator as default
   low power clock. RC32K should not be used as
   it drifts significantly due to temperature and
   voltage variations. Thus, affecting the whole
   system stability regardless of its calibration.

4. PLL should be enabled only when requested and
   on board level LP clock should be switched to
   XTAL32K to avoid overhead due to RCX calibration.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-30 02:59:21 -07:00
Jordan Yates
b9c9426b62 sensor: bme680: simplify conversion logic
Read less data from the sensor and use standard zephyr functions for
extracting integers from byte arrays.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-30 02:06:19 -07:00
Jordan Yates
b67185b90d sensor: bme680: fix fetch API conformance
`sensor_sample_fetch` is documented to read all of a sensor's active
channels and block until complete. The previous implementation read
the result from the previous call and triggered the next sample.

As a result the first call always failed, and subsequent calls would
return data one sampling period old.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-30 02:06:19 -07:00
Sebastian Głąb
98d0fe4452 tests: drivers: spi: Remove inclusive language from SPI test
Rename SPI test to spi_controller_peripheral.
Remove iclusive language from that test.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-30 01:02:13 -07:00
Sebastian Głąb
b82946fba7 tests: drivers: spi: spi_slave: Extend test scope
Add possibility to test all four SPI modes (CPOL, CPHA).
Add possibility to test different bitrates.
Add tests that checks handling of zero length buffers on master.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-30 01:02:13 -07:00
Patrick Stewart
1868987a2f Bluetooth: userchan: Support TCP fragmentation of HCI packets
Keep reading from the HCI socket when a packet is incomplete. The other
end may not write entire packets, or TCP could fragment in the middle of a
packet.
Also fix a potential infinite loop by advancing to the next packet before
any continue statements.

Signed-off-by: Patrick Stewart <patrick@rfcreations.com>
2024-05-30 01:01:04 -07:00
Sebastian Głąb
74378f3d52 tests: drivers: spi: spi_error_cases: Enable test execution on nrf54h20
Add overlay file for nrf54h20.
Align code and DTS between spi_error_cases and spi_controller_peripheral.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-30 01:00:48 -07:00
Erwan Gouriou
008ee25ccf boards: st: stm32h745i_disco: Fix arduino connector description
Arduino connector on this board had 2 issues:
- missing spi reference
- wrong i2c reference

This commit fixes both.


Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-05-30 01:00:34 -07:00
Tom Burdick
d2ccc91d7d sensors: Add a blocking sensor_read call
Rename the current sensor_read to sensor_read_async_pool and create a
new blocking sensor_read helper.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-30 09:00:43 +02:00
Johan Hedberg
f48a57b2a8 Bluetooth: drivers: Remove unmaintained B91 HCI driver
The driver isn't currently buildable due to "west blobs" support never
having been added for hal_telink. Furthermore, even if the blob
dependency is manually made available it turns out the code has
bitrotten to the point where it doesn't build anymore. This situation
has continued for several years without anyone taking action, so I think
it's safe to assume this is unmaintained and should be removed.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-30 09:00:22 +02:00
Romain Pelletant
202c16008f soc: stm32c0: add poweroff mode
Add poweroff mode support for STM32C0
Fixes #73371

Signed-off-by: Romain Pelletant <romainp@kickmaker.net>
2024-05-30 08:59:50 +02:00
Torsten Rasmussen
f7d2cc2d43 cmake: use zephyr_get() and zephyr_file() for APPLICATION_CONFIG_DIR
Fixes: #73065

Update APPLICATION_CONFIG_DIR is Zephyr CMake and sysbuild to follow
the common principle in Zephyr for relative paths.

This means that relative paths are taken from the application source
directory when specified on command line, and require local scoped
defined APPLICATION_CONFIG_DIR to be given as absolute, for example by
using CMAKE_CURRENT_LIST_DIR.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-05-30 08:59:25 +02:00
Emil Gydesen
4f82f40c00 MAINTAINERS: Add audio_samples to Bluetooth Audio
Add the tests/bsim/bluetooth/audio_samples/ directory to the
Bluetooth Audio group.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-30 08:59:03 +02:00
5953 changed files with 168355 additions and 50631 deletions

View file

@ -6,8 +6,8 @@ labels: bug
assignees: ''
---
**Notes (delete this)**
<!--
**Notes**
Github Discussions (https://github.com/zephyrproject-rtos/zephyr/discussions)
are available to first verify that the issue is a genuine Zephyr bug and not a
consequence of Zephyr services misuse.
@ -16,8 +16,10 @@ This issue list is only for bugs in the main Zephyr code base
(https://github.com/zephyrproject-rtos/zephyr/). If the bug is for a project
fork (such as NCS) specific feature, please open an issue in the fork project
instead.
-->
**Describe the bug**
<!--
A clear and concise description of what the bug is.
Please also mention any information which could help others to understand
@ -27,31 +29,43 @@ the problem you're facing:
- Is this a regression? If yes, have you been able to "git bisect" it to a
specific commit?
- ...
-->
**To Reproduce**
<!--
Steps to reproduce the behavior:
1. mkdir build; cd build
2. cmake -DBOARD=board\_xyz
3. make
4. See error
-->
**Expected behavior**
<!--
A clear and concise description of what you expected to happen.
-->
**Impact**
<!--
What impact does this issue have on your progress (e.g., annoyance, showstopper)
-->
**Logs and console output**
<!--
If applicable, add console logs or other types of debug information
e.g Wireshark capture or Logic analyzer capture (upload in zip archive).
copy-and-paste text and put a code fence (\`\`\`) before and after, to help
explain the issue. (if unable to obtain text log, add a screenshot)
-->
**Environment (please complete the following information):**
- OS: (e.g. Linux, MacOS, Windows)
- Toolchain (e.g Zephyr SDK, ...)
- Commit SHA or Version used
**Additional context**
<!--
Add any other context that could be relevant to your issue, such as pin setting,
target configuration, ...
-->

View file

@ -8,13 +8,21 @@ assignees: ''
---
**Is your enhancement proposal related to a problem? Please describe.**
<!--
A clear and concise description of what the problem is.
-->
**Describe the solution you'd like**
<!--
A clear and concise description of what you want to happen.
-->
**Describe alternatives you've considered**
<!--
A clear and concise description of any alternative solutions or features you've considered.
-->
**Additional context**
<!--
Add any other context or graphics (drag-and-drop an image) about the feature request here.
-->

View file

@ -9,43 +9,52 @@ assignees: ''
## Introduction
<!--
This section targets end users, TSC members, maintainers and anyone else that might
need a quick explanation of your proposed change.
-->
### Problem description
<!--
Why do we want this change and what problem are we trying to address?
-->
### Proposed change
<!--
A brief summary of the proposed change - the 10,000 ft view on what it will
change once this change is implemented.
-->
## Detailed RFC
<!--
In this section of the document the target audience is the dev team. Upon
reading this section each engineer should have a rather clear picture of what
needs to be done in order to implement the described feature.
-->
### Proposed change (Detailed)
<!--
This section is freeform - you should describe your change in as much detail
as possible. Please also ensure to include any context or background info here.
For example, do we have existing components which can be reused or altered.
By reading this section, each team member should be able to know what exactly
you're planning to change and how.
-->
### Dependencies
<!--
Highlight how the change may affect the rest of the project (new components,
modifications in other areas), or other teams/projects.
-->
### Concerns and Unresolved Questions
<!--
List any concerns, unknowns, and generally unresolved questions etc.
-->
## Alternatives
<!--
List any alternatives considered, and the reasons for choosing this option
over them.
-->

View file

@ -8,13 +8,21 @@ assignees: ''
---
**Is your feature request related to a problem? Please describe.**
<!--
A clear and concise description of what the problem is.
-->
**Describe the solution you'd like**
<!--
A clear and concise description of what you want to happen.
-->
**Describe alternatives you've considered**
<!--
A clear and concise description of any alternative solutions or features you've considered.
-->
**Additional context**
<!--
Add any other context or graphics (drag-and-drop an image) about the feature request here.
-->

View file

@ -34,18 +34,13 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.11.20240324
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
options: '--entrypoint /bin/bash'
env:
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
BSIM_OUT_PATH: /opt/bsim/
BSIM_COMPONENTS_PATH: /opt/bsim/components
EDTT_PATH: ../tools/edtt
bsim_bt_52_test_results_file: ./bsim_bt/52_bsim_results.xml
bsim_bt_53_test_results_file: ./bsim_bt/53_bsim_results.xml
bsim_bt_53split_test_results_file: ./bsim_bt/53_bsim_split_results.xml
bsim_net_52_test_results_file: ./bsim_net/52_bsim_results.xml
bsim_uart_test_results_file: ./bsim_uart/uart_bsim_results.xml
steps:
- name: Apply container owner mismatch workaround
run: |
@ -153,59 +148,39 @@ jobs:
- name: Run Bluetooth Tests with BSIM
if: steps.check-bluetooth-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
run: |
export ZEPHYR_BASE=${PWD}
# Build and run the BT tests for nrf52_bsim:
nice tests/bsim/bluetooth/compile.sh
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_52_test_results_file} \
TESTS_FILE=tests/bsim/bluetooth/tests.nrf52bsim.txt tests/bsim/run_parallel.sh
# Build and run the BT controller tests also for the nrf5340bsim/nrf5340/cpunet
nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh
BOARD=nrf5340bsim/nrf5340/cpunet \
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_53_test_results_file} \
TESTS_FILE=tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt \
tests/bsim/run_parallel.sh
# Build and run the nrf5340 split stack tests set
nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpuapp.sh
BOARD=nrf5340bsim/nrf5340/cpuapp \
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_53split_test_results_file} \
TESTS_FILE=tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpuapp.txt \
tests/bsim/run_parallel.sh
tests/bsim/ci.bt.sh
- name: Run Networking Tests with BSIM
if: steps.check-networking-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
run: |
export ZEPHYR_BASE=${PWD}
WORK_DIR=${ZEPHYR_BASE}/bsim_net nice tests/bsim/net/compile.sh
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_net_52_test_results_file} \
SEARCH_PATH=tests/bsim/net/ tests/bsim/run_parallel.sh
tests/bsim/ci.net.sh
- name: Run UART Tests with BSIM
if: steps.check-uart-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
run: |
echo "UART: Single device tests"
./scripts/twister -T tests/drivers/uart/ --force-color --inline-logs -v -M -p nrf52_bsim \
--fixture gpio_loopback -- -uart0_loopback
echo "UART: Multi device tests"
export ZEPHYR_BASE=${PWD}
WORK_DIR=${ZEPHYR_BASE}/bsim_uart nice tests/bsim/drivers/uart/compile.sh
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_uart_test_results_file} \
SEARCH_PATH=tests/bsim/drivers/uart/ tests/bsim/run_parallel.sh
tests/bsim/ci.uart.sh
- name: Upload Test Results
- name: Merge Test Results
run: |
pip3 install junitparser junit2html
junitparser merge --glob "./bsim_*/*bsim_results.*.xml" "./twister-out/twister.xml" junit.xml
junit2html junit.xml junit.html
- name: Upload Unit Test Results in HTML
if: always()
uses: actions/upload-artifact@v4
with:
name: bsim-test-results
name: HTML Unit Test Results
if-no-files-found: ignore
path: |
./bsim_bt/52_bsim_results.xml
./bsim_bt/53_bsim_results.xml
./bsim_bt/53_bsim_split_results.xml
./bsim_net/52_bsim_results.xml
./bsim_uart/uart_bsim_results.xml
./twister-out/twister.xml
./twister-out/twister.json
${{ github.event_path }}
if-no-files-found: warn
junit.html
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Bsim Test Results
files: "junit.xml"
comment_mode: off
- name: Upload Event Details
if: always()

View file

@ -12,7 +12,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.11.20240324
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false

View file

@ -14,7 +14,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.11.20240324
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false

View file

@ -1,6 +1,12 @@
name: Compliance Checks
on: pull_request
on:
pull_request:
types:
- edited
- opened
- reopened
- synchronize
jobs:
check_compliance:
@ -52,6 +58,14 @@ jobs:
west config manifest.group-filter -- +ci,-optional
west update -o=--depth=1 -n 2>&1 1> west.update.log || west update -o=--depth=1 -n 2>&1 1> west.update2.log
- name: Check for PR description
if: ${{ github.event.pull_request.body == '' }}
continue-on-error: true
id: pr_description
run: |
echo "Pull request description cannot be empty."
exit 1
- name: Run Compliance Tests
continue-on-error: true
id: compliance
@ -94,5 +108,12 @@ jobs:
done
if [ "${exit}" == "1" ]; then
echo "Compliance error, check for error messages in the \"Run Compliance Tests\" step"
echo "You can run this step locally with the ./scripts/ci/check_compliance.py script."
exit 1;
fi
if [ "${{ steps.pr_description.outcome }}" == "failure" ]; then
echo "PR description cannot be empty"
exit 1;
fi

View file

@ -27,9 +27,9 @@ jobs:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-22.04, macos-11, windows-2022]
os: [ubuntu-22.04, macos-14, windows-2022]
exclude:
- os: macos-11
- os: macos-14
python-version: 3.6
- os: windows-2022
python-version: 3.6

View file

@ -18,6 +18,9 @@ env:
# so we fetch that through pip.
CMAKE_VERSION: 3.20.5
DOXYGEN_VERSION: 1.9.6
# Job count is set to 2 less than the vCPU count of 16 because the total available RAM is 32GiB
# and each sphinx-build process may use more than 2GiB of RAM.
JOB_COUNT: 14
jobs:
doc-file-check:
@ -50,6 +53,8 @@ jobs:
scripts/dts/
doc/requirements.txt
.github/workflows/doc-build.yml
scripts/pylib/pytest-twister-harness/src/twister_harness/device/device_adapter.py
scripts/pylib/pytest-twister-harness/src/twister_harness/helpers/shell.py
doc-build-html:
name: "Documentation Build (HTML)"
@ -130,7 +135,11 @@ jobs:
else
DOC_TARGET="html"
fi
DOC_TAG=${DOC_TAG} SPHINXOPTS_EXTRA="-q -t publish" make -C doc ${DOC_TARGET}
DOC_TAG=${DOC_TAG} \
SPHINXOPTS="-j ${JOB_COUNT} -W --keep-going -T" \
SPHINXOPTS_EXTRA="-q -t publish" \
make -C doc ${DOC_TARGET}
# API documentation coverage
python3 -m coverxygen --xml-dir doc/_build/html/doxygen/xml/ --src-dir include/ --output doc-coverage.info
@ -208,7 +217,7 @@ jobs:
- name: install-pkgs
run: |
apt-get update
apt-get install -y python3-pip python3-venv ninja-build doxygen graphviz librsvg2-bin
apt-get install -y python3-pip python3-venv ninja-build doxygen graphviz librsvg2-bin imagemagick
- name: cache-pip
uses: actions/cache@v4
@ -243,7 +252,10 @@ jobs:
DOC_TAG="development"
fi
DOC_TAG=${DOC_TAG} SPHINXOPTS="-q -j auto" LATEXMKOPTS="-quiet -halt-on-error" make -C doc pdf
DOC_TAG=${DOC_TAG} \
SPHINXOPTS="-q -j ${JOB_COUNT}" \
LATEXMKOPTS="-quiet -halt-on-error" \
make -C doc pdf
- name: upload-build
if: always()

View file

@ -10,7 +10,7 @@ jobs:
check-errno:
runs-on: ubuntu-22.04
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.11
image: ghcr.io/zephyrproject-rtos/ci:v0.26.13
steps:
- name: Apply container owner mismatch workaround

View file

@ -26,7 +26,7 @@ jobs:
group: zephyr-runner-v2-linux-x64-4xlarge
if: github.repository_owner == 'zephyrproject-rtos'
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.11.20240324
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false

View file

@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12, macos-14, windows-2022]
os: [ubuntu-22.04, macos-13, macos-14, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout

View file

@ -25,7 +25,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.11.20240324
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
options: '--entrypoint /bin/bash'
outputs:
subset: ${{ steps.output-services.outputs.subset }}
@ -129,7 +129,7 @@ jobs:
needs: twister-build-prep
if: needs.twister-build-prep.outputs.size != 0
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.11.20240324
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false

View file

@ -24,7 +24,7 @@ jobs:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-22.04]
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.11
image: ghcr.io/zephyrproject-rtos/ci:v0.26.13
steps:
- name: Apply Container Owner Mismatch Workaround

View file

@ -30,9 +30,9 @@ jobs:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-22.04, macos-11, windows-2022]
os: [ubuntu-22.04, macos-14, windows-2022]
exclude:
- os: macos-11
- os: macos-14
python-version: 3.6
- os: windows-2022
python-version: 3.6

7
.gitignore vendored
View file

@ -7,8 +7,10 @@
*.swp
*.swo
*~
.\#*
# Emacs
\#*\#
build*/
!doc/build/
!scripts/build
@ -27,6 +29,8 @@ outdir
outdir-*
scripts/basic/fixdep
scripts/gen_idt/gen_idt
coverage-report
doc-coverage.info
doc/_build
doc/doxygen
doc/xml
@ -53,6 +57,7 @@ venv
.venv
.DS_Store
.clangd
new.info
# CI output
compliance.xml

View file

@ -111,11 +111,6 @@ zephyr_library_named(zephyr)
if(CONFIG_LEGACY_GENERATED_INCLUDE_PATH)
zephyr_include_directories(${PROJECT_BINARY_DIR}/include/generated/zephyr)
message(WARNING "
Warning: CONFIG_LEGACY_GENERATED_INCLUDE_PATH is currently enabled by default
so that user applications can continue to use the legacy include paths for the
generated headers. This Kconfig will be deprecated and eventually removed in
the future releases.")
endif()
zephyr_include_directories(
@ -197,6 +192,7 @@ get_property(OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET compiler PROPERTY no_opti
get_property(OPTIMIZE_FOR_DEBUG_FLAG TARGET compiler PROPERTY optimization_debug)
get_property(OPTIMIZE_FOR_SPEED_FLAG TARGET compiler PROPERTY optimization_speed)
get_property(OPTIMIZE_FOR_SIZE_FLAG TARGET compiler PROPERTY optimization_size)
get_property(OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET compiler PROPERTY optimization_size_aggressive)
# From kconfig choice, pick the actual OPTIMIZATION_FLAG to use.
# Kconfig choice ensures only one of these CONFIG_*_OPTIMIZATIONS is set.
@ -208,6 +204,8 @@ elseif(CONFIG_SPEED_OPTIMIZATIONS)
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SPEED_FLAG})
elseif(CONFIG_SIZE_OPTIMIZATIONS)
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SIZE_FLAG}) # Default in kconfig
elseif(CONFIG_SIZE_OPTIMIZATIONS_AGGRESSIVE)
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
else()
message(FATAL_ERROR
"Unreachable code. Expected optimization level to have been chosen. See Kconfig.zephyr")
@ -1712,9 +1710,8 @@ if(CONFIG_BUILD_OUTPUT_BIN AND CONFIG_BUILD_OUTPUT_UF2)
set(BYPRODUCT_KERNEL_UF2_NAME "${PROJECT_BINARY_DIR}/${KERNEL_UF2_NAME}" CACHE FILEPATH "Kernel uf2 file" FORCE)
endif()
set(KERNEL_META_PATH ${PROJECT_BINARY_DIR}/${KERNEL_META_NAME} CACHE INTERNAL "")
if(CONFIG_BUILD_OUTPUT_META)
set(KERNEL_META_PATH ${PROJECT_BINARY_DIR}/${KERNEL_META_NAME} CACHE INTERNAL "")
list(APPEND
post_build_commands
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/zephyr_module.py
@ -1728,6 +1725,9 @@ if(CONFIG_BUILD_OUTPUT_META)
post_build_byproducts
${KERNEL_META_PATH}
)
else(CONFIG_BUILD_OUTPUT_META)
# Prevent spdx to use invalid data
file(REMOVE ${KERNEL_META_PATH})
endif()
# Cleanup intermediate files
@ -1888,6 +1888,20 @@ if(CONFIG_BUILD_OUTPUT_INFO_HEADER)
)
endif()
if (CONFIG_LLEXT AND CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID)
#slidgen must be the first post-build command to be executed
#on the Zephyr ELF to ensure that all other commands, such as
#binary file generation, are operating on a preparated ELF.
list(PREPEND
post_build_commands
COMMAND ${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/build/llext_prepare_exptab.py
--elf-file ${PROJECT_BINARY_DIR}/${KERNEL_ELF_NAME}
--slid-listing ${PROJECT_BINARY_DIR}/slid_listing.txt
)
endif()
if(NOT CMAKE_C_COMPILER_ID STREQUAL "ARMClang")
set(check_init_priorities_input
$<IF:$<TARGET_EXISTS:native_runner_executable>,${BYPRODUCT_KERNEL_EXE_NAME},${BYPRODUCT_KERNEL_ELF_NAME}>
@ -1974,22 +1988,39 @@ elseif(CONFIG_LOG_MIPI_SYST_USE_CATALOG)
endif()
if(LOG_DICT_DB_NAME_ARG)
if (NOT CONFIG_LOG_DICTIONARY_DB_TARGET)
set(LOG_DICT_DB_ALL_TARGET ALL)
endif()
add_custom_command(
OUTPUT ${LOG_DICT_DB_NAME}
COMMAND
set(log_dict_gen_command
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/logging/dictionary/database_gen.py
${KERNEL_ELF_NAME}
${LOG_DICT_DB_NAME_ARG}=${LOG_DICT_DB_NAME}
--build-header ${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h
)
if (NOT CONFIG_LOG_DICTIONARY_DB_TARGET)
# If not using a separate target for generating logging dictionary
# database, add the generation to post build command to make sure
# the database is actually being generated.
list(APPEND
post_build_commands
COMMAND ${CMAKE_COMMAND} -E echo "Generating logging dictionary database: ${LOG_DICT_DB_NAME}"
COMMAND ${log_dict_gen_command}
)
list(APPEND
post_build_byproducts
${LOG_DICT_DB_NAME}
)
else()
# Seprate build target for generating logging dictionary database.
# This needs to be explicitly called/used to generate the database.
add_custom_command(
OUTPUT ${LOG_DICT_DB_NAME}
COMMAND ${log_dict_gen_command}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Generating logging dictionary database: ${LOG_DICT_DB_NAME}"
DEPENDS ${logical_target_for_zephyr_elf}
)
add_custom_target(log_dict_db_gen ${LOG_DICT_DB_ALL_TARGET} DEPENDS ${LOG_DICT_DB_NAME})
add_custom_target(log_dict_db_gen DEPENDS ${LOG_DICT_DB_NAME})
endif()
endif()
# Add post_build_commands to post-process the final .elf file produced by
@ -2129,9 +2160,8 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND}
-DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR}
-DAPPLICATION_SOURCE_DIR=${APPLICATION_SOURCE_DIR}
-DINTERFACE_INCLUDE_DIRECTORIES="$<JOIN:$<TARGET_PROPERTY:zephyr_interface,INTERFACE_INCLUDE_DIRECTORIES>,:>"
-DINTERFACE_INCLUDE_DIRECTORIES="$<TARGET_PROPERTY:zephyr_interface,INTERFACE_INCLUDE_DIRECTORIES>"
-Dllext_edk_file=${llext_edk_file}
-DAUTOCONF_H=${AUTOCONF_H}
-Dllext_cflags="${llext_edk_cflags}"
-Dllext_edk_name=${CONFIG_LLEXT_EDK_NAME}
-DWEST_TOPDIR=${WEST_TOPDIR}

View file

@ -26,8 +26,6 @@
/soc/arm/infineon_xmc/ @parthitce
/soc/arm/silabs_exx32/efm32pg1b/ @rdmeneze
/soc/arm/silabs_exx32/efr32mg21/ @l-alfred
/soc/arm/st_stm32/ @erwango
/soc/arm/st_stm32/*/power.c @FRASTM
/soc/arm/st_stm32/stm32mp1/ @arnopo
/soc/arm/st_stm32/stm32h7/*stm32h735* @benediktibk
/soc/arm/st_stm32/stm32l4/*stm32l451* @benediktibk
@ -55,8 +53,6 @@
/boards/arm/acn52832/ @sven-hm
/boards/arm/arduino_mkrzero/ @soburi
/boards/arm/bbc_microbit_v2/ @LingaoM
/boards/arm/bl5340_dvk/ @lairdjm
/boards/arm/bl65*/ @lairdjm
/boards/arm/blackpill_f401ce/ @coderkalyan
/boards/arm/blackpill_f411ce/ @coderkalyan
/boards/arm/bt*10/ @greg-leach
@ -67,7 +63,6 @@
/boards/arm/cy8ckit_062s4/ @DaWei8823
/boards/arm/cy8ckit_062_wifi_bt/ @ifyall @npal-cy
/boards/arm/cy8cproto_062_4343w/ @ifyall @npal-cy
/boards/arm/disco_l475_iot1/ @erwango
/boards/arm/efm32pg_stk3401a/ @rdmeneze
/boards/arm/faze/ @mbittan @simonguinot
/boards/arm/frdm*/ @mmahadevan108 @dleach02
@ -77,7 +72,6 @@
/boards/arm/ip_k66f/ @parthitce @lmajewski
/boards/arm/legend/ @mbittan @simonguinot
/boards/arm/lpcxpresso*/ @mmahadevan108 @dleach02
/boards/arm/mg100/ @rerickson1
/boards/arm/mimx8mm_evk/ @Mani-Sadhasivam
/boards/arm/mimx8mm_phyboard_polis @pefech
/boards/arm/mimxrt*/ @mmahadevan108 @dleach02
@ -85,10 +79,8 @@
/boards/arm/msp_exp432p401r_launchxl/ @Mani-Sadhasivam
/boards/arm/npcx7m6fb_evb/ @MulinChao @ChiHuaL
/boards/arm/nrf*/ @carlescufi @lemrey
/boards/arm/nucleo*/ @erwango @ABOSTM @FRASTM
/boards/arm/nucleo_f401re/ @idlethread
/boards/arm/nuvoton_pfm_m487/ @ssekar15
/boards/arm/pinnacle_100_dvk/ @rerickson1
/boards/arm/qemu_cortex_a9/ @ibirnbaum
/boards/arm/qemu_cortex_r*/ @stephanosio
/boards/arm/qemu_cortex_m*/ @ioannisg @stephanosio
@ -106,14 +98,13 @@
/boards/arm/sensortile_box/ @avisconti
/boards/arm/steval_fcu001v1/ @Navin-Sankar
/boards/arm/stm32l1_disco/ @karlp
/boards/arm/stm32*_disco/ @erwango @ABOSTM @FRASTM
/boards/arm/stm32h735g_disco/ @benediktibk
/boards/arm/stm32f3_disco/ @ydamigos
/boards/arm/stm32*_eval/ @erwango @ABOSTM @FRASTM
/boards/arm/rcar_*/ @aaillet
/boards/arm/ubx_bmd345eval_nrf52840/ @Navin-Sankar @brec-u-blox
/boards/arm/nrf5340_audio_dk_nrf5340 @koffes @alexsven @erikrobstad @rick1082 @gWacey
/boards/arm/stm32_min_dev/ @sidcha
/boards/ezurio/* @rerickson1
/boards/riscv/rv32m1_vega/ @dleach02
/boards/riscv/adp_xc7k_ae350/ @cwshu @kevinwang821020 @jimmyzhe
/boards/riscv/longan_nano/ @soburi
@ -152,7 +143,6 @@
/drivers/*/*cc13xx_cc26xx* @bwitherspoon
/drivers/*/*gd32* @nandojve
/drivers/*/*mcux* @mmahadevan108 @dleach02
/drivers/*/*stm32* @erwango @ABOSTM @FRASTM
/drivers/*/*native_posix* @aescolar @daor-oti
/drivers/*/*lpc11u6x* @mbittan @simonguinot
/drivers/*/*npcx* @MulinChao @ChiHuaL
@ -231,7 +221,6 @@
/drivers/gpio/*b91* @andy-liu-telink
/drivers/gpio/*lmp90xxx* @henrikbrixandersen
/drivers/gpio/*nct38xx* @MulinChao @ChiHuaL
/drivers/gpio/*stm32* @erwango
/drivers/gpio/*eos_s3* @fkokosinski @kgugala
/drivers/gpio/*rcar* @aaillet
/drivers/gpio/*esp32* @sylvioalves
@ -357,7 +346,6 @@
/drivers/serial/uart_ite_it8xxx2.c @GTLin08
/drivers/serial/*intel_lw* @shilinte
/drivers/serial/*kb1200* @ene-steven
/drivers/disk/sdmmc_sdhc.h @JunYangNXP
/drivers/disk/sdmmc_stm32.c @anthonybrandon
/drivers/ptp_clock/ @tbursztyka @jukkar
/drivers/spi/*b91* @andy-liu-telink
@ -374,7 +362,6 @@
/drivers/timer/*xlnx_psttc* @wjliang @stephanosio
/drivers/timer/*cc13xx_cc26xx_rtc* @vanti
/drivers/timer/*cavs* @dcpleung
/drivers/timer/*stm32_lptim* @FRASTM
/drivers/timer/*leon_gptimer* @julius-barendt
/drivers/timer/*mips_cp0* @frantony
/drivers/timer/*rcar_cmt* @aaillet
@ -424,7 +411,6 @@
/dts/arm64/renesas/ @lorc @xakep-amatop
/dts/arm/quicklogic/ @fkokosinski @kgugala
/dts/arm/seeed_studio/ @str4t0m
/dts/arm/st/ @erwango
/dts/arm/st/h7/*stm32h735* @benediktibk
/dts/arm/st/l4/*stm32l451* @benediktibk
/dts/arm/ti/cc13?2* @bwitherspoon
@ -478,7 +464,6 @@
/dts/bindings/*/nxp*s32* @manuargue
/dts/bindings/*/openisa* @dleach02
/dts/bindings/*/raspberrypi*pico* @yonsch
/dts/bindings/*/st* @erwango
/dts/bindings/sensor/ams* @alexanderwachter
/dts/bindings/*/sifive* @mateusz-holenko @kgugala @pgielda
/dts/bindings/*/andes* @cwshu @kevinwang821020 @jimmyzhe

View file

@ -478,6 +478,7 @@ choice COMPILER_OPTIMIZATIONS
prompt "Optimization level"
default NO_OPTIMIZATIONS if COVERAGE
default DEBUG_OPTIMIZATIONS if DEBUG
default SIZE_OPTIMIZATIONS_AGGRESSIVE if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "llvm"
default SIZE_OPTIMIZATIONS
help
Note that these flags shall only control the compiler
@ -490,6 +491,12 @@ config SIZE_OPTIMIZATIONS
Compiler optimizations will be set to -Os independently of other
options.
config SIZE_OPTIMIZATIONS_AGGRESSIVE
bool "Aggressively optimize for size"
help
Compiler optimizations wil be set to -Oz independently of other
options.
config SPEED_OPTIMIZATIONS
bool "Optimize for speed"
help

View file

@ -119,6 +119,7 @@ ACPI:
- lib/acpi/
- include/zephyr/acpi/
- tests/lib/acpi/
- dts/bindings/acpi/
labels:
- "area: ACPI"
tests:
@ -136,6 +137,7 @@ ARC arch:
- include/zephyr/arch/arc/
- tests/arch/arc/
- dts/arc/synopsys/
- dts/bindings/arc/
- doc/hardware/arch/arc-support-status.rst
labels:
- "area: ARC"
@ -199,6 +201,7 @@ ARM Platforms:
- soc/arm/designstart/
- soc/arm/fvp_aemv8*/
- dts/arm/armv*.dtsi
- dts/bindings/arm/arm*.yaml
labels:
- "platform: ARM"
@ -237,10 +240,11 @@ MIPS arch:
- arch.mips
Ambiq Platforms:
status: odd fixes
status: maintained
maintainers:
- AlessandroLuo
collaborators:
- aaronyegx
- AlessandroLuo
- RichardSWheatley
files:
- soc/ambiq/
@ -300,7 +304,6 @@ Bluetooth:
collaborators:
- hermabe
- Vudentz
- Thalley
- asbjornsabo
- sjanc
files:
@ -395,6 +398,9 @@ Bluetooth Host:
- subsys/bluetooth/shell/
- tests/bluetooth/host*/
- tests/bsim/bluetooth/host/
files-exclude:
- subsys/bluetooth/host/classic/
- include/zephyr/bluetooth/classic/
labels:
- "area: Bluetooth Host"
- "area: Bluetooth"
@ -437,19 +443,23 @@ Bluetooth Audio:
- kruithofa
- larsgk
- pin-zephyr
- niym-ot
- jthm-ot
files:
- subsys/bluetooth/audio/
- include/zephyr/bluetooth/audio/
- tests/bluetooth/audio/
- tests/bsim/bluetooth/audio/
- tests/bsim/bluetooth/audio_samples/
- tests/bluetooth/shell/audio.conf
- tests/bluetooth/tester/overlay-le-audio.conf
- tests/bluetooth/tester/src/audio/
- doc/connectivity/bluetooth/api/audio/
- samples/bluetooth/broadcast_audio*/
- samples/bluetooth/bap*/
- samples/bluetooth/cap*/
- samples/bluetooth/hap*/
- samples/bluetooth/public_broadcast*/
- samples/bluetooth/pbp*/
- samples/bluetooth/tmap*/
- samples/bluetooth/unicast_audio*/
labels:
- "area: Bluetooth Audio"
- "area: Bluetooth"
@ -468,6 +478,7 @@ Bluetooth Classic:
- include/zephyr/bluetooth/classic/
labels:
- "area: Bluetooth Classic"
- "area: Bluetooth"
tests:
- bluetooth
@ -590,6 +601,22 @@ CMSIS API layer:
- portability.cmsis_rtos_v1
- portability.cmsis_rtos_v2
DAP:
status: maintained
maintainers:
- jfischer-no
collaborators:
- maxd-nordic
files:
- include/zephyr/drivers/swdp.h
- drivers/dp/
- subsys/dap/
- samples/subsys/dap/
description: >-
Debug Access Port controller
labels:
- "area: dap"
DSP subsystem:
status: maintained
maintainers:
@ -714,6 +741,20 @@ Debug:
tests:
- debug
"Debug: Symtab":
status: maintained
maintainers:
- ycsin
files:
- include/zephyr/debug/symtab.h
- subsys/debug/symtab/
- tests/subsys/debug/symtab/
- scripts/build/gen_symtab.py
labels:
- "area: Symtab"
tests:
- debug.symtab
Demand Paging:
status: maintained
maintainers:
@ -732,8 +773,8 @@ Device Driver Model:
status: maintained
maintainers:
- gmarull
collaborators:
- tbursztyka
collaborators:
- dcpleung
- nashif
files:
@ -764,11 +805,10 @@ DFU:
- dfu
Devicetree:
status: maintained
maintainers:
- galak
status: odd fixes
collaborators:
- decsny
- galak
files:
- scripts/dts/
- dts/common/
@ -776,6 +816,7 @@ Devicetree:
- doc/build/dts/
- include/zephyr/devicetree/
- scripts/kconfig/kconfigfunctions.py
- doc/build/kconfig/preprocessor-functions.rst
- include/zephyr/devicetree.h
files-exclude:
- dts/common/nordic/
@ -785,13 +826,11 @@ Devicetree:
- libraries.devicetree
Devicetree Bindings:
status: maintained
maintainers:
- galak
status: odd fixes
collaborators:
- decsny
- galak
files:
- dts/bindings/
- include/zephyr/dt-bindings/
- dts/binding-template.yaml
labels:
@ -831,10 +870,14 @@ Display drivers:
- include/zephyr/drivers/display.h
- subsys/fb/
- samples/subsys/display/
- tests/subsys/display/
- doc/hardware/peripherals/display/
- tests/drivers/*/display/
labels:
- "area: Display"
tests:
- display.cfb
- drivers.display
Documentation:
status: maintained
@ -867,6 +910,7 @@ Documentation:
files-exclude:
- doc/releases/migration-guide-*
- doc/releases/release-notes-*
- doc/develop/test/
labels:
- "area: Documentation"
@ -915,6 +959,7 @@ Release Notes:
- doc/hardware/peripherals/adc.rst
- tests/drivers/build_all/adc/
- include/zephyr/dt-bindings/adc/
- dts/bindings/adc/
labels:
- "area: ADC"
tests:
@ -991,6 +1036,7 @@ Release Notes:
- samples/modules/canopennode/
- samples/net/sockets/can/
- samples/subsys/canbus/
- scripts/west_commands/runners/canopen_program.py
- subsys/canbus/
- subsys/net/l2/canbus/
- tests/drivers/build_all/can/
@ -1008,7 +1054,7 @@ Release Notes:
maintainers:
- rriveramcrus
collaborators:
- GRobertZieba
- RobertZ2011
files:
- drivers/charger/
- dts/bindings/charger/
@ -1188,7 +1234,7 @@ Release Notes:
- samples/drivers/eeprom/
- tests/drivers/eeprom/
- tests/drivers/*/eeprom/
- doc/hardware/peripherals/eeprom.rst
- doc/hardware/peripherals/eeprom/
labels:
- "area: EEPROM"
tests:
@ -1235,6 +1281,7 @@ Release Notes:
collaborators:
- decsny
- lmajewski
- pdgendt
files:
- drivers/ethernet/
- include/zephyr/dt-bindings/ethernet/
@ -1322,7 +1369,7 @@ Release Notes:
"Drivers: GNSS":
status: maintained
maintainers:
- bjarki-trackunit
- bjarki-andreasen
collaborators:
- tomi-font
- fabiobaltieri
@ -1471,6 +1518,7 @@ Release Notes:
- drivers/mdio/
- include/zephyr/drivers/mdio.h
- tests/drivers/build_all/mdio/
- dts/bindings/mdio/
labels:
- "area: MDIO"
tests:
@ -1491,6 +1539,26 @@ Release Notes:
tests:
- drivers.mipi_dsi
"Drivers: MSPI":
status: maintained
maintainers:
- swift-tk
files:
- drivers/mspi/
- drivers/memc/*mspi*
- drivers/flash/*mspi*
- include/zephyr/drivers/mspi.h
- include/zephyr/drivers/mspi/
- samples/drivers/mspi/
- tests/drivers/mspi/
- doc/hardware/peripherals/mspi.rst
- dts/bindings/mspi/
- dts/bindings/mtd/mspi*
labels:
- "area: MSPI"
tests:
- drivers.mspi
"Drivers: Reset":
status: odd fixes
collaborators:
@ -1498,6 +1566,7 @@ Release Notes:
files:
- drivers/reset/
- include/zephyr/drivers/reset.h
- dts/bindings/reset/
"Interrupt Handling":
status: odd fixes
@ -1567,6 +1636,7 @@ Release Notes:
- tests/drivers/led/
- doc/hardware/peripherals/led.rst
- tests/drivers/build_all/led/
- dts/bindings/led/
labels:
- "area: LED"
tests:
@ -1575,9 +1645,9 @@ Release Notes:
"Drivers: LED Strip":
status: maintained
maintainers:
- mbolivar-ampere
- simonguinot
collaborators:
- mbolivar-ampere
- soburi
- thedjnK
files:
@ -1635,6 +1705,7 @@ Release Notes:
- tests/drivers/regulator/
- tests/drivers/build_all/regulator/
- doc/hardware/peripherals/regulators.rst
- dts/bindings/regulator/
labels:
- "area: Regulators"
tests:
@ -1650,6 +1721,7 @@ Release Notes:
- include/zephyr/drivers/retained_mem.h
- tests/drivers/retained_mem/
- doc/hardware/peripherals/retained_mem.rst
- dts/bindings/retained_mem/
labels:
- "area: Retained Memory"
tests:
@ -1658,7 +1730,7 @@ Release Notes:
"Drivers: RTC":
status: maintained
maintainers:
- bjarki-trackunit
- bjarki-andreasen
files:
- drivers/rtc/
- include/zephyr/drivers/rtc/
@ -1666,6 +1738,7 @@ Release Notes:
- doc/hardware/peripherals/rtc.rst
- include/zephyr/drivers/rtc.h
- tests/drivers/build_all/rtc/
- dts/bindings/rtc/
labels:
- "area: RTC"
tests:
@ -1679,6 +1752,7 @@ Release Notes:
- drivers/pcie/
- include/zephyr/drivers/pcie/
- doc/hardware/peripherals/pcie.rst
- dts/bindings/pcie/
labels:
- "area: PCI"
@ -1693,6 +1767,7 @@ Release Notes:
- include/zephyr/drivers/peci.h
- samples/drivers/peci/
- doc/hardware/peripherals/peci.rst
- dts/bindings/peci/
labels:
- "area: PECI"
tests:
@ -1750,6 +1825,7 @@ Release Notes:
- include/zephyr/drivers/pm_cpu_ops/
- include/zephyr/drivers/pm_cpu_ops.h
- include/zephyr/arch/arm64/arm-smccc.h
- dts/bindings/pm_cpu_ops/
labels:
- "area: PM CPU ops"
@ -1828,7 +1904,7 @@ Release Notes:
- dts/bindings/sensor/
- include/zephyr/drivers/sensor/
- include/zephyr/dt-bindings/sensor/
- doc/hardware/peripherals/sensor.rst
- doc/hardware/peripherals/sensor/
- tests/drivers/build_all/sensor/
labels:
- "area: Sensors"
@ -1861,6 +1937,7 @@ Release Notes:
- drivers/spi/
- include/zephyr/drivers/spi.h
- tests/drivers/spi/
- dts/bindings/spi/
- doc/hardware/peripherals/spi.rst
labels:
- "area: SPI"
@ -1876,6 +1953,7 @@ Release Notes:
files:
- drivers/timer/
- include/zephyr/drivers/timer/
- dts/bindings/timer/
labels:
- "area: Timer"
@ -1889,6 +1967,7 @@ Release Notes:
- include/zephyr/drivers/video-controls.h
- doc/hardware/peripherals/video.rst
- tests/drivers/*/video/
- dts/bindings/video/
labels:
- "area: Video"
tests:
@ -1941,6 +2020,7 @@ Release Notes:
- krish2718
files:
- drivers/wifi/
- dts/bindings/wifi/
labels:
- "area: Wi-Fi"
@ -2026,6 +2106,7 @@ Xen Platform:
- arch/arm64/core/xen/
- soc/xen/
- boards/xen/
- dts/bindings/xen/
labels:
- "area: Xen Platform"
@ -2041,6 +2122,7 @@ Filesystems:
- samples/subsys/fs/
- subsys/fs/
- tests/subsys/fs/
- dts/bindings/fs/
labels:
- "area: File System"
tests:
@ -2139,6 +2221,7 @@ IPC:
- subsys/ipc/
- tests/subsys/ipc/
- doc/services/ipc/
- dts/bindings/ipc/
description: >-
Inter-Processor Communication
labels:
@ -2310,16 +2393,16 @@ Memory Management:
tests:
- mem_mgmt
Laird Connectivity platforms:
Ezurio platforms:
status: maintained
maintainers:
- rerickson1
collaborators:
- greg-leach
files:
- boards/lairdconnect/
- boards/ezurio/
labels:
- "platform: Laird Connectivity"
- "platform: Ezurio"
Linker Scripts:
status: maintained
@ -2414,6 +2497,7 @@ Mbed TLS:
- ceolin
collaborators:
- ithinuel
- valeriosetti
files:
- tests/crypto/mbedtls/
- tests/benchmarks/mbedtls/
@ -2461,7 +2545,7 @@ Modbus:
Modem:
status: maintained
maintainers:
- bjarki-trackunit
- bjarki-andreasen
collaborators:
- tomi-font
files:
@ -2570,9 +2654,11 @@ Networking:
files-exclude:
- doc/connectivity/networking/api/gptp.rst
- doc/connectivity/networking/api/ieee802154.rst
- doc/connectivity/networking/api/ptp.rst
- doc/connectivity/networking/api/wifi.rst
- include/zephyr/net/gptp.h
- include/zephyr/net/ieee802154*.h
- include/zephyr/net/ptp.h
- include/zephyr/net/wifi*.h
- include/zephyr/net/buf.h
- include/zephyr/net/dhcpv4*.h
@ -2588,6 +2674,7 @@ Networking:
- subsys/net/lib/coap/
- subsys/net/lib/config/ieee802154*
- subsys/net/lib/lwm2m/
- subsys/net/lib/ptp/
- subsys/net/lib/tls_credentials/
- subsys/net/lib/dhcpv4/
- tests/net/dhcpv4/
@ -2743,6 +2830,20 @@ Networking:
tests:
- net.mqtt_sn
"Networking: PTP":
status: maintained
maintainers:
- awojasinski
files:
- doc/connectivity/networking/api/ptp.rst
- include/zephyr/net/ptp.h
- subsys/net/lib/ptp/
- samples/net/ptp/
labels:
- "area: Networking"
tests:
- sample.net.ptp
"Networking: Native IEEE 802.15.4":
status: maintained
maintainers:
@ -2843,7 +2944,13 @@ Open AMP:
- carlocaione
files:
- lib/open-amp/
- samples/subsys/ipc/openamp/
- samples/subsys/ipc/openamp_rsc_table/
- samples/subsys/ipc/rpmsg_service/
labels:
- "area: Open AMP"
tests:
- sample.ipc.openamp
POSIX API layer:
status: maintained
@ -2908,6 +3015,8 @@ RISCV arch:
- ycsin
files:
- arch/riscv/
- boards/enjoydigital/litex_vexriscv/
- boards/lowrisc/opentitan_earlgrey/
- boards/qemu/riscv*/
- boards/sifive/
- boards/sparkfun/red_v_things_plus/
@ -2965,10 +3074,12 @@ Sensor Subsystem:
- doc/services/sensing/
- subsys/sensing/
- samples/subsys/sensing/
- tests/subsys/sensing/
labels:
- "area: Sensor Subsystem"
tests:
- sample.sensing
- sensing.api
Stats:
status: odd fixes
@ -2985,7 +3096,6 @@ Twister:
collaborators:
- PerMac
- hakehuang
- gopiotr
- golowanow
- gchwier
- LukaszMrugala
@ -3081,11 +3191,13 @@ State machine framework:
- sambhurst
collaborators:
- keith-zephyr
- glenn-andrews
files:
- doc/services/smf/
- include/zephyr/smf.h
- lib/smf/
- tests/lib/smf/
- samples/subsys/smf/
labels:
- "area: State Machine Framework"
tests:
@ -3100,16 +3212,18 @@ ADI Platforms:
- microbuilder
files:
- boards/adi/
- drivers/*/max*
- drivers/*/*max*
- drivers/*/*max*/
- drivers/dac/dac_ltc*
- drivers/ethernet/eth_adin*
- drivers/mdio/mdio_adin*
- drivers/regulator/regulator_adp5360*
- drivers/sensor/adi/
- dts/arm/adi/
- dts/bindings/*/adi,*
- dts/bindings/*/lltc,*
- dts/bindings/*/maxim,*
- soc/adi/
labels:
- "platform: ADI"
@ -3157,6 +3271,8 @@ Synopsys Platforms:
- scripts/west_commands/tests/test_mdb.py
- scripts/west_commands/runners/nsim.py
- cmake/emu/nsim.cmake
- drivers/serial/uart_hostlink.c
- drivers/serial/Kconfig.hostlink
labels:
- "platform: Synopsys"
@ -3218,8 +3334,13 @@ Raspberry Pi Pico Platforms:
labels:
- "platform: Raspberry Pi Pico"
SiLabs Platforms:
status: odd fixes
Silabs Platforms:
status: maintained
maintainers:
- jhedberg
collaborators:
- jerome-pouiller
- asmellby
files:
- soc/silabs/
- boards/silabs/
@ -3227,7 +3348,7 @@ SiLabs Platforms:
- dts/bindings/*/silabs*
- drivers/*/*_gecko*
labels:
- "platform: SiLabs"
- "platform: Silabs"
Intel Platforms (X86):
status: maintained
@ -3322,6 +3443,7 @@ NXP Drivers:
- decsny
- manuargue
- dbaluta
- MarkWangChinese
files:
- drivers/*/*imx*
- drivers/*/*lpc*.c
@ -3453,6 +3575,20 @@ Microchip MEC Platforms:
labels:
- "platform: Microchip MEC"
Microchip RISC-V Platforms:
status: maintained
maintainers:
- fkokosinski
- kgugala
- tgorochowik
files:
- boards/microchip/m2gl025_miv/
- boards/microchip/mpfs_icicle/
- dts/riscv/microchip/
- soc/microchip/miv/
labels:
- "platform: Microchip RISC-V"
Microchip SAM Platforms:
status: maintained
maintainers:
@ -3515,6 +3651,8 @@ Renesas SmartBond Platforms:
- ioannis-karachalios
- andrzej-kaczmarek
- blauret
collaborators:
- ydamigos
files:
- boards/renesas/da14*/
- drivers/*/*smartbond*
@ -3532,6 +3670,10 @@ Renesas RA Platforms:
status: maintained
maintainers:
- soburi
- KhiemNguyenT
collaborators:
- duynguyenxa
- thaoluonguw
files:
- boards/arduino/uno_r4/
- drivers/*/*renesas_ra*
@ -3590,10 +3732,10 @@ STM32 Platforms:
maintainers:
- erwango
collaborators:
- ajarmouni-st
- FRASTM
- gautierg-st
- GeorgeCGV
- marwaiehm-st
files:
- boards/st/
- drivers/*/*stm32*.c
@ -3773,6 +3915,7 @@ RTIO:
- teburd
collaborators:
- yperess
- ubieda
files:
- samples/subsys/rtio/
- include/zephyr/rtio/
@ -3870,6 +4013,7 @@ TF-M Integration:
collaborators:
- Vge0rge
- ithinuel
- valeriosetti
files:
- samples/tfm_integration/
- modules/trusted-firmware-m/
@ -3904,6 +4048,7 @@ TF-M Integration:
files:
- cmake/*/arcmwdt/
- include/zephyr/toolchain/mwdt.h
- include/zephyr/linker/linker-tool-mwdt.h
- lib/libc/arcmwdt/*
labels:
- "area: Toolchains"
@ -3966,7 +4111,6 @@ USB:
- tests/drivers/usb/
- tests/drivers/udc/
- doc/connectivity/usb/
- scripts/generate_usb_vif/
labels:
- "area: USB"
tests:
@ -3988,6 +4132,7 @@ USB-C:
- subsys/usb/usb_c/
- doc/connectivity/usb/pd/
- doc/hardware/peripherals/usbc_vbus.rst
- scripts/generate_usb_vif/
labels:
- "area: USB-C"
tests:
@ -4039,10 +4184,9 @@ VFS:
- filesystem
West:
status: maintained
maintainers:
- mbolivar-ampere
status: odd fixes
collaborators:
- mbolivar-ampere
- carlescufi
- swinslow
files:
@ -4187,7 +4331,7 @@ West:
files:
- modules/cmsis/
labels:
- "area: ARM"
- "area: CMSIS-Core"
"West project: cmsis-dsp":
status: maintained
@ -4304,7 +4448,7 @@ West:
- drivers/misc/ethos_u/
- modules/hal_ethos_u/
labels:
- "area: ARM"
- "platform: ARM"
"West project: hal_gigadevice":
status: maintained
@ -4409,6 +4553,10 @@ West:
collaborators:
- blauret
- andrzej-kaczmarek
- ydamigos
- soburi
- duynguyenxa
- thaoluonguw
files: []
labels:
- "platform: Renesas"
@ -4423,15 +4571,19 @@ West:
- "platform: Raspberry Pi Pico"
"West project: hal_silabs":
status: odd fixes
status: maintained
maintainers:
- jhedberg
collaborators:
- jerome-pouiller
- asmellby
- sateeshkotapati
- yonsch
- mnkp
files:
- modules/Kconfig.silabs
labels:
- "platform: SiLabs"
- "platform: Silabs"
"West project: hal_st":
status: maintained
@ -4448,9 +4600,8 @@ West:
- erwango
collaborators:
- FRASTM
- ABOSTM
- gautierg-st
- Desvauxm-st
- marwaiehm-st
files:
- modules/Kconfig.stm32
labels:
@ -4572,6 +4723,7 @@ West:
- ceolin
collaborators:
- ithinuel
- valeriosetti
files:
- modules/mbedtls/
labels:
@ -4586,7 +4738,7 @@ West:
- nordicjm
files:
- modules/Kconfig.mcuboot
- tests/boot/test_mcuboot/
- tests/boot/
labels:
- "area: MCUBoot"
@ -4870,6 +5022,7 @@ Continuous Integration:
files:
- .github/
- scripts/ci/
- scripts/make_bugs_pickle.py
- .checkpatch.conf
- scripts/gitlint/
- scripts/set_assignees.py
@ -4891,7 +5044,7 @@ Test Framework (Ztest):
- tests/unit/util/
- tests/subsys/testsuite/
- samples/subsys/testsuite/
- doc/develop/test/ztest.rst
- doc/develop/test/
labels:
- "area: Testsuite"
tests:
@ -4933,7 +5086,7 @@ Random:
# This area is to be converted to a subarea
Testing with Renode:
status: maintained
status: odd fixes
collaborators:
- mateusz-holenko
- fkokosinski
@ -4973,6 +5126,6 @@ zbus:
- subsys/llext/
- doc/services/llext/
labels:
- "area: Linkable Loadable Extensions"
- "area: llext"
tests:
- llext

View file

@ -1 +1 @@
0.16.5-1
0.16.8

View file

@ -1,5 +1,5 @@
VERSION_MAJOR = 3
VERSION_MINOR = 6
PATCHLEVEL = 99
VERSION_MINOR = 7
PATCHLEVEL = 0
VERSION_TWEAK = 0
EXTRAVERSION =
EXTRAVERSION = rc3

View file

@ -24,6 +24,7 @@ config ARC
imply XIP
select ARCH_HAS_THREAD_LOCAL_STORAGE
select ARCH_SUPPORTS_ROM_START
select ARCH_HAS_DIRECTED_IPIS
help
ARC architecture
@ -50,6 +51,7 @@ config ARM64
select USE_SWITCH_SUPPORTED
select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD
select BARRIER_OPERATIONS_ARCH
select ARCH_HAS_DIRECTED_IPIS
help
ARM64 (AArch64) architecture
@ -108,13 +110,15 @@ config RISCV
bool
select ARCH_IS_SET
select ARCH_SUPPORTS_COREDUMP
select ARCH_SUPPORTS_ROM_START if !SOC_SERIES_ESP32C3
select ARCH_SUPPORTS_ROM_START if !SOC_FAMILY_ESPRESSIF_ESP32
select ARCH_HAS_CODE_DATA_RELOCATION
select ARCH_HAS_THREAD_LOCAL_STORAGE
select ARCH_HAS_STACKWALK
select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD
select USE_SWITCH_SUPPORTED
select USE_SWITCH
select SCHED_IPI_SUPPORTED if SMP
select ARCH_HAS_DIRECTED_IPIS
select BARRIER_OPERATIONS_BUILTIN
imply XIP
help
@ -129,6 +133,8 @@ config XTENSA
select ARCH_HAS_CODE_DATA_RELOCATION
select ARCH_HAS_TIMING_FUNCTIONS
select ARCH_MEM_DOMAIN_DATA if USERSPACE
select ARCH_HAS_DIRECTED_IPIS
select THREAD_STACK_INFO
help
Xtensa architecture
@ -209,7 +215,7 @@ config SRAM_BASE_ADDRESS
hex "SRAM Base Address"
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))
help
The SRAM base address. The default value comes from from
The SRAM base address. The default value comes from
/chosen/zephyr,sram in devicetree. The user should generally avoid
changing it via menuconfig or in configuration files.
@ -221,6 +227,7 @@ DT_CHOSEN_Z_FLASH := zephyr,flash
config FLASH_SIZE
int "Flash Size in kB"
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0,K) if (XIP && (ARM ||ARM64)) || !ARM
default 0 if !XIP
help
This option specifies the size of the flash in kB. It is normally set by
the board's defconfig file and the user should generally avoid modifying
@ -229,6 +236,7 @@ config FLASH_SIZE
config FLASH_BASE_ADDRESS
hex "Flash Base Address"
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) if (XIP && (ARM || ARM64)) || !ARM
default 0 if !XIP
help
This option specifies the base address of the flash on the board. It is
normally set by the board's defconfig file and the user should generally
@ -398,6 +406,21 @@ config NOCACHE_MEMORY
transfers when cache coherence issues are not optimal or can not
be solved using cache maintenance operations.
config FRAME_POINTER
bool "Compile the kernel with frame pointers"
select OVERRIDE_FRAME_POINTER_DEFAULT
help
Select Y here to gain precise stack traces at the expense of slightly
increased size and decreased speed.
config ARCH_STACKWALK_MAX_FRAMES
int "Max depth for stack walk function"
default 8
depends on ARCH_HAS_STACKWALK
help
Depending on implementation, this can place a hard limit on the depths of the stack
for the stack walk function to examine.
menu "Interrupt Configuration"
config ISR_TABLES_LOCAL_DECLARATION_SUPPORTED
@ -643,6 +666,11 @@ config ARCH_HAS_EXTRA_EXCEPTION_INFO
config ARCH_HAS_GDBSTUB
bool
config ARCH_HAS_STACKWALK
bool
help
This is selected when the architecture implemented the arch_stack_walk() API.
config ARCH_HAS_COHERENCE
bool
help
@ -739,6 +767,13 @@ config ARCH_HAS_RESERVED_PAGE_FRAMES
memory mappings. The architecture will need to implement
arch_reserved_pages_update().
config ARCH_HAS_DIRECTED_IPIS
bool
help
This hidden configuration should be selected by the architecture if
it has an implementation for arch_sched_directed_ipi() which allows
for IPIs to be directed to specific CPUs.
config CPU_HAS_DCACHE
bool
help
@ -774,7 +809,7 @@ config ARCH_MAPS_ALL_RAM
virtual addresses elsewhere, this is limited to only management of the
virtual address space. The kernel's page frame ontology will not consider
this mapping at all; non-kernel pages will be considered free (unless marked
as reserved) and Z_PAGE_FRAME_MAPPED will not be set.
as reserved) and K_MEM_PAGE_FRAME_MAPPED will not be set.
config DCLS
bool "Processor is configured in DCLS mode"

View file

@ -18,6 +18,7 @@ config CPU_ARCEM
config CPU_ARCHS
bool
select ATOMIC_OPERATIONS_BUILTIN
select BARRIER_OPERATIONS_BUILTIN
help
This option signifies the use of an ARC HS CPU

View file

@ -23,7 +23,7 @@
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
#ifdef CONFIG_EXCEPTION_DEBUG
static void dump_arc_esf(const z_arch_esf_t *esf)
static void dump_arc_esf(const struct arch_esf *esf)
{
ARC_EXCEPTION_DUMP(" r0: 0x%" PRIxPTR " r1: 0x%" PRIxPTR " r2: 0x%" PRIxPTR
" r3: 0x%" PRIxPTR "", esf->r0, esf->r1, esf->r2, esf->r3);
@ -42,7 +42,7 @@ static void dump_arc_esf(const z_arch_esf_t *esf)
}
#endif
void z_arc_fatal_error(unsigned int reason, const z_arch_esf_t *esf)
void z_arc_fatal_error(unsigned int reason, const struct arch_esf *esf)
{
#ifdef CONFIG_EXCEPTION_DEBUG
if (esf != NULL) {

View file

@ -346,7 +346,7 @@ static void dump_exception_info(uint32_t vector, uint32_t cause, uint32_t parame
* invokes the user provided routine k_sys_fatal_error_handler() which is
* responsible for implementing the error handling policy.
*/
void _Fault(z_arch_esf_t *esf, uint32_t old_sp)
void _Fault(struct arch_esf *esf, uint32_t old_sp)
{
uint32_t vector, cause, parameter;
uint32_t exc_addr = z_arc_v2_aux_reg_read(_ARC_V2_EFA);

View file

@ -26,7 +26,7 @@ GTEXT(_isr_wrapper)
GTEXT(_isr_demux)
#if defined(CONFIG_PM)
GTEXT(z_pm_save_idle_exit)
GTEXT(pm_system_resume)
#endif
/*
@ -253,7 +253,7 @@ rirq_path:
st 0, [r1, _kernel_offset_to_idle] /* zero idle duration */
PUSHR blink
jl z_pm_save_idle_exit
jl pm_system_resume
POPR blink
_skip_pm_save_idle_exit:

View file

@ -118,7 +118,7 @@ static inline bool _is_enabled_region(uint32_t r_index)
}
/**
* This internal function check if the given buffer in in the region
* This internal function check if the given buffer is in the region
*/
static inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)
{

View file

@ -156,7 +156,7 @@ static inline bool _is_enabled_region(uint32_t r_index)
}
/**
* This internal function check if the given buffer in in the region
* This internal function check if the given buffer is in the region
*/
static inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)
{

View file

@ -13,6 +13,7 @@
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <ksched.h>
#include <ipi.h>
#include <zephyr/init.h>
#include <zephyr/irq.h>
#include <arc_irq_offload.h>
@ -130,19 +131,25 @@ static void sched_ipi_handler(const void *unused)
z_sched_ipi();
}
/* arch implementation of sched_ipi */
void arch_sched_ipi(void)
void arch_sched_directed_ipi(uint32_t cpu_bitmap)
{
uint32_t i;
/* broadcast sched_ipi request to other cores
* if the target is current core, hardware will ignore it
*/
unsigned int i;
unsigned int num_cpus = arch_num_cpus();
/* Send sched_ipi request to other cores
* if the target is current core, hardware will ignore it
*/
for (i = 0U; i < num_cpus; i++) {
if ((cpu_bitmap & BIT(i)) != 0) {
z_arc_connect_ici_generate(i);
}
}
}
void arch_sched_broadcast_ipi(void)
{
arch_sched_directed_ipi(IPI_ALL_CPUS_MASK);
}
int arch_smp_init(void)
@ -188,5 +195,4 @@ int arch_smp_init(void)
return 0;
}
SYS_INIT(arch_smp_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif

View file

@ -36,7 +36,7 @@ extern "C" {
#endif
#ifdef CONFIG_ARC_HAS_SECURE
struct _irq_stack_frame {
struct arch_esf {
#ifdef CONFIG_ARC_HAS_ZOL
uintptr_t lp_end;
uintptr_t lp_start;
@ -72,7 +72,7 @@ struct _irq_stack_frame {
uintptr_t status32;
};
#else
struct _irq_stack_frame {
struct arch_esf {
uintptr_t r0;
uintptr_t r1;
uintptr_t r2;
@ -108,7 +108,7 @@ struct _irq_stack_frame {
};
#endif
typedef struct _irq_stack_frame _isf_t;
typedef struct arch_esf _isf_t;

View file

@ -62,9 +62,7 @@ extern void z_arc_userspace_enter(k_thread_entry_t user_entry, void *p1,
void *p2, void *p3, uint32_t stack, uint32_t size,
struct k_thread *thread);
extern void z_arc_fatal_error(unsigned int reason, const z_arch_esf_t *esf);
extern void arch_sched_ipi(void);
extern void z_arc_fatal_error(unsigned int reason, const struct arch_esf *esf);
extern void z_arc_switch(void *switch_to, void **switched_from);

View file

@ -1,5 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-littlearm)
if(CONFIG_BIG_ENDIAN)
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-bigarm)
else()
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-littlearm)
endif()
add_subdirectory(core)

View file

@ -35,7 +35,7 @@ config ARM_CUSTOM_INTERRUPT_CONTROLLER
assumes responsibility for handling the NVIC.
config ROMSTART_RELOCATION_ROM
bool
bool "Relocate rom_start region"
default n
help
Relocates the rom_start region containing the boot-vector data and
@ -66,7 +66,7 @@ config ROMSTART_RELOCATION_ROM
if ROMSTART_RELOCATION_ROM
config ROMSTART_REGION_ADDRESS
hex
hex "Base address of the rom_start region"
default 0x00000000
help
Start address of the rom_start region.
@ -85,7 +85,7 @@ if ROMSTART_RELOCATION_ROM
$(dt_nodelabel_reg_addr_hex,ocram_s_sys)
config ROMSTART_REGION_SIZE
hex
hex "Size of the rom_start region"
default 1
help
Size of the rom_start region in KB.

View file

@ -60,7 +60,7 @@ config CPU_AARCH32_CORTEX_A
select USE_SWITCH_SUPPORTED
# GDBSTUB has not yet been tested on Cortex M or R SoCs
select ARCH_HAS_GDBSTUB
# GDB on ARM needs the etxra registers
# GDB on ARM needs the extra registers
select EXTRA_EXCEPTION_INFO if GDBSTUB
help
This option signifies the use of a CPU of the Cortex-A family.

View file

@ -131,6 +131,7 @@ config AARCH32_ARMV8_R
bool
select ATOMIC_OPERATIONS_BUILTIN
select SCHED_IPI_SUPPORTED if SMP
select ARCH_HAS_DIRECTED_IPIS
help
This option signifies the use of an ARMv8-R AArch32 processor
implementation.

View file

@ -206,7 +206,7 @@ bool z_arm_fault_undef_instruction_fp(void)
*
* @return Returns true if the fault is fatal
*/
bool z_arm_fault_undef_instruction(z_arch_esf_t *esf)
bool z_arm_fault_undef_instruction(struct arch_esf *esf)
{
#if defined(CONFIG_FPU_SHARING)
/*
@ -243,7 +243,7 @@ bool z_arm_fault_undef_instruction(z_arch_esf_t *esf)
*
* @return Returns true if the fault is fatal
*/
bool z_arm_fault_prefetch(z_arch_esf_t *esf)
bool z_arm_fault_prefetch(struct arch_esf *esf)
{
uint32_t reason = K_ERR_CPU_EXCEPTION;
@ -299,7 +299,7 @@ static const struct z_exc_handle exceptions[] = {
*
* @return true if error is recoverable, otherwise return false.
*/
static bool memory_fault_recoverable(z_arch_esf_t *esf)
static bool memory_fault_recoverable(struct arch_esf *esf)
{
for (int i = 0; i < ARRAY_SIZE(exceptions); i++) {
/* Mask out instruction mode */
@ -321,7 +321,7 @@ static bool memory_fault_recoverable(z_arch_esf_t *esf)
*
* @return Returns true if the fault is fatal
*/
bool z_arm_fault_data(z_arch_esf_t *esf)
bool z_arm_fault_data(struct arch_esf *esf)
{
uint32_t reason = K_ERR_CPU_EXCEPTION;

View file

@ -71,7 +71,7 @@ void z_arm_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
}
#endif /* !CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER */
void z_arm_fatal_error(unsigned int reason, const z_arch_esf_t *esf);
void z_arm_fatal_error(unsigned int reason, const struct arch_esf *esf);
/**
*

View file

@ -156,7 +156,7 @@ _vfp_not_enabled:
* idle, this ensures that the calculation and programming of the
* device for the next timer deadline is not interrupted. For
* non-tickless idle, this ensures that the clearing of the kernel idle
* state is not interrupted. In each case, z_pm_save_idle_exit
* state is not interrupted. In each case, pm_system_resume
* is called with interrupts disabled.
*/
@ -170,7 +170,7 @@ _vfp_not_enabled:
movs r1, #0
/* clear kernel idle state */
str r1, [r2, #_kernel_offset_to_idle]
bl z_pm_save_idle_exit
bl pm_system_resume
_idle_state_cleared:
#endif /* CONFIG_PM */
@ -189,7 +189,7 @@ _idle_state_cleared:
*
* Note that interrupts are disabled up to this point on the ARM
* architecture variants other than the Cortex-M. It is also important
* to note that that most interrupt controllers require that the nested
* to note that most interrupt controllers require that the nested
* interrupts are handled after the active interrupt is acknowledged;
* this is be done through the `get_active` interrupt controller
* interface function.
@ -269,7 +269,7 @@ SECTION_FUNC(TEXT, _isr_wrapper)
* idle, this ensures that the calculation and programming of the
* device for the next timer deadline is not interrupted. For
* non-tickless idle, this ensures that the clearing of the kernel idle
* state is not interrupted. In each case, z_pm_save_idle_exit
* state is not interrupted. In each case, pm_system_resume
* is called with interrupts disabled.
*/
@ -283,7 +283,7 @@ SECTION_FUNC(TEXT, _isr_wrapper)
movs r1, #0
/* clear kernel idle state */
str r1, [r2, #_kernel_offset_to_idle]
bl z_pm_save_idle_exit
bl pm_system_resume
_idle_state_cleared:
#endif /* CONFIG_PM */

View file

@ -7,6 +7,7 @@
#include <zephyr/kernel.h>
#include <zephyr/arch/arm/cortex_a_r/lib_helpers.h>
#include <zephyr/drivers/interrupt_controller/gic.h>
#include <ipi.h>
#include "boot.h"
#include "zephyr/cache.h"
#include "zephyr/kernel/thread_stack.h"
@ -210,7 +211,7 @@ void arch_secondary_cpu_init(void)
#ifdef CONFIG_SMP
static void broadcast_ipi(unsigned int ipi)
static void send_ipi(unsigned int ipi, uint32_t cpu_bitmap)
{
uint32_t mpidr = MPIDR_TO_CORE(GET_MPIDR());
@ -220,6 +221,10 @@ static void broadcast_ipi(unsigned int ipi)
unsigned int num_cpus = arch_num_cpus();
for (int i = 0; i < num_cpus; i++) {
if ((cpu_bitmap & BIT(i)) == 0) {
continue;
}
uint32_t target_mpidr = cpu_map[i];
uint8_t aff0;
@ -239,10 +244,14 @@ void sched_ipi_handler(const void *unused)
z_sched_ipi();
}
/* arch implementation of sched_ipi */
void arch_sched_ipi(void)
void arch_sched_broadcast_ipi(void)
{
broadcast_ipi(SGI_SCHED_IPI);
send_ipi(SGI_SCHED_IPI, IPI_ALL_CPUS_MASK);
}
void arch_sched_directed_ipi(uint32_t cpu_bitmap)
{
send_ipi(SGI_SCHED_IPI, cpu_bitmap);
}
int arch_smp_init(void)
@ -259,6 +268,4 @@ int arch_smp_init(void)
return 0;
}
SYS_INIT(arch_smp_init, PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif

View file

@ -95,6 +95,10 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
iframe->a4 = (uint32_t)p3;
iframe->xpsr = A_BIT | MODE_SYS;
#if defined(CONFIG_BIG_ENDIAN)
iframe->xpsr |= E_BIT;
#endif /* CONFIG_BIG_ENDIAN */
#if defined(CONFIG_COMPILER_ISA_THUMB2)
iframe->xpsr |= T_BIT;
#endif /* CONFIG_COMPILER_ISA_THUMB2 */

View file

@ -73,6 +73,17 @@ config CPU_CORTEX_M55
help
This option signifies the use of a Cortex-M55 CPU
config CPU_CORTEX_M85
bool
select CPU_CORTEX_M
select ARMV8_1_M_MAINLINE
select ARMV8_M_SE if CPU_HAS_TEE
select ARMV7_M_ARMV8_M_FP if CPU_HAS_FPU
select CPU_HAS_DCACHE
select CPU_HAS_ICACHE
help
This option signifies the use of a Cortex-M85 CPU
config CPU_CORTEX_M7
bool
select CPU_CORTEX_M

View file

@ -41,7 +41,7 @@ struct arm_arch_block {
*/
static struct arm_arch_block arch_blk;
void arch_coredump_info_dump(const z_arch_esf_t *esf)
void arch_coredump_info_dump(const struct arch_esf *esf)
{
struct coredump_arch_hdr_t hdr = {
.id = COREDUMP_ARCH_HDR_ID,

View file

@ -146,7 +146,7 @@ LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
*/
#if (CONFIG_FAULT_DUMP == 1)
static void fault_show(const z_arch_esf_t *esf, int fault)
static void fault_show(const struct arch_esf *esf, int fault)
{
PR_EXC("Fault! EXC #%d", fault);
@ -165,7 +165,7 @@ static void fault_show(const z_arch_esf_t *esf, int fault)
*
* For Dump level 0, no information needs to be generated.
*/
static void fault_show(const z_arch_esf_t *esf, int fault)
static void fault_show(const struct arch_esf *esf, int fault)
{
(void)esf;
(void)fault;
@ -185,7 +185,7 @@ static const struct z_exc_handle exceptions[] = {
*
* @return true if error is recoverable, otherwise return false.
*/
static bool memory_fault_recoverable(z_arch_esf_t *esf, bool synchronous)
static bool memory_fault_recoverable(struct arch_esf *esf, bool synchronous)
{
#ifdef CONFIG_USERSPACE
for (int i = 0; i < ARRAY_SIZE(exceptions); i++) {
@ -228,7 +228,7 @@ uint32_t z_check_thread_stack_fail(const uint32_t fault_addr,
*
* @return error code to identify the fatal error reason
*/
static uint32_t mem_manage_fault(z_arch_esf_t *esf, int from_hard_fault,
static uint32_t mem_manage_fault(struct arch_esf *esf, int from_hard_fault,
bool *recoverable)
{
uint32_t reason = K_ERR_ARM_MEM_GENERIC;
@ -387,7 +387,7 @@ static uint32_t mem_manage_fault(z_arch_esf_t *esf, int from_hard_fault,
* @return error code to identify the fatal error reason.
*
*/
static int bus_fault(z_arch_esf_t *esf, int from_hard_fault, bool *recoverable)
static int bus_fault(struct arch_esf *esf, int from_hard_fault, bool *recoverable)
{
uint32_t reason = K_ERR_ARM_BUS_GENERIC;
@ -549,7 +549,7 @@ static int bus_fault(z_arch_esf_t *esf, int from_hard_fault, bool *recoverable)
*
* @return error code to identify the fatal error reason
*/
static uint32_t usage_fault(const z_arch_esf_t *esf)
static uint32_t usage_fault(const struct arch_esf *esf)
{
uint32_t reason = K_ERR_ARM_USAGE_GENERIC;
@ -612,7 +612,7 @@ static uint32_t usage_fault(const z_arch_esf_t *esf)
*
* @return error code to identify the fatal error reason
*/
static uint32_t secure_fault(const z_arch_esf_t *esf)
static uint32_t secure_fault(const struct arch_esf *esf)
{
uint32_t reason = K_ERR_ARM_SECURE_GENERIC;
@ -661,7 +661,7 @@ static uint32_t secure_fault(const z_arch_esf_t *esf)
* See z_arm_fault_dump() for example.
*
*/
static void debug_monitor(z_arch_esf_t *esf, bool *recoverable)
static void debug_monitor(struct arch_esf *esf, bool *recoverable)
{
*recoverable = false;
@ -687,7 +687,7 @@ static void debug_monitor(z_arch_esf_t *esf, bool *recoverable)
#error Unknown ARM architecture
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
static inline bool z_arm_is_synchronous_svc(z_arch_esf_t *esf)
static inline bool z_arm_is_synchronous_svc(struct arch_esf *esf)
{
uint16_t *ret_addr = (uint16_t *)esf->basic.pc;
/* SVC is a 16-bit instruction. On a synchronous SVC
@ -762,7 +762,7 @@ static inline bool z_arm_is_pc_valid(uintptr_t pc)
*
* @return error code to identify the fatal error reason
*/
static uint32_t hard_fault(z_arch_esf_t *esf, bool *recoverable)
static uint32_t hard_fault(struct arch_esf *esf, bool *recoverable)
{
uint32_t reason = K_ERR_CPU_EXCEPTION;
@ -829,7 +829,7 @@ static uint32_t hard_fault(z_arch_esf_t *esf, bool *recoverable)
* See z_arm_fault_dump() for example.
*
*/
static void reserved_exception(const z_arch_esf_t *esf, int fault)
static void reserved_exception(const struct arch_esf *esf, int fault)
{
ARG_UNUSED(esf);
@ -839,7 +839,7 @@ static void reserved_exception(const z_arch_esf_t *esf, int fault)
}
/* Handler function for ARM fault conditions. */
static uint32_t fault_handle(z_arch_esf_t *esf, int fault, bool *recoverable)
static uint32_t fault_handle(struct arch_esf *esf, int fault, bool *recoverable)
{
uint32_t reason = K_ERR_CPU_EXCEPTION;
@ -893,7 +893,7 @@ static uint32_t fault_handle(z_arch_esf_t *esf, int fault, bool *recoverable)
*
* @param secure_esf Pointer to the secure stack frame.
*/
static void secure_stack_dump(const z_arch_esf_t *secure_esf)
static void secure_stack_dump(const struct arch_esf *secure_esf)
{
/*
* In case a Non-Secure exception interrupted the Secure
@ -918,7 +918,7 @@ static void secure_stack_dump(const z_arch_esf_t *secure_esf)
* Non-Secure exception entry.
*/
top_of_sec_stack += ADDITIONAL_STATE_CONTEXT_WORDS;
secure_esf = (const z_arch_esf_t *)top_of_sec_stack;
secure_esf = (const struct arch_esf *)top_of_sec_stack;
sec_ret_addr = secure_esf->basic.pc;
} else {
/* Exception during Non-Secure function call.
@ -947,11 +947,11 @@ static void secure_stack_dump(const z_arch_esf_t *secure_esf)
*
* @return ESF pointer on success, otherwise return NULL
*/
static inline z_arch_esf_t *get_esf(uint32_t msp, uint32_t psp, uint32_t exc_return,
static inline struct arch_esf *get_esf(uint32_t msp, uint32_t psp, uint32_t exc_return,
bool *nested_exc)
{
bool alternative_state_exc = false;
z_arch_esf_t *ptr_esf = NULL;
struct arch_esf *ptr_esf = NULL;
*nested_exc = false;
@ -979,14 +979,14 @@ static inline z_arch_esf_t *get_esf(uint32_t msp, uint32_t psp, uint32_t exc_ret
alternative_state_exc = true;
/* Dump the Secure stack before handling the actual fault. */
z_arch_esf_t *secure_esf;
struct arch_esf *secure_esf;
if (exc_return & EXC_RETURN_SPSEL_PROCESS) {
/* Secure stack pointed by PSP */
secure_esf = (z_arch_esf_t *)psp;
secure_esf = (struct arch_esf *)psp;
} else {
/* Secure stack pointed by MSP */
secure_esf = (z_arch_esf_t *)msp;
secure_esf = (struct arch_esf *)msp;
*nested_exc = true;
}
@ -997,9 +997,9 @@ static inline z_arch_esf_t *get_esf(uint32_t msp, uint32_t psp, uint32_t exc_ret
* and supply it to the fault handing function.
*/
if (exc_return & EXC_RETURN_MODE_THREAD) {
ptr_esf = (z_arch_esf_t *)__TZ_get_PSP_NS();
ptr_esf = (struct arch_esf *)__TZ_get_PSP_NS();
} else {
ptr_esf = (z_arch_esf_t *)__TZ_get_MSP_NS();
ptr_esf = (struct arch_esf *)__TZ_get_MSP_NS();
}
}
#elif defined(CONFIG_ARM_NONSECURE_FIRMWARE)
@ -1024,10 +1024,10 @@ static inline z_arch_esf_t *get_esf(uint32_t msp, uint32_t psp, uint32_t exc_ret
if (exc_return & EXC_RETURN_SPSEL_PROCESS) {
/* Non-Secure stack frame on PSP */
ptr_esf = (z_arch_esf_t *)psp;
ptr_esf = (struct arch_esf *)psp;
} else {
/* Non-Secure stack frame on MSP */
ptr_esf = (z_arch_esf_t *)msp;
ptr_esf = (struct arch_esf *)msp;
}
} else {
/* Exception entry occurred in Non-Secure stack. */
@ -1046,11 +1046,11 @@ static inline z_arch_esf_t *get_esf(uint32_t msp, uint32_t psp, uint32_t exc_ret
if (!alternative_state_exc) {
if (exc_return & EXC_RETURN_MODE_THREAD) {
/* Returning to thread mode */
ptr_esf = (z_arch_esf_t *)psp;
ptr_esf = (struct arch_esf *)psp;
} else {
/* Returning to handler mode */
ptr_esf = (z_arch_esf_t *)msp;
ptr_esf = (struct arch_esf *)msp;
*nested_exc = true;
}
}
@ -1095,12 +1095,12 @@ void z_arm_fault(uint32_t msp, uint32_t psp, uint32_t exc_return,
uint32_t reason = K_ERR_CPU_EXCEPTION;
int fault = SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk;
bool recoverable, nested_exc;
z_arch_esf_t *esf;
struct arch_esf *esf;
/* Create a stack-ed copy of the ESF to be used during
* the fault handling process.
*/
z_arch_esf_t esf_copy;
struct arch_esf esf_copy;
/* Force unlock interrupts */
arch_irq_unlock(0);
@ -1123,13 +1123,13 @@ void z_arm_fault(uint32_t msp, uint32_t psp, uint32_t exc_return,
/* Copy ESF */
#if !defined(CONFIG_EXTRA_EXCEPTION_INFO)
memcpy(&esf_copy, esf, sizeof(z_arch_esf_t));
memcpy(&esf_copy, esf, sizeof(struct arch_esf));
ARG_UNUSED(callee_regs);
#else
/* the extra exception info is not present in the original esf
* so we only copy the fields before those.
*/
memcpy(&esf_copy, esf, offsetof(z_arch_esf_t, extra_info));
memcpy(&esf_copy, esf, offsetof(struct arch_esf, extra_info));
esf_copy.extra_info = (struct __extra_esf_info) {
.callee = callee_regs,
.exc_return = exc_return,

View file

@ -94,7 +94,7 @@ void z_arm_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
#endif /* !defined(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER) */
void z_arm_fatal_error(unsigned int reason, const z_arch_esf_t *esf);
void z_arm_fatal_error(unsigned int reason, const struct arch_esf *esf);
/**
*
@ -122,7 +122,7 @@ void _arch_isr_direct_pm(void)
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* Lock all interrupts. irq_lock() will on this CPU only disable those
* lower than BASEPRI, which is not what we want. See comments in
* arch/arm/core/isr_wrapper.S
* arch/arm/core/cortex_m/isr_wrapper.c
*/
__asm__ volatile("cpsid i" : : : "memory");
#else

View file

@ -97,8 +97,12 @@ uintptr_t z_arm_pendsv_c(uintptr_t exc_ret)
/* restore mode */
IF_ENABLED(CONFIG_USERSPACE, ({
CONTROL_Type ctrl = {.w = __get_CONTROL()};
/* exit privileged state when returing to thread mode. */
/* exit privileged state when returning to thread mode. */
ctrl.b.nPRIV = 0;
/* __set_CONTROL inserts an ISB which is may not be necessary here
* (stack pointer may not be touched), but it's recommended to avoid
* executing pre-fetched instructions with the previous privilege.
*/
__set_CONTROL(ctrl.w | current->arch.mode);
}));

View file

@ -588,7 +588,7 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
"bx r4\n" /* We dont intend to return, so there is no need to link. */
: "+r" (_main)
: "r" (stack_ptr)
: "r0", "r1", "r2", "r3", "r4");
: "r0", "r1", "r2", "r3", "r4", "ip", "lr");
CODE_UNREACHABLE;
}
@ -659,7 +659,7 @@ FUNC_NORETURN void z_arm_switch_to_main_no_multithreading(
#ifdef CONFIG_BUILTIN_STACK_GUARD
, [_psplim]"r" (psplim)
#endif
: "r0", "r1", "r2", "r3"
: "r0", "r1", "r2", "ip", "lr"
);
CODE_UNREACHABLE; /* LCOV_EXCL_LINE */

View file

@ -18,7 +18,7 @@
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
#ifdef CONFIG_EXCEPTION_DEBUG
static void esf_dump(const z_arch_esf_t *esf)
static void esf_dump(const struct arch_esf *esf)
{
LOG_ERR("r0/a1: 0x%08x r1/a2: 0x%08x r2/a3: 0x%08x",
esf->basic.a1, esf->basic.a2, esf->basic.a3);
@ -66,7 +66,7 @@ static void esf_dump(const z_arch_esf_t *esf)
}
#endif /* CONFIG_EXCEPTION_DEBUG */
void z_arm_fatal_error(unsigned int reason, const z_arch_esf_t *esf)
void z_arm_fatal_error(unsigned int reason, const struct arch_esf *esf)
{
#ifdef CONFIG_EXCEPTION_DEBUG
if (esf != NULL) {
@ -102,7 +102,7 @@ void z_arm_fatal_error(unsigned int reason, const z_arch_esf_t *esf)
* @param esf exception frame
* @param callee_regs Callee-saved registers (R4-R11)
*/
void z_do_kernel_oops(const z_arch_esf_t *esf, _callee_saved_t *callee_regs)
void z_do_kernel_oops(const struct arch_esf *esf, _callee_saved_t *callee_regs)
{
#if !(defined(CONFIG_EXTRA_EXCEPTION_INFO) && defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE))
ARG_UNUSED(callee_regs);
@ -130,9 +130,9 @@ void z_do_kernel_oops(const z_arch_esf_t *esf, _callee_saved_t *callee_regs)
#if !defined(CONFIG_EXTRA_EXCEPTION_INFO)
z_arm_fatal_error(reason, esf);
#else
z_arch_esf_t esf_copy;
struct arch_esf esf_copy;
memcpy(&esf_copy, esf, offsetof(z_arch_esf_t, extra_info));
memcpy(&esf_copy, esf, offsetof(struct arch_esf, extra_info));
#if defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* extra exception info is collected in callee_reg param
* on CONFIG_ARMV7_M_ARMV8_M_MAINLINE
@ -156,7 +156,7 @@ void z_do_kernel_oops(const z_arch_esf_t *esf, _callee_saved_t *callee_regs)
FUNC_NORETURN void arch_syscall_oops(void *ssf_ptr)
{
uint32_t *ssf_contents = ssf_ptr;
z_arch_esf_t oops_esf = { 0 };
struct arch_esf oops_esf = { 0 };
/* TODO: Copy the rest of the register set out of ssf_ptr */
oops_esf.basic.pc = ssf_contents[3];

View file

@ -42,7 +42,7 @@ static int is_bkpt(unsigned int exc_cause)
}
/* Wrapper function to save and restore execution c */
void z_gdb_entry(z_arch_esf_t *esf, unsigned int exc_cause)
void z_gdb_entry(struct arch_esf *esf, unsigned int exc_cause)
{
/* Disable the hardware breakpoint in case it was set */
__asm__ volatile("mcr p14, 0, %0, c0, c0, 5" ::"r"(0x0) :);

View file

@ -54,6 +54,7 @@ static uint8_t static_regions_num;
#elif defined(CONFIG_CPU_CORTEX_M23) || \
defined(CONFIG_CPU_CORTEX_M33) || \
defined(CONFIG_CPU_CORTEX_M55) || \
defined(CONFIG_CPU_CORTEX_M85) || \
defined(CONFIG_AARCH32_ARMV8_R)
#include "arm_mpu_v8_internal.h"
#else
@ -130,12 +131,10 @@ static int mpu_configure_regions_from_dt(uint8_t *reg_index)
break;
#endif
default:
/* Either the specified `ATTR_MPU_*` attribute does not
* exists or the `REGION_*_ATTR` macro is not defined
* for that attribute.
/* Attribute other than ARM-specific is set.
* This region should not be configured in MPU.
*/
LOG_ERR("Invalid attribute for the region\n");
return -EINVAL;
continue;
}
#if defined(CONFIG_ARMV7_R)
region_conf.size = size_to_mpu_rasr_size(region[idx].dt_size);

View file

@ -31,7 +31,7 @@ struct dynamic_region_info {
*/
static struct dynamic_region_info dyn_reg_info[MPU_DYNAMIC_REGION_AREAS_NUM];
#if defined(CONFIG_CPU_CORTEX_M23) || defined(CONFIG_CPU_CORTEX_M33) || \
defined(CONFIG_CPU_CORTEX_M55)
defined(CONFIG_CPU_CORTEX_M55) || defined(CONFIG_CPU_CORTEX_M85)
static inline void mpu_set_mair0(uint32_t mair0)
{
MPU->MAIR0 = mair0;

View file

@ -38,7 +38,7 @@ static ALWAYS_INLINE bool arch_is_in_isr(void)
return (arch_curr_cpu()->nested != 0U);
}
static ALWAYS_INLINE bool arch_is_in_nested_exception(const z_arch_esf_t *esf)
static ALWAYS_INLINE bool arch_is_in_nested_exception(const struct arch_esf *esf)
{
return (arch_curr_cpu()->arch.exc_depth > 1U) ? (true) : (false);
}
@ -48,7 +48,7 @@ static ALWAYS_INLINE bool arch_is_in_nested_exception(const z_arch_esf_t *esf)
* This function is used by privileged code to determine if the thread
* associated with the stack frame is in user mode.
*/
static ALWAYS_INLINE bool z_arm_preempted_thread_in_user_mode(const z_arch_esf_t *esf)
static ALWAYS_INLINE bool z_arm_preempted_thread_in_user_mode(const struct arch_esf *esf)
{
return ((esf->basic.xpsr & CPSR_M_Msk) == CPSR_M_USR);
}

View file

@ -59,7 +59,7 @@ extern FUNC_NORETURN void z_arm_userspace_enter(k_thread_entry_t user_entry,
uint32_t stack_end,
uint32_t stack_start);
extern void z_arm_fatal_error(unsigned int reason, const z_arch_esf_t *esf);
extern void z_arm_fatal_error(unsigned int reason, const struct arch_esf *esf);
#endif /* _ASMLANGUAGE */

View file

@ -68,7 +68,7 @@ static ALWAYS_INLINE bool arch_is_in_isr(void)
* @return true if execution state was in handler mode, before
* the current exception occurred, otherwise false.
*/
static ALWAYS_INLINE bool arch_is_in_nested_exception(const z_arch_esf_t *esf)
static ALWAYS_INLINE bool arch_is_in_nested_exception(const struct arch_esf *esf)
{
return (esf->basic.xpsr & IPSR_ISR_Msk) ? (true) : (false);
}
@ -80,7 +80,7 @@ static ALWAYS_INLINE bool arch_is_in_nested_exception(const z_arch_esf_t *esf)
* @param esf the exception stack frame (unused)
* @return true if the current thread was in unprivileged mode
*/
static ALWAYS_INLINE bool z_arm_preempted_thread_in_user_mode(const z_arch_esf_t *esf)
static ALWAYS_INLINE bool z_arm_preempted_thread_in_user_mode(const struct arch_esf *esf)
{
return z_arm_thread_is_in_user_mode();
}

View file

@ -76,7 +76,7 @@ extern FUNC_NORETURN void z_arm_userspace_enter(k_thread_entry_t user_entry,
uint32_t stack_end,
uint32_t stack_start);
extern void z_arm_fatal_error(unsigned int reason, const z_arch_esf_t *esf);
extern void z_arm_fatal_error(unsigned int reason, const struct arch_esf *esf);
#endif /* _ASMLANGUAGE */

View file

@ -42,7 +42,7 @@
extern "C" {
#endif
typedef struct __esf _esf_t;
typedef struct arch_esf _esf_t;
typedef struct __basic_sf _basic_sf_t;
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
typedef struct __fpu_sf _fpu_sf_t;

View file

@ -4,6 +4,7 @@ zephyr_library()
zephyr_library_sources(
cpu_idle.S
early_mem_funcs.S
fatal.c
irq_init.c
irq_manage.c
@ -43,7 +44,7 @@ if ((CONFIG_MP_MAX_NUM_CPUS GREATER 1) OR (CONFIG_SMP))
endif ()
zephyr_cc_option_ifdef(CONFIG_USERSPACE -mno-outline-atomics)
zephyr_cc_option_ifdef(CONFIG_ARM64_ENABLE_FRAME_POINTER -mno-omit-leaf-frame-pointer)
zephyr_cc_option_ifdef(CONFIG_FRAME_POINTER -mno-omit-leaf-frame-pointer)
# GCC may generate ldp/stp instructions with the Advanced SIMD Qn registers for
# consecutive 32-byte loads and stores. Saving and restoring the Advanced SIMD

View file

@ -145,13 +145,22 @@ config ARM64_SAFE_EXCEPTION_STACK
config ARM64_ENABLE_FRAME_POINTER
bool
default y
depends on OVERRIDE_FRAME_POINTER_DEFAULT && !OMIT_FRAME_POINTER
depends on !FRAME_POINTER
select DEPRECATED
help
Deprecated. Use CONFIG_FRAME_POINTER instead.
Hidden option to simplify access to OVERRIDE_FRAME_POINTER_DEFAULT
and OMIT_FRAME_POINTER. It is automatically enabled when the frame
pointer unwinding is enabled.
config ARM64_EXCEPTION_STACK_TRACE
bool
default y
depends on FRAME_POINTER
help
Internal config to enable runtime stack traces on fatal exceptions.
config ARM64_SAFE_EXCEPTION_STACK_SIZE
int "The stack size of the safe exception stack"
default 4096

View file

@ -13,7 +13,7 @@
#define ARCH_HDR_VER 1
/* Structure to store the architecture registers passed arch_coredump_info_dump
* As callee saved registers are not provided in z_arch_esf_t structure in Zephyr
* As callee saved registers are not provided in struct arch_esf structure in Zephyr
* we just need 22 registers.
*/
struct arm64_arch_block {
@ -50,7 +50,7 @@ struct arm64_arch_block {
*/
static struct arm64_arch_block arch_blk;
void arch_coredump_info_dump(const z_arch_esf_t *esf)
void arch_coredump_info_dump(const struct arch_esf *esf)
{
/* Target architecture information header */
/* Information just relevant to the python parser */
@ -69,7 +69,7 @@ void arch_coredump_info_dump(const z_arch_esf_t *esf)
/*
* Copies the thread registers to a memory block that will be printed out
* The thread registers are already provided by structure z_arch_esf_t
* The thread registers are already provided by structure struct arch_esf
*/
arch_blk.r.x0 = esf->x0;
arch_blk.r.x1 = esf->x1;

View file

@ -0,0 +1,83 @@
/*
* Copyright (c) BayLibre SAS
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
_ASM_FILE_PROLOGUE
/*
* These simple memset and memcpy alternatives are necessary as the optimized
* ones depend on the MMU to be active (see commit c5b898743a20).
*
* Furthermore, we can't implement those in C as the compiler is just too
* smart for its own good and replaces our simple loops into direct calls
* to memset or memcpy on its own.
*/
/* void z_early_memset(void *dst, int c, size_t n) */
GTEXT(z_early_memset)
SECTION_FUNC(TEXT, z_early_memset)
/* is dst pointer 8-bytes aligned? */
tst x0, #0x7
b.ne 2f
/* at least 8 bytes to set? */
cmp x2, #8
b.lo 2f
/* spread the byte value across whole 64 bits */
and x8, x1, #0xff
mov x9, #0x0101010101010101
mul x8, x8, x9
1: /* 8 bytes at a time */
sub x2, x2, #8
cmp x2, #7
str x8, [x0], #8
b.hi 1b
2: /* at least one byte to set? */
cbz x2, 4f
3: /* one byte at a time */
subs x2, x2, #1
strb w8, [x0], #1
b.ne 3b
4: ret
/* void z_early_memcpy(void *dst, const void *src, size_t n) */
GTEXT(z_early_memcpy)
SECTION_FUNC(TEXT, z_early_memcpy)
/* are dst and src pointers 8-bytes aligned? */
orr x8, x1, x0
tst x8, #0x7
b.ne 2f
/* at least 8 bytes to copy? */
cmp x2, #8
b.lo 2f
1: /* 8 bytes at a time */
ldr x8, [x1], #8
sub x2, x2, #8
cmp x2, #7
str x8, [x0], #8
b.hi 1b
2: /* at least one byte to copy? */
cbz x2, 4f
3: /* one byte at a time */
ldrb w8, [x1], #1
subs x2, x2, #1
strb w8, [x0], #1
b.ne 3b
4: ret

View file

@ -181,7 +181,7 @@ static void dump_esr(uint64_t esr, bool *dump_far)
LOG_ERR(" ISS: 0x%llx", GET_ESR_ISS(esr));
}
static void esf_dump(const z_arch_esf_t *esf)
static void esf_dump(const struct arch_esf *esf)
{
LOG_ERR("x0: 0x%016llx x1: 0x%016llx", esf->x0, esf->x1);
LOG_ERR("x2: 0x%016llx x3: 0x%016llx", esf->x2, esf->x3);
@ -195,8 +195,8 @@ static void esf_dump(const z_arch_esf_t *esf)
LOG_ERR("x18: 0x%016llx lr: 0x%016llx", esf->x18, esf->lr);
}
#ifdef CONFIG_ARM64_ENABLE_FRAME_POINTER
static void esf_unwind(const z_arch_esf_t *esf)
#ifdef CONFIG_EXCEPTION_STACK_TRACE
static void esf_unwind(const struct arch_esf *esf)
{
/*
* For GCC:
@ -223,7 +223,7 @@ static void esf_unwind(const z_arch_esf_t *esf)
uint64_t lr;
LOG_ERR("");
while (fp != NULL) {
for (int i = 0; (fp != NULL) && (i < CONFIG_EXCEPTION_STACK_TRACE_MAX_FRAMES); i++) {
lr = fp[1];
#ifdef CONFIG_SYMTAB
uint32_t offset = 0;
@ -244,7 +244,7 @@ static void esf_unwind(const z_arch_esf_t *esf)
#endif /* CONFIG_EXCEPTION_DEBUG */
#ifdef CONFIG_ARM64_STACK_PROTECTION
static bool z_arm64_stack_corruption_check(z_arch_esf_t *esf, uint64_t esr, uint64_t far)
static bool z_arm64_stack_corruption_check(struct arch_esf *esf, uint64_t esr, uint64_t far)
{
uint64_t sp, sp_limit, guard_start;
/* 0x25 means data abort from current EL */
@ -284,7 +284,7 @@ static bool z_arm64_stack_corruption_check(z_arch_esf_t *esf, uint64_t esr, uint
}
#endif
static bool is_recoverable(z_arch_esf_t *esf, uint64_t esr, uint64_t far,
static bool is_recoverable(struct arch_esf *esf, uint64_t esr, uint64_t far,
uint64_t elr)
{
if (!esf)
@ -306,7 +306,7 @@ static bool is_recoverable(z_arch_esf_t *esf, uint64_t esr, uint64_t far,
return false;
}
void z_arm64_fatal_error(unsigned int reason, z_arch_esf_t *esf)
void z_arm64_fatal_error(unsigned int reason, struct arch_esf *esf)
{
uint64_t esr = 0;
uint64_t elr = 0;
@ -363,9 +363,9 @@ void z_arm64_fatal_error(unsigned int reason, z_arch_esf_t *esf)
esf_dump(esf);
}
#ifdef CONFIG_ARM64_ENABLE_FRAME_POINTER
#ifdef CONFIG_EXCEPTION_STACK_TRACE
esf_unwind(esf);
#endif /* CONFIG_ARM64_ENABLE_FRAME_POINTER */
#endif /* CONFIG_EXCEPTION_STACK_TRACE */
#endif /* CONFIG_EXCEPTION_DEBUG */
z_fatal_error(reason, esf);
@ -379,7 +379,7 @@ void z_arm64_fatal_error(unsigned int reason, z_arch_esf_t *esf)
*
* @param esf exception frame
*/
void z_arm64_do_kernel_oops(z_arch_esf_t *esf)
void z_arm64_do_kernel_oops(struct arch_esf *esf)
{
/* x8 holds the exception reason */
unsigned int reason = esf->x8;

View file

@ -159,7 +159,7 @@ void z_arm64_fpu_enter_exc(void)
* simulate them and leave the FPU access disabled. This also avoids the
* need for disabling interrupts in syscalls and IRQ handlers as well.
*/
static bool simulate_str_q_insn(z_arch_esf_t *esf)
static bool simulate_str_q_insn(struct arch_esf *esf)
{
/*
* Support only the "FP in exception" cases for now.
@ -221,7 +221,7 @@ static bool simulate_str_q_insn(z_arch_esf_t *esf)
* don't get interrupted that is. To ensure that we mask interrupts to
* the triggering exception context.
*/
void z_arm64_fpu_trap(z_arch_esf_t *esf)
void z_arm64_fpu_trap(struct arch_esf *esf)
{
__ASSERT(read_daif() & DAIF_IRQ_BIT, "must be called with IRQs disabled");

View file

@ -18,7 +18,7 @@
#include <zephyr/sw_isr_table.h>
#include <zephyr/drivers/interrupt_controller/gic.h>
void z_arm64_fatal_error(unsigned int reason, z_arch_esf_t *esf);
void z_arm64_fatal_error(unsigned int reason, struct arch_esf *esf);
#if !defined(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER)
/*

View file

@ -28,9 +28,13 @@ LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
static uint64_t xlat_tables[CONFIG_MAX_XLAT_TABLES * Ln_XLAT_NUM_ENTRIES]
__aligned(Ln_XLAT_NUM_ENTRIES * sizeof(uint64_t));
static uint16_t xlat_use_count[CONFIG_MAX_XLAT_TABLES];
static int xlat_use_count[CONFIG_MAX_XLAT_TABLES];
static struct k_spinlock xlat_lock;
/* Usage count value range */
#define XLAT_PTE_COUNT_MASK GENMASK(15, 0)
#define XLAT_REF_COUNT_UNIT BIT(16)
/* Returns a reference to a free table */
static uint64_t *new_table(void)
{
@ -39,9 +43,9 @@ static uint64_t *new_table(void)
/* Look for a free table. */
for (i = 0U; i < CONFIG_MAX_XLAT_TABLES; i++) {
if (xlat_use_count[i] == 0U) {
if (xlat_use_count[i] == 0) {
table = &xlat_tables[i * Ln_XLAT_NUM_ENTRIES];
xlat_use_count[i] = 1U;
xlat_use_count[i] = XLAT_REF_COUNT_UNIT;
MMU_DEBUG("allocating table [%d]%p\n", i, table);
return table;
}
@ -59,31 +63,80 @@ static inline unsigned int table_index(uint64_t *pte)
return i;
}
/* Makes a table free for reuse. */
static void free_table(uint64_t *table)
{
unsigned int i = table_index(table);
MMU_DEBUG("freeing table [%d]%p\n", i, table);
__ASSERT(xlat_use_count[i] == 1U, "table still in use");
xlat_use_count[i] = 0U;
}
/* Adjusts usage count and returns current count. */
static int table_usage(uint64_t *table, int adjustment)
{
unsigned int i = table_index(table);
int prev_count = xlat_use_count[i];
int new_count = prev_count + adjustment;
xlat_use_count[i] += adjustment;
__ASSERT(xlat_use_count[i] > 0, "usage count underflow");
return xlat_use_count[i];
/* be reasonable not to always create a debug flood */
if ((IS_ENABLED(DUMP_PTE) && adjustment != 0) || new_count == 0) {
MMU_DEBUG("table [%d]%p: usage %#x -> %#x\n", i, table, prev_count, new_count);
}
__ASSERT(new_count >= 0,
"table use count underflow");
__ASSERT(new_count == 0 || new_count >= XLAT_REF_COUNT_UNIT,
"table in use with no reference to it");
__ASSERT((new_count & XLAT_PTE_COUNT_MASK) <= Ln_XLAT_NUM_ENTRIES,
"table PTE count overflow");
xlat_use_count[i] = new_count;
return new_count;
}
static inline void inc_table_ref(uint64_t *table)
{
table_usage(table, XLAT_REF_COUNT_UNIT);
}
static inline void dec_table_ref(uint64_t *table)
{
int ref_unit = XLAT_REF_COUNT_UNIT;
table_usage(table, -ref_unit);
}
static inline bool is_table_unused(uint64_t *table)
{
return table_usage(table, 0) == 1;
return (table_usage(table, 0) & XLAT_PTE_COUNT_MASK) == 0;
}
static inline bool is_table_single_referenced(uint64_t *table)
{
return table_usage(table, 0) < (2 * XLAT_REF_COUNT_UNIT);
}
#ifdef CONFIG_TEST
/* Hooks to let test code peek at table states */
int arm64_mmu_nb_free_tables(void)
{
int count = 0;
for (int i = 0; i < CONFIG_MAX_XLAT_TABLES; i++) {
if (xlat_use_count[i] == 0) {
count++;
}
}
return count;
}
int arm64_mmu_tables_total_usage(void)
{
int count = 0;
for (int i = 0; i < CONFIG_MAX_XLAT_TABLES; i++) {
count += xlat_use_count[i];
}
return count;
}
#endif /* CONFIG_TEST */
static inline bool is_free_desc(uint64_t desc)
{
return (desc & PTE_DESC_TYPE_MASK) == PTE_INVALID_DESC;
@ -102,15 +155,15 @@ static inline bool is_block_desc(uint64_t desc)
static inline uint64_t *pte_desc_table(uint64_t desc)
{
uint64_t address = desc & GENMASK(47, PAGE_SIZE_SHIFT);
uint64_t address = desc & PTE_PHYSADDR_MASK;
/* tables use a 1:1 physical:virtual mapping */
return (uint64_t *)address;
}
static inline bool is_desc_block_aligned(uint64_t desc, unsigned int level_size)
{
uint64_t mask = GENMASK(47, PAGE_SIZE_SHIFT);
bool aligned = !((desc & mask) & (level_size - 1));
bool aligned = (desc & PTE_PHYSADDR_MASK & (level_size - 1)) == 0;
if (!aligned) {
MMU_DEBUG("misaligned desc 0x%016llx for block size 0x%x\n",
@ -123,7 +176,7 @@ static inline bool is_desc_block_aligned(uint64_t desc, unsigned int level_size)
static inline bool is_desc_superset(uint64_t desc1, uint64_t desc2,
unsigned int level)
{
uint64_t mask = DESC_ATTRS_MASK | GENMASK(47, LEVEL_TO_VA_SIZE_SHIFT(level));
uint64_t mask = DESC_ATTRS_MASK | GENMASK64(47, LEVEL_TO_VA_SIZE_SHIFT(level));
return (desc1 & mask) == (desc2 & mask);
}
@ -139,6 +192,8 @@ static void debug_show_pte(uint64_t *pte, unsigned int level)
return;
}
MMU_DEBUG("0x%016llx ", *pte);
if (is_table_desc(*pte, level)) {
uint64_t *table = pte_desc_table(*pte);
@ -225,20 +280,17 @@ static uint64_t *expand_to_table(uint64_t *pte, unsigned int level)
/* Link the new table in place of the pte it replaces */
set_pte_table_desc(pte, table, level);
table_usage(table, 1);
return table;
}
static int set_mapping(struct arm_mmu_ptables *ptables,
uintptr_t virt, size_t size,
static int set_mapping(uint64_t *top_table, uintptr_t virt, size_t size,
uint64_t desc, bool may_overwrite)
{
uint64_t *pte, *ptes[XLAT_LAST_LEVEL + 1];
uint64_t *table = top_table;
uint64_t *pte;
uint64_t level_size;
uint64_t *table = ptables->base_xlat_table;
unsigned int level = BASE_XLAT_LEVEL;
int ret = 0;
while (size) {
__ASSERT(level <= XLAT_LAST_LEVEL,
@ -246,7 +298,6 @@ static int set_mapping(struct arm_mmu_ptables *ptables,
/* Locate PTE for given virtual address and page table level */
pte = &table[XLAT_TABLE_VA_IDX(virt, level)];
ptes[level] = pte;
if (is_table_desc(*pte, level)) {
/* Move to the next translation table level */
@ -260,8 +311,7 @@ static int set_mapping(struct arm_mmu_ptables *ptables,
LOG_ERR("entry already in use: "
"level %d pte %p *pte 0x%016llx",
level, pte, *pte);
ret = -EBUSY;
break;
return -EBUSY;
}
level_size = 1ULL << LEVEL_TO_VA_SIZE_SHIFT(level);
@ -280,8 +330,7 @@ static int set_mapping(struct arm_mmu_ptables *ptables,
/* Range doesn't fit, create subtable */
table = expand_to_table(pte, level);
if (!table) {
ret = -ENOMEM;
break;
return -ENOMEM;
}
level++;
continue;
@ -291,32 +340,58 @@ static int set_mapping(struct arm_mmu_ptables *ptables,
if (is_free_desc(*pte)) {
table_usage(pte, 1);
}
if (!desc) {
table_usage(pte, -1);
}
/* Create (or erase) block/page descriptor */
/* Create block/page descriptor */
set_pte_block_desc(pte, desc, level);
/* recursively free unused tables if any */
while (level != BASE_XLAT_LEVEL &&
is_table_unused(pte)) {
free_table(pte);
pte = ptes[--level];
set_pte_block_desc(pte, 0, level);
table_usage(pte, -1);
}
move_on:
virt += level_size;
desc += desc ? level_size : 0;
desc += level_size;
size -= level_size;
/* Range is mapped, start again for next range */
table = ptables->base_xlat_table;
table = top_table;
level = BASE_XLAT_LEVEL;
}
return ret;
return 0;
}
static void del_mapping(uint64_t *table, uintptr_t virt, size_t size,
unsigned int level)
{
size_t step, level_size = 1ULL << LEVEL_TO_VA_SIZE_SHIFT(level);
uint64_t *pte, *subtable;
for ( ; size; virt += step, size -= step) {
step = level_size - (virt & (level_size - 1));
if (step > size) {
step = size;
}
pte = &table[XLAT_TABLE_VA_IDX(virt, level)];
if (is_free_desc(*pte)) {
continue;
}
if (is_table_desc(*pte, level)) {
subtable = pte_desc_table(*pte);
del_mapping(subtable, virt, step, level + 1);
if (!is_table_unused(subtable)) {
continue;
}
dec_table_ref(subtable);
} else {
/*
* We assume that block mappings will be unmapped
* as a whole and not partially.
*/
__ASSERT(step == level_size, "");
}
/* free this entry */
*pte = 0;
table_usage(pte, -1);
}
}
#ifdef CONFIG_USERSPACE
@ -324,7 +399,7 @@ move_on:
static uint64_t *dup_table(uint64_t *src_table, unsigned int level)
{
uint64_t *dst_table = new_table();
int i;
int i, usage_count = 0;
if (!dst_table) {
return NULL;
@ -347,13 +422,14 @@ static uint64_t *dup_table(uint64_t *src_table, unsigned int level)
}
dst_table[i] = src_table[i];
if (is_table_desc(src_table[i], level)) {
table_usage(pte_desc_table(src_table[i]), 1);
if (is_table_desc(dst_table[i], level)) {
inc_table_ref(pte_desc_table(dst_table[i]));
}
if (!is_free_desc(dst_table[i])) {
table_usage(dst_table, 1);
usage_count++;
}
}
table_usage(dst_table, usage_count);
return dst_table;
}
@ -388,8 +464,7 @@ static int privatize_table(uint64_t *dst_table, uint64_t *src_table,
return -ENOMEM;
}
set_pte_table_desc(&dst_table[i], dst_subtable, level);
table_usage(dst_subtable, 1);
table_usage(src_subtable, -1);
dec_table_ref(src_subtable);
}
ret = privatize_table(dst_subtable, src_subtable,
@ -433,18 +508,23 @@ static int privatize_page_range(struct arm_mmu_ptables *dst_pt,
static void discard_table(uint64_t *table, unsigned int level)
{
unsigned int i;
int free_count = 0;
for (i = 0U; i < Ln_XLAT_NUM_ENTRIES; i++) {
if (is_table_desc(table[i], level)) {
table_usage(pte_desc_table(table[i]), -1);
discard_table(pte_desc_table(table[i]), level + 1);
uint64_t *subtable = pte_desc_table(table[i]);
if (is_table_single_referenced(subtable)) {
discard_table(subtable, level + 1);
}
dec_table_ref(subtable);
}
if (!is_free_desc(table[i])) {
table[i] = 0U;
table_usage(table, -1);
free_count++;
}
}
free_table(table);
table_usage(table, -free_count);
}
static int globalize_table(uint64_t *dst_table, uint64_t *src_table,
@ -466,6 +546,20 @@ static int globalize_table(uint64_t *dst_table, uint64_t *src_table,
continue;
}
if (is_free_desc(src_table[i]) &&
is_table_desc(dst_table[i], level)) {
uint64_t *subtable = pte_desc_table(dst_table[i]);
del_mapping(subtable, virt, step, level + 1);
if (is_table_unused(subtable)) {
/* unreference the empty table */
dst_table[i] = 0;
table_usage(dst_table, -1);
dec_table_ref(subtable);
}
continue;
}
if (step != level_size) {
/* boundary falls in the middle of this pte */
__ASSERT(is_table_desc(src_table[i], level),
@ -497,15 +591,15 @@ static int globalize_table(uint64_t *dst_table, uint64_t *src_table,
table_usage(dst_table, -1);
}
if (is_table_desc(src_table[i], level)) {
table_usage(pte_desc_table(src_table[i]), 1);
inc_table_ref(pte_desc_table(src_table[i]));
}
dst_table[i] = src_table[i];
debug_show_pte(&dst_table[i], level);
if (old_table) {
/* we can discard the whole branch */
table_usage(old_table, -1);
discard_table(old_table, level + 1);
dec_table_ref(old_table);
}
}
@ -625,7 +719,7 @@ static int __add_map(struct arm_mmu_ptables *ptables, const char *name,
__ASSERT(((virt | phys | size) & (CONFIG_MMU_PAGE_SIZE - 1)) == 0,
"address/size are not page aligned\n");
desc |= phys;
return set_mapping(ptables, virt, size, desc, may_overwrite);
return set_mapping(ptables->base_xlat_table, virt, size, desc, may_overwrite);
}
static int add_map(struct arm_mmu_ptables *ptables, const char *name,
@ -640,20 +734,18 @@ static int add_map(struct arm_mmu_ptables *ptables, const char *name,
return ret;
}
static int remove_map(struct arm_mmu_ptables *ptables, const char *name,
static void remove_map(struct arm_mmu_ptables *ptables, const char *name,
uintptr_t virt, size_t size)
{
k_spinlock_key_t key;
int ret;
MMU_DEBUG("unmmap [%s]: virt %lx size %lx\n", name, virt, size);
__ASSERT(((virt | size) & (CONFIG_MMU_PAGE_SIZE - 1)) == 0,
"address/size are not page aligned\n");
key = k_spin_lock(&xlat_lock);
ret = set_mapping(ptables, virt, size, 0, true);
del_mapping(ptables->base_xlat_table, virt, size, BASE_XLAT_LEVEL);
k_spin_unlock(&xlat_lock, key);
return ret;
}
static void invalidate_tlb_all(void)
@ -892,7 +984,7 @@ void z_arm64_mm_init(bool is_primary_core)
enable_mmu_el1(&kernel_ptables, flags);
}
static void sync_domains(uintptr_t virt, size_t size)
static void sync_domains(uintptr_t virt, size_t size, const char *name)
{
#ifdef CONFIG_USERSPACE
sys_snode_t *node;
@ -906,7 +998,7 @@ static void sync_domains(uintptr_t virt, size_t size)
domain = CONTAINER_OF(node, struct arch_mem_domain, node);
domain_ptables = &domain->ptables;
ret = globalize_page_range(domain_ptables, &kernel_ptables,
virt, size, "generic");
virt, size, name);
if (ret) {
LOG_ERR("globalize_page_range() returned %d", ret);
}
@ -988,7 +1080,7 @@ void arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flags)
} else {
uint32_t mem_flags = flags & K_MEM_CACHE_MASK;
sync_domains((uintptr_t)virt, size);
sync_domains((uintptr_t)virt, size, "mem_map");
invalidate_tlb_all();
switch (mem_flags) {
@ -1005,14 +1097,9 @@ void arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flags)
void arch_mem_unmap(void *addr, size_t size)
{
int ret = remove_map(&kernel_ptables, "generic", (uintptr_t)addr, size);
if (ret) {
LOG_ERR("remove_map() returned %d", ret);
} else {
sync_domains((uintptr_t)addr, size);
remove_map(&kernel_ptables, "generic", (uintptr_t)addr, size);
sync_domains((uintptr_t)addr, size, "mem_unmap");
invalidate_tlb_all();
}
}
int arch_page_phys_get(void *virt, uintptr_t *phys)
@ -1031,7 +1118,7 @@ int arch_page_phys_get(void *virt, uintptr_t *phys)
}
if (phys) {
*phys = par & GENMASK(47, 12);
*phys = par & GENMASK64(47, 12);
}
return 0;
}
@ -1230,6 +1317,7 @@ static void z_arm64_swap_ptables(struct k_thread *incoming)
return; /* Already the right tables */
}
MMU_DEBUG("TTBR0 switch from %#llx to %#llx\n", curr_ttbr0, new_ttbr0);
z_arm64_set_ttbr0(new_ttbr0);
if (get_asid(curr_ttbr0) == get_asid(new_ttbr0)) {

View file

@ -93,3 +93,80 @@
#define DESC_ATTRS_LOWER_MASK GENMASK(11, 2)
#define DESC_ATTRS_MASK (DESC_ATTRS_UPPER_MASK | DESC_ATTRS_LOWER_MASK)
/*
* PTE descriptor can be Block descriptor or Table descriptor
* or Page descriptor.
*/
#define PTE_DESC_TYPE_MASK 3ULL
#define PTE_BLOCK_DESC 1ULL
#define PTE_TABLE_DESC 3ULL
#define PTE_PAGE_DESC 3ULL
#define PTE_INVALID_DESC 0ULL
/*
* Block and Page descriptor attributes fields
*/
#define PTE_BLOCK_DESC_MEMTYPE(x) (x << 2)
#define PTE_BLOCK_DESC_NS (1ULL << 5)
#define PTE_BLOCK_DESC_AP_ELx (1ULL << 6)
#define PTE_BLOCK_DESC_AP_EL_HIGHER (0ULL << 6)
#define PTE_BLOCK_DESC_AP_RO (1ULL << 7)
#define PTE_BLOCK_DESC_AP_RW (0ULL << 7)
#define PTE_BLOCK_DESC_NON_SHARE (0ULL << 8)
#define PTE_BLOCK_DESC_OUTER_SHARE (2ULL << 8)
#define PTE_BLOCK_DESC_INNER_SHARE (3ULL << 8)
#define PTE_BLOCK_DESC_AF (1ULL << 10)
#define PTE_BLOCK_DESC_NG (1ULL << 11)
#define PTE_BLOCK_DESC_PXN (1ULL << 53)
#define PTE_BLOCK_DESC_UXN (1ULL << 54)
/*
* Descriptor physical address field bits
*/
#define PTE_PHYSADDR_MASK GENMASK64(47, PAGE_SIZE_SHIFT)
/*
* TCR definitions.
*/
#define TCR_EL1_IPS_SHIFT 32U
#define TCR_EL2_PS_SHIFT 16U
#define TCR_EL3_PS_SHIFT 16U
#define TCR_T0SZ_SHIFT 0U
#define TCR_T0SZ(x) ((64 - (x)) << TCR_T0SZ_SHIFT)
#define TCR_IRGN_NC (0ULL << 8)
#define TCR_IRGN_WBWA (1ULL << 8)
#define TCR_IRGN_WT (2ULL << 8)
#define TCR_IRGN_WBNWA (3ULL << 8)
#define TCR_IRGN_MASK (3ULL << 8)
#define TCR_ORGN_NC (0ULL << 10)
#define TCR_ORGN_WBWA (1ULL << 10)
#define TCR_ORGN_WT (2ULL << 10)
#define TCR_ORGN_WBNWA (3ULL << 10)
#define TCR_ORGN_MASK (3ULL << 10)
#define TCR_SHARED_NON (0ULL << 12)
#define TCR_SHARED_OUTER (2ULL << 12)
#define TCR_SHARED_INNER (3ULL << 12)
#define TCR_TG0_4K (0ULL << 14)
#define TCR_TG0_64K (1ULL << 14)
#define TCR_TG0_16K (2ULL << 14)
#define TCR_EPD1_DISABLE (1ULL << 23)
#define TCR_TG1_16K (1ULL << 30)
#define TCR_TG1_4K (2ULL << 30)
#define TCR_TG1_64K (3ULL << 30)
#define TCR_PS_BITS_4GB 0x0ULL
#define TCR_PS_BITS_64GB 0x1ULL
#define TCR_PS_BITS_1TB 0x2ULL
#define TCR_PS_BITS_4TB 0x3ULL
#define TCR_PS_BITS_16TB 0x4ULL
#define TCR_PS_BITS_256TB 0x5ULL
/*
* ARM guarantees at least 8 ASID bits.
* We may have more available, but do not make use of them for the time being.
*/
#define VM_ASID_BITS 8
#define TTBR_ASID_SHIFT 48

View file

@ -40,7 +40,7 @@ GEN_NAMED_OFFSET_SYM(_callee_saved_t, x27, x27_x28);
GEN_NAMED_OFFSET_SYM(_callee_saved_t, x29, x29_sp_el0);
GEN_NAMED_OFFSET_SYM(_callee_saved_t, sp_elx, sp_elx_lr);
#ifdef CONFIG_ARM64_ENABLE_FRAME_POINTER
#ifdef CONFIG_FRAME_POINTER
GEN_NAMED_OFFSET_SYM(_esf_t, fp, fp);
#endif

View file

@ -21,29 +21,6 @@ extern void z_arm64_mm_init(bool is_primary_core);
__weak void z_arm64_mm_init(bool is_primary_core) { }
/*
* These simple memset/memcpy alternatives are necessary as the optimized
* ones depend on the MMU to be active (see commit c5b898743a20).
*/
void z_early_memset(void *dst, int c, size_t n)
{
uint8_t *d = dst;
while (n--) {
*d++ = c;
}
}
void z_early_memcpy(void *dst, const void *src, size_t n)
{
uint8_t *d = dst;
const uint8_t *s = src;
while (n--) {
*d++ = *s++;
}
}
/**
*
* @brief Prepare to and run C code

View file

@ -16,6 +16,7 @@
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <ksched.h>
#include <ipi.h>
#include <zephyr/init.h>
#include <zephyr/arch/arm64/mm.h>
#include <zephyr/arch/cpu.h>
@ -180,7 +181,7 @@ void arch_secondary_cpu_init(int cpu_num)
#ifdef CONFIG_SMP
static void broadcast_ipi(unsigned int ipi)
static void send_ipi(unsigned int ipi, uint32_t cpu_bitmap)
{
uint64_t mpidr = MPIDR_TO_CORE(GET_MPIDR());
@ -190,6 +191,10 @@ static void broadcast_ipi(unsigned int ipi)
unsigned int num_cpus = arch_num_cpus();
for (int i = 0; i < num_cpus; i++) {
if ((cpu_bitmap & BIT(i)) == 0) {
continue;
}
uint64_t target_mpidr = cpu_map[i];
uint8_t aff0;
@ -209,10 +214,14 @@ void sched_ipi_handler(const void *unused)
z_sched_ipi();
}
/* arch implementation of sched_ipi */
void arch_sched_ipi(void)
void arch_sched_broadcast_ipi(void)
{
broadcast_ipi(SGI_SCHED_IPI);
send_ipi(SGI_SCHED_IPI, IPI_ALL_CPUS_MASK);
}
void arch_sched_directed_ipi(uint32_t cpu_bitmap)
{
send_ipi(SGI_SCHED_IPI, cpu_bitmap);
}
#ifdef CONFIG_USERSPACE
@ -232,7 +241,7 @@ void mem_cfg_ipi_handler(const void *unused)
void z_arm64_mem_cfg_ipi(void)
{
broadcast_ipi(SGI_MMCFG_IPI);
send_ipi(SGI_MMCFG_IPI, IPI_ALL_CPUS_MASK);
}
#endif
@ -302,6 +311,5 @@ int arch_smp_init(void)
return 0;
}
SYS_INIT(arch_smp_init, PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif

View file

@ -87,7 +87,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
void *p1, void *p2, void *p3)
{
extern void z_arm64_exit_exc(void);
z_arch_esf_t *pInitCtx;
struct arch_esf *pInitCtx;
/*
* Clean the thread->arch to avoid unexpected behavior because the
@ -102,7 +102,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
* dropping into EL0.
*/
pInitCtx = Z_STACK_PTR_TO_FRAME(struct __esf, stack_ptr);
pInitCtx = Z_STACK_PTR_TO_FRAME(struct arch_esf, stack_ptr);
pInitCtx->x0 = (uint64_t)entry;
pInitCtx->x1 = (uint64_t)p1;

View file

@ -72,7 +72,7 @@ _ASM_FILE_PROLOGUE
.endif
#endif
#ifdef CONFIG_ARM64_ENABLE_FRAME_POINTER
#ifdef CONFIG_FRAME_POINTER
str x29, [sp, ___esf_t_fp_OFFSET]
#endif
@ -339,7 +339,7 @@ SECTION_FUNC(TEXT, z_arm64_exit_exc)
ldp x16, x17, [sp, ___esf_t_x16_x17_OFFSET]
ldp x18, lr, [sp, ___esf_t_x18_lr_OFFSET]
#ifdef CONFIG_ARM64_ENABLE_FRAME_POINTER
#ifdef CONFIG_FRAME_POINTER
ldr x29, [sp, ___esf_t_fp_OFFSET]
#endif

View file

@ -36,7 +36,7 @@
extern "C" {
#endif
typedef struct __esf _esf_t;
typedef struct arch_esf _esf_t;
typedef struct __basic_sf _basic_sf_t;
#ifdef __cplusplus

View file

@ -43,7 +43,7 @@ static inline void arch_switch(void *switch_to, void **switched_from)
z_arm64_context_switch(new, old);
}
extern void z_arm64_fatal_error(unsigned int reason, z_arch_esf_t *esf);
extern void z_arm64_fatal_error(unsigned int reason, struct arch_esf *esf);
extern void z_arm64_set_ttbr0(uint64_t ttbr0);
extern void z_arm64_mem_cfg_ipi(void);

View file

@ -15,11 +15,11 @@
struct int_list_header {
uint32_t table_size;
uint32_t offset;
#if IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION)
#if defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION)
uint32_t swi_table_entry_size;
uint32_t shared_isr_table_entry_size;
uint32_t shared_isr_client_num_offset;
#endif /* IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */
#endif /* defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */
};
/* These values are not included in the resulting binary, but instead form the
@ -29,13 +29,13 @@ struct int_list_header {
Z_GENERIC_SECTION(.irq_info) __used struct int_list_header _iheader = {
.table_size = IRQ_TABLE_SIZE,
.offset = CONFIG_GEN_IRQ_START_VECTOR,
#if IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION)
#if defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION)
.swi_table_entry_size = sizeof(struct _isr_table_entry),
#if IS_ENABLED(CONFIG_SHARED_INTERRUPTS)
#if defined(CONFIG_SHARED_INTERRUPTS)
.shared_isr_table_entry_size = sizeof(struct z_shared_isr_table_entry),
.shared_isr_client_num_offset = offsetof(struct z_shared_isr_table_entry, client_num),
#endif /* IS_ENABLED(CONFIG_SHARED_INTERRUPTS) */
#endif /* IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */
#endif /* defined(CONFIG_SHARED_INTERRUPTS) */
#endif /* defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */
};
/* These are placeholder tables. They will be replaced by the real tables
@ -90,7 +90,7 @@ uintptr_t __irq_vector_table _irq_vector_table[IRQ_TABLE_SIZE] = {
#ifdef CONFIG_GEN_SW_ISR_TABLE
struct _isr_table_entry __sw_isr_table _sw_isr_table[IRQ_TABLE_SIZE] = {
[0 ...(IRQ_TABLE_SIZE - 1)] = {(const void *)0x42,
(void *)&z_irq_spurious},
&z_irq_spurious},
};
#endif

View file

@ -9,7 +9,7 @@
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
FUNC_NORETURN void z_mips_fatal_error(unsigned int reason,
const z_arch_esf_t *esf)
const struct arch_esf *esf)
{
#ifdef CONFIG_EXCEPTION_DEBUG
if (esf != NULL) {
@ -84,7 +84,7 @@ static char *cause_str(unsigned long cause)
}
}
void _Fault(z_arch_esf_t *esf)
void _Fault(struct arch_esf *esf)
{
unsigned long cause;

View file

@ -14,7 +14,7 @@
#include <mips/regdef.h>
#include <mips/mipsregs.h>
#define ESF_O(FIELD) __z_arch_esf_t_##FIELD##_OFFSET
#define ESF_O(FIELD) __struct_arch_esf_##FIELD##_OFFSET
#define THREAD_O(FIELD) _thread_offset_to_##FIELD
/* Convenience macros for loading/storing register states. */
@ -58,12 +58,12 @@
op v1, ESF_O(v1)(sp) ;
#define STORE_CALLER_SAVED() \
addi sp, sp, -__z_arch_esf_t_SIZEOF ;\
addi sp, sp, -__struct_arch_esf_SIZEOF ;\
DO_CALLER_SAVED(OP_STOREREG) ;
#define LOAD_CALLER_SAVED() \
DO_CALLER_SAVED(OP_LOADREG) ;\
addi sp, sp, __z_arch_esf_t_SIZEOF ;
addi sp, sp, __struct_arch_esf_SIZEOF ;
/* imports */
GTEXT(_Fault)

View file

@ -23,32 +23,32 @@ GEN_OFFSET_SYM(_callee_saved_t, s6);
GEN_OFFSET_SYM(_callee_saved_t, s7);
GEN_OFFSET_SYM(_callee_saved_t, s8);
GEN_OFFSET_SYM(z_arch_esf_t, ra);
GEN_OFFSET_SYM(z_arch_esf_t, gp);
GEN_OFFSET_SYM(z_arch_esf_t, t0);
GEN_OFFSET_SYM(z_arch_esf_t, t1);
GEN_OFFSET_SYM(z_arch_esf_t, t2);
GEN_OFFSET_SYM(z_arch_esf_t, t3);
GEN_OFFSET_SYM(z_arch_esf_t, t4);
GEN_OFFSET_SYM(z_arch_esf_t, t5);
GEN_OFFSET_SYM(z_arch_esf_t, t6);
GEN_OFFSET_SYM(z_arch_esf_t, t7);
GEN_OFFSET_SYM(z_arch_esf_t, t8);
GEN_OFFSET_SYM(z_arch_esf_t, t9);
GEN_OFFSET_SYM(z_arch_esf_t, a0);
GEN_OFFSET_SYM(z_arch_esf_t, a1);
GEN_OFFSET_SYM(z_arch_esf_t, a2);
GEN_OFFSET_SYM(z_arch_esf_t, a3);
GEN_OFFSET_SYM(z_arch_esf_t, v0);
GEN_OFFSET_SYM(z_arch_esf_t, v1);
GEN_OFFSET_SYM(z_arch_esf_t, at);
GEN_OFFSET_SYM(z_arch_esf_t, epc);
GEN_OFFSET_SYM(z_arch_esf_t, badvaddr);
GEN_OFFSET_SYM(z_arch_esf_t, hi);
GEN_OFFSET_SYM(z_arch_esf_t, lo);
GEN_OFFSET_SYM(z_arch_esf_t, status);
GEN_OFFSET_SYM(z_arch_esf_t, cause);
GEN_OFFSET_STRUCT(arch_esf, ra);
GEN_OFFSET_STRUCT(arch_esf, gp);
GEN_OFFSET_STRUCT(arch_esf, t0);
GEN_OFFSET_STRUCT(arch_esf, t1);
GEN_OFFSET_STRUCT(arch_esf, t2);
GEN_OFFSET_STRUCT(arch_esf, t3);
GEN_OFFSET_STRUCT(arch_esf, t4);
GEN_OFFSET_STRUCT(arch_esf, t5);
GEN_OFFSET_STRUCT(arch_esf, t6);
GEN_OFFSET_STRUCT(arch_esf, t7);
GEN_OFFSET_STRUCT(arch_esf, t8);
GEN_OFFSET_STRUCT(arch_esf, t9);
GEN_OFFSET_STRUCT(arch_esf, a0);
GEN_OFFSET_STRUCT(arch_esf, a1);
GEN_OFFSET_STRUCT(arch_esf, a2);
GEN_OFFSET_STRUCT(arch_esf, a3);
GEN_OFFSET_STRUCT(arch_esf, v0);
GEN_OFFSET_STRUCT(arch_esf, v1);
GEN_OFFSET_STRUCT(arch_esf, at);
GEN_OFFSET_STRUCT(arch_esf, epc);
GEN_OFFSET_STRUCT(arch_esf, badvaddr);
GEN_OFFSET_STRUCT(arch_esf, hi);
GEN_OFFSET_STRUCT(arch_esf, lo);
GEN_OFFSET_STRUCT(arch_esf, status);
GEN_OFFSET_STRUCT(arch_esf, cause);
GEN_ABSOLUTE_SYM(__z_arch_esf_t_SIZEOF, STACK_ROUND_UP(sizeof(z_arch_esf_t)));
GEN_ABSOLUTE_SYM(__struct_arch_esf_SIZEOF, STACK_ROUND_UP(sizeof(struct arch_esf)));
GEN_ABS_SYM_END

View file

@ -19,11 +19,11 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
char *stack_ptr, k_thread_entry_t entry,
void *p1, void *p2, void *p3)
{
struct __esf *stack_init;
struct arch_esf *stack_init;
/* Initial stack frame for thread */
stack_init = (struct __esf *)Z_STACK_PTR_ALIGN(
Z_STACK_PTR_TO_FRAME(struct __esf, stack_ptr)
stack_init = (struct arch_esf *)Z_STACK_PTR_ALIGN(
Z_STACK_PTR_TO_FRAME(struct arch_esf, stack_ptr)
);
/* Setup the initial stack frame */

View file

@ -35,7 +35,7 @@ arch_thread_return_value_set(struct k_thread *thread, unsigned int value)
}
FUNC_NORETURN void z_mips_fatal_error(unsigned int reason,
const z_arch_esf_t *esf);
const struct arch_esf *esf);
static inline bool arch_is_in_isr(void)
{

View file

@ -35,35 +35,35 @@ GTEXT(_offload_routine)
*/
SECTION_FUNC(exception.entry, _exception)
/* Reserve thread stack space for saving context */
subi sp, sp, __z_arch_esf_t_SIZEOF
subi sp, sp, __struct_arch_esf_SIZEOF
/* Preserve all caller-saved registers onto the thread's stack */
stw ra, __z_arch_esf_t_ra_OFFSET(sp)
stw r1, __z_arch_esf_t_r1_OFFSET(sp)
stw r2, __z_arch_esf_t_r2_OFFSET(sp)
stw r3, __z_arch_esf_t_r3_OFFSET(sp)
stw r4, __z_arch_esf_t_r4_OFFSET(sp)
stw r5, __z_arch_esf_t_r5_OFFSET(sp)
stw r6, __z_arch_esf_t_r6_OFFSET(sp)
stw r7, __z_arch_esf_t_r7_OFFSET(sp)
stw r8, __z_arch_esf_t_r8_OFFSET(sp)
stw r9, __z_arch_esf_t_r9_OFFSET(sp)
stw r10, __z_arch_esf_t_r10_OFFSET(sp)
stw r11, __z_arch_esf_t_r11_OFFSET(sp)
stw r12, __z_arch_esf_t_r12_OFFSET(sp)
stw r13, __z_arch_esf_t_r13_OFFSET(sp)
stw r14, __z_arch_esf_t_r14_OFFSET(sp)
stw r15, __z_arch_esf_t_r15_OFFSET(sp)
stw ra, __struct_arch_esf_ra_OFFSET(sp)
stw r1, __struct_arch_esf_r1_OFFSET(sp)
stw r2, __struct_arch_esf_r2_OFFSET(sp)
stw r3, __struct_arch_esf_r3_OFFSET(sp)
stw r4, __struct_arch_esf_r4_OFFSET(sp)
stw r5, __struct_arch_esf_r5_OFFSET(sp)
stw r6, __struct_arch_esf_r6_OFFSET(sp)
stw r7, __struct_arch_esf_r7_OFFSET(sp)
stw r8, __struct_arch_esf_r8_OFFSET(sp)
stw r9, __struct_arch_esf_r9_OFFSET(sp)
stw r10, __struct_arch_esf_r10_OFFSET(sp)
stw r11, __struct_arch_esf_r11_OFFSET(sp)
stw r12, __struct_arch_esf_r12_OFFSET(sp)
stw r13, __struct_arch_esf_r13_OFFSET(sp)
stw r14, __struct_arch_esf_r14_OFFSET(sp)
stw r15, __struct_arch_esf_r15_OFFSET(sp)
/* Store value of estatus control register */
rdctl et, estatus
stw et, __z_arch_esf_t_estatus_OFFSET(sp)
stw et, __struct_arch_esf_estatus_OFFSET(sp)
/* ea-4 is the address of the instruction when the exception happened,
* put this in the stack frame as well
*/
addi r15, ea, -4
stw r15, __z_arch_esf_t_instr_OFFSET(sp)
stw r15, __struct_arch_esf_instr_OFFSET(sp)
/* Figure out whether we are here because of an interrupt or an
* exception. If an interrupt, switch stacks and enter IRQ handling
@ -157,7 +157,7 @@ not_interrupt:
*
* We earlier put ea - 4 in the stack frame, replace it with just ea
*/
stw ea, __z_arch_esf_t_instr_OFFSET(sp)
stw ea, __struct_arch_esf_instr_OFFSET(sp)
#ifdef CONFIG_IRQ_OFFLOAD
/* Check the contents of _offload_routine. If non-NULL, jump into
@ -193,35 +193,35 @@ _exception_exit:
* and return to the interrupted context */
/* Return address from the exception */
ldw ea, __z_arch_esf_t_instr_OFFSET(sp)
ldw ea, __struct_arch_esf_instr_OFFSET(sp)
/* Restore estatus
* XXX is this right??? */
ldw r5, __z_arch_esf_t_estatus_OFFSET(sp)
ldw r5, __struct_arch_esf_estatus_OFFSET(sp)
wrctl estatus, r5
/* Restore caller-saved registers */
ldw ra, __z_arch_esf_t_ra_OFFSET(sp)
ldw r1, __z_arch_esf_t_r1_OFFSET(sp)
ldw r2, __z_arch_esf_t_r2_OFFSET(sp)
ldw r3, __z_arch_esf_t_r3_OFFSET(sp)
ldw r4, __z_arch_esf_t_r4_OFFSET(sp)
ldw r5, __z_arch_esf_t_r5_OFFSET(sp)
ldw r6, __z_arch_esf_t_r6_OFFSET(sp)
ldw r7, __z_arch_esf_t_r7_OFFSET(sp)
ldw r8, __z_arch_esf_t_r8_OFFSET(sp)
ldw r9, __z_arch_esf_t_r9_OFFSET(sp)
ldw r10, __z_arch_esf_t_r10_OFFSET(sp)
ldw r11, __z_arch_esf_t_r11_OFFSET(sp)
ldw r12, __z_arch_esf_t_r12_OFFSET(sp)
ldw r13, __z_arch_esf_t_r13_OFFSET(sp)
ldw r14, __z_arch_esf_t_r14_OFFSET(sp)
ldw r15, __z_arch_esf_t_r15_OFFSET(sp)
ldw ra, __struct_arch_esf_ra_OFFSET(sp)
ldw r1, __struct_arch_esf_r1_OFFSET(sp)
ldw r2, __struct_arch_esf_r2_OFFSET(sp)
ldw r3, __struct_arch_esf_r3_OFFSET(sp)
ldw r4, __struct_arch_esf_r4_OFFSET(sp)
ldw r5, __struct_arch_esf_r5_OFFSET(sp)
ldw r6, __struct_arch_esf_r6_OFFSET(sp)
ldw r7, __struct_arch_esf_r7_OFFSET(sp)
ldw r8, __struct_arch_esf_r8_OFFSET(sp)
ldw r9, __struct_arch_esf_r9_OFFSET(sp)
ldw r10, __struct_arch_esf_r10_OFFSET(sp)
ldw r11, __struct_arch_esf_r11_OFFSET(sp)
ldw r12, __struct_arch_esf_r12_OFFSET(sp)
ldw r13, __struct_arch_esf_r13_OFFSET(sp)
ldw r14, __struct_arch_esf_r14_OFFSET(sp)
ldw r15, __struct_arch_esf_r15_OFFSET(sp)
/* Put the stack pointer back where it was when we entered
* exception state
*/
addi sp, sp, __z_arch_esf_t_SIZEOF
addi sp, sp, __struct_arch_esf_SIZEOF
/* All done, copy estatus into status and transfer to ea */
eret

View file

@ -12,7 +12,7 @@
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
FUNC_NORETURN void z_nios2_fatal_error(unsigned int reason,
const z_arch_esf_t *esf)
const struct arch_esf *esf)
{
#if CONFIG_EXCEPTION_DEBUG
if (esf != NULL) {
@ -102,7 +102,7 @@ static char *cause_str(uint32_t cause_code)
}
#endif
FUNC_NORETURN void _Fault(const z_arch_esf_t *esf)
FUNC_NORETURN void _Fault(const struct arch_esf *esf)
{
#if defined(CONFIG_PRINTK) || defined(CONFIG_LOG)
/* Unfortunately, completely unavailable on Nios II/e cores */

View file

@ -44,24 +44,24 @@ GEN_OFFSET_SYM(_callee_saved_t, sp);
GEN_OFFSET_SYM(_callee_saved_t, key);
GEN_OFFSET_SYM(_callee_saved_t, retval);
GEN_OFFSET_SYM(z_arch_esf_t, ra);
GEN_OFFSET_SYM(z_arch_esf_t, r1);
GEN_OFFSET_SYM(z_arch_esf_t, r2);
GEN_OFFSET_SYM(z_arch_esf_t, r3);
GEN_OFFSET_SYM(z_arch_esf_t, r4);
GEN_OFFSET_SYM(z_arch_esf_t, r5);
GEN_OFFSET_SYM(z_arch_esf_t, r6);
GEN_OFFSET_SYM(z_arch_esf_t, r7);
GEN_OFFSET_SYM(z_arch_esf_t, r8);
GEN_OFFSET_SYM(z_arch_esf_t, r9);
GEN_OFFSET_SYM(z_arch_esf_t, r10);
GEN_OFFSET_SYM(z_arch_esf_t, r11);
GEN_OFFSET_SYM(z_arch_esf_t, r12);
GEN_OFFSET_SYM(z_arch_esf_t, r13);
GEN_OFFSET_SYM(z_arch_esf_t, r14);
GEN_OFFSET_SYM(z_arch_esf_t, r15);
GEN_OFFSET_SYM(z_arch_esf_t, estatus);
GEN_OFFSET_SYM(z_arch_esf_t, instr);
GEN_ABSOLUTE_SYM(__z_arch_esf_t_SIZEOF, sizeof(z_arch_esf_t));
GEN_OFFSET_STRUCT(arch_esf, ra);
GEN_OFFSET_STRUCT(arch_esf, r1);
GEN_OFFSET_STRUCT(arch_esf, r2);
GEN_OFFSET_STRUCT(arch_esf, r3);
GEN_OFFSET_STRUCT(arch_esf, r4);
GEN_OFFSET_STRUCT(arch_esf, r5);
GEN_OFFSET_STRUCT(arch_esf, r6);
GEN_OFFSET_STRUCT(arch_esf, r7);
GEN_OFFSET_STRUCT(arch_esf, r8);
GEN_OFFSET_STRUCT(arch_esf, r9);
GEN_OFFSET_STRUCT(arch_esf, r10);
GEN_OFFSET_STRUCT(arch_esf, r11);
GEN_OFFSET_STRUCT(arch_esf, r12);
GEN_OFFSET_STRUCT(arch_esf, r13);
GEN_OFFSET_STRUCT(arch_esf, r14);
GEN_OFFSET_STRUCT(arch_esf, r15);
GEN_OFFSET_STRUCT(arch_esf, estatus);
GEN_OFFSET_STRUCT(arch_esf, instr);
GEN_ABSOLUTE_SYM(__struct_arch_esf_SIZEOF, sizeof(struct arch_esf));
GEN_ABS_SYM_END

View file

@ -39,7 +39,7 @@ arch_thread_return_value_set(struct k_thread *thread, unsigned int value)
}
FUNC_NORETURN void z_nios2_fatal_error(unsigned int reason,
const z_arch_esf_t *esf);
const struct arch_esf *esf);
static inline bool arch_is_in_isr(void)
{

View file

@ -30,7 +30,6 @@ config RISCV_GP
config RISCV_ALWAYS_SWITCH_THROUGH_ECALL
bool "Do not use mret outside a trap handler context"
depends on MULTITHREADING
depends on !RISCV_PMP
help
Use mret instruction only when in a trap handler.
This is for RISC-V implementations that require every mret to be
@ -38,19 +37,9 @@ config RISCV_ALWAYS_SWITCH_THROUGH_ECALL
and most people should say n here to minimize context switching
overhead.
config RISCV_ENABLE_FRAME_POINTER
bool
default y
depends on OVERRIDE_FRAME_POINTER_DEFAULT && !OMIT_FRAME_POINTER
help
Hidden option to simplify access to OVERRIDE_FRAME_POINTER_DEFAULT
and OMIT_FRAME_POINTER. It is automatically enabled when the frame
pointer unwinding is enabled.
config RISCV_EXCEPTION_STACK_TRACE
bool
default y
depends on EXCEPTION_STACK_TRACE
imply THREAD_STACK_INFO
help
Internal config to enable runtime stack traces on fatal exceptions.
@ -58,10 +47,11 @@ config RISCV_EXCEPTION_STACK_TRACE
menu "RISCV Processor Options"
config INCLUDE_RESET_VECTOR
bool "Include Reset vector"
bool "Jumps to __initialize directly"
help
Include the reset vector stub, which initializes the stack and
prepares for running C code.
Select 'y' here to use the Zephyr provided default implementation that
jumps to `__initialize` directly. Otherwise a SOC needs to provide its
custom `__reset` routine.
config RISCV_PRIVILEGED
bool
@ -98,7 +88,7 @@ config RISCV_SOC_HAS_ISR_STACKING
guarded by !_ASMLANGUAGE. The ESF should be defined to account for
the hardware stacked registers in the proper order as they are
saved on the stack by the hardware, and the registers saved by the
software macros. The structure must be called '__esf'.
software macros. The structure must be called 'struct arch_esf'.
config RISCV_SOC_HAS_CUSTOM_IRQ_HANDLING
bool
@ -379,6 +369,7 @@ config ARCH_IRQ_VECTOR_TABLE_ALIGN
config RISCV_TRAP_HANDLER_ALIGNMENT
int "Alignment of RISC-V trap handler in bytes"
default 64 if RISCV_HAS_CLIC
default 4
help
This value configures the alignment of RISC-V trap handling

View file

@ -6,7 +6,6 @@ zephyr_library_sources(
cpu_idle.c
fatal.c
irq_manage.c
isr.S
prep_c.c
reboot.c
reset.S
@ -21,9 +20,10 @@ endif ()
zephyr_library_sources_ifdef(CONFIG_FPU_SHARING fpu.c fpu.S)
zephyr_library_sources_ifdef(CONFIG_DEBUG_COREDUMP coredump.c)
zephyr_library_sources_ifdef(CONFIG_IRQ_OFFLOAD irq_offload.c)
zephyr_library_sources_ifdef(CONFIG_GEN_SW_ISR_TABLE isr.S)
zephyr_library_sources_ifdef(CONFIG_RISCV_PMP pmp.c pmp.S)
zephyr_library_sources_ifdef(CONFIG_THREAD_LOCAL_STORAGE tls.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE userspace.S)
zephyr_library_sources_ifdef(CONFIG_SEMIHOST semihost.c)
zephyr_library_sources_ifdef(CONFIG_RISCV_EXCEPTION_STACK_TRACE stacktrace.c)
zephyr_library_sources_ifdef(CONFIG_EXCEPTION_STACK_TRACE stacktrace.c)
zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld)

View file

@ -67,7 +67,7 @@ struct riscv_arch_block {
*/
static struct riscv_arch_block arch_blk;
void arch_coredump_info_dump(const z_arch_esf_t *esf)
void arch_coredump_info_dump(const struct arch_esf *esf)
{
struct coredump_arch_hdr_t hdr = {
.id = COREDUMP_ARCH_HDR_ID,

View file

@ -4,7 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/debug/symtab.h>
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <kernel_internal.h>
@ -30,15 +29,15 @@ static const struct z_exc_handle exceptions[] = {
#endif
/* Stack trace function */
void z_riscv_unwind_stack(const z_arch_esf_t *esf);
void z_riscv_unwind_stack(const struct arch_esf *esf, const _callee_saved_t *csf);
uintptr_t z_riscv_get_sp_before_exc(const z_arch_esf_t *esf)
uintptr_t z_riscv_get_sp_before_exc(const struct arch_esf *esf)
{
/*
* Kernel stack pointer prior this exception i.e. before
* storing the exception stack frame.
*/
uintptr_t sp = (uintptr_t)esf + sizeof(z_arch_esf_t);
uintptr_t sp = (uintptr_t)esf + sizeof(struct arch_esf);
#ifdef CONFIG_USERSPACE
if ((esf->mstatus & MSTATUS_MPP) == PRV_U) {
@ -54,12 +53,12 @@ uintptr_t z_riscv_get_sp_before_exc(const z_arch_esf_t *esf)
}
FUNC_NORETURN void z_riscv_fatal_error(unsigned int reason,
const z_arch_esf_t *esf)
const struct arch_esf *esf)
{
z_riscv_fatal_error_csf(reason, esf, NULL);
}
FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const z_arch_esf_t *esf,
FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const struct arch_esf *esf,
const _callee_saved_t *csf)
{
#ifdef CONFIG_EXCEPTION_DEBUG
@ -80,14 +79,7 @@ FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const z_arch_esf
#endif /* CONFIG_RISCV_ISA_RV32E */
LOG_ERR(" sp: " PR_REG, z_riscv_get_sp_before_exc(esf));
LOG_ERR(" ra: " PR_REG, esf->ra);
#ifndef CONFIG_SYMTAB
LOG_ERR(" mepc: " PR_REG, esf->mepc);
#else
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(esf->mepc, &offset);
LOG_ERR(" mepc: " PR_REG " [%s+0x%x]", esf->mepc, name, offset);
#endif
LOG_ERR("mstatus: " PR_REG, esf->mstatus);
LOG_ERR("");
}
@ -107,8 +99,8 @@ FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const z_arch_esf
LOG_ERR("");
}
if (IS_ENABLED(CONFIG_RISCV_EXCEPTION_STACK_TRACE) && (esf != NULL)) {
z_riscv_unwind_stack(esf);
if (IS_ENABLED(CONFIG_EXCEPTION_STACK_TRACE)) {
z_riscv_unwind_stack(esf, csf);
}
#endif /* CONFIG_EXCEPTION_DEBUG */
@ -152,14 +144,14 @@ static char *cause_str(unsigned long cause)
}
}
static bool bad_stack_pointer(z_arch_esf_t *esf)
static bool bad_stack_pointer(struct arch_esf *esf)
{
#ifdef CONFIG_PMP_STACK_GUARD
/*
* Check if the kernel stack pointer prior this exception (before
* storing the exception stack frame) was in the stack guard area.
*/
uintptr_t sp = (uintptr_t)esf + sizeof(z_arch_esf_t);
uintptr_t sp = (uintptr_t)esf + sizeof(struct arch_esf);
#ifdef CONFIG_USERSPACE
if (_current->arch.priv_stack_start != 0 &&
@ -197,7 +189,7 @@ static bool bad_stack_pointer(z_arch_esf_t *esf)
return false;
}
void _Fault(z_arch_esf_t *esf)
void _Fault(struct arch_esf *esf)
{
#ifdef CONFIG_USERSPACE
/*
@ -249,7 +241,7 @@ FUNC_NORETURN void arch_syscall_oops(void *ssf_ptr)
void z_impl_user_fault(unsigned int reason)
{
z_arch_esf_t *oops_esf = _current->syscall_frame;
struct arch_esf *oops_esf = _current->syscall_frame;
if (((_current->base.user_options & K_USER) != 0) &&
reason != K_ERR_STACK_CHK_FAIL) {

View file

@ -204,7 +204,7 @@ void z_riscv_fpu_enter_exc(void)
* Note that the exception depth count was not incremented before this call
* as no further exceptions are expected before returning to normal mode.
*/
void z_riscv_fpu_trap(z_arch_esf_t *esf)
void z_riscv_fpu_trap(struct arch_esf *esf)
{
__ASSERT((esf->mstatus & MSTATUS_FS) == 0 &&
(csr_read(mstatus) & MSTATUS_FS) == 0,
@ -293,7 +293,7 @@ static bool fpu_access_allowed(unsigned int exc_update_level)
* This is called on every exception exit except for z_riscv_fpu_trap().
* In that case the exception level of interest is 1 (soon to be 0).
*/
void z_riscv_fpu_exit_exc(z_arch_esf_t *esf)
void z_riscv_fpu_exit_exc(struct arch_esf *esf)
{
if (fpu_access_allowed(1)) {
esf->mstatus &= ~MSTATUS_FS;

View file

@ -24,22 +24,22 @@
/* Convenience macro for loading/storing register states. */
#define DO_CALLER_SAVED(op) \
RV_E( op t0, __z_arch_esf_t_t0_OFFSET(sp) );\
RV_E( op t1, __z_arch_esf_t_t1_OFFSET(sp) );\
RV_E( op t2, __z_arch_esf_t_t2_OFFSET(sp) );\
RV_I( op t3, __z_arch_esf_t_t3_OFFSET(sp) );\
RV_I( op t4, __z_arch_esf_t_t4_OFFSET(sp) );\
RV_I( op t5, __z_arch_esf_t_t5_OFFSET(sp) );\
RV_I( op t6, __z_arch_esf_t_t6_OFFSET(sp) );\
RV_E( op a0, __z_arch_esf_t_a0_OFFSET(sp) );\
RV_E( op a1, __z_arch_esf_t_a1_OFFSET(sp) );\
RV_E( op a2, __z_arch_esf_t_a2_OFFSET(sp) );\
RV_E( op a3, __z_arch_esf_t_a3_OFFSET(sp) );\
RV_E( op a4, __z_arch_esf_t_a4_OFFSET(sp) );\
RV_E( op a5, __z_arch_esf_t_a5_OFFSET(sp) );\
RV_I( op a6, __z_arch_esf_t_a6_OFFSET(sp) );\
RV_I( op a7, __z_arch_esf_t_a7_OFFSET(sp) );\
RV_E( op ra, __z_arch_esf_t_ra_OFFSET(sp) )
RV_E( op t0, __struct_arch_esf_t0_OFFSET(sp) );\
RV_E( op t1, __struct_arch_esf_t1_OFFSET(sp) );\
RV_E( op t2, __struct_arch_esf_t2_OFFSET(sp) );\
RV_I( op t3, __struct_arch_esf_t3_OFFSET(sp) );\
RV_I( op t4, __struct_arch_esf_t4_OFFSET(sp) );\
RV_I( op t5, __struct_arch_esf_t5_OFFSET(sp) );\
RV_I( op t6, __struct_arch_esf_t6_OFFSET(sp) );\
RV_E( op a0, __struct_arch_esf_a0_OFFSET(sp) );\
RV_E( op a1, __struct_arch_esf_a1_OFFSET(sp) );\
RV_E( op a2, __struct_arch_esf_a2_OFFSET(sp) );\
RV_E( op a3, __struct_arch_esf_a3_OFFSET(sp) );\
RV_E( op a4, __struct_arch_esf_a4_OFFSET(sp) );\
RV_E( op a5, __struct_arch_esf_a5_OFFSET(sp) );\
RV_I( op a6, __struct_arch_esf_a6_OFFSET(sp) );\
RV_I( op a7, __struct_arch_esf_a7_OFFSET(sp) );\
RV_E( op ra, __struct_arch_esf_ra_OFFSET(sp) )
#ifdef CONFIG_EXCEPTION_DEBUG
/* Convenience macro for storing callee saved register [s0 - s11] states. */
@ -157,7 +157,7 @@ SECTION_FUNC(exception.entry, _isr_wrapper)
/* Save user stack value. Coming from user space, we know this
* can't overflow the privileged stack. The esf will be allocated
* later but it is safe to store our saved user sp here. */
sr t0, (-__z_arch_esf_t_SIZEOF + __z_arch_esf_t_sp_OFFSET)(sp)
sr t0, (-__struct_arch_esf_SIZEOF + __struct_arch_esf_sp_OFFSET)(sp)
/* Make sure tls pointer is sane */
lr t0, ___cpu_t_current_OFFSET(s0)
@ -180,21 +180,21 @@ SECTION_FUNC(exception.entry, _isr_wrapper)
SOC_ISR_SW_STACKING
#else
/* Save caller-saved registers on current thread stack. */
addi sp, sp, -__z_arch_esf_t_SIZEOF
addi sp, sp, -__struct_arch_esf_SIZEOF
DO_CALLER_SAVED(sr) ;
#endif /* CONFIG_RISCV_SOC_HAS_ISR_STACKING */
/* Save s0 in the esf and load it with &_current_cpu. */
sr s0, __z_arch_esf_t_s0_OFFSET(sp)
sr s0, __struct_arch_esf_s0_OFFSET(sp)
get_current_cpu s0
/* Save MEPC register */
csrr t0, mepc
sr t0, __z_arch_esf_t_mepc_OFFSET(sp)
sr t0, __struct_arch_esf_mepc_OFFSET(sp)
/* Save MSTATUS register */
csrr t2, mstatus
sr t2, __z_arch_esf_t_mstatus_OFFSET(sp)
sr t2, __struct_arch_esf_mstatus_OFFSET(sp)
#if defined(CONFIG_FPU_SHARING)
/* determine if FPU access was disabled */
@ -301,7 +301,7 @@ no_fp: /* increment _current->arch.exception_depth */
#ifdef CONFIG_RISCV_SOC_CONTEXT_SAVE
/* Handle context saving at SOC level. */
addi a0, sp, __z_arch_esf_t_soc_context_OFFSET
addi a0, sp, __struct_arch_esf_soc_context_OFFSET
jal ra, __soc_save_context
#endif /* CONFIG_RISCV_SOC_CONTEXT_SAVE */
@ -351,7 +351,7 @@ no_fp: /* increment _current->arch.exception_depth */
/*
* Call _Fault to handle exception.
* Stack pointer is pointing to a z_arch_esf_t structure, pass it
* Stack pointer is pointing to a struct_arch_esf structure, pass it
* to _Fault (via register a0).
* If _Fault shall return, set return address to
* no_reschedule to restore stack.
@ -370,9 +370,9 @@ is_kernel_syscall:
* It's safe to always increment by 4, even with compressed
* instructions, because the ecall instruction is always 4 bytes.
*/
lr t0, __z_arch_esf_t_mepc_OFFSET(sp)
lr t0, __struct_arch_esf_mepc_OFFSET(sp)
addi t0, t0, 4
sr t0, __z_arch_esf_t_mepc_OFFSET(sp)
sr t0, __struct_arch_esf_mepc_OFFSET(sp)
#ifdef CONFIG_PMP_STACK_GUARD
/* Re-activate PMP for m-mode */
@ -383,7 +383,7 @@ is_kernel_syscall:
#endif
/* Determine what to do. Operation code is in t0. */
lr t0, __z_arch_esf_t_t0_OFFSET(sp)
lr t0, __struct_arch_esf_t0_OFFSET(sp)
.if RV_ECALL_RUNTIME_EXCEPT != 0; .err; .endif
beqz t0, do_fault
@ -396,8 +396,24 @@ is_kernel_syscall:
#ifdef CONFIG_RISCV_ALWAYS_SWITCH_THROUGH_ECALL
li t1, RV_ECALL_SCHEDULE
bne t0, t1, skip_schedule
lr a0, __z_arch_esf_t_a0_OFFSET(sp)
lr a1, __z_arch_esf_t_a1_OFFSET(sp)
lr a0, __struct_arch_esf_a0_OFFSET(sp)
lr a1, __struct_arch_esf_a1_OFFSET(sp)
#ifdef CONFIG_FPU_SHARING
/*
* When an ECALL is used for a context-switch, the current thread has
* been updated to the next thread.
* Add the exception_depth back to the previous thread.
*/
lb t1, _thread_offset_to_exception_depth(a0)
add t1, t1, -1
sb t1, _thread_offset_to_exception_depth(a0)
lb t1, _thread_offset_to_exception_depth(a1)
add t1, t1, 1
sb t1, _thread_offset_to_exception_depth(a1)
#endif
j reschedule
skip_schedule:
#endif
@ -408,7 +424,7 @@ skip_schedule:
do_fault:
/* Handle RV_ECALL_RUNTIME_EXCEPT. Retrieve reason in a0, esf in A1. */
lr a0, __z_arch_esf_t_a0_OFFSET(sp)
lr a0, __struct_arch_esf_a0_OFFSET(sp)
1: mv a1, sp
#ifdef CONFIG_EXCEPTION_DEBUG
@ -431,8 +447,8 @@ do_irq_offload:
* Routine pointer is in saved a0, argument in saved a1
* so we load them with a1/a0 (reversed).
*/
lr a1, __z_arch_esf_t_a0_OFFSET(sp)
lr a0, __z_arch_esf_t_a1_OFFSET(sp)
lr a1, __struct_arch_esf_a0_OFFSET(sp)
lr a0, __struct_arch_esf_a1_OFFSET(sp)
/* Increment _current_cpu->nested */
lw t1, ___cpu_t_nested_OFFSET(s0)
@ -474,18 +490,18 @@ is_user_syscall:
* Same as for is_kernel_syscall: increment saved MEPC by 4 to
* prevent triggering the same ecall again upon exiting the ISR.
*/
lr t1, __z_arch_esf_t_mepc_OFFSET(sp)
lr t1, __struct_arch_esf_mepc_OFFSET(sp)
addi t1, t1, 4
sr t1, __z_arch_esf_t_mepc_OFFSET(sp)
sr t1, __struct_arch_esf_mepc_OFFSET(sp)
/* Restore argument registers from user stack */
lr a0, __z_arch_esf_t_a0_OFFSET(sp)
lr a1, __z_arch_esf_t_a1_OFFSET(sp)
lr a2, __z_arch_esf_t_a2_OFFSET(sp)
lr a3, __z_arch_esf_t_a3_OFFSET(sp)
lr a4, __z_arch_esf_t_a4_OFFSET(sp)
lr a5, __z_arch_esf_t_a5_OFFSET(sp)
lr t0, __z_arch_esf_t_t0_OFFSET(sp)
lr a0, __struct_arch_esf_a0_OFFSET(sp)
lr a1, __struct_arch_esf_a1_OFFSET(sp)
lr a2, __struct_arch_esf_a2_OFFSET(sp)
lr a3, __struct_arch_esf_a3_OFFSET(sp)
lr a4, __struct_arch_esf_a4_OFFSET(sp)
lr a5, __struct_arch_esf_a5_OFFSET(sp)
lr t0, __struct_arch_esf_t0_OFFSET(sp)
#if defined(CONFIG_RISCV_ISA_RV32E)
/* Stack alignment for RV32E is 4 bytes */
addi sp, sp, -4
@ -519,7 +535,7 @@ valid_syscall_id:
#endif /* CONFIG_RISCV_ISA_RV32E */
/* Update a0 (return value) on the stack */
sr a0, __z_arch_esf_t_a0_OFFSET(sp)
sr a0, __struct_arch_esf_a0_OFFSET(sp)
/* Disable IRQs again before leaving */
csrc mstatus, MSTATUS_IEN
@ -534,7 +550,7 @@ is_interrupt:
* If we came from userspace then we need to reconfigure the
* PMP for kernel mode stack guard.
*/
lr t0, __z_arch_esf_t_mstatus_OFFSET(sp)
lr t0, __struct_arch_esf_mstatus_OFFSET(sp)
li t1, MSTATUS_MPP
and t0, t0, t1
bnez t0, 1f
@ -665,7 +681,7 @@ no_reschedule:
#ifdef CONFIG_RISCV_SOC_CONTEXT_SAVE
/* Restore context at SOC level */
addi a0, sp, __z_arch_esf_t_soc_context_OFFSET
addi a0, sp, __struct_arch_esf_soc_context_OFFSET
jal ra, __soc_restore_context
#endif /* CONFIG_RISCV_SOC_CONTEXT_SAVE */
@ -683,8 +699,8 @@ fp_trap_exit:
#endif
/* Restore MEPC and MSTATUS registers */
lr t0, __z_arch_esf_t_mepc_OFFSET(sp)
lr t2, __z_arch_esf_t_mstatus_OFFSET(sp)
lr t0, __struct_arch_esf_mepc_OFFSET(sp)
lr t2, __struct_arch_esf_mstatus_OFFSET(sp)
csrw mepc, t0
csrw mstatus, t2
@ -711,7 +727,7 @@ fp_trap_exit:
sb t1, %tprel_lo(is_user_mode)(t0)
/* preserve stack pointer for next exception entry */
add t0, sp, __z_arch_esf_t_SIZEOF
add t0, sp, __struct_arch_esf_SIZEOF
sr t0, _curr_cpu_arch_user_exc_sp(s0)
j 2f
@ -720,13 +736,13 @@ fp_trap_exit:
* We are returning to kernel mode. Store the stack pointer to
* be re-loaded further down.
*/
addi t0, sp, __z_arch_esf_t_SIZEOF
sr t0, __z_arch_esf_t_sp_OFFSET(sp)
addi t0, sp, __struct_arch_esf_SIZEOF
sr t0, __struct_arch_esf_sp_OFFSET(sp)
2:
#endif
/* Restore s0 (it is no longer ours) */
lr s0, __z_arch_esf_t_s0_OFFSET(sp)
lr s0, __struct_arch_esf_s0_OFFSET(sp)
#ifdef CONFIG_RISCV_SOC_HAS_ISR_STACKING
SOC_ISR_SW_UNSTACKING
@ -736,10 +752,10 @@ fp_trap_exit:
#ifdef CONFIG_USERSPACE
/* retrieve saved stack pointer */
lr sp, __z_arch_esf_t_sp_OFFSET(sp)
lr sp, __struct_arch_esf_sp_OFFSET(sp)
#else
/* remove esf from the stack */
addi sp, sp, __z_arch_esf_t_SIZEOF
addi sp, sp, __struct_arch_esf_SIZEOF
#endif
#endif /* CONFIG_RISCV_SOC_HAS_ISR_STACKING */

View file

@ -13,6 +13,7 @@
* structures.
*/
#include <zephyr/arch/exception.h>
#include <zephyr/kernel.h>
#include <kernel_arch_data.h>
#include <gen_offset.h>
@ -88,43 +89,43 @@ GEN_OFFSET_SYM(_thread_arch_t, exception_depth);
#endif /* CONFIG_FPU_SHARING */
/* esf member offsets */
GEN_OFFSET_SYM(z_arch_esf_t, ra);
GEN_OFFSET_SYM(z_arch_esf_t, t0);
GEN_OFFSET_SYM(z_arch_esf_t, t1);
GEN_OFFSET_SYM(z_arch_esf_t, t2);
GEN_OFFSET_SYM(z_arch_esf_t, a0);
GEN_OFFSET_SYM(z_arch_esf_t, a1);
GEN_OFFSET_SYM(z_arch_esf_t, a2);
GEN_OFFSET_SYM(z_arch_esf_t, a3);
GEN_OFFSET_SYM(z_arch_esf_t, a4);
GEN_OFFSET_SYM(z_arch_esf_t, a5);
GEN_OFFSET_STRUCT(arch_esf, ra);
GEN_OFFSET_STRUCT(arch_esf, t0);
GEN_OFFSET_STRUCT(arch_esf, t1);
GEN_OFFSET_STRUCT(arch_esf, t2);
GEN_OFFSET_STRUCT(arch_esf, a0);
GEN_OFFSET_STRUCT(arch_esf, a1);
GEN_OFFSET_STRUCT(arch_esf, a2);
GEN_OFFSET_STRUCT(arch_esf, a3);
GEN_OFFSET_STRUCT(arch_esf, a4);
GEN_OFFSET_STRUCT(arch_esf, a5);
#if !defined(CONFIG_RISCV_ISA_RV32E)
GEN_OFFSET_SYM(z_arch_esf_t, t3);
GEN_OFFSET_SYM(z_arch_esf_t, t4);
GEN_OFFSET_SYM(z_arch_esf_t, t5);
GEN_OFFSET_SYM(z_arch_esf_t, t6);
GEN_OFFSET_SYM(z_arch_esf_t, a6);
GEN_OFFSET_SYM(z_arch_esf_t, a7);
GEN_OFFSET_STRUCT(arch_esf, t3);
GEN_OFFSET_STRUCT(arch_esf, t4);
GEN_OFFSET_STRUCT(arch_esf, t5);
GEN_OFFSET_STRUCT(arch_esf, t6);
GEN_OFFSET_STRUCT(arch_esf, a6);
GEN_OFFSET_STRUCT(arch_esf, a7);
#endif /* !CONFIG_RISCV_ISA_RV32E */
GEN_OFFSET_SYM(z_arch_esf_t, mepc);
GEN_OFFSET_SYM(z_arch_esf_t, mstatus);
GEN_OFFSET_STRUCT(arch_esf, mepc);
GEN_OFFSET_STRUCT(arch_esf, mstatus);
GEN_OFFSET_SYM(z_arch_esf_t, s0);
GEN_OFFSET_STRUCT(arch_esf, s0);
#ifdef CONFIG_USERSPACE
GEN_OFFSET_SYM(z_arch_esf_t, sp);
GEN_OFFSET_STRUCT(arch_esf, sp);
#endif
#if defined(CONFIG_RISCV_SOC_CONTEXT_SAVE)
GEN_OFFSET_SYM(z_arch_esf_t, soc_context);
GEN_OFFSET_STRUCT(arch_esf, soc_context);
#endif
#if defined(CONFIG_RISCV_SOC_OFFSETS)
GEN_SOC_OFFSET_SYMS();
#endif
GEN_ABSOLUTE_SYM(__z_arch_esf_t_SIZEOF, sizeof(z_arch_esf_t));
GEN_ABSOLUTE_SYM(__struct_arch_esf_SIZEOF, sizeof(struct arch_esf));
#ifdef CONFIG_EXCEPTION_DEBUG
GEN_ABSOLUTE_SYM(__callee_saved_t_SIZEOF, ROUND_UP(sizeof(_callee_saved_t), ARCH_STACK_PTR_ALIGN));

View file

@ -204,6 +204,34 @@ static bool set_pmp_entry(unsigned int *index_p, uint8_t perm,
return ok;
}
static inline bool set_pmp_mprv_catchall(unsigned int *index_p,
unsigned long *pmp_addr, unsigned long *pmp_cfg,
unsigned int index_limit)
{
/*
* We'll be using MPRV. Make a fallback entry with everything
* accessible as if no PMP entries were matched which is otherwise
* the default behavior for m-mode without MPRV.
*/
bool ok = set_pmp_entry(index_p, PMP_R | PMP_W | PMP_X,
0, 0, pmp_addr, pmp_cfg, index_limit);
#ifdef CONFIG_QEMU_TARGET
if (ok) {
/*
* Workaround: The above produced 0x1fffffff which is correct.
* But there is a QEMU bug that prevents it from interpreting
* this value correctly. Hardcode the special case used by
* QEMU to bypass this bug for now. The QEMU fix is here:
* https://lists.gnu.org/archive/html/qemu-devel/2022-04/msg00961.html
*/
pmp_addr[*index_p - 1] = -1L;
}
#endif
return ok;
}
/**
* @brief Write a range of PMP entries to corresponding PMP registers
*
@ -320,8 +348,8 @@ static unsigned int global_pmp_end_index;
*/
void z_riscv_pmp_init(void)
{
unsigned long pmp_addr[4];
unsigned long pmp_cfg[1];
unsigned long pmp_addr[5];
unsigned long pmp_cfg[2];
unsigned int index = 0;
/* The read-only area is always there for every mode */
@ -351,10 +379,28 @@ void z_riscv_pmp_init(void)
(uintptr_t)z_interrupt_stacks[_current_cpu->id],
Z_RISCV_STACK_GUARD_SIZE,
pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
#endif
/*
* This early, the kernel init code uses the IRQ stack and we want to
* safeguard it as soon as possible. But we need a temporary default
* "catch all" PMP entry for MPRV to work. Later on, this entry will
* be set for each thread by z_riscv_pmp_stackguard_prepare().
*/
set_pmp_mprv_catchall(&index, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
/* Write those entries to PMP regs. */
write_pmp_entries(0, index, true, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
/* Activate our non-locked PMP entries for m-mode */
csr_set(mstatus, MSTATUS_MPRV);
/* And forget about that last entry as we won't need it later */
index--;
#else
/* Write those entries to PMP regs. */
write_pmp_entries(0, index, true, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
#endif
#ifdef CONFIG_SMP
#ifdef CONFIG_PMP_STACK_GUARD
/*
@ -373,6 +419,7 @@ void z_riscv_pmp_init(void)
}
#endif
__ASSERT(index <= PMPCFG_STRIDE, "provision for one global word only");
global_pmp_cfg[0] = pmp_cfg[0];
global_pmp_last_addr = pmp_addr[index - 1];
global_pmp_end_index = index;
@ -429,24 +476,7 @@ void z_riscv_pmp_stackguard_prepare(struct k_thread *thread)
set_pmp_entry(&index, PMP_NONE,
stack_bottom, Z_RISCV_STACK_GUARD_SIZE,
PMP_M_MODE(thread));
/*
* We'll be using MPRV. Make a fallback entry with everything
* accessible as if no PMP entries were matched which is otherwise
* the default behavior for m-mode without MPRV.
*/
set_pmp_entry(&index, PMP_R | PMP_W | PMP_X,
0, 0, PMP_M_MODE(thread));
#ifdef CONFIG_QEMU_TARGET
/*
* Workaround: The above produced 0x1fffffff which is correct.
* But there is a QEMU bug that prevents it from interpreting this
* value correctly. Hardcode the special case used by QEMU to
* bypass this bug for now. The QEMU fix is here:
* https://lists.gnu.org/archive/html/qemu-devel/2022-04/msg00961.html
*/
thread->arch.m_mode_pmpaddr_regs[index-1] = -1L;
#endif
set_pmp_mprv_catchall(&index, PMP_M_MODE(thread));
/* remember how many entries we use */
thread->arch.m_mode_pmp_end_index = index;

View file

@ -7,6 +7,7 @@
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <ksched.h>
#include <ipi.h>
#include <zephyr/irq.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/arch/riscv/irq.h>
@ -86,14 +87,15 @@ static atomic_val_t cpu_pending_ipi[CONFIG_MP_MAX_NUM_CPUS];
#define IPI_SCHED 0
#define IPI_FPU_FLUSH 1
void arch_sched_ipi(void)
void arch_sched_directed_ipi(uint32_t cpu_bitmap)
{
unsigned int key = arch_irq_lock();
unsigned int id = _current_cpu->id;
unsigned int num_cpus = arch_num_cpus();
for (unsigned int i = 0; i < num_cpus; i++) {
if (i != id && _kernel.cpus[i].arch.online) {
if ((i != id) && _kernel.cpus[i].arch.online &&
((cpu_bitmap & BIT(i)) != 0)) {
atomic_set_bit(&cpu_pending_ipi[i], IPI_SCHED);
MSIP(_kernel.cpus[i].arch.hartid) = 1;
}
@ -102,6 +104,11 @@ void arch_sched_ipi(void)
arch_irq_unlock(key);
}
void arch_sched_broadcast_ipi(void)
{
arch_sched_directed_ipi(IPI_ALL_CPUS_MASK);
}
#ifdef CONFIG_FPU_SHARING
void arch_flush_fpu_ipi(unsigned int cpu)
{
@ -165,5 +172,4 @@ int arch_smp_init(void)
return 0;
}
SYS_INIT(arch_smp_init, PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif /* CONFIG_SMP */

View file

@ -12,70 +12,96 @@
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
uintptr_t z_riscv_get_sp_before_exc(const z_arch_esf_t *esf);
uintptr_t z_riscv_get_sp_before_exc(const struct arch_esf *esf);
#if __riscv_xlen == 32
#define PR_REG "%08" PRIxPTR
#elif __riscv_xlen == 64
#define PR_REG "%016" PRIxPTR
#endif
#define MAX_STACK_FRAMES CONFIG_EXCEPTION_STACK_TRACE_MAX_FRAMES
#define MAX_STACK_FRAMES \
MAX(CONFIG_EXCEPTION_STACK_TRACE_MAX_FRAMES, CONFIG_ARCH_STACKWALK_MAX_FRAMES)
struct stackframe {
uintptr_t fp;
uintptr_t ra;
};
#ifdef CONFIG_RISCV_ENABLE_FRAME_POINTER
#define SFP_FMT "fp: "
#else
#define SFP_FMT "sp: "
#endif
typedef bool (*stack_verify_fn)(uintptr_t, const struct k_thread *const, const struct arch_esf *);
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
#define LOG_STACK_TRACE(idx, sfp, ra, name, offset) \
LOG_ERR(" %2d: " SFP_FMT PR_REG " ra: " PR_REG " [%s+0x%x]", idx, sfp, ra, name, \
offset)
#else
#define LOG_STACK_TRACE(idx, sfp, ra, name, offset) \
LOG_ERR(" %2d: " SFP_FMT PR_REG " ra: " PR_REG, idx, sfp, ra)
#endif
static inline bool in_irq_stack_bound(uintptr_t addr, uint8_t cpu_id)
{
uintptr_t start, end;
static bool in_stack_bound(uintptr_t addr, const z_arch_esf_t *esf)
start = (uintptr_t)K_KERNEL_STACK_BUFFER(z_interrupt_stacks[cpu_id]);
end = start + CONFIG_ISR_STACK_SIZE;
return (addr >= start) && (addr < end);
}
static inline bool in_kernel_thread_stack_bound(uintptr_t addr, const struct k_thread *const thread)
{
#ifdef CONFIG_THREAD_STACK_INFO
uintptr_t start, end;
if (_current == NULL || arch_is_in_isr()) {
/* We were servicing an interrupt */
uint8_t cpu_id = IS_ENABLED(CONFIG_SMP) ? arch_curr_cpu()->id : 0U;
start = (uintptr_t)K_KERNEL_STACK_BUFFER(z_interrupt_stacks[cpu_id]);
end = start + CONFIG_ISR_STACK_SIZE;
#ifdef CONFIG_USERSPACE
} else if (((esf->mstatus & MSTATUS_MPP) == PRV_U) &&
((_current->base.user_options & K_USER) != 0)) {
/* See: zephyr/include/zephyr/arch/riscv/arch.h */
if (IS_ENABLED(CONFIG_PMP_POWER_OF_TWO_ALIGNMENT)) {
start = _current->arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE;
end = _current->arch.priv_stack_start;
} else {
start = _current->stack_info.start - CONFIG_PRIVILEGED_STACK_SIZE;
end = _current->stack_info.start;
}
#endif /* CONFIG_USERSPACE */
} else {
start = _current->stack_info.start;
end = Z_STACK_PTR_ALIGN(_current->stack_info.start + _current->stack_info.size);
}
start = thread->stack_info.start;
end = Z_STACK_PTR_ALIGN(thread->stack_info.start + thread->stack_info.size);
return (addr >= start) && (addr < end);
#else
ARG_UNUSED(addr);
ARG_UNUSED(thread);
/* Return false as we can't check if the addr is in the thread stack without stack info */
return false;
#endif
}
#ifdef CONFIG_USERSPACE
static inline bool in_user_thread_stack_bound(uintptr_t addr, const struct k_thread *const thread)
{
uintptr_t start, end;
/* See: zephyr/include/zephyr/arch/riscv/arch.h */
if (IS_ENABLED(CONFIG_PMP_POWER_OF_TWO_ALIGNMENT)) {
start = thread->arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE;
end = thread->arch.priv_stack_start;
} else {
start = thread->stack_info.start - CONFIG_PRIVILEGED_STACK_SIZE;
end = thread->stack_info.start;
}
return (addr >= start) && (addr < end);
}
#endif /* CONFIG_USERSPACE */
static bool in_stack_bound(uintptr_t addr, const struct k_thread *const thread,
const struct arch_esf *esf)
{
ARG_UNUSED(esf);
return true;
#endif /* CONFIG_THREAD_STACK_INFO */
if (!IS_ALIGNED(addr, sizeof(uintptr_t))) {
return false;
}
#ifdef CONFIG_USERSPACE
if ((thread->base.user_options & K_USER) != 0) {
return in_user_thread_stack_bound(addr, thread);
}
#endif /* CONFIG_USERSPACE */
return in_kernel_thread_stack_bound(addr, thread);
}
static bool in_fatal_stack_bound(uintptr_t addr, const struct k_thread *const thread,
const struct arch_esf *esf)
{
if (!IS_ALIGNED(addr, sizeof(uintptr_t))) {
return false;
}
if ((thread == NULL) || arch_is_in_isr()) {
/* We were servicing an interrupt */
uint8_t cpu_id = IS_ENABLED(CONFIG_SMP) ? arch_curr_cpu()->id : 0U;
return in_irq_stack_bound(addr, cpu_id);
}
return in_stack_bound(addr, thread, esf);
}
static inline bool in_text_region(uintptr_t addr)
@ -85,62 +111,134 @@ static inline bool in_text_region(uintptr_t addr)
return (addr >= (uintptr_t)&__text_region_start) && (addr < (uintptr_t)&__text_region_end);
}
#ifdef CONFIG_RISCV_ENABLE_FRAME_POINTER
void z_riscv_unwind_stack(const z_arch_esf_t *esf)
#ifdef CONFIG_FRAME_POINTER
static void walk_stackframe(stack_trace_callback_fn cb, void *cookie, const struct k_thread *thread,
const struct arch_esf *esf, stack_verify_fn vrfy,
const _callee_saved_t *csf)
{
uintptr_t fp = esf->s0;
uintptr_t fp, last_fp = 0;
uintptr_t ra;
struct stackframe *frame;
LOG_ERR("call trace:");
if (esf != NULL) {
/* Unwind the provided exception stack frame */
fp = esf->s0;
ra = esf->mepc;
} else if ((csf == NULL) || (csf == &_current->callee_saved)) {
/* Unwind current thread (default case when nothing is provided ) */
fp = (uintptr_t)__builtin_frame_address(0);
ra = (uintptr_t)walk_stackframe;
} else {
/* Unwind the provided thread */
fp = csf->s0;
ra = csf->ra;
}
for (int i = 0; (i < MAX_STACK_FRAMES) && (fp != 0U) && in_stack_bound(fp, esf);) {
for (int i = 0; (i < MAX_STACK_FRAMES) && vrfy(fp, thread, esf) && (fp > last_fp);) {
if (in_text_region(ra)) {
if (!cb(cookie, ra)) {
break;
}
/*
* Increment the iterator only if `ra` is within the text region to get the
* most out of it
*/
i++;
}
last_fp = fp;
/* Unwind to the previous frame */
frame = (struct stackframe *)fp - 1;
ra = frame->ra;
if (in_text_region(ra)) {
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(ra, &offset);
#endif
LOG_STACK_TRACE(i, fp, ra, name, offset);
/*
* Increment the iterator only if `ra` is within the text region to get the
* most out of it
*/
i++;
}
fp = frame->fp;
}
LOG_ERR("");
}
#else /* !CONFIG_RISCV_ENABLE_FRAME_POINTER */
void z_riscv_unwind_stack(const z_arch_esf_t *esf)
#else /* !CONFIG_FRAME_POINTER */
register uintptr_t current_stack_pointer __asm__("sp");
static void walk_stackframe(stack_trace_callback_fn cb, void *cookie, const struct k_thread *thread,
const struct arch_esf *esf, stack_verify_fn vrfy,
const _callee_saved_t *csf)
{
uintptr_t sp = z_riscv_get_sp_before_exc(esf);
uintptr_t sp;
uintptr_t ra;
uintptr_t *ksp = (uintptr_t *)sp;
uintptr_t *ksp, last_ksp = 0;
LOG_ERR("call trace:");
if (esf != NULL) {
/* Unwind the provided exception stack frame */
sp = z_riscv_get_sp_before_exc(esf);
ra = esf->mepc;
} else if ((csf == NULL) || (csf == &_current->callee_saved)) {
/* Unwind current thread (default case when nothing is provided ) */
sp = current_stack_pointer;
ra = (uintptr_t)walk_stackframe;
} else {
/* Unwind the provided thread */
sp = csf->sp;
ra = csf->ra;
for (int i = 0; (i < MAX_STACK_FRAMES) && ((uintptr_t)ksp != 0U) &&
in_stack_bound((uintptr_t)ksp, esf);
ksp++) {
ra = *ksp;
}
ksp = (uintptr_t *)sp;
for (int i = 0; (i < MAX_STACK_FRAMES) && vrfy((uintptr_t)ksp, thread, esf) &&
((uintptr_t)ksp > last_ksp);) {
if (in_text_region(ra)) {
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(ra, &offset);
#endif
LOG_STACK_TRACE(i, (uintptr_t)ksp, ra, name, offset);
if (!cb(cookie, ra)) {
break;
}
/*
* Increment the iterator only if `ra` is within the text region to get the
* most out of it
*/
i++;
}
last_ksp = (uintptr_t)ksp;
/* Unwind to the previous frame */
ra = ((struct arch_esf *)ksp++)->ra;
}
}
#endif /* CONFIG_FRAME_POINTER */
void arch_stack_walk(stack_trace_callback_fn callback_fn, void *cookie,
const struct k_thread *thread, const struct arch_esf *esf)
{
if (thread == NULL) {
/* In case `thread` is NULL, default that to `_current` and try to unwind */
thread = _current;
}
walk_stackframe(callback_fn, cookie, thread, esf, in_stack_bound, &thread->callee_saved);
}
#if __riscv_xlen == 32
#define PR_REG "%08" PRIxPTR
#elif __riscv_xlen == 64
#define PR_REG "%016" PRIxPTR
#endif
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
#define LOG_STACK_TRACE(idx, ra, name, offset) \
LOG_ERR(" %2d: ra: " PR_REG " [%s+0x%x]", idx, ra, name, offset)
#else
#define LOG_STACK_TRACE(idx, ra, name, offset) LOG_ERR(" %2d: ra: " PR_REG, idx, ra)
#endif /* CONFIG_EXCEPTION_STACK_TRACE_SYMTAB */
static bool print_trace_address(void *arg, unsigned long ra)
{
int *i = arg;
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(ra, &offset);
#endif
LOG_STACK_TRACE((*i)++, ra, name, offset);
return true;
}
void z_riscv_unwind_stack(const struct arch_esf *esf, const _callee_saved_t *csf)
{
int i = 0;
LOG_ERR("call trace:");
walk_stackframe(print_trace_address, &i, _current, esf, in_fatal_stack_bound, csf);
LOG_ERR("");
}
#endif /* CONFIG_RISCV_ENABLE_FRAME_POINTER */

View file

@ -23,15 +23,15 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
void *p1, void *p2, void *p3)
{
extern void z_riscv_thread_start(void);
struct __esf *stack_init;
struct arch_esf *stack_init;
#ifdef CONFIG_RISCV_SOC_CONTEXT_SAVE
const struct soc_esf soc_esf_init = {SOC_ESF_INIT};
#endif
/* Initial stack frame for thread */
stack_init = (struct __esf *)Z_STACK_PTR_ALIGN(
Z_STACK_PTR_TO_FRAME(struct __esf, stack_ptr)
stack_init = (struct arch_esf *)Z_STACK_PTR_ALIGN(
Z_STACK_PTR_TO_FRAME(struct arch_esf, stack_ptr)
);
/* Setup the initial stack frame */
@ -212,6 +212,8 @@ FUNC_NORETURN void z_riscv_switch_to_main_no_multithreading(k_thread_entry_t mai
main_stack = (K_THREAD_STACK_BUFFER(z_main_stack) +
K_THREAD_STACK_SIZEOF(z_main_stack));
irq_unlock(MSTATUS_IEN);
__asm__ volatile (
"mv sp, %0; jalr ra, %1, 0"
:

View file

@ -71,9 +71,9 @@ arch_switch(void *switch_to, void **switched_from)
/* Thin wrapper around z_riscv_fatal_error_csf */
FUNC_NORETURN void z_riscv_fatal_error(unsigned int reason,
const z_arch_esf_t *esf);
const struct arch_esf *esf);
FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const z_arch_esf_t *esf,
FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const struct arch_esf *esf,
const _callee_saved_t *csf);
static inline bool arch_is_in_isr(void)

View file

@ -122,7 +122,7 @@ static const struct {
{ .tt = 0x0A, .desc = "tag_overflow", },
};
static void print_trap_type(const z_arch_esf_t *esf)
static void print_trap_type(const struct arch_esf *esf)
{
const int tt = (esf->tbr & TBR_TT) >> TBR_TT_BIT;
const char *desc = "unknown";
@ -142,7 +142,7 @@ static void print_trap_type(const z_arch_esf_t *esf)
LOG_ERR("tt = 0x%02X, %s", tt, desc);
}
static void print_integer_registers(const z_arch_esf_t *esf)
static void print_integer_registers(const struct arch_esf *esf)
{
const struct savearea *flushed = (struct savearea *) esf->out[6];
@ -159,7 +159,7 @@ static void print_integer_registers(const z_arch_esf_t *esf)
}
}
static void print_special_registers(const z_arch_esf_t *esf)
static void print_special_registers(const struct arch_esf *esf)
{
LOG_ERR(
"psr: %08x wim: %08x tbr: %08x y: %08x",
@ -168,7 +168,7 @@ static void print_special_registers(const z_arch_esf_t *esf)
LOG_ERR(" pc: %08x npc: %08x", esf->pc, esf->npc);
}
static void print_backtrace(const z_arch_esf_t *esf)
static void print_backtrace(const struct arch_esf *esf)
{
const int MAX_LOGLINES = 40;
const struct savearea *s = (struct savearea *) esf->out[6];
@ -190,7 +190,7 @@ static void print_backtrace(const z_arch_esf_t *esf)
}
}
static void print_all(const z_arch_esf_t *esf)
static void print_all(const struct arch_esf *esf)
{
LOG_ERR("");
print_trap_type(esf);
@ -205,7 +205,7 @@ static void print_all(const z_arch_esf_t *esf)
#endif /* CONFIG_EXCEPTION_DEBUG */
FUNC_NORETURN void z_sparc_fatal_error(unsigned int reason,
const z_arch_esf_t *esf)
const struct arch_esf *esf)
{
#if CONFIG_EXCEPTION_DEBUG
if (esf != NULL) {

View file

@ -72,7 +72,7 @@ SECTION_FUNC(TEXT, __sparc_trap_except_reason)
mov %l5, %g3
/* Allocate an ABI stack frame and exception stack frame */
sub %fp, 96 + __z_arch_esf_t_SIZEOF, %sp
sub %fp, 96 + __struct_arch_esf_SIZEOF, %sp
/*
* %fp: %sp of interrupted task
* %sp: %sp of interrupted task - ABI_frame - esf
@ -81,19 +81,19 @@ SECTION_FUNC(TEXT, __sparc_trap_except_reason)
mov %l7, %o0
/* Fill in the content of the exception stack frame */
#if defined(CONFIG_EXTRA_EXCEPTION_INFO)
std %i0, [%sp + 96 + __z_arch_esf_t_out_OFFSET + 0x00]
std %i2, [%sp + 96 + __z_arch_esf_t_out_OFFSET + 0x08]
std %i4, [%sp + 96 + __z_arch_esf_t_out_OFFSET + 0x10]
std %i6, [%sp + 96 + __z_arch_esf_t_out_OFFSET + 0x18]
std %g0, [%sp + 96 + __z_arch_esf_t_global_OFFSET + 0x00]
std %g2, [%sp + 96 + __z_arch_esf_t_global_OFFSET + 0x08]
std %g4, [%sp + 96 + __z_arch_esf_t_global_OFFSET + 0x10]
std %g6, [%sp + 96 + __z_arch_esf_t_global_OFFSET + 0x18]
std %i0, [%sp + 96 + __struct_arch_esf_out_OFFSET + 0x00]
std %i2, [%sp + 96 + __struct_arch_esf_out_OFFSET + 0x08]
std %i4, [%sp + 96 + __struct_arch_esf_out_OFFSET + 0x10]
std %i6, [%sp + 96 + __struct_arch_esf_out_OFFSET + 0x18]
std %g0, [%sp + 96 + __struct_arch_esf_global_OFFSET + 0x00]
std %g2, [%sp + 96 + __struct_arch_esf_global_OFFSET + 0x08]
std %g4, [%sp + 96 + __struct_arch_esf_global_OFFSET + 0x10]
std %g6, [%sp + 96 + __struct_arch_esf_global_OFFSET + 0x18]
#endif
std %l0, [%sp + 96 + __z_arch_esf_t_psr_OFFSET] /* psr pc */
std %l2, [%sp + 96 + __z_arch_esf_t_npc_OFFSET] /* npc wim */
std %l0, [%sp + 96 + __struct_arch_esf_psr_OFFSET] /* psr pc */
std %l2, [%sp + 96 + __struct_arch_esf_npc_OFFSET] /* npc wim */
rd %y, %l7
std %l6, [%sp + 96 + __z_arch_esf_t_tbr_OFFSET] /* tbr y */
std %l6, [%sp + 96 + __struct_arch_esf_tbr_OFFSET] /* tbr y */
/* Enable traps, raise PIL to mask all maskable interrupts. */
or %l0, PSR_PIL, %o2

View file

@ -31,11 +31,11 @@ GEN_OFFSET_SYM(_callee_saved_t, i6);
GEN_OFFSET_SYM(_callee_saved_t, o6);
/* esf member offsets */
GEN_OFFSET_SYM(z_arch_esf_t, out);
GEN_OFFSET_SYM(z_arch_esf_t, global);
GEN_OFFSET_SYM(z_arch_esf_t, npc);
GEN_OFFSET_SYM(z_arch_esf_t, psr);
GEN_OFFSET_SYM(z_arch_esf_t, tbr);
GEN_ABSOLUTE_SYM(__z_arch_esf_t_SIZEOF, STACK_ROUND_UP(sizeof(z_arch_esf_t)));
GEN_OFFSET_STRUCT(arch_esf, out);
GEN_OFFSET_STRUCT(arch_esf, global);
GEN_OFFSET_STRUCT(arch_esf, npc);
GEN_OFFSET_STRUCT(arch_esf, psr);
GEN_OFFSET_STRUCT(arch_esf, tbr);
GEN_ABSOLUTE_SYM(__struct_arch_esf_SIZEOF, sizeof(struct arch_esf));
GEN_ABS_SYM_END

View file

@ -43,7 +43,7 @@ static inline void arch_switch(void *switch_to, void **switched_from)
}
FUNC_NORETURN void z_sparc_fatal_error(unsigned int reason,
const z_arch_esf_t *esf);
const struct arch_esf *esf);
static inline bool arch_is_in_isr(void)
{

View file

@ -166,7 +166,9 @@ endmenu
config X86_EXCEPTION_STACK_TRACE
bool
default y
depends on EXCEPTION_STACK_TRACE
select DEBUG_INFO
select THREAD_STACK_INFO
depends on !OMIT_FRAME_POINTER
help
Internal config to enable runtime stack traces on fatal exceptions.

Some files were not shown because too many files have changed in this diff Show more