Commit graph

79302 commits

Author SHA1 Message Date
Oscar Goldring c26f44ced3 drivers: uart: fix compiler warnings in uart emulator
Fix compiler warnings in the UART emulator header file. By explicitly
adding the include for the Zephyr device.

Signed-off-by: Oscar Goldring <oscar@goldring.dev>
2023-05-23 16:46:23 +02:00
Anas Nashif de46b70f1c doc: releases: add supported releases table
Add a table of currently supported releases.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-23 10:43:21 -04:00
Anas Nashif 6f1c764a92 doc: release: minor tweaks
Minor tweak about length of stabilization phase and the merge process.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-23 10:43:21 -04:00
Anas Nashif 8c410123b3 doc: releases: expand on release cycle and support
Add more information about release cycle and type of releases we have.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-23 10:43:21 -04:00
Torsten Rasmussen 6f9e86a5a8 doc: release: 3.4: add note about EXTRA_<VAR> Zephyr build variables
Update release notes 3.4 with description of
EXTRA_CONF_FILE, EXTRA_DTC_OVERLAY_FILE, and EXTRA_ZEPHYR_MODULES.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen 6c8e52ba42 doc: update Zephyr modules to use EXTRA_ZEPHYR_MODULES
Update Zephyr modules documentation to use EXTRA_ZEPHYR_MODULES.
This gives a more consistent naming scheme in Zephyr CMake build system.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen a88502783b cmake: align Zephyr module variable to EXTRA_ZEPHYR_MODULES
Align Zephyr modules with other user facing variables where settings
can be defined or extended, meaning Zephyr modules now supports:
ZEPHYR_MODULES and EXTRA_ZEPHYR_MODULES.

Support for ZEPHYR_EXTRA_MODULES is kept foir backward compatibility.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen 1120934874 doc: samples: update OVERLAY_CONFIG to EXTRA_CONF_FILE
Update rst files to use EXTRA_CONF_FILE instead of OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen 754eca92a2 doc: introduce EXTRA_CONF_FILE and EXTRA_DTC_OVERLAY_FILE
Introduce EXTRA_CONF_FILE and EXTRA_DTC_OVERLAY_FILE and remove old
references to OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen 391f4c9b0f samples: update nrf53_sync_rtc sample to EXTRA_CONF_FILE
Update nrf53_sync_rtc to use EXTRA_CONF_FILE instead of the old
OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen 5c4060743d sysbuild: update sysbuild to use EXTRA_CONF_FILE variable
Align sysbuild with Zephyr CMake so that sysbuild supports
SB_EXTRA_CONF_FILE. Keep support for the old SB_OVERLAY_CONFIG.

This ensures that sysbuild is consistent with Zephyr CMake configuration
file handling.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen ca76349d24 cmake: update package helper description to use EXTRA_CONF_FILE var
Update package_helper.cmake to use EXTRA_CONF_FILE instead of deprecated
OVERLAY_CONFIG variable.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen 384fb1e478 cmake: introduce EXTRA_DTC_OVERLAY_FILE for devicetree
This commit introduces EXTRA_DTC_OVERLAY_FILE.

This allows users to specify additional devicetree overlays in addition
to a sample / board specific default devicetree overlay files.

It also allows snippets to provide extra devicetree overlays on addition
to sample / board specific overlays.

The name EXTRA_DTC_OVERLAY_FILE clearly indicates the purpose and
follows the naming scheme of EXTRA_ in front of variable name.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen 3a345682ba cmake: introduce EXTRA_CONF_FILE and deprecate OVERLAY_CONFIG
This commit introduces EXTRA_CONF_FILE and deprecates OVERLAY_CONFIG.

It has often caused confusion that OVERLAY_CONFIG adds extra
configuration fragments to the value of CONF_FILE (default: prj.conf),
but the similar named variable DTC_OVERLAY_FILE replaces the default
dtc overlay file used by the build system.

To remove such confusion, this commit introduces the EXTRA_ prefix in
front of CONF_FILE to clearly indicate it's purpose.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen 8460d91e32 cmake: extend zephyr_get() to support fetching of multiple variables
This commit extends zephyr_get() to support multiple variable names to
be fetched into a single variable.

Example:
  zephyr_get(FOO VAR FOO_A FOO_B FOO_C)

