Commit graph

100972 commits

Author SHA1 Message Date
Jeppe Odgaard
6446ce8982 drivers: rtc: rtc_ll_stm32: add hse clock support
Add support for HSE as the RTC clock source.

The initial implementation has the following limitations:
 - Only whole MHz HSE frequency is supported, e.g. 24.5 MHz will generate a
 compile error.
 - Frequencies equal or above 64 MHz are not supported and will generate a
   compile error.

The implementation has been tested on nucleo_h563zi with:
 - 8 MHz (via hse-bypass)
 - 25 MHz (via external crystal)

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-08-28 06:51:00 -04:00
Anke Xiao
59655d4e08 tests: drivers: add flexio pwm and spi support for ke17z
pwm: pwm_api: update testcase.yaml and add new overlay configuration
to support flexio pwm driver.
spi: spi_loopback: update testcase.yaml and add new overlay
configuration to support flexio spi driver.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Anke Xiao
594bf682e1 boards: nxp: update pinctrl dtsi for ke17z
Add flexio pwm pinctrl configuration to support flexio pwm

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Anke Xiao
883f36c448 soc: nxp: kinetis: ke1xz: update soc.c to add flexio clock
Add flexio clock configuration, and select the clock source.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Anke Xiao
04ae22eb22 drivers: spi: update spi_mcux_flexio.c
After testing the flexio spi_loopback on the ke1xz platform,
it is found that the master transfer and receive are not
synchronized. So add loop code to wait for the master transfer
to complete for frdm_ke17z and frdm_ke17z512 platforms.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Anke Xiao
41f9d52c07 dts: arm: nxp: nxp_ke1xz.dtsi: add flexio information
Add flexio support for frdm_ke17z and frdm_ke17z512.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Andrzej Drabarek
166b9bf35a soc: polarfire: split into cpu clusters
Split Polarfire SoC into CPU clusters as they have different
capabilities.

Signed-off-by: Andrzej Drabarek <adrabarek@antmicro.com>
2024-08-28 06:50:40 -04:00
Daniel Leung
82d56e8f0b tests: thread_analyzer: test for privileged stacks usage
This adds the bits to test the displaying the usage of
privileged stacks for user threads. Note that this only
adds the printk part as this is to test the code path to
fetch usage data rather than the display part.

Also add qemu_xtensa/dc233c/mmu to platform allow list so
the privileged stack code can be tested on that platform.

