Commit graph

1083 commits

Author SHA1 Message Date
Aaron Ye d84874309e drivers: spi: create Ambiq SPI BLEIF driver
Some Ambiq Apollox Blue SOC (e.g. Apollo3 Blue) uses internal designed
BLEIF module which is different from the general IOM module for SPI
transceiver. The called HAL API will also be independent. This driver is
implemented for the BLEIF module usage scenarios.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-05-27 03:27:43 -07:00
Krzysztof Chruściński 59415697c4 modules: hal_nordic: nrfx: nrfx_config: Fix SPIS137 config
Fixing a bug where wrong instance was enabled when SPIS137 was supposed
to be used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-27 02:09:34 -07:00
Axel Le Bourhis 6ffbcd4990 modules: Add Kconfig to Kconfig.mcux for BLE support
Added NXP_FW_LOADER for NXP platforms.
Added NXP_RF_IMU for NXP platforms.
Added MONOLITHIC Flags for NXP platforms.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-05-25 11:23:04 +03:00
Sreeram Tatapudi f96e6ccbc0 boards: arm: Introduce Infineon CYW920829M2EVK-02 board
- Add initial version of CYW920829M2EVK-02 board
- [drivers: clock_control] Make it possible to set up both iho and imo
  clocks instead of just one or the other

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-05-24 18:05:11 -04:00
Andrzej Głąbek 2e8f104425 modules: hal_nordic: nrfx_glue: Remove NRFX_GPIOTE_CHANNELS_USED
This definition is no longer supported by the nrfx_gpiote driver (since
nrfx 3.2.0, reserved channels need to be defined per GPIOTE instance),
so remove it to not mislead users.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 07:47:15 -04:00
Valerio Setti 11920e35a0 mbedtls: reduce heap usage when building PSA crypto
By default PSA crypto library copies all the buffers that are passed
in into the heap before further processing them. This is required
when the PSA crypto library is on the secure side and it accepts
buffers from a non-secure code. However this case in Zephyr
is already handled by TF-M, so when the PSA crypto library is
built (CONFIG_MBEDTLS_PSA_CRYPTO_C) then it will be on the
non-secure side. Therefore this malloc copy is useless and
it consumes heap memory. Setting MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS
at Mbed TLS build time helps in removing this mechanism and
it saves heap memory.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 09:03:20 -07:00
Valerio Setti 210e08be5d bluetooth: mesh: update BT_MESH_USES_MBEDTLS_PSA selected symbols
Instead of selecting legacy MBEDTLS symbols, use corresponding
PSA_WANT ones when possible (note: some legacy symbols do not
have a PSA correspondance).

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti a1a7c9081a mbedtls: add new source file from MbedTLS 3.6 release
Add "sha3.c" source file that was previously missing from
CMakeLists.txt and that has been added in MbedTLS 3.6 release.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti 12ff947568 mbedtls: add new PSA_CRYPTO_CLIENT config
Using MBEDTLS_PSA_CRYPTO_CLIENT to guard all PSA_WANT symbols is
not completely correct because:

1. the prefix MBEDTLS suggests that it's something related to
   MbedTLS, while actually PSA APIs can be provided also
   by other implementations (ex: TFM)

2. there might applications which are willing to use PSA APIs
   without using MbedTLS at all. For example computing an hash
   can be as simple as writing psa_hash_compute() and, if the
   PSA function is provided thorugh TFM, then MbedTLS is not
   required at all

Therefore this commit:

- moves MBEDTLS_PSA_CRYPTO_CLIENT to Kconfig.tls-generic since
  that symbol belongs to MbedTLS

- adds a new symbol named PSA_CRYPTO_CLIENT as a generic way
  to state that there is "some" PSA crypto API provider

- let MBEDTLS_PSA_CRYPTO_CLIENT automatically select
  PSA_CRYPTO_CLIENT, since the former is an implementation of
  the latter.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti 2adb4cac17 mbedtls: default enable USE_PSA_CRYPTO when CRYPTO_C
Now that support for all PSA_WANT symbols is in place, we can
enable MBEDTLS_USE_PSA_CRYPTO when MBEDTLS_PSA_CRYPTO_C is
enabled as well.

