Commit graph

90926 commits

Author SHA1 Message Date
Radoslaw Koppel b0c83f328c arch: sw_isr_table: Update shared interrupts structures
This commit updates the definition of z_shared_isr_table_entry
to use _isr_table_entry instead of specially created z_shared_isr_client.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 568cced14f scripts: gen_isr_tables: Break code into classes
This commit breaks the code into functional classes.
This way the functionality is visibly splitted into
functional parts and it is easier to replace the
specific parser part to implement new code generators.

There is also common functionality to handle multi level interrupts
moved to configuration class.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 4360acb27e scripts: gen_isr_tables: Code cleanup
This commit cleans up the gen_isr_tables code for better clarity
and easier modification.
Changes include:
- Separate functions to load intList section.
- Replace spurious handlers in internal data with None.
  Now it is the output generator work to choose right function.
- All the work to generate vt and swt separated into its own functions.
- Remove the need for internal shared array - all the information
  is here in swt array.
- The update_masks function - more functionality moved here.
- Simplify bit_mask function.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 717c5835d6 arch: isr_tables: Add __used attribute to int_list_header
This commit adds missing __used attribute it int_list_header,
preventing it from being optimized out.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Tom Burdick 84e883b611 llext: Support memory protection
Sets up memory partitions and allows for the partitions to be added to a
memory domain after loading an extension. This allows for applying
memory protection attributes to all of the needed memory regions an
extension requires to execute code correctly.

Currently only works when usermode is enabled as otherwise memory
protection APIs are unavailable.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-02-02 13:06:28 -05:00
Tom Burdick 172bc0c238 llext: Remove automatic include
clangd like to automatically add include directives, this one slipped by
and made its way in the tree. Remove it.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-02-02 13:06:28 -05:00
Daniel DeGrasse b6feb567d1 drivers: display: ili9xxx: do not delay for reset unless supported
Check the return code of mipi_dbi_reset, and do not delay for the reset
wait time unless the mipi controller has issued a hardware reset to the
display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-02 11:52:17 -06:00
Daniel DeGrasse 5b767a0dd2 drvers: display: ili9xxx: fix usage of MIPI buffer descriptor
Fix usage of MIPI buffer descriptor in ili9xxx driver. Previously, the
buffer descriptor size was being set to display buffer size. For cases
where the write height/width  was not equal to the size of the buffer, this
resulted in additional data being written that was not needed. To
resolve this, calculate the mipi descriptor buffer size in the driver

Also, remove the unconditional setting of mipi_desc.height, as this
would override the previous (correct) setting.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-02 11:52:17 -06:00
Daniel DeGrasse f81ca136fe drivers: mipi_dbi: clarify write size for mipi_write_display
Clarify write size used by mipi_write_display, so that implementers of
MIPI drivers know to use the buf_size field of the display buffer
descriptor to determine write size.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-02 11:52:17 -06:00
Jukka Rissanen aa546baf44 tests: net: sockets: udp: Add recvmsg test for checking msg_controllen
Make sure that msg_controllen is cleared if there is no
control data received.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-02 11:51:53 -06:00
Jukka Rissanen 692ebf404c net: sockets: Update msg_controllen in recvmsg properly
If recvmsg() does not update control data, then it must
set msg_controllen length to 0 so that the caller can
understand this.

Fixes #68352

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-02 11:51:53 -06:00
Armando Visconti 12017b8481 drivers/sensor: lps2xdf: Fix uninitialized variables
Fix some uninitialized variables calling the proper get()
routine prior the equivalent set() operation.

Fixes: #66791, #66778, #66772.
Coverity-CID: 338119, 338144, 338157.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-02-02 10:53:32 -06:00
Grzegorz Chwierut 8f18094c62 twister: pytest: Fix shell fixture
On the hardware, after booting up the device, on the
console might appear additional logs after receiving first
prompt. Wait and clear the buffer to avoid unexpected
messages when verifying output.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-02-02 10:52:46 -06:00
Juliane Schulze 34cb22e919 sensors: Add driver for Vischay VCNL36825T Proximity Sensor
Driver for the Vishay VCNL36825T including power management support.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-02-02 10:51:10 -06:00
Robert Lubos 68bc981c52 net: zperf: Fix session leak
In case zperf session was aborted by the user (by for instance stopping
it from shell), or practically in case of any other
communication-related error, the zperf session could end up in a state
other than NULL or COMPLETED, with no way to recover. This made the
session no longer usable and eventually could lead to zperf being not
able to start a new session anymore.

