Commit graph

1783 commits

Author SHA1 Message Date
Fengming Ye
1640826fc5 net: wifi_mgmt: add hostap DPP support
Add wifi l2 mgmt dpp handlers.
Add wifi subcommand dpp to call l2 mgmt dpp handlers.

DPP l2 handlers will parse params to hostap wpa_cli format args
and send wpa_cli commands to hostap.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-08-05 18:40:17 -04:00
Li Long
85ccb24881 modules: hostap: src: add get_version cmd support
Add get_version cmd support for "wifi version" cmd input

Signed-off-by: Li Long <li.long@nxp.com>
2024-08-05 16:29:43 +02:00
Mathieu Choplain
d50e190b02 modules: Kconfig.stm32: remove duplicate Kconfig symbol for RAMCFG
Remove the duplicate `USE_STM32_HAL_RAMCFG` Kconfig symbol definition
from Kconfig.stm32, which was introduced by accident in PR #66181,
commit 6ed002ddae.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-02 18:38:13 -05:00
Nikodem Kastelik
443276eccb modules: hal_nordic: nrfx: sync configs for UARTE MAGIC_BYTE option
New option is used in RX FIFO flush workaround
performed by the nrfx_uarte driver.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
c0ede7106e modules: hal_nordic: nrfx: remove nrfx_uarte rx cache for nrf54l15 enga
This option is no longer valid for nRF54L15 Eng A target.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Chun-Chieh Li
9e9e409cb9 drivers: usb_c: numaker: support Nuvoton's M2L31 series
1. Support USB-C drivers TCPC, PPC, and VBUS with UTCPD H/W IP
2. UTCPD is interconnected with Timer-triggered EADC for updating
   VBUS/VCONN voltage periodically

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-01 12:38:53 +02:00
Anke Xiao
643e464c76 modules: Kconfig.mcux: remove HAS_MCUX_ACMP
Remove the ‘HAS_MCUX_ACMP’ Kconfig, and also remove it from
driver and soc Kconfig files. It is not needed since we already
depend on 'ACMP' enabled in the dt file, the 'HAS_MCUX_ACMP'
kconfig is a relic of the past before devicetree was stable.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Rubin Gerritsen
a4e43d013c Bluetooth: Samples: Use string printing functions for error codes
When developing Bluetooth applications, you typically run into some errors.
If you are an experienced Bluetooth developer, you would typically know
how to translate the error codes into string representations.
Others might not.

This commit to adds string printing of error codes for all
samples to make them more user-friendly.

Several formatting alternatives were considered. The chosen alternative
balances code readability and FLASH size (with and without string
printing).

Example output from the peripheral_hids sample when the
peer rejects pairing:

```
Bluetooth initialized
Bluetooth authentication callbacks registered.
Advertising successfully started
Connected 5E:67:02:D3:1C:DB (random)
Security failed: 5E:67:02:D3:1C:DB (random) \
level 1 err 6 BT_SECURITY_ERR_PAIR_NOT_ALLOWED
Disconnected from 5E:67:02:D3:1C:DB (random), \
reason 0x13 BT_HCI_ERR_REMOTE_USER_TERM_CONN
```

Other alternatives that were considered:

- Use of parantheses:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err BT_SECURITY_ERR_PAIR_NOT_ALLOWED(6)
Disconnected from 5E:67:02:D3:1C:DB (random), reason \
BT_HCI_ERR_REMOTE_USER_TERM_CONN(0x13)
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err (6)
Disconnected from 5E:67:02:D3:1C:DB (random), reason (0x13)
```

- Spaces and parantheses:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err BT_SECURITY_ERR_PAIR_NOT_ALLOWED (6)
Disconnected from 5E:67:02:D3:1C:DB (random), \
reason BT_HCI_ERR_REMOTE_USER_TERM_CONN (0x13)
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err  (6)
Disconnected from 5E:67:02:D3:1C:DB (random), reason  (0x13)
```

- Parantheses around everything:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err (BT_SECURITY_ERR_PAIR_NOT_ALLOWED(6))
Disconnected from 5E:67:02:D3:1C:DB (random), \
reason (BT_HCI_ERR_REMOTE_USER_TERM_CONN(0x13))
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err ((6))
Disconnected from 5E:67:02:D3:1C:DB (random), reason ((0x13))
```

- Error code first, then string representation:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err 6 (BT_SECURITY_ERR_PAIR_NOT_ALLOWED)
Disconnected from 5E:67:02:D3:1C:DB (random), reason \
0x13 (BT_HCI_ERR_REMOTE_USER_TERM_CONN)
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err 6 ()
Disconnected from 5E:67:02:D3:1C:DB (random), reason 0x13 ()
```

