Commit Graph

726 Commits

Author SHA1 Message Date
Flavio Ceolin e57e7f28a9 Revert "Revert "modules: tinycrypt: Options only when module is available""
This reverts commit 572491ab95.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-27 13:33:30 -05:00
Andriy Gelman d0961756a6 drivers: watchdog: Add xmc4xxx support
Adds watchdog support for Infineon xmc4xxx MCUs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-10-27 12:58:07 -05:00
Przemyslaw Bida b2fec758b3 net: openthread: Fix dependency on openthread max ip addr.
Fixes discrepancy between FTD and MTD in amount of ipaddr in
`ChildUpdateRequest`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-10-27 10:52:55 +02:00
Joakim Andersson 96c5052733 tfm: Add BL2 log level configuration and disable it with TFM silent conf
Add choice for BL2 log level configuration.
Silence TF-M BL2 logging when TF-M is configured to be silent.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-10-26 12:10:11 +02:00
Jukka Rissanen 83c875adab hostap: Move the relevant config options away from hostap
Moving the Zephyr specific config options from
modules/hostap/Kconfig to corresponding Kconfig where the
option is specified.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-26 09:48:47 +02:00
Sridhar Nuvusetty ab5821a8c8 hostap: Add build support for Zephyr
Only adds basic build support using Zephyr. Crypto support is disabled
till the MbedTLS integration is complete.

Signed-off-by: Sridhar Nuvusetty <sridhar.nuvusetty@nordicsemi.no>
Signed-off-by: Sachin Kulkarni <sachin.kulkarni@nordicsemi.no>
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-10-26 09:48:47 +02:00
Alberto Escolar Piedras 572491ab95 Revert "modules: tinycrypt: Options only when module is available"
This reverts commit 713ca15224.

This change broken several BT unit tests breaking CI in the main
branch. Let's revert it.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/64344

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 11:04:43 +02:00
Nikodem Kastelik 70db8cd12a modules: hal_nordic: nrfx: enable NRFX_GPIOTE1 for non-secure builds
Now it is needed to explicitly use NRF_GPIOTE1 instance
in nrfx_gpiote driver for non-secure builds.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2023-10-24 11:13:53 +02:00
Flavio Ceolin ffe1285343 modules: zcbor: Options only when module is available
Only show zcbor menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin 2e6871a46f modules: openamp: Options only when module is available
Only show openamp menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin f4cb487b79 modules: sof: Options only when module is available
Only show sof menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin 9eff0ca521 modules: libmetal: Options only when module is available
Only show libmetal menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin 713ca15224 modules: tinycrypt: Options only when module is available
Only show tinycrypt menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin 761a3039bb modules: Remove legacy comment
Module's Kconfig depends now in the presence of the module itself.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Joakim Andersson 33a44d0ed8 tfm: nordic_nrf: Add generic SoC support for nordic SoCs
Add generic SoC support for the supported nordic SoCs:
- nrf5340
- nrf9160
- nrf9120

Add generic SoC support by taking board specific configurations from
zephyr devicetree and kconfig.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-10-24 09:40:16 +02:00
Sebastian Bøe a4e9aed68d tfm: Enable TFM_EXCEPTION_INFO_DUMP by default
Exception info dump is a very basic feature so it should IMHO be
enabled by default.

For instance, a simple null-pointer exception in the non-secure app
will not be logged unless this option is enabled.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2023-10-20 19:29:32 +02:00
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