Commit Graph

92719 Commits

Author SHA1 Message Date
Marcin Szymczyk a994dc5a35 soc: nordic: vpr: remove enabling `MSTATUS.MIE` in boot time
Interrupts should not be enabled this early in boot time.
Driver initializations expect IRQs not to arrive when
setting up HW.
Remove enabling `MSTATUS.MIE` in `__start`.
It will be enabled when main thread is switched to,
as threads by default start with enabled `MSTATUS.MIE`.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-03-21 14:09:27 +00:00
Marcin Szymczyk d248b7bf07 soc: nordic: vpr: add workaround for MSTATUS.MIE not waking VPR up
Due to HW issue, VPR needs to keep MSTATUS.MIE enabled during sleep.
Otherwise, interrupts will not wake it up.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-03-21 14:30:15 +01:00
Marcin Szymczyk 292aafef5a arch: riscv: disable interrupts before `wfi`
According to RISC-V Instruction Set Manual Chapter 3.3.2:
"The operation of WFI must be unaffected by the global interrupt
bits in mstatus
[...]
WFI is also required to resume execution for locally enabled
interrupts pending at any privilege level,
regardless of the global interrupt enable at each privilege level."

Disabling interrupts before executing `wfi` prevents a corner case
where an IRQ is presented just before executing `wfi`,
which would cause it to return directly into `wfi` and potentially
get stuck in sleep, instead of continuing to background processing.

When execution is resumed, interrupts are reenabled
and appropriate IRQ Handlers should be executed.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-03-21 14:30:15 +01:00
Wafer Xie 2396b01b1e drivers: eth: stellaris: Fix driver poll all packets from ethernet
The number of interrupts received by the driver maybe less than
the number of data packets received by Ethernet,
so the driver should read the packets number
from the register REG_MACNP value.

Signed-off-by: Wafer Xie <wafer@jaguarmicro.com>
2024-03-21 12:07:35 +00:00
Alperen Şener de41005fe9 tests: bluetooth: Update ICS for Mesh v1.1, DFU v1.0 and MBT v1.0
Mesh v1.1, DFU v1.0 and MBT v1.0 are supported by default in the stack.
In this regard, this commit updates the ICS file and Launch Studio
Project file to reflect supported features.

Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
2024-03-21 12:40:07 +01:00
cyliang tw 62665eabf7 boards: nuvoton: add support for numaker m2l31ki
Add new development board numaker_m2l31ki for m2l31x series.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-03-21 10:25:53 +00:00
Andy Sinclair 9813221ea6 drivers: mfd: npm1300: Added GPIO events
Added GPIO input edge events

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-21 10:25:42 +00:00
Andy Sinclair 13e43ca5c8 drivers: gpio: npm1300: Event configuration based on active state
Configuration of GPIO as input now sets rising/falling
event orientation based on ACTIVE_HIGH/LOW setting.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-21 10:25:42 +00:00
Aleksander Wasaznik 1e2b889bbb Bluetooth: tests: use global testlib in read_fill_buf
This deduplicates a copy of testlib from before testlib was a globally
available cmake library.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-21 10:08:01 +00:00
Mehdi Zemzem adedf14c42 drivers: flash: spi nor: Add MultInstance support
Modify the SPI Nor driver to be able to have multiple instances at
the same time.

This patch is heavily inspired by the at45 driver.
It was tested on the nRF5340 DK by using the external spi memory two times.
Macros were improved by de-nordic

Signed-off-by: Mehdi Zemzem <mehdi.zemzem2@gmail.com>
2024-03-21 10:07:53 +00:00
Jordan Yates ca36feeca8 doc: logging: document `LOG_WRN_ONCE`
Document the existence of `LOG_WRN_ONCE`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-03-21 10:07:36 +00:00
Jordan Yates 61ee9f4fbf tests: logging: log_api: test `LOG_WRN_ONCE`
Add a test for the `LOG_WRN_ONCE` wrapper around `LOG_WRN`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-03-21 10:07:36 +00:00
Jordan Yates 4afd33570e logging: log: add `LOG_WRN_ONCE`
Add an equivalent to the linux `WARN_ONCE` macro. This is intended for
use when the developer should be notified of an event, but may occur a
multitude of times in quick succession.