- Apostrophes around error printing:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err "BT_SECURITY_ERR_PAIR_NOT_ALLOWED (6)"
Disconnected from 5E:67:02:D3:1C:DB (random), reason \
"BT_HCI_ERR_REMOTE_USER_TERM_CONN (0x13)"
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err " (6)"
Disconnected from 5E:67:02:D3:1C:DB (random), reason " (0x13)"
```

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-31 12:56:11 +02:00
Fabio Baltieri
716fa268f4 input: add a user_data pointer to the callback
Add a void *user_data pointer to the input callback structure. This is
useful for driver to get back the driver data structure and avoid
defining wrapper functions.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-31 12:55:11 +02:00
Maciej Baczmanski
040a942a63 manifest: net: openthread: Regular openthread upmerge to e10a925.
Regular openthread upmerge to `e10a92570f94ff1e0bc5e0da9ecf0ee135d955a6`.

Additionally commit aligns platform implementation with diag changes:
https://github.com/openthread/openthread/pull/10354

based on:
https://github.com/openthread/ot-nrf528xx/pull/822

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-07-30 18:27:15 +01:00
Sreeram Tatapudi
eebc998a5a drivers: flash: Support for IFX QSPI Flash driver
Initial version

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-29 14:14:10 +02:00
Marcin Gasiorek
313a92baf9 net: openthread: Set CIDR for NAT64
Implementation of functionality whitch configure CIDR for OT NAT64.

Signed-off-by: Marcin Gasiorek <marcin.gasiorek@nordicsemi.no>
2024-07-28 07:29:50 +03:00
Marcin Gasiorek
ac0a9d79ab net: openthread: Add NAT64 send and receive callbacks.
Packets are routed between OT and Zephyr net stacks.
For IPv4 these packets are managed by NAT64 by default.

Signed-off-by: Marcin Gasiorek <marcin.gasiorek@nordicsemi.no>
2024-07-28 07:29:50 +03:00
Piotr Koziar
4df79b5503 modules: hal_nordic: adjust HFCLK ramp-up time.
Changes the ramp-up time from 1000us to 550us
on nRF54H20.
The time must fit inside general preconditions ramp up.

The hfclk time can be adjsuted this way because
the current solution is not precise until
the clock_control is available.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-07-27 20:50:32 +03:00
Pieter De Gendt
ad63ca284e kconfig: replace known integer constants with variables
Make the intent of the value clear and avoid invalid ranges with typos.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-27 20:49:15 +03:00
Gaofeng Zhang
27270fa14d modules: hostap: fix disconnect print fail log
WIFI_REASON_DISCONN_UNSPECIFIED is 1, when disconnect reason is 0,
wpas_to_wifi_mgmt_disconn_status return the
WIFI_REASON_DISCONN_UNSPECIFIED and print error log "Disconnection
request failed (1)"

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-07-27 15:19:56 +03:00
Rubin Gerritsen
893c4ed4f9 modules: hal_nordic: Support EGU130 driver instance
Adds the glue code to enable this.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:15:07 +03:00
Rubin Gerritsen
73ec3467e7 modules: hal_nordic: Support nRF54L15 EGU driver instances
Adds the glue code to enable those.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:15:07 +03:00
Gerard Marull-Paretas
a1de1d6cb3 modules: hal_nordic: nrf-regtool: enforce in-tree devicetree package
It looks like nrf-regtool depends on the
https://pypi.org/project/devicetree/ Python package, which contains an
old copy (https://github.com/zephyrproject-rtos/python-devicetree) of
the in-tree devicetree package.

Because no major changes have happened in the devicetree scripts, this
likely went unnoticed. However, realized today that such old package is
not able to parse bindings with multiple buses (e.g. in I3C, where we
have `bus: [i3c, i2c]`).

While a proper solution is discussed, inject `PYTHONPATH` with the
in-tree library.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-27 15:08:30 +03:00
Jordan Yates
a96b017e3e modules: mbedtls: rename MBEDTLS_PSA_CRYPTO_RND_SOURCE
Rename `MBEDTLS_PSA_CRYPTO_RND_SOURCE`->`MBEDTLS_PSA_CRYPTO_RNG_SOURCE`
as all other options use `RNG` for random number generator instead of
`RND` for random number.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:07:44 +03:00
Konrad Derda
ec0d6ab885 net: l2: openthread: set multicast loop by default
When multicast packet is forwarded to the OpenThread stack it has to
have its "multicast loop" flag enabled to be processed by the stack
itself instead of only propagating it further.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-07-27 10:46:38 +03:00
Tomi Fontanilles
45ae95241a modules: tf-m: fix git clone during build
As of v2.1.0 TF-M has updated to CMSIS v6 and switched from hosting
the sources to depending on the upstream repository, cloning it at
build time.

To prevent a download from happening during the build, CMSIS v6 sources
are pushed to Zephyr's fork of TF-M and the `CMSIS_PATH` CMake variable
is set to point to them.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-25 12:25:32 +02:00
Tomi Fontanilles
50c03e9bbe modules: mbedtls: fix MBEDTLS_PSA_P256M_DRIVER_RAW Kconfig option
Make it depend on MBEDTLS_PSA_P256M_DRIVER_ENABLED instead of
selecting it.

This fixes the build of
tests/crypto/secp256r1/crypto.secp256r1.p256-m_raw on filtered-out
platforms since PR #75441 (83cd9f5a01).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-15 10:36:58 -04:00
Jordan Yates
1bbfbef88d modules: tfm: fix TFM_MCUBOOT_IMAGE_NUMBER == 1
Fix builds with `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`. The merged binary
should be signed with the same argumements as a secure build, not a
non-secure build, except with a different layout file generated by the
TF-M build system.

Fixes #68345.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-12 20:38:49 -04:00
Stefan Schwendeler
5feb028512 modules: hal_nordic: defines NRF_CONFIG_NFCT_PINS_AS_GPIOS for nRF54L15
Currently, the NFCT pins cannot be used as GPIOs on the nRF54L15 MCU
because the Nordic HAL for this MCU uses the new upcoming `NRF_CONFIG_`
style configuration settings for this MCU.
To support all nRF5x MCUs, the old configuration is still required
because Nordic didn't update their MDK entirely to the new style.

Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
2024-07-12 16:11:44 -04:00
Lukasz Stepnicki
f71d848c14 modules: hal_nordic: nrfs: fix buffer used in nrfs send
In function nrfs_backend_send_work tx_data buffer was
used in function ipc_service_send instead of
data_to_send. This is fixed and also tx_data and rx_data
are moved to coresponding functions preventing such
issues in future.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-07-12 09:12:25 -04:00
Declan Snyder
5fa17a8d39 modules: hal_nxp: Fix i2s define mistake
The commands should be within the if command checking
for CONFIG_HAS_MCUX, fix.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-11 16:13:35 +02:00
Emilio Benavente
33a9e4b088 modules: hal_nxp: CMakeLists: Added SAI definition to fix I2S.
Added definition MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK
to fix timeout fault on the I2S_Speed test
using MIMXRT1170_evk/mimxrt1176/cm7.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-07-10 16:15:49 -04:00
Chaitanya Tata
0e6db9c918 modules: hostap: Fix interface addition
WPA supplicant as a network manager monitors interface events and
registers to the Wi-Fi NM module, so, adding a check for NM type before
registering the interface is wrong.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-09 13:07:11 -04:00
Tomi Fontanilles
83cd9f5a01 modules: mbedtls: properly guard PSA_CRYPTO_C
Instead of silently `#undef`ing PSA_CRYPTO_C when TF-M is in use,
enforce that rule at the Kconfig level.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-08 12:14:49 -04:00
Stephan Linz
e823cc5fb4 modules: lvgl: fix initialization macro syntax
Adding a semicolon after the do-while loop in the LV_DEV_INIT()
macro also supports multiple instantiation.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-07-08 15:53:46 +02:00
Chaitanya Tata
650227d8c4 modules: hostap: Fix check for iface up
We only need the interface to be administratively up, the operationl
status is managed by the WPA supplicant.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
176a47c2df modules: hostap: Fix SoF
Due to recent changes to hostap, the stack usage is increased, so,
increase the stack size to fix SoF.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
f4e0a1abea modules: hostap: Fix MbedTLS config issue
Fixes build issues when Wi-Fi security is enabled for default
implementation, the alternative implementation is managed separately,
and doesn't need these.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
515f1fee48 modules: hostap: Fix MbedTLS TLS
TLS is only for Enterprise, so, move to enterprise macro.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Jan Zyczkowski
b737598dcf boards: nordic: Change NRFS logs to debug level
Change NRFS logs to debug level not to break tests.