This replaces mps2/an385 with qemu_x86 as an integration
platform due to the privileged stack test. Since ARM does
not currently support getting privileged stack info, test
would result in twister error due to kconfig warnings.
The board cannot be excluded since it's an integration
platform. So for now, use qemu_x86 as an integration for
32-bit testing. Once ARM has proper support, we can go
back to having mps2/an385 as an integration platform.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
96bb97a54f tests: thread_analyzer: disable QEMU icount
This disables QEMU icount for all the simulated platforms
in the allowed list. With icount enabled, the printout from
the thread analyzer would be continuous and non-stop instead
of the default once every 60 seconds. Besides, the console
harness only needs one, and these is no need to waste CPU
cycles and memory for processing the extra ones.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
0962114f2b riscv: implements arch_thread_priv_stack_space_get
This implements arch_thread_priv_stack_space_get() so this can
be used to figure out how much privileged stack space is used.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
bb313355f3 riscv: initialize privileged stack during thread init
This adds the bits to initialize the privileged stack when
a thread is transitioning to user mode. This prevents
information leaking if the stack is reused, and also aids
in calculating stack space usage during system calls.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
55ee97c7d2 xtensa: implements arch_thread_priv_stack_space_get
This implements arch_thread_priv_stack_space_get() so this can
be used to figure out how much privileged stack space is used.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
1dc02fcbda xtensa: initialize privileged stack during thread init
This adds the bits to initialize the privileged stack for
each thread during thread initialization. This prevents
information leaking if the thread stack is reused, and
also aids in calculating stack space usage during system
calls.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
d736af8d26 x86: implements arch_thread_priv_stack_space_get
This implements arch_thread_priv_stack_space_get() so this can
be used to figure out how much privileged stack space is used.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
fb0babacee x86: initialize privileged stack during thread init
This adds the bits to initialize the privileged stack for
each thread during thread initialization. This prevents
information leaking if the thread stack is reused, and
also aids in calculating stack space usage during system
calls.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
c25fa96a68 x86: only set psp pointer for thread stacks
Only set the privileged stack pointer for thread stacks, but
nullify the pointer for kernel-only stacks, as these stacks
do not have the reserved space. The psp pointer may point to
arbitrary memory in this case if stack is not big enough.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
d26b7d4ed1 debug: thread_analyzer: display privileged stack usage
This adds the bits to display privileged stack usage for
architectures that support obtaining this information.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
aa65842e95 debug: thread_analyzer: align output
The per-thread output after the first stack usage line is not
aligned which makes it harder to decipher the content.
So align them for easier reading.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
b4c455c754 arch: add interface to get stack space of privileged stack
This adds a new arch_thread_priv_stack_space_get() interface for
each architecture to report privileged stack space usage. Each
architecture will need to implement this function as each arch
has their own way of defining privileged stacks.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Marcin Niestroj
2b9ce2eef6 samples: sockets: echo_server: fix IPPROTO_IPV6 on UDP sockets
IPPROTO_IPV6 option was set on TCP socket (besides doing it already in
tcp.c) instead of UDP. Fix that.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-28 06:50:20 -04:00
Benjamin Cabé
346031d060 ci: github: bump tj-actions/changed-files version
Bump tj-actions/changed-files to latest (v45).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:50:10 -04:00
Benjamin Cabé
501fa47c4f ci: bsim tests: also run BabbleSim Tests on deleted files
Use correct output for the changed-files action so that bsim tests are
also run on deleted files, no just added/copied/modified/renamed

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:50:10 -04:00
Benjamin Cabé
178e940a45 ci: doc: build documentation in CI when files are deleted
Use correct output for the changed-files action so that docs
is built in CI when relevant files are *deleted* too, not just
added/renamed/modified

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:50:10 -04:00
Benjamin Cabé
3f722e1b4d ci: github: bump dawidd6/action-download-artifact from 3 to 6
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 3 to 6.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v3...v6)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:49:54 -04:00
Benjamin Cabé
f2c5736f95 ci: github: bump actions/stale from 8 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:49:54 -04:00
Benjamin Cabé
ae0e99d436 ci: github: bump fsfe/reuse-action from 1 to 4
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 1 to 4.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v1...v4)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:49:54 -04:00
The Nguyen
71e3a98b77 boards: renesas: add entropy support for Renesas RA8 boards
Enable support of entropy driver for ek_ra8d1 and mck_ra8t1 boards

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-08-28 06:49:46 -04:00
Tim Lin
2cce7ff4a8 Revert "drivers/interrupt: it8xxx2: Register interrupt number 0 to handle"
This reverts commit 93f2b08b460a47e17ac756b61576a05cff88d650.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-08-28 06:49:36 -04:00
Erik Tamlin
bb784c45dd modules: percepio: Fix python executable name
Fix python executable name in percepio module's CMakeLists.txt

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
2024-08-28 06:49:27 -04:00
Andrej Butok
7af6396a0d boards: nxp: frdm_mcxn947: fix sysbuild mcuboot
Adds the default MCUboot operating mode when building using sysbuild.
Fix mcuboot sysbuild for frdm_mcxn947.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-28 06:49:14 -04:00
Lucas Tamborrino
ad70ff7b9d tests: boards: esp32: Use smh in cache coex test
Simplifies test by using smh API.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-27 18:37:47 -04:00
Lucas Tamborrino
adbf2192df samples: boards: esp32: spiram test
Simplifies psram test by using smh API.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-27 18:37:47 -04:00
Lucas Tamborrino
5dc545290c soc: espressif: psram as shared multi heap
Currently, if the user wants to allocate heap on external RAM
he needs to enable CONFIG_ESP_SPIRAM and set a threshold defined
with CONFIG_ESP_HEAP_MIN_EXTRAM_THRESHOLD.

This approach requires that we re-implement `k_malloc` and allocate
the memory on the proper region based on the block size.

By using the shared multi heap feature the proccess of allocating
memory from external memory becomes more fluent and simple.

