We changed the return type of
sy1xx_mac_set_mac_addr, but forgot to change
the prorotype, but instead of fixing that we can
remove the prototype, as the function is only used
after it is been implemented.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
CRC16_CCITT and CRC16_ITU_T share the same polynomial and
differ only in input/output reflection.
So collapse them into a single fall-through case to avoid duplication.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Add missing k_spin_unlock() calls on error return paths in
gpio_altera_configure() and gpio_altera_pin_interrupt_configure().
Both functions returned -EINVAL in their default/else branches
while still holding the spinlock acquired earlier.
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
remove setting tx stats, that are already handled
by ethernet_send. It will already call
eth_stats_update_errors_tx on failiure
and on success via ethernet_update_tx_stats
it calls eth_stats_update_bytes_tx,
eth_stats_update_pkts_tx,
eth_stats_update_broadcast_tx and
eth_stats_update_multicast_tx.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
These drivers were used by Series 2 SoCs before they were migrated from
gecko_sdk to simplicity_sdk. Currently, Series 2 SoCs don't use them
anymore. In fact, their Kconfig dependencies don't even allow using them
for simplicity_sdk based SoCs.
Removing the leftovers simplifies the code and is a preparation for larger
changes in soc.c.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
`DEVICE_MMIO_ROM/RAM` must be the first field in a struct, but the
GPIO API uniquely requires `gpio_driver_config/data` to be first.
This commit extends the changes made in PR #108244 to
the renesas_rza2m GPIO driver by switching to the named MMIO variants.
This allows the MMIO data to be safely placed in subsequent
fields for both ROM and RAM initializations.
Signed-off-by: Akansh Sinha <akansh.sinha.dev@gmail.com>
Add a wait for the Transmission Complete (TC) flag at the start of
mcux_lpuart_configure(). This prevents reconfiguration while the
hardware is still shifting out the final byte on the TX line.
Without this wait, uart_configure() could interrupt an ongoing
transmission, causing the last byte to not be fully sent on the UART
bus. This behavior was observed on NXP LPUART and tracked in issue
#109807.
Fixes#109807
Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
Resolve ITCM overflow (2928 bytes) on mimxrt1060_evk by applying
function-level FILTER to relocate only hot-path functions instead
of entire files. This reduces ITCM usage from 100% to 70.09%
with no throughput regression.
Use FILTER for net stack, socket, SDIO, and zperf files
Keep kernel primitives as whole-file (inline dependencies)
Add zvfs, poll, condvar, timeout to relocation list
Restrict to CONFIG_SPEED_OPTIMIZATIONS only
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Start the Wi-Fi driver during initialization so coexistence is
enabled early. Without it the Wi-Fi pp task blocks at boot when BLE
is also used, hanging the device.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
When the A and B encoder pins connect to different GPIO ports, the
driver registered a single gpio_callback node on both ports' interrupt
lists. A sys_slist_t node can only belong to one list at a time;
inserting it into the second port silently unlinks it from the first,
so all interrupts from pin A are lost.
Fix this by replacing the single gpio_callback with two named fields,
gpio_cb_a and gpio_cb_b, each with its own independent slist node.
A dedicated ISR handler per field recovers the encoder device via
CONTAINER_OF with no extra RAM overhead per instance.
Signed-off-by: Eriks Zaharans <eriks.zaharans@marshall.com>
Assisted-by: Claude:claude-sonnet-4-6 Claude-Code
Related to commit 01b611100c. When not using
the fifo, the renesas_ra_sci peripheral will resend the last transmitted
character if you manually clear the TDRE bit in the SSR status register.
This makes 'SSR &=' dangerous to use in the case where the TDRE bit is set
in between reading the register and updating it. The hardware manual says
that writing a zero clears status bits and writing a one is ignored, so the
update isn't needed, only write 0 to the bits that need to be cleared. Only
the error status bits need to be manually cleared, the RDRF bit is cleared
automatically by hardware.
Signed-off-by: Aaron Brice <aaron@embeddedts.com>
The SPI SCK pin needs to be initialized to match the current SPI
transfer CPOL setting. The SPIM peripheral is enabled after CS is
toggled, thus all pins need to be configured to drive correct
initial state using gpio. Since the SCK pin is defined in pinctrl
rather than as a gpio pin, nrfy is used to get the pin number and
set the pin rather than gpio peripheral driver.
Without this addition, CPOL=1 may cause an incorrect clock to be
registered at the start of the transfer, shifting the data 1 bit.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
add a net_eth_carrier_set function, that
uses atomic_test_and_set_bit_to.
make net_eth_carrier_on and
net_eth_carrier_off inline and
based on net_eth_carrier_set.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add a system clock driver built on top of the NXP System Counter
(SYS_CTR) block, which provides a 56-bit free-running counter and two
compare frames capable of generating maskable interrupts.
The driver is a free-running counter paired with an absolute compare
register. Compare frame 0 is used for the system timer, leaving frame
1 available for other consumers. The instance is selected via the
zephyr,system-timer chosen property.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
dma_nxp_gdma_init() runs at PRE_KERNEL_1 and emitted an unconditional
LOG_INF on the init success path. Under the default deferred logging
mode that log captures a timestamp via the system clock, which on
RW612 is not initialized until PRE_KERNEL_2, hanging boot on frdm_rw612
(seen with the lvgl sample). ztest masks it by defaulting to minimal
logging, which takes no timestamp.
Other DMA drivers that log on init success run at POST_KERNEL, after
the clock is up; nxp_gdma is the only one doing so at PRE_KERNEL_1.
Remove the line to avoid the early-boot hang.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Add build-time validation of buffer constraints for the DWMAC driver.
This ensures that the configured buffer sizes and counts meet the
hardware requirements, preventing potential runtime issues due to
misconfiguration.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
The Alif clock control driver needs to be usable by MMU-enabled
Cortex-A32 based board variants, which require the register regions to
be mapped into the virtual address space at runtime. Use the DEVICE_MMIO
named-region helpers to map and access the clock register regions.
The m55hp_cfg region is optional (absent on Balletto family and E1C
series SoCs), and the DEVICE_MMIO_NAMED_* helpers cannot express an
optional region. Store its physical address from the DT (0 if absent)
and map it manually with device_map() only when present.
No functional change for the existing non-MMU (Cortex-M55) targets.
Signed-off-by: Silesh C V <silesh@alifsemi.com>
The Alif pinctrl driver needs to be usable by MMU-enabled Cortex-A32
based board variants (in addition to the Cortex-M55 based boards), which
require MMIO regions to be mapped into the virtual address space at
runtime. Map the pinctrl and lpgpio pinctrl regions using device_map()
during boot.
The driver does not use the device model, and the two regions are named
reg entries on a single pinctrl node. As the DEVICE_MMIO_TOPLEVEL_*
macros do not support named reg entries, device_map() is called directly
to map each region.
No behavioral change for the existing non-MMU (Cortex-M55) targets, as
device_map() collapses to a simple address assignment in them, now done
once at boot instead of compile time.
Signed-off-by: Silesh C V <silesh@alifsemi.com>
Factorize the macros and definitions of the I2C devices resources
between I2C STM32 non-RTIO and RTIO drivers that are the same
aside resource that can be conditioned to CONFIG_I2C_RTIO being enabled.
This change requires I2C API structure (renamed here i2c_stm32_driver_api)
and i2c_stm32_init() initialization function are no more locally defined.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add DMA support in the RTIO implementation of STM32 I2C v2 driver.
The implementation is based on the DMA support in the STM32 I2C v2 no-RTIO
driver (i2c_stm32_v2.c).
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add a return status to i2c_stm32_msg_start() that will be needed to
manage DMA, in case the DMA configuration fails.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Depending on the series, the JPEG HAL requires either MDMA or
DMA HAL and for some series DMA_EX HAL is required as well.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Copy beacon/probe data under vif_lock, then post the net_mgmt
event without holding the lock. Avoids stalling firmware RX when
the event queue backs up during raw scan floods.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
Clear scan_in_progress and notify the application when
nrf_wifi_disp_scan_res_get_zep() fails. Do not clear the flag
early on success; let the final result event own teardown.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
- Add pclk-hb-disable DTS property to control PCLK toggling
during horizontal blank periods. Different camera receivers may
have different requirement on this configuration.
- Reorder initialization sequence to apply format settings after
the common initialization table. Different format may apply differnt
configurations and overwrite the default configurations.
- Change the input XCLK frequency from 6MHz to 24MHz. According to
the data sheet and software application note, the camera sensor
requires the clock to be within the range of 10~48 MHz and the
typical value is 24 MHz. It can work with 6MHz XCLK but the
performance is not ideal. For example it glitches with VGA resolution.
- Fix resolution-specific register tables for QCIF, CIF, and VGA modes
with corrected timing and gamma settings for OV7670. When the OV7670
driver was originally enabled with the camera receiver smartdma, only
the QVGA resolution is tested, since smartdma can only support this
resolution, the others are not tested.
- Fix comment typo: case 352 is CIF, not QCIF
- Fix array size bug in QVGA format selection
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Default overrides in Kconfig can makeuse of configdefault instead of
config to preserve the dependency checks.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Make sure to have enough even packets for every ACL TX packets we want to
respond. Declare (BT_EVT_RX_COUNT) as (BT_ACL_TX_COUNT + 1).
Signed-off-by: Josuah Demangeon <me@josuah.net>
Add target (peripheral) mode to the Espressif SPI driver. The scattered
transfer buffers are coalesced into one FIFO transfer and the received
data is scattered back on completion. Socs with the integrated SPI-DMA
use DMA, as their CPU/FIFO slave path drops the final received byte.
Also fix the controller chip-select hold to track the remaining length
so trailing zero-length buffers no longer keep the line asserted.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
To avoid MXC_SPI_Shutdown having an invalid state (for DMA channels,
specifically), add a call to initialize the internal state of the SPI
driver before calling shutdown. This avoids a bug with DMA channels being
released that shouldn't be by shutdown.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Pull the code for checking if a given peripheral has DMA channels assigned
into a shared inline function.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
To avoid accidentally sending bogus data placed into the dummy buffer
during an RX, use dedicated two-byte buffers for TX/RX each.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Add support for target mode for the MAX32 SPI peripheral, including testing
support for the APARD32690 board.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Fixes for properly setting half duplex mode for the SPI peripheral, and
handle fifo/interrupts properly for that mode of operation.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Add a hwinfo backend that reports the reset cause on NXP MCUs that use
the MC_RGM (Reset Generation Module), such as the MCXE family, rather
than the Kinetis RCM/SIM blocks. The driver decodes the MC_RGM DES
(Destructive Event Status) and FES (Functional/External Reset Status)
registers into Zephyr RESET_* flags.
DES and FES status bits are write-1-to-clear, so
hwinfo_clear_reset_cause() writes back the latched bits it just read.
The backend binds to the existing "nxp,mc-rgm" compatible and reaches the
register block through the MC_RGM_Type CMSIS layout at the node's reg
address, so no fsl HAL component is required.
hwinfo_get_device_id is intentionally left as the weak -ENOSYS default:
the MCXE family exposes no per-die unique identifier (only SIUL2 MIDR
part identification), so reporting it as a device ID would be misleading.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
If possible, use 64 bit access instead of the default memcpy which
uses byte access. For example, on nrf54l15dk it reduces copying time
from 5 ms to 2 ms.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add handling of the optional property which indicates that VPR core
is indicating its readiness by setting a specific VPR event. Mailbox
is polling for readiness before sending the signal. Feature is
optional and used only for instances with nordic-vpr-ready-event
property.
Add optional setting of the event in VPR initialization.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Do not clean events during the initialization as there might be
some pending events that were set before the driver is initialized.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
CACHE_MANAGEMENT depends on DCACHE,
therfore we should also only select it, if it is
enabled and not just if the cache exists, as the
user could disable DCACHE and then there
would be a problem.
DCACHE btw depends on CPU_HAS_DCACHE
and is enabled by default.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Sustained CMUX and PPP data transfer can overrun the modem UART when
neither side can pause the other. Send AT+IFC=2,2 during init, enabling
RTS/CTS hardware flow control on the modem UART for boards that wire
those lines.
Signed-off-by: Paulo Santos <pauloxrms@gmail.com>
The EG25-G defined no set_baudrate script, so
CONFIG_MODEM_CELLULAR_NEW_BAUDRATE was ignored and the link stayed at
115200. Add the script (AT+IPR) behind the same mechanism the other
vendors use, compiled only when a non-default rate is configured, and
derive the AT+CMUX port-speed field from the configured rate so the
modem moves its multiplexer UART to match. Rates without a defined
port-speed code fail the build rather than silently mismatching.
Raise the baudrate-change delay default to the 1000 ms the EG25-G needs
to switch rate.
Signed-off-by: Paulo Santos <pauloxrms@gmail.com>
The iMX GPIO IMR and ISR registers are not reset by a warm reset.
If a pin had its interrupt enabled in a previous boot, it remains
active after reset. This causes a spurious ISR to fire the moment
irq_enable() is called during driver init, before any Zephyr driver
has called gpio_pin_interrupt_configure() for that pin.
Fix this by: (1) clearing IMR to 0 to disable all interrupt sources,
(2) writing 0xFFFFFFFF to ISR (write-1-to-clear) to flush
any pending interrupt flags — all before irq_enable().
Tested with tests/drivers/gpio/gpio_basic_api for
mimxrt1020_evk.
Fixes#108056
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
This reverts commit 8c2a903829.
Chunk transfers are now handled in spi_nrfx_spim_common.c to support
both DMM, RAM and EasyDMA limits for spim and spim_rtio drivers.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The nrfx_spim drivers need to handle transfers larger than the
internal buffers and DMA capabilities by splitting them into chunks.
Additionally, DMM and RAM buffers are mutually exclusive.
Update the common code to split the transfer internally, and update
the event callback to include the result of the transfer, since the
transfer can now fail. Update the spim and spim_rtio drivers to use
the new callback. Add new kconfig for DMM chunk size and update both
common code and kconfig to make it clear DMM and RAM buf are mutually
exclusive.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add build assert which validates that memory region has been defined
for SPIM instance if HAS_NORDIC_DMM is enabled.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>