Using `LOG_WRN` could result in either cluttered logs or recursive
logging (i.e. in serial drivers).

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-03-21 10:07:36 +00:00
Piotr Pryga 6608ff810b boards: nordic: Add to GRTC missing child-owned-channels allocation
The child-owned-channels property of GRTC is used by nrfx_grtc
driver to exclude channels for common pool of channels allowed
for dynamic allocation. That is sort-of workaround for missing
property that allowes to remove some channels from the pool.

There are also not aligned GRTC IRQs for nRF54H20 and nRF54L15.
Only one of avaialbe IRQs was added to GRTC in DTS whereas
there should be two. That allows to find second IRQ by other
drivers that use GRTC peripehral.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-03-21 09:15:27 +01:00
Ledion Daja 93af8754ec modules: hal_ethos_u: add support for log level NONE
Add support for log level NONE by disabling Ethos-U driver logging.

Signed-off-by: Ledion Daja <ledion.daja@arm.com>
2024-03-21 09:07:35 +01:00
Ledion Daja 2fff293cc7 modules: hal_ethos_u: fix log configuration in CMake file
The core driver ETHOSU_LOG_SEVERITY CMake variable is a cache variable,
and thus will not be configured by the ETHOSU_LOG_SEVERITY CMake
variable of the hal_ethos_u module with local scope.
Change ETHOSU_LOG_SEVERITY local variable to be a cache var.

In addition, change condition test from LESS_EQUAL to LESS in order
to prevent an out-of-range index when accessing list variable.

Signed-off-by: Ledion Daja <ledion.daja@arm.com>
2024-03-21 09:07:35 +01:00
Ledion Daja 4c25482ef6 modules: hal_ethos_u: update module revision
Updated revision for hal_ethos_u module, and adapted
ethosu_semaphore_take function prototype accordingly in order to align
with changes in the NPU driver

Signed-off-by: Ledion Daja <ledion.daja@arm.com>
2024-03-21 09:07:35 +01:00
Declan Snyder 557e5969f3 boards: rd_rw612_bga: Enable counters
Enable CTimer0 and MRT0 channel 0 by default on the board,
and add more of the device instances in the counter api test overlay.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-21 09:06:48 +01:00
Declan Snyder a65ae89b9e soc: nxp: rw: Support MRT counter
Add DT entries and peripheral reset for MRT on RW.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-21 09:06:48 +01:00
Declan Snyder d3e2052a69 drivers: clock_control: Support RW MRT
Support RW MRT in clock control syscon driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-21 09:06:48 +01:00
Declan Snyder 241d41596b soc: nxp: rw: Support CTIMER
Add DT entries and clocking for CTIMER peripherals on RW61x.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-21 09:06:48 +01:00
TOKITA Hiroshi f90c2b1122 boards: seagate: legend: Cleanup `led-strip` alias
The led-strip alias can be determined in the base dts file.
Remove from overlay files and aggregate to the base dts file.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-20 17:20:08 -05:00
TOKITA Hiroshi ba9f49d7a0 samples: drivers: led_strip: Unify `led_apa102` and `led_lpd8806` samples
Unify `led_apa102` and `led_lpd8806` samples into `led_strip`
and remove these.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-20 17:20:08 -05:00
TOKITA Hiroshi 0929a8db37 samples: drivers: Rename `led_ws2812` to `led_strip`
Rename it so that it can be used as a sample of various LED strips.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-20 17:20:08 -05:00
TOKITA Hiroshi 7b61d1c43c drivers: led_strip: Enabling config with DT_HAS_..
Applying the modern way which is adding `default y` and
`depends on DT_HAS_...` to enable configs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-20 17:20:08 -05:00
TOKITA Hiroshi 7d99de6dfa drivers: led_strip: ws2812: Remove WS2812_STRIP and WS2812_STRIP_DRIVER
Removing `choice WS2812_STRIP_DRIVER` to enable the use of multiple
types of WS2812 drivers.
Also, `menuconfig WS2812_STRIP` will be deleted as it does not
correspond to the appropriate settings.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-20 17:20:08 -05:00
Johan Carlsson 94351ce2ad drivers: uart_mcux_flexcomm: fix invalid use of status bits.
uart flexcomm driver incorrectly used kStatus enum as mask when
checking for errors and enabling the error interrupts.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-03-20 17:18:48 -05:00
Daniel Baluta 5ebce33c42 MAINTAINERS: Update paths for NXP Platforms (MPU)
Files around dts/arm64/nxp should belong to NXP Platforms (MPU) group.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-03-20 17:18:01 -05:00
Pieter De Gendt c74d60dba0 Revert "manifest: optional: Update nanopb"
Upstream repo has made changes to the cmake module, which breaks
native_sim builds.