The attribute SMH_REG_ATTR_EXTERNAL was added to reference the
external memory.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-27 18:37:47 -04:00
Théo Battrel
cfeb325b4f Tests: Shell: Take into account startup new line
Update `shell_backend_uart` to take into account the new line print by
`z_cursor_next_line_move`.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-27 18:37:28 -04:00
Théo Battrel
9aba9ddd0c Shell: Remove unnecessary new lines at startup
When the shell start, it will print two lines. The reason for that
behavior is not documented. Remove that to make the code simpler and
shorter one line at a time.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-27 18:37:28 -04:00
Théo Battrel
e34542a3de Shell: Make full_line_cmd return false on empty lines
The fact that the function was returning `true` for empty line was an
unexpected behavior according to the name of the function itself and how
it was used elsewhere.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-27 18:37:28 -04:00
Jose Alberto Meza
e2b34b96e3 soc: microchip: mec172x: Add CPU barriers during low power entry/exit
Follow ARM architecture recommendations:
* Use Data Synchronization Barrier (DSB) instruction before WFI,
to ensure that pending memory transactions complete before
changing state.

* To guarantee pend interrupts are recognized before subsequent
operation, use ISB after CPSIE (__irq_enable)

This prevents sporadicy delayed ISRs due to continous MEC172x
entering/exiting deep sleep.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-08-27 18:37:11 -04:00
Felipe Neves
419edffabf boards: arduino_nicla_vision: add Arduino Nicla Vision
Initial board support and documentation.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-27 18:36:21 -04:00
Daniel Leung
c4e3afe621 tests: logging/dictionary: limit allowed platforms
Instead of using filter (which is expensive in terms of CI as
it needs to run cmake on everything to get the full kconfigs
before filtering can be done), change that to a curated list
of allowed platforms. This avoids the expensive filtering
operation, yet can still run on some emulated platforms to
verify the dictionary output.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-27 15:21:31 -04:00
Ian Morris
a329a0c09f drivers: sensor: tmp116: Add ability to set operating mode of TMP116/7
Adds support for setting the operating mode of the TMP116/7 sensor to
either shutdown, continuous conversion or one-shot mode.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-08-27 15:14:59 -04:00
Nicolas Pitre
6255bf1ef4 arch/arm64/mmu: allow partial unmap of block mappings again
Before commit baa70d8d36 ("arch/arm64/mmu: fix page table reference
counting part 2")  it was possible to perform a partial unmap of a block
mapping. Restore that ability and provide a test case to validate it.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-27 15:14:43 -04:00
Jordan Yates
6bfd7a4302 sd: resend CMD0 before each CMD8
Resend CMD0 before each CMD8 query while initialising the card, as the
first CMD0 is not always sufficient to recover the card.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-27 15:14:23 -04:00
Emil Gydesen
3e9197a58a Bluetooth: Mesh: Rename mesh test primitives
Since testing.c/h was moved to mesh, all functions and
structs in those files now follow a bt_mesh_test_*
naming scheme to be consistent with the naming in Zephyr.

Due to missing includes in many files, this commit also
added some that were missing in order to build since
the order of includes have changed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-27 15:14:08 -04:00
Emil Gydesen
f1b182b585 Bluetooth: Mesh: Move testing.h to mesh subsys instead of include
The file is only ever used by mesh and it is even stated in the
header of the file that it is internal APIs.

The include file has been merged with the host testing.h file
as that was mesh specific as well. Similarly the testing.c
file was also moved

This is part of a process to clean up the file structure of
Bluetooth as it's a bit messy, which is evident from the
MAINTAINERS.yml file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-27 15:14:08 -04:00
Dmitrii Golovanov
87c1e2a40f twister: Group test plan reporting options
Re-arrange Twister command line options for test plan reporting
to a dedicated group with mutally-exclusive options to reflect
actual implementation and its dry-run execution mode.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-27 15:13:52 -04:00
Benjamin Cabé
774fd8b328 samples: cpp: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-27 15:13:43 -04:00
Benjamin Cabé
1b66353a8d samples: posix: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-27 15:13:43 -04:00
Benjamin Cabé
9902eec01b samples: application_development: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-27 15:13:43 -04:00
Dmitrii Golovanov
ec7b42a19f tests: timer_behavior: align saleae package requirements
Align python package versions to saleae/grpc/saleae.proto
new requirements.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-27 15:12:59 -04:00
Benjamin Cabé
cca08c3690 boards: samples: drop support for Google Kukui EC
Drop support for Google Kukui EC board which was used for
early Zephyr experiments but doesn't really exist anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-27 15:12:44 -04:00