will lookup each FOO_A, FOO_B, FOO_C for supported scopes and return
the value in FOO of the first scope encountered having one of the
variables defined.

If MERGE is specified, then all scopes for all vars are looped and the
variable values are merged into FOO and returned.

This functionality will allow to deprecate user-facing settings while
ensuring that both the new and deprecated variables are considered
in zephyr_get() and also taking into consideration the scope with
highest precedence.

This allows Zephyr CMake to do:
  zephyr_get(FOO VAR FOO DEPRECATED_FOO)

  zephyr_get(BAR MERGE VAR BAR DEPRECATED_BAR)

This allows support of old and new setting for a given number of
releases.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Andrzej Głąbek dd3266706d boards: nrf9160dk_nrf9160: Use H0H1 drive for arduino_spi pins
This is usually needed for reliable SPI communication when SCK
frequency is >= 4 MHz, so make it the default setting.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-23 16:38:14 +02:00
Andrzej Głąbek 6d1df8a129 boards: nrf9160dk_nrf9160: Apply a few corrections to revision 0.14.0
- remove deprecated `label` properties
- add `spi-flash0` alias
- correct `sfdp-bfp` property value to reflect exactly what is returned
  by the flash chip

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-23 16:38:14 +02:00
Jamie McCrae 2e4c3f1da9 mgmt: mcumgr: grp: fs_mgmt: Change insecure warning
Changes the warning from being text in Kconfig for filesystem
management as a whole to being a cmake warning which is displayed
if the user has not enabled file access hooks with a link to the
documentation on how to set them up.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-23 16:36:38 +02:00
Jamie McCrae 1d6ee8da5f mgmt: mcumgr: Change from mcumgr to MCUmgr
Fixes the name of the system.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-23 16:36:38 +02:00
Dawid Niedzwiecki aa0c0727b4 mgmt: ec_host_cmd: add config to create a dedicated thread
Add a config to decide if a new dedicated thread for Host Command is
created during initialization.

