Commit graph

103851 commits

Author SHA1 Message Date
Chaitanya Tata
5c8f1807c1 drivers: wifi: Fix RPU recovery disabled build failures
Fix RPU recovery protection to solve build failures when RPU recovery is
disabled.

As recovery is primarily based on power-management, add a Kconfig
dependency to enforce, this simplies the macros to protect the code.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
9b105698ed drivers: wifi: Add RPU recovery retry mechanism
In case RPU is stuck in consecutive recovery over a time period then
that means it's not recoverable through RPU recovery, only thing left to
do is to trigger a system reboot. This feature is disabled by default,
so, either application can do their own implementatio or enable this
feature in the driver along with configurable retries and window period.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
6f7fbf8451 drivers: wifi: Fix the NULL check
Check for RPU context as well.

To fix this properly we need more fixes to be backported, but this
should suffice for now.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
ed7c10ead3 drivers: wifi: Add quiet period for RPU recovery
This is to avoid successive recoveries in case we get successive
watchdog interrupts from the RPU.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
ce521b89ee drivers: wifi: Ignore parallel recovery requests
During recovery we might get further watchdog interrupts causing
multiple recovery requests, ignore them if a recovery is already in
progress.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
c1afe97e94 drivers: wifi: Increase the propogation delay
In order for the interface down to propagate and cleanup it needs more
time, using Shell 10ms was working due to human delay, but
programatically this needs higher delay.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
1e5db78afc drivers: wifi: Add support for separate debugs for RPU recovery
These are helpful for debugging RPU recovery only.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
a23184c473 drivers: wifi: Add a sanity check for RPU comms
Before proceeding with RPU bringup, do a sanity check by reading a known
signature to make sure the Host-RPU comms are operational.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
04ddd6d2b0 drivers: wifi: nrf700x: Ignore all failures in iface down
In case RPU is stuck and need a recovery, the failures in interface down
should be ignored as they are expected and we should proceed with device
removal that in turn removes power to the RPU.

TODO: This works for single VIF, but needs more thought for multi-VIF.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
5ad7339311 drivers: wifi: Fix RPU recovery not being triggered
During watchdog (or any) interrupt processing, RPU accesses are being
made and they assert the wakeup_now flag this causes RPU recovery to not
trigger.

New false or true recovery detection algo:

 Check the time difference b/w last de-assert and assert, and if it
 exceeds minimum time needed for RPU to enter sleep, then not the
 timestamp. This timestamp will be used to compare when a watchdog
 interrupt is received and see if during the last window if host has
 given a chance for RPU to attempt sleep, if yes, then attempt recovery
 else ignore watchdog.

Also, add a Kconfig for the 10s active time that triggers recovery, this
needs to be passed to the FW (once we have enough patch memory).

Also, add a Kconfig for the minimum time needed for RPU to attempt sleep
in positive case.

Also, add a new _ms API for time stamp fetch, this is to avoid
precision loss when converting to and from ms to us and also makes code
readable by avoiding *1000 and /1000.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Andrej Butok
e53eec0851 yaml: use EXTRA_CONF_FILE in .yaml files
Use EXTRA_CONF_FILE in sample yaml files,
that replaced deprecated OVERLAY_CONFIG
since the Zephyr v3.4 release.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-17 09:45:25 +02:00
Sylvio Alves
59f0418d2e soc: esp32: unify runtime heap usage
This commit applies several changes in the way "heap_runtime"
feature is used. It can't be split due to bisectability issues.

Whenever the feature is enabled, a new heap is created and
custom malloc/calloc/free functions are added into the build
system. Those functions are currently used for internal Wi-Fi and BLE
drivers only.

Such changes are described below:

1) Rename heap.c to esp_heap_runtime.c for better readability.
2) Rename RUNTIME_HEAP to HEAP_RUNTIME to make it similar to what is
available in Zephyr.
3) Add runtime heap to BT as such as Wi-Fi.

