Commit graph

92710 commits

Author SHA1 Message Date
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
Alberto Escolar Piedras 7b8664c3f9 arch posix: Clarify some references to native_posix
Some old references to native_posix are better
refering to the native targets in general,
or being clarified as only applying to the old
native_posix like targets.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Laurentiu Mihalcea 64ba1b2210 dts: nxp: imx93: add nodes for SAI3 and EDMA4
Add DTS nodes for 93's SAI3 and EDMA4.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-20 15:42:55 +01:00
Mykola Kvach ff35a247f1 drivers: pinctrl: pfc_rcar: add dummy IPSR flag to pinctrl driver
Add a dummy IPSR flag to the RCar PFC driver. It is necessary
to ensure that the driver sets the 'peripheral' bit (the driver
resets this bit during the first call of 'pfc_rcar_set_gpsr') for
a pin that doesn't have a pin function defined in IPSR, but always
acts as a 'peripheral', for example, the MMC pins on the Spider
board.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-03-20 15:42:45 +01:00
Alberto Escolar Piedras 280fd59547 boards lpcxpresso55s36: Provisionally disable in twister
This board fails to build for a multitude of samples & tests
which is blocking CI.
Let's provisionally disable it until the matter is properly
resolved.
The issue was introduced with the NXP HAL update to 2.15:
e4e463af81

See https://github.com/zephyrproject-rtos/zephyr/issues/69961
for more information.

Once this issue is fixed, this change should be reverted.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:25:42 +01:00
Pieter De Gendt d737e5d8e3 manifest: optional: Update nanopb
Upstream nanopb added zephyr module support. Update the revision to the
latest head.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 14:39:51 +01:00
Magdalena Kasenberg dba205a2ce bluetooth: audio: broadcast source: Add missing check condition
There is no need to validate stream_param->data if it is NULL.
Fixes failing PTS BAP/BSRC test cases.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2024-03-20 08:20:09 -05:00
Pieter De Gendt 5f3a69fada tests: drivers: build_all: ethernet: Build without L2
Limit the number of files built when building ethernet device drivers.
Use the ETH_DRIVER_RAW_MODE to provide weak funtions for upper layer
handling.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Pieter De Gendt 2ee4716091 drivers: ethernet: Build ethernet drivers with ETH_DRIVER_RAW_MODE
Allow building ethernet drivers without NET_L2_ETHERNET config symbol.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Pieter De Gendt e99b5228a1 drivers: ethernet: Introduce ETH_DRIVER_RAW_MODE option
Add a Kconfig symbol to allow building ethernet device driver without
an L2 layer.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00