Commit Graph

710 Commits

Author SHA1 Message Date
Adam Wojasinski 5685af0923 modules: hal_nordic: Add support for new TWIM instances
Add Kconfig and symbols for twim: 20-22, 30, 121, 130-137 instances

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:04:10 +02:00
Adam Wojasinski 5c1daef5ab drivers: spi: nrfx: Add SPIM Kconfig symbols for new instances
Add support for upcomming SPIM instances.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:03:17 +02:00
Przemyslaw Bida cc85223ed4 net: openthread: Remove waiting for DTR in openthread UART.
Uart driver for openthread have been waiting for host to start
communicating with coprocessor, during booting of the Zephyr and
by that blocking start os OS. There is no longer a need for
that since the stack will be soft rebooted after host connects
to coprocessor, removing the need to wait on host communication.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-10-20 14:59:47 +02:00
Florian Grandel e9d5a98e9d drivers: ieee802154: improve CSL standard conformance
This change slightly simplifies the configuration of a CSL receiver and
generalized CSL_RX_TIME to EXPECTED_RX_TIME as a re-usable primitive
across several timing-sensitive IEEE 802.15.4 standard sub-protocols
(namely BE-PANs/DSME/CSL/RIT/TSCH).

This API change is based on the rules outlined in RFC #61227.

Fixes: #62918

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-20 14:58:32 +02:00
Florian Grandel 80da9ddfef drivers: ieee802154: improve ACK header IE config
Improves standard conformance of the IEEE802154_CONFIG_ENH_ACK_HEADER_IE
option and introduces certain "soft MAC" capabilities around header IEs:
 * Introduces types and helpers that allow driver maintainers to
   represent, parse, write and validate header IEs.
 * Introduces helper functions to access non-aligned fields in header
   IEs, namely element IDs.

Updates the only existing L2 and driver pair that uses
IEEE802154_CONFIG_ENH_ACK_HEADER_IE: OpenThread platform radio and nRF5
and improves header IE validation in the nRF5 driver.

This change should help further driver maintainers to support
OpenThread's CSL and vendor IE extensions. It is based on the rules
specified in RFC #61227.

It is also a precondition to generically support both, "soft MAC" and
"hard MAC", approaches to header IEs in the TSCH protocol, namely the
time synchronization IE.

Fixes: #62940

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-20 14:58:23 +02:00
Florian Grandel 62396443fc drivers: ieee802154: deprecate OT "sleep" nomenclature
"Sleeping" has a well defined meaning in Zephyr related to threading and
power management. This differs from OpenThread's definition:

- Deprecates the "SLEEP_TO_TX" capability as it is redundant and
  conflicts with all of Zephyr's nomenclature, #61227, RFC 2863, Thread
  standard and IEEE 802.15.4. This binds the API to an implementation
  detail of OpenThread, instead. See #63670 for the agreed migration path.

- Renames the "SLEEP" event to "RX_OFF" which conforms to the
  nomenclature in Zephyr, this API and IEEE 802.15.4.

Fixes: #62995

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-20 14:58:16 +02:00
Andrzej Głąbek 5e38471e71 modules: hal_nordic: cmake: Fix checking if uicr DT node is accessible
According to cmake documentation, in the `if(<string>)` expression
the string evaluates to false unless its value is one of the true
constants. Thus, the commands under `if(${uicr_path})` are never
executed. Use `if(DEFINED uicr_path)` instead, since `uicr_path`
is returned by `dt_nodelabel()` and it will be undefined if such
node does not exist.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-10-13 21:23:17 +03:00
Henrik Brix Andersen b9675b05d3 drivers: can: mcux: flexcan: override maximum HAL wait loop iterations
Add option for overriding the maximum number of wait loop iterations for
entering/leaving freeze mode. Set the default to 10000 (as opposed to a
default of 1000 used in the HAL).

Fixes: #56171

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-13 10:04:57 +01:00
Flavio Ceolin e7bd10ae71 random: Rename random header
rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.

Rename it to random.h and get consistently with other
subsystems.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 14:23:50 +03:00
Laurentiu Mihalcea 3563347b10 modules: Kconfig.mcux: Remove implicit selection of HAS_CMSIS_CORE
CONFIG_HAS_MCUX is also selected by ARM64 and XTENSA-based cores
which don't have any CMSIS files. As such, it's wrong to implicitly
select CONFIG_HAS_CMSIS_CORE when CONFIG_HAS_MCUX is selected. Since
the ARM32-based cores implicitly select CONFIG_HAS_CMSIS_CORE there's
no point in CONFIG_HAS_MCUX also selecting it too.

