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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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#79490Fixes#79470
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
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>
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>
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>
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>
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>
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>
flushregs alias is deprecated, so it was replaced by the command:
"maintenance flush register-cache"
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>