Fix this by introducing zperf_session_reset() function, which resets the
session state back to defaults. The function is called when the zperf
receiver service is stopped.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-02-02 10:31:53 -06:00
Robert Lubos 4ce0352026 net: zperf: Fix TCP receiver start/stop operation
The issues found for UDP receiver were also identified for TCP receiver,
this commit applies practically the same set of changes as in case of
UDP.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-02-02 10:31:53 -06:00
Robert Lubos 139bc4e87e net: zperf: Fix UDP receiver start/stop operation
This commit fixes restarting of UDP receiver service, along with some
other minor cleanups:

* The core issue was udp_server_running flag not being cleared when
  service was stopped. Fix this by introducing udp_receiver_cleanup()
  which does all of the required cleanups when receiver service is
  stopped. The function is called either when the application stopped
  the service with zperf_udp_download_stop(), or when the service was
  stopped due to error.
* net_socket_service_unregister() was not called on
  zperf_udp_download_stop(), but only from the service callback - that
  would not work in case there's no active communication.
* at the same time, net_socket_service_unregister() would be called from
  the service callback in case of errors. Fix this, by making
  udp_recv_data() only return an error, and let the service callback to
  do the cleanup.
* Remove no longer used udp_server_run semaphore
* Remove udp_server_stop - with socket services it seems no longer
  needed.
* zperf_udp_receiver_init() now returns an error, so that we don't
  mark the service as running in case of socket/services error.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-02-02 10:31:53 -06:00
Jamie McCrae 1c70041dcb doc: develop: west: sign: Add details on signing
Adds details on how to do signing using sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 10:08:27 -06:00
Jamie McCrae 605c854369 doc: release: 3.6: Add note on signing script addition
Adds a note about how the signing script can be set

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 10:08:27 -06:00
Jamie McCrae d676234493 cmake: Add support for sysbuild-set signing script
Allows a sysbuild project to specify a signing script file to
use instead of the default zephyr one

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 10:08:27 -06:00
John Johnson 125a2bccaa net: net_pkt: add peer sockaddr member in net_pkt struct
Add sockaddr member in struct net_pkt to store peer address if offloaded
network inteface is used. This enables recvfrom() to fill in src_addr if
socket type is UDP and offloaded interface driver supports it.

Signed-off-by: John Johnson <john.filip.johnson@gmail.com>
2024-02-02 09:42:18 -06:00
Lars Knudsen c460d285c0 MAINTAINERS: Add pin-zephyr to Bluetooth Audio
Ping is collaborating on Bluetooth Audio

and is attending the weekly LE Audio Zephyr meetings

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
2024-02-02 09:41:10 -06:00
Gerard Marull-Paretas 117194ae22 boards: riscv: add nrf54h20pdk_nrf54h20_cpuppr
Add a board that allows to build for the nRF54H20 PPR RISC-V core.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas 426bbf5649 soc: riscv: nordic_nrf: nrf54h: introduce PPR support
Add support for the nRF54H PPR (Peripheral Processor), based on the VPR
RISC-V core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas ba16e3dd13 soc: riscv: nordic_nrf: add initial support for VPR core
Add initial support for the VPR RISC-V core found in the new nRF54 SoCs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas 1a6b88608e soc: arm: nordic_nrf: move Kconfig.peripherals to common folder
Because RISC-V cores also need to include this file, so it is no longer
ARM specific.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas d7dc942382 soc: common: nordic_nrf: move pinctrl_soc.h to a common dir
Because both, RISC-V and ARM cores share the same pinctrl driver. The
top level common folder will disappear with the introduction of HWMv2,
where multi-arch SoCs will be well supported.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas 018cf08d8d scripts: kconfig: functions: add dt_chosen_partition_addr_int|hex
dt_chosen_partition_addr_int|hex allow obtaining the absolute address of
a partition, which is the result of the grandparent node address plus
the partition node address.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas 270ae63036 modules: hal_nordic: add configuration for nRF54H PPR core
Add nrfx configuration file to make the nrfx HAL work for
nRF54H PPR core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas d230542f1d drivers: serial: nrfx_uarte2: drop soc.h
As it is not required (e.g. RISC-V nRF54H port does not provide soc.h)

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas 245da8aae6 snippets: add nordic-ppr
Add a new snippet that allows to build any application with the
capability to boot the PPR core found in some nRF54 SoCs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas d1468b8484 drivers: misc: nordic_vpr_launcher: initial version
Add a custom driver that takes care of loading and launching RISC-V VPR
cores found on the new nRF54 SoCs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 00566d64fa tests: lib: cpp: Exclude cpp98 test on nRF54H20
Similar to nRF54L15, the MDK files in HAL for this SoC are not
compatible with C++98, so currently the test cannot be performed
on this SoC.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 38520a93d3 boards: arm: Add initial support for nRF54H20 PDK
Add targets that allows building for the Application and Radio cores
in the nRF54H20 SoC on the nRF54H20 PDK board.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas 6b987d3192 scripts: west: runners: nrfjprog: add basic support for nRF54H series
Add basic support to flash application and/or radio core for nRF54H
series. Note that features like merged hexes present in nRF53 series is
not supported.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas a99b5ca01b scripts: west: runners: nrfjprog: add erasepage op
Add a new operation that allows erasing pages.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas b2c8f7680d scripts: west: runners: nrfjprog: add option to not erase
On some new SoCs, the erase option is not required, so introduce a new
option that doesn't set any erase mode.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 1606f65972 dts: nordic: Include input-event-codes.h from nrf_common.dtsi
... so that there is no need to include that header individually
for every added board based on an nRF SoC.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek c50c4130a0 tests: arm_irq_vector_table: Add special handling for nRF54H20
Different set of IRQ lines need to be used for this SoC and the CLOCK
IRQ is not to be installed in the vector table.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek bb065262bc drivers: timer: nrf_grtc_timer: Add dependency on nRF clock control
... in the related parts, so that the driver can be used on nRF54H20
where the clock control is not present yet.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 976de4edbe drivers: serial: nrfx: Allow new UARTE instances to be used
Extend Kconfig definitions and nrfx_config translations so that UARTE
instances that are available in nRF54H20 can be used.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 784688a511 drivers: serial: Kconfig.nrfx: Filter out options unsupported on nRF54H20
On nRF54H20, only the new shim can be used and the enhanced poll out
cannot be enabled since there is no DPPI support for this SoC yet.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Grzegorz Swiderski be8b2663c6 modules: hal_nordic: Integrate nrf-regtool
nrf-regtool is a Python utility from Nordic Semiconductor, which is used
for generating binary files with register values for given peripherals.
It sources the descriptions of peripheral registers from CMSIS-SVD files
(typically ones bundled with nRF MDK).