If not, the ec_host_cmd_task has to be called by another thread to
handle host commands.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-05-23 16:19:53 +02:00
Gerard Marull-Paretas 52aec02e96 tests: drivers: build_all: regulator: add test
Add a new _test_ that is used to build all regulator drivers. SoC
regulators, such as Raspberry Pi Pico core supply are excluded as they
are typically built as part of the platform.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-23 14:37:15 +02:00
Mikkel Jakobsen 92fb90c483 CODEOWNERS: remove myself as mcumgr/smp_udp owner
The mcumgr subsystem as a whole is already maintained by @nordicjm
(#57780) and I am no longer actively using mcumgr, so removing myself
from the equation and letting more capable hands take over.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2023-05-23 13:39:00 +02:00
Andrzej Kuros 679fa28574 boards: nrf5340: use nrf_reset_network_force_off
The function nrf_reset_network_force_off contains workaround for
errata 161 for nRF5340 SoC. This function should be used instead of
manual writing to NRF_RESET->NETWORK.FORCEOFF register.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2023-05-23 13:36:18 +02:00
Pavel Vasilyev e51a909343 Bluetooth: Mesh: Shell: fix vnd model pub command
The command at most takes 11 args. argc = num of args + 1 (command
name) => 12. We substruct 3 from argc (cmd name, mod id, addr). This
gives argc = 9 when all args are provided for vendor model.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-05-23 13:03:18 +02:00
Wojciech Slenska 330a2f84c7 net: wifi: Fix cpp compatibility
Fixed comparison between signed(int16_t) and unsigned(size_t) variables.

Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
2023-05-23 13:03:09 +02:00
Carlo Caione be8630d54d west.yml: Bump libmetal to v2023.04.0
Bump libmetal to v2023.04.0

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-05-23 13:02:48 +02:00
Erwan Gouriou eb9efc7211 boards: sam_v71_xult: Enable GPIO Kconfig
CONFIG_GPIO is expected to be enabled by default.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-05-23 13:02:36 +02:00
Erwan Gouriou 34b1f7c737 boards: shields: Clean up Kconfig.defconfig files
Shield's Kconfig.defconfig files should only be used to configure
components options, or drivers specific (eg init priority, ..), depending
on driver activation which remains application responsibility.
High level components (such as DISPLAY) should not be enabled by default on
boards activation (which is similar to policy used for boards).

Additionally, clean up busses activation (SPI, I2C), which is not required
as bus activation is already done automatically on bus devices activation.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-05-23 13:02:36 +02:00
Erwan Gouriou 5a26397450 sample: shields: Update prj.conf
Before Kconfig clean up to be performed in boards/shields, update samples
to enable the components they require.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-05-23 13:02:36 +02:00
Benedikt Schmidt 940ddba8bd drivers: dac: make output buffer for STM32 DAC configurable
If an operational amplifier is used on the DAC output it is
preferrable to disable the DAC output buffer.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-05-23 13:02:25 +02:00
Stefan Petersen 945d074ec0 drivers: ethernet: eth_stm32_hal: Configurable speed and duplex
Make it possible to be able to change speed and duplex for the
STM32H7xx and API_V2 from the configuration settings.

This exists for the non-STM32H7x already today, so this is basically
copying the code for the other STM32's.

Please note that ST has a series incompability. For F1 and F2,
the duplex settings are named ETH_MODE_FULLDUPLEX respective
ETH_MODE_HALFDUPLEX. For F4, H7 and F7 the duplex settings are named
ETH_FULLDUPLEX_MODE respective ETG_HALFDUPLEX_MODE.

This should really be queried from the PHY (as previous programmer have
written in the code). But while waiting for a proper PHY solution,
this is intended as a stop-gap solution.

Signed-off-by: Stefan Petersen <spe@ciellt.se>
2023-05-23 13:02:05 +02:00
Alberto Escolar Piedras 4b0d691a37 drivers console native_posix: Do not set buffering mode anymore
Since aadca692b3
the board code already sets the stdout/err buffering,
even if there is no console driver;
So there is no need to set it also in the console driver.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-05-23 12:56:38 +02:00
Andries Kruithof 253818ebea Bluetooth: controller: move bn scope from filescope to lll-scope
The scope for the burst number for tx and rx is currently at module
level in both lll_central_iso.c and lll_peripheral_iso.c
 This PR puts the scope to the lll level

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-05-23 12:56:07 +02:00
Lucas Tamborrino 2f718dd369 drivers: dma: esp32xx: Fix get interrupts from DT
Simplify get interrupt numbers array by using DT_INST_PROP.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-05-23 08:55:51 +02:00
Andrei Emeltchenko f6211e2641 drivers: sbs_gauge: Fix buffer overflow
Fixes buffer overflow when trying to copy 5 bytes to 4 bytes array.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-05-23 08:55:43 +02:00
Katarzyna Giądła 8bb576b7e8 scripts: requirements: Update protobuf and grpcio-tools requirements
Minimal requirements for nanopb were not accurate
to allow its usage (and causing related tests to build fail).
This change updates requirements for protobuf (>=3.20.3) and
grpcio-tools (>=1.47.0) to use protocol buffer.

Fixes #56103

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
2023-05-23 08:55:16 +02:00
Denis Mingulov f27d360d96 tests: boot: test_mcuboot: Add test with asserts enabled
Chain-load images might behave differently comparing to the usual
standalone boot, as for example some peripheral initialization
might be done already.

Add an additional test with CONFIG_ASSERT=y as enabled asserts
could break up chain-loaded image.

Signed-off-by: Denis Mingulov <denis@mingulov.com>
2023-05-23 08:55:00 +02:00
Denis Mingulov b5785f3545 drivers: clock_control: stm32u5: fix chain-load with asserts
It is possible that stm32_clock_control_init function is started
when the image is chain-loaded and hardware clocks are already
initialized to some state (PLL1).

Currently due to an assert in get_startup_frequency function
(which will trigger k_fatal_halt) the boot will stop on the
early stage if CONFIG_ASSERT=y. This is reproducible for example
with standalone MCUboot and TF-M with MCUboot.

Fixed by adding support for HSE and PLL1 clock sources at
get_startup_frequency.

Signed-off-by: Denis Mingulov <denis@mingulov.com>
2023-05-23 08:55:00 +02:00
Daniel Leung e444cc9fb9 xtensa: mmu: always map data TLB for VECBASE
This adds code to always map data TLB for VECBASE so that
we would be dealing with fewer data TLB misses during
exception handling. With VECBASE always mapped, there is
no need to pre-load anymore.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-05-23 08:54:29 +02:00
Daniel Leung c3d1fa2138 xtensa: mmu: handle TLB misses in C exception handler
This moves the TLB miss handling to the C exception handler.
This also allows us to handle page faults (for example,
unmapped pages) during this time as any more exceptions
handled in the C handler will not trigger the double
exception handler but the same C handler.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-05-23 08:54:29 +02:00
Daniel Leung ce1bf365b6 xtensa: make CONFIG_XTENSA_MMU_PTEVADDR based on choice
Instead of being able to arbitrarily set the PTEVADDR for page
table, this provides choices (currently just one). This is in
preparation to enable handling memory management exception in
C code. For that to work, we will need to pre-load the page
table address (PTEVADDR) for the memory page containing
exception code and data (containing jump addresses), and
various stacks. This is to prempt any TLB misses during handling
the level 1 interrupt code. If a TLB miss is encountered during
handling of level 1 interrupt, we will be thrown into double
exception handling code where we will get stuck in infinite
loop. However, in order to pre-load the page table entries,
PTEVADDR needs to be calculated. This requires the use of
PTEVADDR base which cannot be loaded via l32r, as we may cause
a data TLB miss. So we must be able to grab the PTEVADDR base
address strictly within code, and must be without any data
load. So changing CONFIG_XTENSA_MMU_PTEVADDR to be based on
choice so we can have pre-defined bit shift value for shift
operation. This shift value will be used in exception handling
code.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-05-23 08:54:29 +02:00
Daniel Leung dfc87e2754 xtensa: gen_zsr: add _STR for extra registers
This also generates the correspoing _STR entries for
extra registers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-05-23 08:54:29 +02:00
Flavio Ceolin d091740b00 xtensa: mmu: Add option to map memory in cached/uncached
Add a build option to tell if memory should be mapped in cached
and uncachedr regions.

If the memory is neither in cached nor uncached region it is not double
mapped.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-05-23 08:54:29 +02:00
Flavio Ceolin df4be07b26 kernel: mmu: Fix Xtensa memory alignment issue
z_page_frame can't be packed on Xtensa due memory alignment
constraints. When this is struct is packed it is 5 bytes long it will
cause an memory alignment problem on Xtensa.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-05-23 08:54:29 +02:00
Flavio Ceolin 020df54ba4 xtensa: mmu: Initial implementation
Initial support for Xtensa MMU version 3. It is using a two level page
table based on fact that the page table is in the virtual space.  Only
the top level (page directory) is wired mapped in the TLB to avoid
second level page miss.

The mapped memory is completely fragmented in multiple sections, maybe
we find a better way in future.

The exception handler is where we effectively map the memory, the way it
works is:

1) SW try to access some memory address
2) The address is not mapped, so the MMU will try the auto-refill,
   looking the page table