This reverts commit d737e5d8e3.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 21:19:53 +00:00
Daniel DeGrasse 414b3b7efd boards: nxp: rd_rw612_bga: enable support for flash
Enable support for the mx25u51245g flash chip present on the
RD RW612 BGA. Support has been verified with the following samples:

- samples/drivers/flash_shell
- tests/drivers/flash/common

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-20 19:08:06 +00:00
Daniel DeGrasse adfe4b8359 drivers: clock_control: clock_control_mcux_syscon: allow FlexSPI reclock
Enable support for setting and querying the FlexSPI clock rate to the
clock_control_mcux_syscon driver, as this is required by the
flash_flexspi_nor_driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-20 19:08:06 +00:00
Daniel DeGrasse 90a8ef11fe soc: nxp: rw: define Kconfigs for MEMC_MCUX_FLEXSPI code relocation
MEMC_MCUX_FLEXSPI depends on code relocation being enabled on parts that
XIP from the FlexSPI by default and requires a string describing the RAM
region to relocate code into. Add these Kconfigs to the RW SOC port.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-20 19:08:06 +00:00
Daniel DeGrasse 9021ce82fc soc: nxp: rw: add support for reclocking flexspi
Add support for reclocking FlexSPI peripheral via flexspi_clock_set_freq
function

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-20 19:08:06 +00:00
Dominik Ermel 4c8ed7dd9a devicetree.h: Rework DT_ANY_INST_HAS_PROP_STATUS_OKAY
The macro is searching for all instances of specific device
that contain specific property and evaluates to true (1) if
any device does.
The macro used to do that by generating, using
DT_ANY_INST_HAS_PROP_STATUS_OKAY, a logical expression
like (0 || 1 || 0), where each digit represented existence of
property (1) or lack of it (0).
Unfortunately other util macros, like IS_ENABLED, were
not able to evaluate such expression, as they often simply
expect something they can evaluate to 0 or 1.

The commit here changes DT_ANY_INST_HAS_PROP_STATUS_OKAY
to generate a list of tokens (1) where token is added to list
only for instance of a device that has the property;
then such list is processed using IS_EMPTY() macro and
in the end 0 or 1 is generated, depending on whether
any enabled instance of a device has the property or not.
This change allows result of DT_ANY_INST_HAS_PROP_STATUS_OKAY
to be used with macros like IS_ENABLED, IF_ENABLED or
COND_CODE_x.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-03-20 16:52:48 +00:00
Piotr Kosycarz c3b96ffbab scripts: twister: handlers: pass dev-id for nrfutil
Needed to distinguish boards.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-03-20 16:52:39 +00:00
Henrik Brix Andersen 02b84fbb0e boards: nxp: mr_canhubk3: CAN requires 120 ohm termination at both ends
CAN requires 120 ohm termination at both ends of the bus, resulting in a
bus impedance of 60 ohm. Fix the board documentation to reflect this.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-20 16:52:28 +00:00
Mateusz Kapala 5ff8249d19 samples: subsys: mgmt: mcumgr: smp_svr: Add BT static svc registration
Added build configuration for the
CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT=n (non-default
option) to test building the smp_svr sample with statically defined
and registered SMP service.

Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
2024-03-20 16:27:23 +00:00
Mateusz Kapala 9e0d7f0264 mgmt: mcumgr: Add Kconfig option to manage SMP service registration
Added the CONFIG_MCUMGR_TRANSPORT_BT_DYNAMIC_SVC_REGISTRATION Kconfig
option to manage how the SMP service should be registered.
By default the SMP service must be registered at runtime.
If this Kconfig option is disabled, the SMP service is statically
defined and registered.

