Set pmf_cfg.capable for WPA2-PSK so the station advertises PMF
capability, which transition-mode APs require to associate.
Add WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL handling. STA path uses
WPA2-PSK threshold with PMF capable so it can still associate to
WPA2-only and transition APs. AP path advertises WPA2/WPA3 mixed
mode, guarded by CONFIG_ESP32_WIFI_SOFTAP_SAE_SUPPORT.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Lift the unsol_matches table out of modem_cellular.c.
Each driver now declares its own match table via the new
MODEM_CELLULAR_UNSOL_DEFINE() helper, which generates the matches array
and a small modem_cellular_config_unsol descriptor in one go. Drivers
point at it through the new `unsol` field on modem_cellular_config.
Signed-off-by: Paulo Santos <paulo.santos-ext@hexagon.com>
Fixing a startup issue where the device would get into a bad state and
not respond to reads.
Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
move qemu network interface selection, because it fits better in
cmake/emu/qemu.cmake than in cmake/modules/kernel.cmake.
It is also put at the end because for usb network cards, the usb bus
must be created before the network interface can be added. Also true
for other network cards on buses. Currently we don't have usb network
cards in zephyr, but it is better to be prepared for that.
Also use the separate netdev and device option.
The combined command line option didn't work for "usb-net" for example.
For the riscv qemu the -nic option is broken acording to the qemu issue
(https://gitlab.com/qemu-project/qemu/-/work_items/691), so we need to
use the -netdev and -device options.
Because of the change to -netdev and -device options, we need a new
Kconfig option to specify the extra arguments for the network device,
so we add NET_QEMU_DEVICE_EXTRA_ARGS option.
this can be used to customise the network device, like the mac address,
or more device specific options like setting f.e. the addresss/slot of
a pci card.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Update the gnttab_[get|put]_pages and gnttab_[map|unmap]_refs functions
to add support for memory allocation and mapping using extended regions
if CONFIG_XEN_REGIONS is enabled. When the config is not set, the
original behavior is preserved.
To safely map extended memory areas it is required to do that after
stage 2 mapping, i.e., handled by the hypervisor, as accesses to memory
earlier will cause MMU translation errors.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
Introduce a driver for the extended regions provided by Xen to Zephyr,
running as Xen Domain-0. Extended regions are the unmapped spaces in
Stage 2 address space, and can be used by Zephyr for foreign mapping,
i.e. mapping pages managed by Xen or belonging to other domains. The
regions are configured via the regs property in the hypervisor node,
compatible with xen,xen.
For example, the following device-tree overlay:
&hypervisor {
reg = < 0x0 0x40200000 0x0 0x1000000
0x0 0x40400000 0x0 0x1FC00000
0x0 0x80000000 0x1 0x40000000>;
};
will allocate two extended regions:
- 0x40400000 with size 0x1fc00000
- 0x80000000 with size 0x140000000
The first region, 0x40200000 (size 0x1000000), is used for grant_tables
and will be ignored.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
- Fixes hwinfo_get_reset_cause() for mimxrt118x.
- On RT118x, SRSR register reads always as zero at application startup,
so use backup SRSR_BBSM register.
- Tested on frdm_mimxrt1186.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
This commit fixes#108916
It wraps assert variables in CONFIG_ASSERT to avoid
unused variable warnings when assertions are disabled.
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Implements the counter_api reset callback for the NXP GPT
driver to reset the counter to the initial value.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Adds a color_palette member to the display capabilities struct,
to enable indexed color format displays to expose their color
selection.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Mask the per-endpoint done interrupt while a bulk OUT is left NAKed
(NAKed OUT tokens otherwise storm the ISR), bound the exrs/RDY busy-wait
(RM 18.3.4) so a stuck status bit can't hang the ISR, re-arm rather than
truncate a multi-packet OUT on a zero-count done, and skip the thread hop.
Signed-off-by: William Markezana <william.markezana@gmail.com>
sys_clock_set_timeout() computed the compare value as
cyc = ticks * CYC_PER_TICK + unannounced;
cyc = DIV_ROUND_UP(cyc, CYC_PER_TICK) * CYC_PER_TICK;
target = last_count + cyc;
The DIV_ROUND_UP forces the fire onto the next tick boundary *after*
the requested point, but the driver never subtracts the unannounced
sub-tick offset back out. When the caller arms partway through a tick
(the common case), the timer therefore fires one tick later than the
kernel asked for -- k_timer_start(K_TICKS(N), ...) ends up firing at
roughly N+2 ticks instead of N+1. This is what GoranWall observed on
nrf52840dk: the new tests/kernel/timer/timer_behavior ramp test fails
on specific delay values.
Compute the target directly as
target = last_count + (last_elapsed + ticks) * CYC_PER_TICK
where last_elapsed is the tick count the kernel last observed via
sys_clock_elapsed(), and last_count is tick-aligned by construction.
The fire lands at exactly (last_elapsed + ticks) ticks past the last
announce, regardless of when within a tick the caller armed.
Track last_elapsed in sys_clock_elapsed() and reset it in
sys_clock_timeout_handler() at announce. The COUNTER_HALF_SPAN
wrap-protection check is preserved. Clamp on ticks alone since the
24-bit compare register limit is relative to the current counter,
and target - now = ticks * CYC_PER_TICK - sub_tick.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Support setting desiered SPI communication frequency via configuring
the SCLK_DIV divisior in IFTIM register.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Replace per-instance switch/case in _on()/_off()/_get_rate() with two
static lookup tables built via LISTIFY over FSL_FEATURE_SOC_<IP>_COUNT.
_on() and _off() share the gate map through a common lookup helper.
FLEXIO, TEMPSENSE and SIRC remain as a switch fallback since they have
no indexed SDK enum. Driver shrinks from 499 to 363 lines.
Behavior changes:
* _off() now calls CLOCK_DisableClock() (was a no-op returning 0).
* PIT _on()/_off() use kCLOCK_Pit<i> instead of kCLOCK_Pit<i>Clk,
fixing a latent mismatch with the SDK's clock-gate API.
* LPCMP and FLEXIO no longer return -ENOTSUP on get_rate().
Verified on FRDM-MCXE31B (linkserver):
- samples/hello_world boots, prints over LPUART0.
- tests/drivers/counter/counter_basic_api: 9 PASS, 2 SKIP, 0 FAIL.
- tests/kernel/timer/timer_api: 15/15 PASS.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add realtek ameba dma driver.
Signed-off-by: minyuan xue <minyuan_xue@realsil.com.cn>
drivers: dma: ameba: use IF_ENABLED instead of COND_CODE_1 with empty else
Replace COND_CODE_1(CONFIG_DMA_AMEBA_LLI, (...), ()) with the cleaner
IF_ENABLED(CONFIG_DMA_AMEBA_LLI, (...)) idiom in the DMA_AMEBA_INIT
macro. The two forms are semantically identical; IF_ENABLED avoids the
superfluous empty else argument.
Signed-off-by: minyuan xue <minyuan_xue@realsil.com.cn>
- Enables input buffer via Software Input On (SION)
to get correct pin value in PDIR for both input/output pins
for IMXRT118X.
- Issue has been discovered during Safety DIO self-tests.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
When parts of code are running from EXTXIP and at the same
time QSPI external flash writes/erases are happenning there
is a high risk of a race condition where a thread running
EXTXIP code starts executing while an external flash operation
is in progress; This can lead to execution stalling or
bus faults/usage faults.
The issue was observed when parts of MCUMGR were relocated to
EXTXIP and DFU was performed.
To fix the issue added the CONFIG_NORDIC_QSPI_NOR_XIP_FLASH_SCHED_LOCK
option which should be used when executing parts of code from EXTXIP.
It ensures the blocking variant of nrfx_qspi_ is used and that
no preemption happens while an external flash write is in progress
(by making qspi_wait_while_writing blocking)
Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Optimize logging processing by:
- Explicitly controlling device PM for UART
- Optimizing copying from fast to slow RAM by using double word
access.
Optimizations reduced CPU load in the coresight_stm sample from
8.5% to 5.8%.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Support for common protocol commands has been present in the Zephyr tree
since commit d0e9d950fb ("drivers: firmware: scmi: add common protocol
interface functions") so there's no need for each protocol to define these
commands.
Replace all occurrences of scmi_clock_protocol_attributes() with
scmi_protocol_attributes_get() since the former will be soon removed.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
SCMI stack users don't need access to the SCMI command IDs. Thus, they
can be made private to the protocol module making use of them.
Since the command IDs are private now, their corresponding macro names can
be aligned with those found in the SCMI spec.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Coming with nrfx 4.3, NRF_GPIO_HAS_DETECTMODE is now
defned only when it is actually accessible.
Removed the hidden Kconfig option and used
nrfx symbol only.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
the boot banner is printed at the end of
the init process with
``SYS_INIT(boot_banner, APPLICATION, 0);``
we don't need the early console for it.
When CONFIG_EARLY_CONSOLE is enabled,
the console will init with PRE_KERNEL_1, otherwise
with POST_KERNEL. Both are before APPLICATION.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The original net.c in hal_nxp contains Zephyr-specific code, which
violates the rule that HAL 'Zephyr modules should not contain code that
is written exclusively for Zephyr'.
Move the network porting layer and Zephyr relocation related CMakelist
change into drivers/wifi/nxp to align with Zephyr architecture.
Also fix build issues and switch to Zephyr-defined configurations.
Add nxp_net_if_get_device() wrapper API.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
DMA_XILINX_AXI_DMA_DISABLE_CACHE_WHEN_ACCESSING_SG_DESCRIPTORS describes
a specific implementation strategy rather than the underlying intent:
manage cache coherency manually because the platform doesn't provide
hardware coherency for DMA accesses. Tying the symbol name to the
mechanism makes it harder to evolve the driver to a different coherency
strategy without breaking existing user configurations.
Introduce DMA_XILINX_AXI_DMA_MANUAL_CACHE_COHERENCY with the same
semantics and update the driver's #ifdef sites to use it. Keep the
original symbol around as an invisible alias that selects DEPRECATED
and the new symbol so existing out-of-tree configs continue to work
and produce a deprecation warning at build time instead of silently
losing the behaviour.
Signed-off-by: Abin Joseph <abin.joseph@amd.com>
The Xilinx PG021 spec requires the DMA to clear DMACR.RESET before any
further DMACR writes are honored. Use Zephyr's WAIT_FOR() helper from
<zephyr/sys/util.h> to spin on DMACR.RESET clearing after the soft-reset
write, with an XILINX_AXI_DMA_RESET_TIMEOUT_MS ceiling. On timeout, log
an error and return -EIO so the failure surfaces immediately instead of
being absorbed by silently dropped subsequent register writes.
Signed-off-by: Abin Joseph <abin.joseph@amd.com>
The IRQ lock/unlock helpers used bare 0x1 / 0x2 bit literals in the lock
key returned to the caller, and indexed the per-channel array with bare
0 and 1. Both required a "TX is 0, RX is 1" comment to read.
Replace the bit literals with named constants
XILINX_AXI_DMA_LOCK_KEY_TX_ENABLED / _RX_ENABLED, derived from the
existing channel index defines via BIT(), and replace the bare channel
indices with XILINX_AXI_DMA_TX_CHANNEL_NUM / _RX_CHANNEL_NUM. The
"TX/RX is N" / "TX/RX was enabled" comments become redundant and are
removed.
Signed-off-by: Abin Joseph <abin.joseph@amd.com>
Add the SYS_CTR clock IDs to the CCM rev2 dt-bindings header and handle
both the SYS_CTR base and slow clocks in the rate query callback so the
counter driver can retrieve its operating frequency at init time.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add a Zephyr counter driver for the NXP MCUXpresso System Counter
(SYS_CTR). The driver supports:
- 56-bit free-running up-counter
- Selectable clock source: 24 MHz base clock or 32 kHz slow clock
- Two compare frames (alarm channels) with a shared interrupt
- Standard Zephyr counter alarm API
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add DMA driver support for Realtek Bee series SoCs,
including RTL87x2G and RTL8752H.
This driver supports:
- Memory to Memory transfer
- Peripheral to Memory transfer
- Memory to Peripheral transfer
Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
Some MCUX LPTMR instances expose counters narrower than 32 bits.
Raw uint32_t subtraction in tickless mode can treat a 16-bit
hardware wrap as a 32-bit wrap.
Compute elapsed time and compare distances in the hardware counter
domain with COUNTER_MAX.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Implement AUPLL management in the BL61x clock control driver,
following the same pattern as the existing WIFIPLL implementation.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Add support for issuing a software reset sequence (RSTEN 0x66 followed
by RST 0x99) to the flash device during initialization, before reading
SFDP parameters.
The feature is controlled by a new devicetree property
'initial-soft-reset'. When enabled, the driver sends the reset
sequence using temporary LUT entries to avoid flash data
access during XIP critical sections.
An optional 't-reset-recovery' property specifies the minimum time in
nanoseconds the flash needs after reset before accepting new commands.
If provided, the driver will busy-wait(self defined) for the
specified duration.
Suggested-by: Sanjay Varghese <Varghesemela@gmail.com>
Link: https://github.com/zephyrproject-rtos/zephyr/pull/105891
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Fix by demoting BIT(6) to a fallback, checked only when no active
entry method bit (BIT(0), BIT(1), BIT(4)) is also set. This aligns
with the approach in Zephyr's generic spi_nor driver and the Linux
kernel spi-nor subsystem, both of which prefer active entry commands
when available and treat the "always 4-byte" indication as a last
resort. Sending 0xB7 to a device that is already in 4-byte mode is
idempotent and harmless.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
the litex ethernet driver uses NET_IF_DT_INST_GET,
therefore we need to depend on NET_L2_ETHERNET, so
it can't be used with ETH_DRIVER_RAW_MODE.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The UART driver's ISR could read the TC interrupt flag multiple times,
but doing so is unsafe as the interrupt flag could be clear during the
first read but set during the second, whereas the ISR expects the same
value all along.
Read the flag's status exactly once at the start of the ISR and use the
cached value in all checks instead of reading the hardware register.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Reset the I2S RX FIFO when restarting the DMA channel between
descriptors. Without this, residual samples held in the FIFO at the
channel boundary are read first after the GDMA reload and cause a
drift in the captured stream.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
this commit replaces SDMMC_FIFO_SIZE usages related to
RXFIFOHF/TXFIFOHE handling with SDMMC_HALFFIFOBYTES.
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
This commit fixes#108757.
It adds NULL pointer checks in FIFO read/write functions to avoid crashes
and fixes buffer offset handling in the switch speed path.
Signed-off-by: Sara Touqan <zephyr@exalt.ps>