Signed-off-by: Jan Zyczkowski <jan.zyczkowski@nordicsemi.no>
2024-07-01 16:07:15 -04:00
Torsten Rasmussen
2bfea20d70 cmake: tf-m: create tfm_api dependency on tfm_s.hex
Incremental builds for TF-M are not picked up by Zephyr linking stage.
Code changes to tf-m repository results in a rebuild of TF-M and thus
an updated tfm_s.hex (and other files).

tfm_s.hex is merged together with the zephyr hex to form a final merged
hex file for flashing. This is done as a post-build command, however
such as step cannot take extra dependencies. The Zephyr target can have
extra dependencies, however that will only ensure the dependency is
brought up-to-date when Zephyr re-link, not re-linking Zephyr when the
dependency changes.

Therefore an object dependency is placed on the interface.c file for
Zephyr TF-M interface implementation, which ensures the tfm_api library
is brought up-to-date whenever TF-M rebuilds, and this update again
ensures the Zephyr itself is re-linked whenever TF-M rebuilds.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-29 05:24:49 -04:00
Jordan Yates
f4d09c9791 modules: cmsis-nn: add *_s4.c sources
Add new sources for 4 bit function variants to build system.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
afdbb3b94b submanifests: update tflite-micro
Update `tflite-micro` to the latest version.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
The Thanh. Nguyen
f93f801c65 driver: serial: Add serial driver support for Renesas RA8 devices
Add implementation of sci_b_uart for Renesas RA device