Fixes #79490
Fixes #79470

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-17 09:45:02 +02:00
Sylvio Alves
882ac1d088 drivers: esp32: wifi/bt: modify init call return error
Update both Wi-FI and BLE init codes to return proper
error code and logging when it is missing heap.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-17 09:45:02 +02:00
Valerio Setti
5e225e0c8b tinycrypt: deprecate the library
Since we now have PSA Crypto APIs/Mbed TLS alternatives for crypto
operations in all Zephyr's codebase we can start the deprecation
of the TinyCrypt libary (as planned from #43712).
This commit is only the inital step: updates documentation and
add the DEPRECATED Kconfig option to the TINYCRYPT one.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-10-17 09:44:53 +02:00
Tom Chang
cbb322937f drivers: espi: npcx: support espi taf rpmc request
This commit adds support for handling espi taf rpmc requests.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-10-17 09:44:39 +02:00
Ibe Van de Veire
e6dd4cda89 test: net: igmp: Add extra IGMPv3 testcase
Added extra testcases for the IGMPv3 protocol. The IGMP driver is
supposed to send an IGMPv3 report when joining a group.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Ibe Van de Veire
ba9eca3181 net: ip: igmp: Add igmp.h for definitions
Add igmp.h file to declare definitions for IGMP that are not meant te be
included by the application but can be used in e.g. tests.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Ibe Van de Veire
c646dd37e5 net: ip: igmp: Remove too strict length check
According to RFC2236 section 2.5, the IGMP message may be longer then 8
bytes. The rest of the bytes should be ignored.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Ibe Van de Veire
f852c12360 net: ip: igmp: Fix wrong header length
The header length of the net ip packet was calculated using only the
net_pkt_ip_hdr_len function. The correct header length should be
calculated by adding net_pkt_ip_hdr_len and net_pkt_ipv4_opts_len. This
resulted in an incorrect IGMP version type in case of IGMPv2 message
(when IGMPv3 was enabled). The IGMP message was not parsed correctly and
therefore dropped.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Marcio Ribeiro
3c82cd6585 openocd: esp32: gdb init command update
flushregs alias is deprecated, so it was replaced by the command:
"maintenance flush register-cache"

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-17 09:44:26 +02:00
Dominik Ermel
3e8ea52e21 tests/flash/common: Increase ztest stack size
The commit sets CONFIG_ZTEST_STACK_SIZE to 4096.

Fixes #79801

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-17 09:43:40 +02:00
Jukka Rissanen
8134673309 tracing: segger-sysview: Fix compilation issues with networking
The networking tracing function definitions were missing for sysview.

Fixes #79805

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-17 09:43:33 +02:00
Fabio Baltieri
b23fea114d input: gpio_keys: add a no-disconnect property
Add a no-disconnect property that skips the call to disconnect the pin
during suspend, this is useful as not all gpio controllers supports pin
disconnection, and right now using the gpio-keys driver on one of those
results in a failed initialization if PM runtime is enabled.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-17 09:43:25 +02:00
Pieter De Gendt
ca3dc019b7 scripts: Read yaml files using utf-8 encoding
By default Windows does not use utf-8 encoding for reading files,
set is explicitly.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-17 09:43:16 +02:00
Fengming Ye
9e8b7bd3ad modules: hostap: fix DPP build error
Fix DPP build error when HOSTAPD enabled and DPP disabled.
Guard hapd_dpp_dispatch in both CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
and CONFIG_WIFI_NM_HOSTAPD_AP.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-10-17 09:43:08 +02:00
Maochen Wang
4af697ad6b net: l2: wifi: fix AP sets band failed with channel 0
Should support setting band for both STA and SAP mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-17 09:42:59 +02:00
Phi Bang Nguyen
829c03bcdc runners: jlink: Fix NoneType object error
The commit 221199e15b presents a bug that
makes west flash failed with error.

AttributeError: 'NoneType' object has no attribute 'startswith'

In function is_tunnel(), tunnel may contain None and has no attribute
"startswith". Fix it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-16 20:53:31 +01:00
Aleksander Strzebonski
18fb3f9a32 usb: dwc2: Allow for enabling USB if the cable is disconnected
Adds CONFIG_UDC_DWC2_USBHS_VBUS_READY_TIMEOUT_MS that allows
for waiting for a USBHS VBUS ready event for a specified
amount of time. Earlier it waited forever and because of that,
the udc_enable() was blocked forever if the USB cable was
disconnected. Now the function returns error on timeout.

Signed-off-by: Aleksander Strzebonski <aleksander.strzebonski@nordicsemi.no>
2024-10-16 16:37:31 +01:00
Jamie McCrae
ef45434690 boards: nxp: imx8mp_evk: doc: Remove stray PINCTRL reference
Removes a reference to PINCTRL in a defconfig file, which has
been removed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
b5b335ef6e tests: drivers: build_all: eeprom: Add nrf9131ek Kconfig fragment
Adds a Kconfig fragment which changes the MFD init priority

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
3e8b769577 boards: ruuvi: ruuvitag: Remove setting PINCTRL
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
fb62ac0220 boards: vcc-gnd: yd_stm32h750vb: Remove PINCTRL
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
6ec63d4424 boards: ezurio: rm1xx_dvk: Remove setting PINCTRL
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
84976a2ce7 boards: nordic: Remove setting PINCTRL in defconfig files
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Andrzej Głąbek
edc4f75b61 soc: nordic: Fix the way of enabling clock control for nRF54H Series
This is a follow-up to commit 7a2ce2882a.

Do not enable clock control by default on nRF54H Series SoCs when
the system timer is present, because clock control is not needed
for this purpose there.

Add missing `default y` in the CLOCK_CONTROL_NRF2 Kconfig option that
enables compilation of clock control drivers for nRF54H Series.
This way modules that actually require clock control (like drivers
that use radio) will be able to enable it using the generic option
(CLOCK_CONTROL), not the above one that is specific for nRF54H.

Update accordingly applications that referenced the CLOCK_CONTROL_NRF2
option.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-10-16 16:36:51 +01:00
Ayush Singh
3f0476d773 boards: beagle: beagleplay_cc1352p7: Fix twister
- Add UART console config.
- Fixes tests/subsys/llext/simple/llext.simple.readonly_mpu

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-16 16:36:34 +01:00
Ayush Singh
e596143dc7 boards: beagle: beagleplay_cc1352p7: Disable 2.4g ieee802154
- A lot of zephyr networking samples (zperf, http_server, etc) will
  complain if both 2.4g and subg ieee802154 are enabled simultaneously.
- This leads to a lot of new people getting confused with the network code
  not working without any clear errors.
- As we already set the alias `zephyr,ieee802154 = &ieee802154g`, I think
  it would be best to enable only subg by default.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-16 16:36:34 +01:00
Bruce Rosier
24414e3c39 subsystem: tracing: test: fix k_pipe_put_* functions
k_pipe_put_* functions should take const void* data
    instead of void* data. This can lead to warnings at the
    the -Werror=discarded-qualifiers compiler flag, because the
    the input will be const void* and the parameter will be void*.
    Fix it by replacing void* data with “const void* data”.

Signed-off-by: Bruce Rosier <brucerosier9@gmail.com>
2024-10-16 16:36:11 +01:00
Szymon Janc
5b232bf1d7 Bluetooth: GATT: Allow to tune writable device appearance permissions
This allows to select if device appearance requires encryption or
authentication or none. This makes it similar to what is implemented
for device name characteristic.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-10-16 16:35:56 +01:00
Szymon Janc
398487f841 Bluetooth: GATT: Convert writable device name to KConfig choice
This makes it clear on how security requirements are set and avoid
confusion on how encryption and authentication are handled.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-10-16 16:35:56 +01:00
alperen sener
a5010504bc tests: bluetooth: tester: Add nrf54l15dk and remove nrf54l15pdk
Rename the config files according to nrf54l15dk.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-10-16 16:35:32 +01:00
Bjarki Arge Andreasen
0f6a35c363 manifest: hal_nordic: include lpcomp-int-dis-on-stop patch
Update hal_nordic manifest to include lpcomp-int-dis-on-stop patch

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-16 16:35:10 +01:00
Benjamin Cabé
9beb82f971 doc: vulnerabilities: use :cve: role to link to CVEs
This is a new role available in Sphinx 8.1 and it very useful to avoid
typos and to provide a consistent way to link to CVEs.
This commit actually fixes some such typos :)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:34:46 +01:00
Benjamin Cabé
e0ee9f1ac6 doc: vulnerabilities: fix typo in JIRA urls
Some JIRA urls had a triple s in "...atlassian..."

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:34:46 +01:00
Krzysztof Chruściński
7b3acdb5c0 dts: common: nordic: nrf54l20: Adjust RAM size to 511k
Last 1k is used for saving VPR context and shall not be exposed.
Limiting RAM to 511k.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-16 16:33:48 +01:00
Benjamin Cabé
dd1f51148b doc: enable three-way dark-mode switch
dark-mode-toggle now allows to also set current mode to "system", which
allows people to use the system-wide dark mode setting rather than
having to definitively choose between light and dark mode once they've
used the button once.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:33:24 +01:00
Benjamin Cabé
dbf3c8f5cd doc: fix dark mode "flashing" on page load
This hooks up the dark-mode-toggle-stylesheets-loader so that the dark
mode styles are loaded immediately, rather than waiting for the page to
load and then switching to dark mode. This prevents the "flashing" of
light mode styles on page load.

Fixes #79791

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:33:24 +01:00
Benjamin Cabé
7aa6222835 doc: update dark-mode-toggle to 0.16.1
Updates the minified JS resources corresponding to latest
dark-mode-toggle (0.16.1) release.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:33:24 +01:00
Chris Friedt
a6a6cc6a63 modules: thrift: use app and library private include paths
Do not export Thrift header paths to the global build.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-16 16:33:05 +01:00
Chris Friedt
45b3010d74 tests: posix: net: fix missing clock_t and clockid_t with newlib
Fix errors found in CI for missing clock_t and clockid_t types
when building the tests/posix/net testsuite.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-16 16:32:51 +01:00