Note: this commit also moves USE_PSA_CRYPTO out of CRYPTO_C
dependency in config-tls-generic.h because TLS/DTLS/X509 modules
of MbedTLS can rely on *any* implementation of PSA crypto APIs
not only the MbedTLS one. TFM is for example an alternative
to this.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti c4e1b56ef9 mbedtls: add the python script used to generate PSA Kconfigs
Since PSA has several different symbols defined and since it's
better to keep them aligned with the current MbedTLS release,
a python script is used to generate both:
- Kconfig.psa
- config-psa-generic.h

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti e58ebe12f4 mbedtls: add configuration file for PSA features
Adding a Kconfig and a header file to control which PSA features
are to be used from MbedTLS:

- new kconfig symbols are placed in a separate header file
  (Kconfig.psa) and are guarded by MBEDTLS_PSA_CRYPTO_CLIENT. The
  reason for this is that TLS/X509 can either rely on PSA functions
  provided by MbedTLS (when MBEDTLS_PSA_CRYPTO_C is defined) or
  TFM (when BUILD_WITH_TFM is selected). Therefore we could
  not make these new Kconfigs depending on MBEDTLS_PSA_CRYPTO_C.

- by default all PSA symbols are enabled, but they can be
  disabled by respective Kconfigs in order to reduce the image
  size.

- the new header file (config-psa-generic.h) mimics what
  config-tls-generic.h does for MbedTLS builtin symbols: it
  enables a build symbol for every Kconfig one. The name is
  kept identical in the 2 cases (a part from the initial CONFIG_
  in order to simplify the mechanism).