Signed-off-by: The Thanh. Nguyen <the.nguyen.yf@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
7195f0de0f soc: renesas: ra: Add initial support for RA8M1 SOC series
Add minimal support for RA8M1 SOC series.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
259b3d0095 arch: arm: Add initial support for Cortex-M85 Core
Add initial support for the Cortex-M85 Core which is an implementation
of the Armv8.1-M mainline architecture.

The support is based on the Cortex-M55 support that already exists in
Zephyr.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-06-26 13:36:14 -04:00
Maochen Wang
b7ed82c060 modules: mbedtls: Fix init hang issue
In device init phase, it will call _mbedtls_init before malloc_prepare
as mbedtls has higher priority defined in SYS_INIT..
_mbedtls_init() will call psa_crypto_init() and malloc buffer,
but z_malloc_heap is not initialized, which will cause device hang.
Should call malloc_prepare() before _mbedtls_init to fix this issue,
so decrease the priority of mbedtls to default 40.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-26 13:07:02 -04:00
Fabian Blatz
b7b1a56124 modules: lvgl: support linking memory pool to custom section
This patch adds a kconfig option `LV_Z_MEMORY_POOL_CUSTOM_SECTION`
which allows to place the buffer the memory pool is backed by into a
section with the label ".lvgl_heap".

Resolves issue: #66494.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-22 05:39:41 -04:00
Fabian Blatz
5a62c1137c modules: lvgl: Remove LVGL pointer kscan
Removes the wrapper code of the kscan based pointer input device. It was
implemented during the transitioning phase until all intree drivers were
converted to the input subsystem.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-21 11:54:11 -04:00
Maochen Wang
c116c9faf8 hostap: Add macro to wrap the interface monitoring code
Add macro to wrap the interface monitoring code and user can choose if
enable it.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
1726aa4345 hostap: fix wifi sta connection not triggerred issue
Use select_network instead of enable_network, then can trigger sta
connection mutiple times. Also update the configuration in
add_interface().

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
001ac3976a modules: hostap: fix hostap compile error and support enterprise
Fix compile error when enable enterprise security mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
762169034b net: wifi: split wifi interface into STA and uAP
Split wifi interface into station mode and soft-AP mode, as there may be
station and soft-AP two interfaces that work concurrently.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Yong Cong Sin
19e4cb8f89 libc: cleanup deprecated heap-related Kconfigs
The following heap-related Kconfigs shared by the picolibc &
minimal libc have been deprecated for more than 2 releases,
remove them and update the Kconfigs accordingly:

- `CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE`
- `CONFIG_MINIMAL_LIBC_REALLOCARRAY`

Cleanup the handling to support the deprecated malloc arena
size configuration values.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00