For some peripherals, such as UICR, nrf-regtool supports parsing values
from devicetree as well, based on the bindings already found in Zephyr.

Currently, this tool is not submitted as a script to Zephyr, but it can
be installed from PyPI.

Having nrf-regtool installed is recommended when working with nRF54H20.
Booting the Application or Radiocore CPU requires flashing not only its
firmware, but also its respective UICR instance. On this SoC, the UICR
is used to assign ownership of global hardware resources, including
memory and peripherals, to individual cores. The Zephyr build system can
call nrf-regtool to generate the UICR based on devicetree, to reflect
the boot-time hardware configuration required for a given application.
The generated `uicr.hex` is then merged with `zephyr.hex`, so that they
can be flashed together using west.

The build system integration takes the form of a CMake package, which
includes a version check and reusable components; over time, some of
these components can be reused by sysbuild. This package is located in
the `hal_nordic` module, because it depends on the `SOC_SVD_FILE` CMake
variable, which is defined there as well.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Grzegorz Swiderski 7740bcf670 modules: hal_nordic: Set SOC_SVD_FILE
This CMake variable contains a path to a CMSIS-SVD file from nRF MDK,
which describes the selected Nordic SoC.

Initially, this will be used as an argument to nrf-regtool.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek abb0934def soc: nordic: Add initial support for nRF54H20 EngA
Add nrfx and Kconfig related infrastructure plus SoC initialization
code to allow building for nRF54H20 targets (Application and Radio
cores).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 139b97a64a modules: hal_nordic: Use common nrfx_config section for GRTC
Move code that prepares `NRFX_CONFIG_GRTC_*` definitions based on
information from devicetree from the nRF54L15 nrfx_config header
to the global one, so that the code can be used by nRF54H20, too.

The checks that validate owned-channels and child-owned-channels
DT properties are moved to the nrf_grtc_timer driver so that
the global nrfx_config is not polluted unnecessarily.

The default values in nrfx_config_nrf54l15_enga_application.h
are restored to those from the corresponding template file.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 2efd34bda3 modules: hal_nordic: nrfx_glue: Include cmsis_core_m_defaults.h
... to cover missing __ICACHE_PRESENT and __DCACHE_PRESENT symbols that
should be defined in MDK files.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 50d56c9503 dts: Add initial support for nRF54H20 EngA SoC
Add definition of the nRF54H20 SoC revision EngA with its Application,
Radio, and Peripheral Processor (PPR) cores and basic peripherals:
GRTC, GPIOs, GPIOTE, and UARTs.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 6bce789829 dts: Add and extend Nordic bindings needed for nRF54H20
Add a set of bindings that will be used in the nRF54H20 SoC definition.
Extend the existing GPIOTE binding with properties needed for this SoC.
Also do a tiny clean-up in the bindings added recently for nRF54L15
(HFXO and LFXO).

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas 928dbb58c2 dt-bindings: misc: add nordic,nrf-ficr helper definitions
Add definitions to access all FICR fields in the nRF54H20 EngA SoC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00