- MBEDTLS_PSA_CRYPTO_CONFIG is finally enabled whenever there
  is any PSA crypto provider (either MBEDTLS_PSA_CRYPTO_C or
  TFM)

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Tomi Fontanilles d830446c91 modules: tf-m: nordic: remove problematic include path
It made the build of
`samples/tfm_integration/tfm_psa_test/sample.tfm.psa_test_crypto`
break since the update of Mbed TLS to 3.6.0 (#71118), apparently because
`${ZEPHYR_BASE}` wasn't set, and the include doesn't seem to be needed.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-23 08:22:47 -04:00
Scott Worley c6e3bc3252 soc: microchip: mec: Add new HAL based MEC5 family chips
Add new Microchip MEC chips using the new MEC5 HAL and
add a HAL version of a legacy chip named MECH172x.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-05-21 16:45:30 -04:00
Nazar Palamar 879c10d818 soc: infineon: port Infineon SOC to HWMv2
Port Infineon SOC to HWMv2.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Joel Guittet b876bd26fd modules: mbedtls: fix pk ecc functions undefined references
Fix undefined reference to mbedtls_pk_ecc_xxx functions following update
to latest mbedtls version.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2024-05-20 14:43:31 +03:00
Alberto Escolar Piedras c9753f5cf6 modules hal_nordic: Handle appropiately new kconfig options
The new kconfig options intend to represent a final
nRF54L product, let's handle them appropriately.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-16 15:19:08 +01:00
Valerio Setti dfae5ba7de mbedtls: fix entropy module enablement
- Do not set CONFIG_MBEDTLS_ZEPHYR_ENTROPY in
  tests/crypto/mbedtls because this can cause test failure on
  real devices in which test thread do not have access to
  drivers.
- make MBEDTLS_PSA_CRYPTO_RND_SOURCE depending on
  MBEDTLS_PSA_CRYPTO_C because it only makes sense when the
  latter is defined

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-15 14:55:16 +02:00
Rafal Dyla 13aa26eac2 manifest: Adding nRF Services library
Adding nRF Services library to the hal-nordic repo

Signed-off-by: Rafal Dyla <rafal.dyla@nordicsemi.no>
2024-05-15 09:25:30 +01:00
Grzegorz Swiderski 24ce3f4182 drivers: serial: nrfx: Update Kconfig dependencies for RX cache
Two Kconfig symbols were tied to a board-specific DT nodelabel - namely
the `NRFX_UARTE_CONFIG_RX_CACHE_ENABLED` and `UART_<n>_RX_CACHE_SIZE`
were tied to `shared_ram3x_region` - but this is not necessary.

That DT node is where the UARTE driver RX/TX cache buffers are placed
in the default nRF54H20 DK memory map, but on another board, they could
be located somewhere else.

The exact memory sub-regions used for this purpose are indicated using
the `memory-regions` property on each UARTE instance, which should be
generic enough already, so let's use that instead.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 16:05:39 -04:00
Jędrzej Ciupis ba1102c97d modules: hal_nordic: add missing glue for nRF54H20
Add missing #ifdef in nrfx_glue for nRF54H20.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-13 10:21:08 +02:00
Tomi Fontanilles 2d61db9a60 mbedtls: introduce PSA-specific Kconfig file
It is meant specifically for configuration of the PSA crypto library.

The underlying PSA configuration items are guarded by the condition
that a PSA crypto provider must be present, which is the case when
either TF-M is in use or MbedTLS's PSA core is built as part of
the application image.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-10 18:24:38 -04:00
Phi Bang Nguyen f621407d50 modules: mcux: Drop HAS_MCUX_CSI config
The HAS_MCUX_CSI (as well as all the HAS_MCUX_XXX) config was obsolete
and has been replaced by the DT_HAS_NXP_IMX_CSI_ENABLED (i.e.
DT_HAS_XXX_ENABLED). Drop it as well as all the dependencies on it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-10 18:09:44 -04:00
Richard Wheatley e1e78a5f08 drivers: hwinfo: Adds Ambiq hwinfo support
This commit adds support for the hwinfo for Apollo4P SoCs

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-05-10 12:32:02 +02:00
Jędrzej Ciupis fe4f101a99 modules: hal_nordic: request nRF5340 network CPU in 802.15.4 init
The network CPU must be requested explicitly by the 802.15.4 driver for
the sharing mechanism to work correctly.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-09 15:44:47 +02:00
Sebastian Głąb 2f17c46fb1 drivers: wdt: nrf: Add WDT instances that exist in nrf54h20
Add WDT instances no. 010, 011, 131, 132.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-09 15:44:40 +02:00
Valerio Setti f539b661d6 mbedtls: add specific Kconfig option for MBEDTLS_USE_PSA_CRYPTO
MBEDTLS_PSA_CRYPTO_C and MBEDTLS_USE_PSA_CRYPTO are 2 different
things and the former should not automatically enable the
latter. The reson is that the user might want the MbedTLS
PSA crypto toolbox to be built, but at the same time he/she
does not want TLS/DTLS (and other intermediate modules such
as PK, MD and Cipher) to use PSA APIs.

For this reason this commit introduces a new Kconfig option
named CONFIG_MBEDTLS_USE_PSA_CRYPTO to enable the corresponding
build symbol. By default USE_PSA_CRYPTO is disabled. It is
only explicilty enabled in tests/samples that were previously
setting CRYPTO_C (since in those cases USE_PSA was set).

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-09 10:27:30 +02:00
Valerio Setti 9d5021befd mbedtls: do not include PSA ITS when using PICOLIBC
PICOLIBC misses the dirent.h header which is required
to emulate ITS (internal trusted storage) in PSA APIs.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-09 10:27:30 +02:00
Valerio Setti a364fc8a41 mbedtls: add option to use CSPRNG as random source for PSA_CRYPTO_C
Add a choice to select between legacy modules
(i.e. ENTROPY + CTR_DRBG/HMAC_DRBG) and CSPRNG as random generators
for PSA_CRYPTO_C.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-09 10:27:30 +02:00
Valerio Setti 7e2f06cbc2 mbedtls: add Kconfig option for PSA_WANT_ALG_SHA_256
Create a new Kconfig named CONFIG_PSA_WANT_ALG_SHA_256 which allows to
enable PSA_WANT_ALG_SHA_256. This allows to use PSA functions to
compute SHA256 hashes. When PSA is provided by TFM this allows also
to remove legacy mbedtls_sha256() support and therefore reduce
footprint for the NS side.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-08 22:14:19 -07:00
Dominik Ermel e2d9f09b70 modules: hal_nordic: nrfx: Add NRFX_RRAMC
Add Kconfig option for RRAM controller, NRFX_RRAMC.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-08 14:59:56 -05:00
Abram Early 61bb304c69 mcuboot: Remove OVERWRITE_ONLY from DIRECT_XIP modes.
Fixes #71111

Signed-off-by: Abram Early <abram.early@gmail.com>
2024-05-08 12:04:45 +02:00
Pieter De Gendt 9910f1ef77 modules: nanopb: Pull upstream fixes
Update nanopb with upstream fixes for selecting the correct protoc
executable.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-07 21:22:43 -04:00
Sebastian Bøe ad6e7298a5 tfm: cmake: Delete dead CMake code
This code appears to be dead so we delete it.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-07 17:57:40 -04:00
Jordan Yates 586882f003 mbedtls: compile FFDH support in PSA mode
Include `psa_crypto_ffdh.c` when compiling MbedTLS with PSA support, as
`MBEDTLS_PSA_BUILTIN_KEY_TYPE_DH_PUBLIC_KEY` references the included
functions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-07 17:55:56 -04:00
Hao Luo a0b07212e9 soc: arm: ambiq: apollo3: Add support for Apollo3 Blue Plus SoC
Add all required parts (new SoC family/series, device tree) for
the Ambiq Apollo3 Blue Plus SoC.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-07 18:57:19 +02:00
Jukka Rissanen ce75cd1c09 hostap: Fix the function name to be more descriptive
The wpas_to_wifi_mgmt_diconn_status() was missing "s" char,
so name it to wpas_to_wifi_mgmt_disconn_status() as that is
more descriptive.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 14:55:09 +01:00
Jukka Rissanen 16eed4e367 hostap: Handle CTRL-EVENT-SCAN-RESULTS event
Handle scan results event in order to avoid warning print
for unhandled event. The event is not used for anything atm,
this just prevents unknown event printout.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 14:55:09 +01:00
Jukka Rissanen b03cb04411 hostap: Enable suitable mbedtls options
Enable all needed mbedtls options to allow crypto support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 14:55:09 +01:00
Ravi Dondaputi fd88b09b1a hostap: Support BSSID configuration for connect command
Support BSSID configuration while setting up the network information
as part of the connect command processing.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 14:55:09 +01:00
Chaitanya Tata 0fb4320f9e hostap: Fix handling channel 14
Channel 14 in JP is still allowed (though OFDM is disabled), this wasn't
handled by operating class 81, so, add 82 to the list.

We still need to full implement regulatory support in the WPA
supplicant but that is handled in separate fix.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 14:55:09 +01:00
Chaitanya Tata c8a8c94186 hostap: Convert channel to frequency conversion to a loop
This makes it readable and also scalable for upcoming extension of
operating classes.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 14:55:09 +01:00
Tomi Fontanilles 6c68068c38 modules: mbedtls: remove default-enabling of hash algorithms
Do not enable hash algorithms except SHA-256 by default.
This unnecessarily inflates the final code size even if not all the
enabled hash algorithms are actually used.

SHA-256 is (for now) kept enabled by default because many configurations
across the code base assume that there is some hash algorithm
available without needing to enable it.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-03 14:47:52 -07:00
Tomi Fontanilles 43651979fc drivers: entropy: fix TF-M enabled build with MbedTLS 3.6.0
This fixes the compilation of entropy_psa_crypto.c that failed
when trying to include the MbedTLS configuration.

Inherit the needed include folders and definitions from tfm_api.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-02 09:42:34 -07:00
Tomi Fontanilles e49033ac1e modules: tf-m: make CONFIG_BUILD_WITH_TFM imply CONFIG_MBEDTLS
This fixes NS compilation on certain app/board combinations
where TF-M is used but CONFIG_MBEDTLS was not set to y.

With the update to MbedTLS 3.6.0, the compilation failed in
(at least) interface/src/tfm_crypto_api.c when trying to
include MbedTLS configuration file because the MbedTLS Kconfigs
were not defined due to CONFIG_MBEDTLS being n (and the default
MbedTLS configuration file not being found).

TF-M's dependency on MbedTLS is pretty much a given.
This change ensures that the configuration for MbedTLS
is properly defined at all times when TF-M is in use.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-02 09:42:34 -07:00
Tomi Fontanilles 94404589d4 modules: tf-m: fix tfm_api's configuration of MbedTLS
The configuration file was not passed down to tfm_api, which
made the compilation of (at least) interface/src/tfm_crypto_api.c
fail when updating MbedTLS to 3.6.0.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-02 09:42:34 -07:00
Tomi Fontanilles 5416e76d3b modules: mbedtls: force NS-side config to client-only when using TF-M
When building with TF-M (CONFIG_BUILD_WITH_TFM),
force MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C
so that no NS code tries to act like the MbedTLS core
is built on this side.

This fixes compilation errors in (at least)
interface/src/tfm_crypto_api.c after the
update of MbedTLS to 3.6.0.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-02 09:42:34 -07:00
Tomi Fontanilles 8d3c5efc33 modules: mbedtls: fix RSA's dependency on ASN1
With MbedTLS updated to 3.6.0 the RSA module does not
depend on PK anymore. However, it is now dependent on ASN1.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-02 09:42:34 -07:00
Martin Jäger f3e41c6a25 lorawan: services: add Fragmented Data Block Transport
This service receives fragmented data (usually firmware images) and
stores them in the slot1_partition in the flash.

Also update CMakeLists.txt in loramac-node module to be able to use
FragDecoder.c

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-05-02 16:54:43 +02:00
cyliang tw 183edd2549 drivers: rtc: support for Nuvoton numaker m46x
Add Nuvoton numaker RTC driver including RTC alarm feature.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-04-30 14:31:29 -04:00
Fabian Blatz 6fdf9c9ae9 modules: lvgl: Fix coordinate handling for invert-{x,y} and swap-xy
This patch fixes two issues in the coordinate handling of the
`zephyr,lvgl-pointer-input` compatible:
- If the swap-xy flag is set the coordinates need to be swapped even
  before the sync event is received.
- The coordinates are stored into an additional variable instead of the
  pending_event. This is done to prevent the double inversion for touch
  release events.

Resolves issue #70539.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-04-30 18:22:57 +02:00
Pieter De Gendt 608554aeca 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-04-26 16:06:44 +02:00
Jordan Yates 3247a1db81 modules: mbedtls: option for MBEDTLS_HKDF_C
Add kconfig option to enabled `MBEDTLS_HKDF_C`, HMAC-based
Extract-and-Expand Key Derivation Function.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-04-25 09:46:52 -04:00
Sebastian Bøe 33786b55ab tf-m: Silence harmless version warning
Silence harmless version warning for users that have tagged TF-M.

TF-M creates a very noisy warning when you tag it:

CMake Warning at cmake/version.cmake:28 (message):
  Actual TF-M version is not available from Git repository.  Settled to
  v2.0.0
Call Stack (most recent call first):
  CMakeLists.txt:22 (include)

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-04-25 07:25:36 -04:00
Nikodem Kastelik 9711b37e7b modules: hal_nordic: nrfx: add support for nRF54 TWIS
Add Kconfig-to-nrfx symbol redefinitions so that TWIS instances
found on nRF54H20 and nRF54L15 devices are supported.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-19 02:23:16 +01:00
Caspar Friedrich 1cfdba997b modules: segger: Add Kconfig option to use CCM for data
SEGGER RTT module supports to use CCM for output data. This add the
necessary Kconfig option (choice).

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2024-04-17 14:38:54 +02:00
Grzegorz Swiderski 35e418f469 modules: hal_nordic: Fix NRF_GRTC_HAS_EXTENDED
This definition is used in nrfx header files, so it shouldn't be added
using `zephyr_library_compile_definitions()`. This would cause the GRTC
driver to fail the build when CONFIG_NRF_GRTC_START_SYSCOUNTER=y.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-04-17 14:26:02 +02:00
Jakub Zymelka d907986b5d modules: hal_nordic: nrfx: add nRF54L15 FLPR core support
Add support for nRF54L15 FLPR core.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-04-16 18:36:58 +01:00
Krzysztof Chruściński 685e6cec9b drivers: serial: nrf: Adapt config dependencies to nrf54h20
DT nodes and compatible had been renamed and Kconfig option was relying
on the names that do not exists.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-15 12:53:09 +02:00
Krzysztof Chruściński 865c8800c6 modules: hal_nordic: Extend SPI configuration for all instances
Iterate over all instances to get the information about extended
feature support in SPIM driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-11 14:30:31 +02:00
Fabian Blatz f47b862c44 modules: lvgl: Kconfig: Add missing stubs for DMA2D kconfig symbols
Adds the missing stubs for DMA2D kconfig symbol to fix the Kconfig warning
produced by checkpatch.

Resolves #70859

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-04-10 11:29:19 -04:00
Nazar Palamar a83d2dad8d wifi: airoc: remove dependency on CYHAL
Removing dependency on cyhal in airoc wifi driver.

It need to build airoc wifi driver with different than
PSoC 6 Soc like STM32

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-04-09 16:57:49 +02:00
Nikodem Kastelik 9949645dd4 modules: hal_nordic: nrfx: add support for nRF54 PWM
Add Kconfig-to-nrfx symbol redefinitions so that PWM instances
found on nRF54H20 and nRF54L15 devices are supported.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-09 11:05:46 +02:00
Andrzej Głąbek 902351a2e5 modules: hal_nordic: Add missing nrfx_config entries for nRF54L15
Add nrfx_grtc related entries that were introduced in nrfx 3.4.0,
especially NRFX_GRTC_CONFIG_AUTOSTART that should be by default
set to 1.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-04-08 12:27:21 +02:00
Jukka Rissanen af75192910 hostap: Comment out offeding mbedtls configs
Comment out mbedtls symbols that do not have a proper Kconfig
setting. Future commits will need to add relevant support in mbedtls
side to provided needed symbols so that they can be used in hostap
and uncomment these.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 873106faf1 hostap: Add configuration options for NW selection
To cater for different needs add an configuration options for WPA
supplicant network selection (scan results sorting). The default is
still left unchanged.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata e2d267c92c hostap: Fix band selection
If user selects a band, then we should restrict scanning channels to
that band, but using freq_list will only filter the results.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Ravi Dondaputi 688fe9afe5 hostap: Resolve build warning with strncpy
Make sure to copy LEN -1 bytes to the destination, to
accommodate the terminating null byte.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 2e9b17158a hostap: Always allow disconnect
Even if the interface is not in connected state, allow disconnect to be
accepted, this behaviour regressed when the mode check was introduced
and if not connected then SSID will be NULL.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata a62f85c2ee hostap: Reduce WPA supplicant heap when MbedTLS heap is enabled
If MbedTLS uses its own heap which is a static heap (not libc heap),
then WPA supplicant heap usage will come down, so, reduce 8K (minimum
MbedTLS heap for Wi-Fi) from the libc heap size.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata fa2b192df4 hostap: Free association response event deep copy
Free the deep copied data of the association response event.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 26418cba14 hostap: Fix interface name copy in removal
Using a macro here that can potentially limit the interface name
compared to add can lead to issues, so, to mimic what we do in add, use
the sizeof with a boundary check.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata d777c8654f hostap: Add return value checks for interface removal
These were missed earlier, and if event send fails, no point in waiting
for the state to change.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata df70640f60 hostap: Limit only to WPA2 for SAP
Due to AP-MLME being in the host and expensive computation WPA3 is not
working reliably, so, for now this is being disabled.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 86c3e0ade4 hostap: SAP mode needs more heap
SAP mode adds more functionality that increases the heap usage, based on
experiments, 40000 works well to avoid startup failures.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata dbb5914f95 hostap: Free the buffer for TX status
Now that TX status buffer is allocated on heap by Zephyr driver, free
the buffer once its processed.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Vidar Lillebø 6f5d50fec9 hostap: Select MBEDTLS_PKCS5_C
For WPA_SUPP_CRYPTO_LEGACY, MBEDTLS_PKCS5_C is needed.

Signed-off-by: Vidar Lillebø <vidar.lillebo@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Sebastian Bøe acd0aa7bb3 hostap: Add missing deps in WPA_SUPP_CRYPTO_
Add missing MBEDTLS_PK_C dependcy for legacy crypto.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 58efe79683 hostap: Fix key management for SAP
Key management for SAP should be retrieved from the network block rather
than using the per-interface global structure.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 2f29c1057f hostap: Reserve the heap
By default (-1) libc uses all the available heap, this is good to
efficiently use the RAM, but for scenarios which there isn't enough RAM
the build will be success, but we see runtime failures.

Reserved the necessary RAM based on tests ahead to catch such scenarios,
of course this would mean that we might be no using full RAM in case
more is left, but that's never the case the with Wi-Fi :).

And this also adds the constant evaluation and fine tuneing like we do
for kernel heap and other parameters.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 3186c70e41 hostap: Fix the disconnect wait timeout
The timeout should be 5s, not 50s. Fix and rename the variables to
better reflect their meaning.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Sreeram Tatapudi cc2898e6fe modules: hal_infineon: wifi_host_driver: Fix blob case
FIx the name of the cyw43xx_fw_bin

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-04-05 11:55:04 +02:00
Kyle Dunn a846b81d58 drivers: sensor: lis2dux12: Add lis2dux12 driver
Adds support for the STMicroelectronics LIS2DUX12 3-axis accelerometer.

Signed-off-by: Kyle Dunn <kdunn926@gmail.com>
2024-04-04 09:45:49 +01:00
Damian Krolik 42d928ee93 drivers: ieee802154: fix configuring CSL IE in ACK
The code was assigning a pointer to a scoped buffer to
an object outside that scope. This would cause the driver
would receive garbage instead of a well-formatted IE and
would likely reject the IE. This in turn caused CSL IE
not being included in enhanced ACKs (verified with
wireshark).

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2024-04-03 13:57:50 +03:00
Dave Lacerte 379ac5e394 modules: openthread: platform: radio: Time Sync OT Feature support
Add missing otRadioIeInfo structure and add plaform time to transmit frame

Signed-off-by: Dave Lacerte <lacerte.dave@hydroquebec.com>
2024-03-28 16:05:21 -05:00
Daniel Leung 6cd7936f57 kernel: align kernel stack size declaration
When kernel stack is defined as an array, K_KERNEL_STACK_LEN()
is used to calculate the size for each stack in the array.
However, standalone kernel stack has its size calculated by
Z_KERNEL_STACK_SIZE_ADJUST() instead. Depending on the arch
alignment requirement, they may not be the same... which
could cause some confusions. So align them both to use
K_KERNEL_STACK_LEN().

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-27 19:27:10 -04:00
Marco Widmer 1a899ee414 modules: hal_nordic: nrfx_glue: Fix unused argument
NRFX_IRQ_PRIORITY_SET is defined as empty. This causes an unused
argument warning in many callers (e.g. nrfy_gpiote_int_init). Fix it by
using ARG_UNUSED for the priority argument.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-03-26 11:19:05 -05:00
Marco Widmer 0e46701d6d modules: hal_nordic: nrfx_glue: Fix coding style
We will touch these lines in the next commit. Convert the comment style
to C89 instead of C99 and the indentation to tabs instead of spaces.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-03-26 11:19:05 -05: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
Jukka Rissanen d5dd3a0a54 hostap: Remove PSA crypto support
The PSA is referring to Kconfig symbols that are only found
in Nordic downstream repo so we cannot use it anyway atm.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen 57b4ff137d hostap: Replace menuconfig by config
This avoid compliance warning

Found pointless 'menuconfig' symbols without children. Use regular 'config'
symbols instead. See
https://docs.zephyrproject.org/latest/build/kconfig/tips.html#menuconfig-symbols.

WIFI_NM_WPA_SUPPLICANT              modules/hostap/Kconfig:8
WIFI_NM_WPA_SUPPLICANT              modules/hostap/Kconfig:8

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen 5af390c600 hostap: Fix missing items in Kconfig and CMakeLists.txt files
Various settings in Kconfig and CMakeLists.txt file were
plain wrong or missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen e1729b44ef hostap: Fix compilation issues
The big cherry-picking left some invalid code so remove/fix
it in order to pass the compilation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 675346705f hostap: Fix channel comparison
Due to a typo, channel and frequency were compared causing the
connection to fail for any combination.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata b3a6f8c2db hostap: Implement STA disconnect in AP mode
Use the WPA cli command to disconnect a station in AP mode.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 2a144e8bfe hostap: Fix WPA version for WPA3 and WPA2-PSK-256
The WPA version was only been set for WPA-PSK and WPA2-PSK, but for
others it wasn't set. For AP mode this causes issues as WPA-IE is
considered and WPA3/WPA2-PSK-256 aren't allowed, they need RSN.

Explicitly set the version for all to RSN, except for WPA-PSK.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata d8600d57cc hostap: Fix the security mode in AP
For AP we should use the security mode from the SSID as stations can
have a different security than the configure one. E.g., WPA/WPA2 in AP
vs WPA in STA1 and WPA2 in STA2.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 8729141da1 hostap: Fix SSID check
If the interface is in associated state, then current SSID will always
be set, so, add an early check and use SSID info freely after that.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata b5ed2b45f1 hostap: Add mode check for disconnect
This way we reject disconnect in AP mode and ap disable in STA mode,
though both have same functionality we treat them differently to keep
it clean.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00