Using ms and converting to us is a bad idea as we still get ms
granualrity in us units. Use the proper API to get us granularity.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
When QSPI LPM is enabled, QSPI will already be uninitialized, and during
deinit if uninitialized is being called again then it leads to a hang as
it waits for mem busy check to pass which it won't.
Fix by checking if the device is initialized before calling
uninitialize.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Release the SPI during the deinit to put respective GPIOs in low-power
state or disconnected.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
By default QSPI is uninitialized after every transaction, so, deinit is
a no-op, but if QSPI_LOW_POWER is disabled, then we need to uninitialize
the QSPI in the deinit.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
These are applicable for Wi-Fi over QSPI (nRF7002DK) or Flash over QSPI
(nRF52/53 + nRF7002EK) and as most Wi-Fi samples run on 128MHz (for
performance), disable the anomalies for both.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Memory allocations in HAL are using data pool. These operations
are in control plane. Add APIs for allocation/free operations on
control pool.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Make the IOVDD settling delay configurable, instead of hardcoding a
delay that happens to work for the dev kits. For example, the nPM1300
load switches have a soft-start time of 1.8 ms.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The Zephyr base variable is not used below and also is deprecated and
not needed to be set.
Fixes#87950.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
In order to support higher frequencies than 8MHz, we need to implement
frequency switching while waking up the RPU, as it has to be done only
at 8MHz, once RPU is awake, we can switch back to the configured (DTS)
frequency.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This uses the network packet as is without the need for a copy all the
way till the packet is handed over to RPU.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
With introduction of OSAL wrapper for memory allocation, usage of
zephyr's native malloc calls need to be removed. When NRF70 driver
is not enabled, OSAL needs to be built explicitly.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Create dedicated memory pools for Wi-Fi management and
data operations (defaults: 20KB for management and 130KB for data).
Setting Data pool to 110KB for non-Nordic SOCs to resolve
RAM overflows seen in twister runs.
Remove the `HEAP_MEM_POOL_ADD_SIZE_NRF70` hint since we are
creating separate heaps for driver and not allocating from
system heap.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Move the cmake file of OSAL to it's own repo and build as a standalone
library, this is porting friendly.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
The nrf wifi drivers include code related to qspi/spi bus. This work
moves bus related files to a new nrf70 bus library which is now
independent of the core driver and facilitlates building applications
directly using the bus APIs, agnostic to enabling wifi configs.
Signed-off-by: Bansidhar P.M <bansidhar.mangalwedhekar@nordicsemi.no>
For the C sources the offloaded raw TX mode wasn't considered and else
case picks up system mode files causing build issues.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
The shim files should be part of the Zephyr module directory within
Zephyr, as they are coupled with the module implementation which os OS
agnostic.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>