The old approach caused config-related warnings
in external projects such as SOF after the introduction of
Commit '8d5ed53' ("modules: remove uncessary source for
external cmsis kconfig"). The warnings were in the form of:
"HAS_CMSIS_CORE (defined at modules/cmsis/Kconfig:7) has
direct dependencies 0 with value n ..."

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-10-06 16:49:51 +03:00
Najumon B.A b86b4b96a1 lib: acpi: update DSDT Kconfig with condition enable
update DSDT_SUPPORT Kconfig with condition enable only if both
ACPI and PCI enabled

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2023-10-06 10:40:14 +02:00
Ryan McClelland 2a2d032341 modules: hal_ethos_u: ethosu_log depends on stdout console
ethosu_log.h uses the stdout as it's stream for printf. This could
cause an issue where if CONFIG_LOG=n and CONFIG_CONSOLE=y then there
would be no way to control the log level and it would default to debug
level. There is no NONE option as with the way the ethos-u hal is set
up with no way to go below the err level.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-10-05 11:12:28 +02:00
Florian Grandel 36402b6d2a net: pkt: time: introduce ns timestamp helper
A little refactoring that simplifies dealing with nanosecond timestamp
values in packets and further decouples calling code from PTP:

Benefits:
- simplifies calling code by removing redundant conversions.
- prepares for removing PTP dependencies from net_pkt.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-29 16:27:15 +02:00
Iuliana Prodan 4289359eb2 modules: mcux: fix HAS_CMSIS_CORE selection
Do not select HAS_CMSIS_CORE for SOC_FAMILY_NXP_ADSP.
This soc family refers to the Audio DSP from i.MX MPU,
which is a HiFi4 core, Xtensa arch.

HAS_CMSIS_CORE is for ARM cores (A, M, R cores) -
see modules/cmsis/Kconfig.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-09-29 08:41:37 -05:00
Dominik Ermel 5d28fdea63 modules/MCUboot: Add overwrite mode for MCUboot
Add MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY mode.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-28 16:27:45 +02:00
Ryan McClelland 8d5ed530d7 modules: remove uncessary source for external cmsis kconfig
CMSIS uses an external KConfig so sourcing the KConfig is uncessary. This
also adds a comment if it is not available.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-27 18:33:40 -04:00
Ryan McClelland 90c6465f1f modules: fix naming of cmsis-nn,cmsis-dsp folder
The names have underscores within them. Somehow it was still being found
within the build but not with building documents. This renames them to
the correct name.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-27 18:33:40 -04:00
Flavio Ceolin 5d505c7b28 random: Fix feature dependency usage
Code using sys_csrand_get should depend on CONFIG_CSPRNG_ENABLED symbol
and not in ENTROPY_HAS_DRIVER since they are not using the entropy
device directly.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:55:10 -05:00
Dominik Ermel a2b238eee7 modules/MCUboot: Fix missing dependency
The CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP has been missing
select of CONFIG_MCUBOOT_BOOTLOADER_MODE_HAS_NO_DOWNGRADE.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-27 09:54:28 +02:00
Fabian Blatz c7f8033f2b modules: lvgl: simplify sys_heap memory size configs
Changes the Kconfig symbols for the sys_heap based memory management option
and removes the notion of `BLOCKS` with a more concise single
`LV_Z_MEM_POOL_SIZE` option. Also adds `LV_MEM_CUSTOM` to the lv_conf.h,
since in any option the memory management is considered to be custom.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-27 09:54:08 +02:00
Dominik Ermel f17e4f1b76 modules/MCUboot: Add new Kconfig indicating downgrade prevention
Add the MCUBOOT_BOOTLOADER_NO_DOWNGRADE Kconfig option that allows,
when paired with MCUboot mode Kconfig, to indicate that the MCUboot
has been configured with downgrade prevention, which means that only
application with version higher than running can be swapped on next boot.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-26 16:41:25 +02:00
Dominik Ermel f3067f2364 mgmt/MCUmgr/grp/img: Add support for DirectXIP with revert
The commit adds support for uploading image to board with MCUboot
configured with DirectXIP with revert.
It allows to set uploaded image either for test or as permanent
boot application, until newer image gets confirmed.
Note that in DirectXIP with revert MCUboot will remove image
that has not been set for test nor confirmed and MCUmgr does not
set either mode unless image has the mode set within uploaded
binary.
The commit adds Kconfig option
CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT
that enabled the new mode of operation within MCUmgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-26 13:40:11 +02:00
Ryan McClelland d2f82648cd modules: tflite-micro: update to latest
Update tflite-micro to use the latest. This also updates to use
the cmsis-nn module.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
Ryan McClelland b092094815 modules: cmsis-nn: add cmsis-nn module
This adds the cmsis-nn module since it moved to its own realm.
This also adds a kconfig for the long short-term memory.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
Ryan McClelland 104ea2ccca modules: cmsis-dsp: add cmsis-dsp module
Use CMSIS-DSP from its new realm. This also changes change how you
initialize FFT tables as well to use arm_cfft_init_64_f32 if you
know the FFT size in advance rather than the generic initialization
arm_cfft_init_f32.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
Roland Lezuo f4c901b82d soc: arm: st_stm32: add config to allow debugger attach in sleep/stop modes
Adds CONFIG_STM32_ENABLE_DEBUG_SLEEP_STOP to allow debugger attaching in
sleep/stop mode of STM32 parts. Mainly useful for debugging. Move DBGMCU
from part-sepcific power.c to common soc_config.c. CONFIG_USE_SEGGER_RTT
depends on this as well.

Signed-off-by: Roland Lezuo <roland.lezuo@embedded-solutions.at>
2023-09-22 15:31:47 +02:00
Alberto Escolar Piedras 6afe7cf216 hal nordic: cmake: Add support for nrf53_bsim boards
Also set the HAL variant appropriately when building for
the new nrf53_bsim boards.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-20 08:56:49 +02:00
Fabian Blatz 2ea2d37d60 modules: lvgl: retain last event for button/pointer device
Adds saving of the last lv_indev_data_t for button and pointer type
devices. This is needed because there is currently no way to tell LVGL in
the read callback that no event is pending. Preservation of the last state
is expected to happen in the port layer for the input devices.
This resolves issue #62512.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-19 16:18:18 +01:00
Maciej Baczmanski d2495b14f2 modules: openthread: fix unused variable during `otPlatCryptoInit`
If asserts are disabled, there is a warning in 'otPlatCryptoInit'
regarding unused variable `err`. This commit fixes that.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-09-19 15:22:03 +01:00
Florian Grandel e2005b6e48 modules: openthread: radio: OT now uses standard TX timestamp
Synchronizes with the new upstream RX/TX timestamp definition in
OpenThread based on the standard's SFD.

This change is synchronized with the upstream OpenThread implementation
via west.yml.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-19 15:21:17 +01:00
Fabian Blatz 1896130bd8 modules: lvgl: fix initialization order depedencies
Removes the pseudo device prerequisite that the LVGL setup routine has been
executed before initialization. The pseudo devices are now registered at
the end of the LVGL setup routine, the driver is not concerned with
configuring the devices anymore. This also removes the need for enforcing
certain priorities within the same init level.

This resolves issue #62753.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-18 20:37:43 +02:00
Gerard Marull-Paretas 4d7d5ce226 modules: hal_nordic: nrfx: add support for 'gpio-as-nreset'
So that the HAL's system init function configures the reset GPIO as
nRESET if requested by the user.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-18 13:14:08 +02:00
Gerard Marull-Paretas e43c2f3eb5 modules: hal_nordic: inject CONFIG_NFCT_PINS_AS_GPIOS
If the users configures this option in devicetree, ie,

```
&uicr {
    nfct-pins-as-gpios;
};
```

CMake will inject the HAL-specific CONFIG_NFCT_PINS_AS_GPIOS definition,
so that the necessary operations are performed during system init.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:05:28 +02:00
Gerard Marull-Paretas c7292efbda modules: lvgl: input: move to POST_KERNEL level
devices need to be initialized in pre/post-Kernel.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:04:19 +02:00
Alberto Escolar Piedras 5029922384 mbedtls module: Fix for other POSIX arch boards
Instead of detecting that we are in a native/POSIX arch based
board by checking for each board specifically,
let checks for the architecture.
In that way other boards (like the upcoming nrf53_bsim ones)
will also work.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-15 12:58:00 +02:00
Pieter De Gendt 0357b4d4f5 modules: nanopb: Add helper function to generate sources
Introduce a helper function zephyr_nanopb_sources to generate
source files and add these to a target.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-09-15 12:57:40 +02:00
Florian La Roche 79d0bf39b8 modules/acpica: CMakeLists.txt: move conditional to beginning of file
Move the conditional compile of CONFIG_ACPI to the beginning of the file
as we currently add compiler include paths to all projects even if
CONFIG_ACPI is not set.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-09-15 09:26:14 +02:00
Johan Lafon 6f0bf76086 modules: fatfs: fix build warnings
Adds a missing include to avoid these warnings :
- zephyr/modules/fatfs/zfs_ffsystem.c:19:16: warning: implicit declaration
  of function 'k_malloc'; did you mean 'ff_memalloc'?
  [-Wimplicit-function-declaration]
- zephyr/modules/fatfs/zfs_ffsystem.c:19:16: warning: returning 'int' from
  a function with return type 'void *' makes pointer from integer without a
  cast [-Wint-conversion]
- zephyr/modules/fatfs/zfs_ffsystem.c:25:9: warning: implicit declaration
  of function 'k_free' [-Wimplicit-function-declaration]

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-14 16:03:13 +02:00
TOKITA Hiroshi 8d98e7064e modules: hal_rpi_pico: Enable TIMER driver
Enable TIME driver.
Add the path of the TIME driver header into include paths.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
Jordan Yates 1e06ba2328 soc: arm: nordic: handle nRF52832 anomaly 109
Enable workaround for anomaly 109 by default when affected peripherals
are enabled.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-09-13 12:05:27 +02:00
Vladimir Graudt d40dbdf96f modules: mbedtls: use proper memory alignment on 64-bit platforms
This commit instructs mbedtls to use 64-bit alignment in its internal
memory allocation routines when targeting 64-bit platforms. By default
mbedtls uses 32-bit alignment regardless the platform, what may result
in misaligned memory accesses, possibly inducing access time overhead or
exceptions

Signed-off-by: Vladimir Graudt <vladimir.graudt@syntacore.com>
2023-09-13 12:02:06 +02:00
Fabian Blatz ca56084244 modules: lvgl: move existing includes to folder
Moves the includes to the exisiting `include` folder within the
module.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Fabian Blatz 094342866f modules: lvgl: input: add zephyr,lvgl-encoder-input device binding
Add a pseudo device which can be used to hook into qdec events and
optionally a button and relay the input_event to lvgl.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Huifeng Zhang 2c22e83dfb include: arch: arm: Remove aarch32 directory
This commit follows the parent commit work.

This commit introduces the following major changes.

  1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
    to the 'include/zephyr/arch/arm' directory.

  2. Change the path string which is influenced by the changement 1.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Aron Lander 89c866ab68 modules: Add DFM and move Tracerecorder into percepio module
This commit adds the DFM (DevAlert target side code) module and
moves the TraceRecorder module into the percepio module, which
results in the TraceRecorder module definition being removed
from the west manufest and module definition within zephyr.

Signed-off-by: Aron Lander <aron.lander@percepio.com>
2023-09-12 10:19:37 -04:00
Mateusz Sierszulski 8db11e6a0a drivers: spi: Add Ambiq MSPI driver
This commit adds MSPI driver for Apollo4 SoCs.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-09-08 14:44:12 +02:00
Fabio Baltieri 7140b6f9c1 modules: lvgl: initialize lvgl_heap_init from lvgl_init
Call lvgl_heap_init from lvgl_init rather than using two separate
SYS_INIT, this sensures that the heap is initialized correctly
regardless of the relation between CONFIG_KERNEL_INIT_PRIORITY_DEFAULT
and CONFIG_APPLICATION_INIT_PRIORITY.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-08 09:43:24 +02:00
Najumon B.A e5ec893c00 lib: acpi: add support for MAD table and DMAR table
add support for retrieve MAD and DMAR table information. Provided
two new interface namely acpi_dmar_entry_get() and acpi_drhd_get()
for retrieve DMA Remapping Reporting and DMA-remapping hardware
unit definition (DRDH).

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2023-09-07 09:42:38 +02:00
Jamie McCrae 95349eae2b mcuboot: Use tweak version for final signing version field
Includes the application VERSION-file designated tweak version
for the build number field when signing MCUboot images.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-01 17:44:28 +02:00
Sreeram Tatapudi 09a07e42c0 drivers: cat1: Updates to support latest version of HAL/PDL
- Refactoring to support latest versions of HAL/PDL

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-09-01 09:52:25 +02:00