3) The page table contents is not mapped (remember, just the top-level page
   is mapped)
4) An exception will be triggered, in the exception we try to read the
   portion of the page table that maps the original address
5) The address is not mapped, so the MMU will try again the auto-refill.
   This time though, the address is mapped by the top level page that is
   properly mapped. (The top-level page maps the page table itself).

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-05-23 08:54:29 +02:00
Daniel Leung cadc51cb8b xtensa: add functions to determine if pointer is in cached area
This adds two functions to determine if a pointer is in
the cached region or uncached region.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-05-23 08:54:29 +02:00
Kenneth J. Miller daa7b6dca1 samples: sensor: Remove redundant stm32_vbat_sensor
Remove stm32_vbat_sensor sample which has been made redundant by the new
generic soc_voltage sample.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Kenneth J. Miller 529bdf2f85 samples: sensor: Add generic voltage driver example
Add basic sample to demonstrate voltage driver measurements.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Kenneth J. Miller f55ffb5f7b boards: arm: Add vbat node and alias for STM32 SoCs
Add enabled vbat node for all boards of supported STM32 SoC series which
have the required adc node enabled.

Add volt-sensor alias pointing to said vref node.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Kenneth J. Miller 4dc16527fd boards: arm: Add vref node and alias for STM32 SoCs
Add enabled vref node for all boards of supported STM32 SoC series which
have the required adc node enabled.

Add volt-sensor alias pointing to said vref node.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00