This change allows to opt out of using the CONFIG_BT_GATT_DYNAMIC_DB
Kconfig option and as a result, lower the memory usage.

Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
2024-03-20 16:27:23 +00:00
Ederson de Souza 67bb6db3f8 syscall: Export all emitted syscalls, enabling them for extensions
Linkable loadable extensions can only use syscalls if they are exported
via EXPORT_SYSCALL (or EXPORT_SYMBOL). Instead of enabling used syscalls
one by one, this patch exports all of them automatically via
`gen_syscalls.py`. If CONFIG_LLEXT=n, the section where the exported
symbols live is discarded, so it should be a non-op when llext is not
enabled.

This patch also removes the now redundant EXPORT_SYSCALL macro. Note
that EXPORT_SYMBOL is still useful on different situations (and is
indeed used by the code generated by `gen_syscalls.py`).

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-03-20 16:26:54 +00:00
Declan Snyder 1680223003 boards: rd_rw612_bga: Enable WWDT
Enable watchdog on RD_RW612_BGA board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-20 16:19:12 +00:00
Declan Snyder 2cb4550dc7 soc: rw: Support WWDT
Add DT entry and SOC code for watchdog

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-20 16:19:12 +00:00
Declan Snyder e336c644be drivers: wdt_mcux_wwdt: Support RW
Support RW soc series in wwdt driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-20 16:19:12 +00:00
Jakob Genßler 3d1a4039ea sd: sdmmc: fix formatting
Formats according to latest .clang-format rules.

Signed-off-by: Jakob Genßler <jakob.genssler@gin.de>
2024-03-20 10:27:02 -05:00
Jakob Genßler 64fd289b2f sd: sdmmc: initialize cmd retries
Sets the retries in cmd struct to their Kconfig value. This fixes
an issue in imx_usdhc.c where retries would be used uninitialized. That
leads to a loop not being entered and subsequently no data being read
from the controller.
Tested on mimxrt1170_evk.

Signed-off-by: Jakob Genßler <jakob.genssler@gin.de>
2024-03-20 10:27:02 -05:00
Alberto Escolar Piedras 50542682df subsys/testsuite/ztest: Replace native_posix in one comment
As we are replacing native_posix with native_sim, let's
refer to native_sim instead of native_posix in the comments.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Alberto Escolar Piedras f532937e92 tests|scripts/net: Change native_posix references to native_sim
* As we are replacing native_posix with native_sim, let's
  refer to native_sim instead of native_posix in the comments
  of why we have 1 extra interface.

* scripts/net/run-sample-tests.sh builds for native_sim now,
  not native_posix => let's fix it

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Alberto Escolar Piedras 46193f48f6 drivers/sensor/bma4xx/Kconfig: Change native_posix reference to native_sim
As we are replacing native_posix with native_sim, let's
use native_sim instead of native_posix as example platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Alberto Escolar Piedras 11530015ad drivers/gpio emul: Fix reference to example overlay
That file does not exist anymore, let's refer
to its new name.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Alberto Escolar Piedras bd68ec9568 doc/develop/application: Replace native_posix w native_sim
As we are replacing native_posix with native_sim, let's
use native_sim instead of native_posix as example platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Alberto Escolar Piedras 996377340a cmake clang/compiler_flags.cmake: Clarify comment for native targets
Correct the comment for native targets.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00