Replace SOC_FAMILY_TI_MSPM0 with HAS_MSPM0_SDK in the depends on
clauses for the clock_control and hwinfo MSPM0 drivers.
HAS_MSPM0_SDK is selected by all MSPM0 SoC series and is the correct
guard for SDK-dependent drivers. This avoids enumerating individual
SoC series and is consistent with how other SDK-gated code is guarded.
Drop the SOC_FAMILY_TI_MSPM0 dependency from the entropy driver
entirely as it is already guarded by DT_HAS_TI_MSPM0_TRNG_ENABLED.
Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
ifx_cat1_uart_irq_is_pending() read the latched interrupt-cause
register, but the ISR clears RX_NOT_EMPTY and TX_EMPTY before
invoking the callback. The cause register could then read
not-pending while bytes remained in the RX FIFO. Callers gating on
uart_irq_is_pending() then stopped servicing the FIFO and dropped
received data.
Report the pending state by reusing irq_rx_ready() and
irq_tx_ready(), gated by the interrupt enable mask.
Assisted-by: Copilot:claude-opus-4.8
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
Add an in-process virtual Wi-Fi simulator (wifi_hwsim) for testing the
Zephyr Wi-Fi stack (wpa_supplicant / hostapd -> driver) without
physical hardware, modeled after Linux's mac80211_hwsim.
The driver instantiates N virtual radios from devicetree, each backed
by a net_if with Ethernet L2 and Wi-Fi offload. An in-process
frame-relay "medium" connects radios tuned to the same frequency.
Management frames (802.11) are handed to wpa_supplicant; data frames
(802.3) are delivered by L2 destination MAC, so a unicast frame reaches
only the matching radio while broadcast/multicast frames reach all
peers on the channel.
Because all radios share a single IP stack, a peer's source address is
also a local address. Injected data frames are flagged as loopback so
they are not dropped by the IP input anti-spoof check; deployments must
also disable the "destination is my own address" short-circuit
(CONFIG_NET_IP_ADDR_CHECK) so inter-radio data frames traverse the
medium.
Open, WPA2-PSK and WPA3-SAE associations work end to end. Since both
radios live in one process, the driver relays the association between
the STA and AP contexts as an EVENT_ASSOC carrying the STA's RSN IE (the
way a FullMAC firmware reports it) rather than serializing
(Re)Association frames. For a secured network the STA port is left
unauthorized so wpa_supplicant runs the real 4-way handshake, whose
EAPOL frames cross the medium as ordinary data frames. The AP's beacon
IEs (including the RSN element) are surfaced in scan results so a STA
can match a secured network, and the AP-side station ops are accepted
so the authenticator can authorize the station.
For WPA3-SAE the driver advertises WPA_DRIVER_FLAGS_SAE and relays the
SAE Authentication commit/confirm frames over the medium (built from the
SME auth_data on the STA, parsed back into EVENT_AUTH), so the real SAE
exchange runs before the 4-way handshake.
MAC addresses follow the standard Ethernet MAC config mechanism
(local-mac-address / zephyr,random-mac-address / NVMEM via
net_eth_mac_load()), falling back to a random locally-administered
address.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
Add a bus emulator for the BMP581 so the driver can be exercised on
native_sim without hardware. It models the register file, the soft-reset
power-on-complete handshake, the chip-id and NVM-ready status, and the
temperature/pressure data registers, and implements the emul_sensor
backend (set_channel / get_sample_range) for the pressure and ambient
temperature channels.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
On the RP2040, interrupt 15 is used for the RX FIFO on core 0, and
interrupt 16 is used for the RX FIFO on core 1. By splitting the mailbox
node into separate ones for each core, the correct interrupt for each core
can be selectively enabled in an overlay.
This benefits AMP use cases with the RP2040 where each core runs its own
distinct application. Without this, only the interrupt for core 0 would be
enabled.
Signed-off-by: Eric Hay <erichay@live.ca>
Add device power management to the DesignWare I2C driver so instances
under a switchable power domain can be used safely with runtime PM.
Hardware bring-up is moved from initialize() to PM_DEVICE_ACTION_TURN_ON
via i2c_dw_turn_on(), which reuses the helpers introduced in the
previous commit (prepare, probe_hw, init_config). initialize() now
only performs one-time CPU-side setup: MMIO/PCIe mapping, semaphores,
IRQ connect, and default app_config, then calls pm_device_driver_init().
It also add pm_device_runtime_get()/put() when needed to prevent the CPU
from sleeping while the device is in use.
When CONFIG_PM_DEVICE or runtime PM is not enabled for an instance,
existing behavior is preserved: runtime get/put are no-ops, and
pm_device_driver_init() still invokes TURN_ON at the end of init when
the device is powered.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
In i2c_dw_initialize(), move the i2c_dw_prepare() call to after
MMIO/PCIe mapping instead of before it.
MMIO mapping and PCIe BAR setup are CPU-side bus operations and do not
require the peripheral clock, reset, or pinctrl to be enabled first.
Clock, reset, and pin configuration are still applied before any
controller register access (probe and init_config).
No change to the helpers themselves or to the overall initialization
sequence beyond this ordering fix.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Refactor i2c_dw_initialize() by extracting the hardware setup into
focused helpers without changing runtime behavior:
- i2c_dw_prepare(): enable clock, optional reset, and pinctrl
- i2c_dw_probe_hw(): COMP_TYPE check and high-speed mode detection
- i2c_dw_init_config(): controller register programming (SDA hold,
block mode, spike length, bitrate configuration, extended timeouts)
i2c_dw_initialize() still follows the same call order as before except
for :
- we are now doing the COMPT_TYPE + high-speed mode detection before
setting up the SDAHOLD timing register (register programming)
- we are now doing the controller register programming before the IRQ
registration (that was done in the middle of it before )
Register programming has been assembled into a single helper function to
make it easier to understand and maintain hence the diff in call order.
This is a preparatory step for introducing runtime power management for
the I2C driver.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Store pointer to original target config instead of copying it.
The Zephyr I2C target API expects callbacks to receive the original
config pointer for CONTAINER_OF usage. Also fix ISR handling order
and remove unnecessary ACK commands handled by smart mode.
Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
In ramcode_flash_cmd_read_status, the status polling loop continuously
reads SMFI_ECINDDR in RAM without any delay cycles. During flash erase
operations, tight polling can cause bus contention or premature register
evaluation on fast silicon and at higher compiler optimization levels,
resulting in intermittent erase failures (rc=-2).
Add a small delay loop inside the status polling loop to throttle
register reads.
Tested on board with it8xxx2 EC.
Signed-off-by: Keith Short <keithshort@google.com>
Fix few:
wuc_nxp_wuu.c:231:14: warning: duplicate 'const' declaration specifier
[-Wduplicate-decl-specifier]
warnings, DEVICE_API already includes the const qualifier. Only exposed
when compiling with COMPILER_SAVE_TEMPS=y for some reason.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add short delay after enabling the hardware flow control.
This setting is stored in the flash, but first time it is enabled
might cause next AT command to fail.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The TX_FULL flag requires a short hardware response time to update.
Add a 10us busy wait to ensure the flag is stable before reading it.
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
For non-control out endpoints, do not submit the out event to upper
stack until the transfer buffer is completely filled.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Re-initializing the suspend work when it's busy may cause kernel
panic. This change moves the suspend work initialization to the pre-init
function to ensure it is initialized only once.
Tested with: sudo dfu-util --detach
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
The PORT-based gpio_mcux_port_configure() rejects any configuration
that sets neither GPIO_INPUT nor GPIO_OUTPUT with -ENOTSUP. This makes
it impossible to release a pin with gpio_pin_configure(dev, pin,
GPIO_DISCONNECTED), which applications such as debug probes and
programmers need in order to tri-state shared target pins (SWD, ICSP,
UPDI) when a protocol is deactivated.
Handle GPIO_DISCONNECTED by clearing the pin's direction bit in PDDR
and setting the PCR MUX field to 0 (pin disabled / Alternative 0),
disconnecting the pin from the GPIO module. This also disables the
digital input buffer (cleared explicitly via IBE on parts that have
it), so the released pad is high impedance and draws no current when
left floating.
Signed-off-by: Leonardo José Consoni <leonardo@binho.io>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The TWT interval passed by the Wi-Fi management API is a uint64_t, but
nrf_wifi_twt_us_to_float() took a uint32_t, silently truncating any
interval above UINT32_MAX us (~71.6 min). On top of that, the encoder
worked in milliseconds and renormalised the mantissa via frexp(), which
pinned it near ~1000 and used only ~10 of the 16 mantissa bits, capping
the encodable interval at ~1000 * 2^31 us (~24 days).
Take the interval as uint64_t end to end and encode it directly in
micro-seconds using the full 16-bit mantissa and the 5-bit exponent
(max WIFI_MAX_TWT_EXPONENT). This removes the truncation and lets the
driver represent the complete range the API exposes, up to the IEEE
802.11 maximum of UINT16_MAX * 2^31 us, with exact micro-second
resolution. Intervals beyond the encodable maximum are saturated.
The over-the-air value is unchanged (mantissa * 2^exponent us), so the
firmware interface is untouched; only the host-side conversion changes.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
Previously, the MRAMC uses the NRFX driver which
used the INFO.MRAM register to get the size of
the MRAM. In other parts of the driver, the size
is taken from the devicetree. Also, if running tf-m
the size would be taken from the devicetree. This
commit ensures there's only 1 source of truth so
we only ever use the devicetree. This will also
allow the user to select a smaller MRAM size if
they wanted.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Add the MCUX_POWERQUAD_CLK clock identifier to the LPC syscon clock
dt-bindings header and add the corresponding clock enable case in
the syscon clock control driver. This allows the PowerQuad DSP
coprocessor peripheral clock to be managed through the Zephyr clock
control API.
Assisted-by: Claude Code:claude-opus-4-6
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
remove checking phy dev in
init. the phy is only needed in the iface init,
and the iface init doesn't check if the
regular init was successfull.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The management frame packet pointer error cause drop all the action
frame, so can't process neighbor report response frame, cause 11kv
roaming failure.
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
Some of the RTS5912 ESPI driver's state is tracked in software and
cannot be deduced from hardware registers. When this driver is
used in multi-image (e.g. A/B, RO/RW) firmware products that jump
between images without a full hardware reset, the cache state is
wiped and no longer reflects the hardware state.
This commit adds an optional pair of driver-specific functions that
can be called to export state data to be preserved ahead of soft-reboots
and then restore it. It is the caller's responsibility to retain the
state data somewhere safe in the meantime (e.g. BBRAM, NVRAM, etc)
Signed-off-by: Tristan Honscheid <honscheid@google.com>
In Wi-Fi + BT coex scenario on NXP hosted wireless SoCs (IW612/IW416/
IW610), once Wi-Fi CPU loads valid firmware, it puts BT CPU into sleep
via Boot-Sleep-Patch (BSP). The BT bootloader stops sending HDR
signature bytes, blocking BT firmware download.
Add BSP wakeup detection and trigger mechanism:
- Introduce fw_upload_read_data_tmo() to support custom timeout for
UART read, refactoring fw_upload_read_data() as a wrapper.
- Add fw_upload_wake_bt_from_bootsleep() which polls for HDR signature
bytes with a configurable interval. Absence of signature within the
polling window indicates BT CPU has entered BSP sleep.
- Send an RTS low pulse to wake BT CPU before FW download begins.
New Kconfig options:
- BT_NXP_CTRL_BSP_TRIGGER: enable/disable BSP wakeup feature
- BT_NXP_CTRL_HDR_SIG_INTERVAL: single poll timeout (default 505ms)
- BT_NXP_CTRL_BSP_WAIT_TIMEOUT: max total wait time (default 10s)
- BT_NXP_CTRL_BSP_RTS_PULSE_MS: RTS pulse duration (default 10ms)
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
Signed-off-by: Gang Li <gang.li_1@nxp.com>
Add a basic flash driver for intel pflash. This flash implements a CFI
interface, and is available as "pflash" within QEMU targets.
Assisted-by: Claude:Haiku 4.5
Signed-off-by: Daniel DeGrasse <daniel.degrasse@analog.com>
After recent modifications to the timeout calculation in cmsdk_apb_timer,
MAX_TICKS define is no longer used. This commit removes it.
Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
Same underflow as eth_w5500: a device-supplied header of 0-2 wraps
rx_len to a huge value. Reject before subtracting.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
frm_len = sys_get_le16(info) - 4 underflows to ~65532 when the
status-vector length is <= 4, causing enc28j60_read_packet to allocate
and copy ~64 KB. Reject the frame when the length is too small to hold
the CRC.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The FSIZE register is 32-bit and was used directly as the SPI burst-read
length into ctx->buf (sized CONFIG_ETH_ADIN2111_BUFFER_SIZE). A large
device-reported value could overflow the buffer.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The header value read from the chip was used as-is in:
rx_len = sys_get_be16(header) - 2
A value of 0, 1, or 2 underflows the uint16_t, causing an extremely
large allocation followed by a NULL fragment dereference.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add driver for the ADIS16477 6-axis IMU sensor family.
Supports polling, trigger (DRDY interrupt), RTIO async, and
streaming modes. Includes SPI bus access, burst read, decoder,
temperature and inertial data channels, decimation rate
configuration via devicetree, hardware reset, and diagnostic
status checking.
Signed-off-by: Iustin Stolniceanu <iustin.stolniceanu@analog.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The z_vrfy_* functions forward parameters to the corresponding
implementation with identical casts that are redundant since the
variables already have those types. Drop the casts to let the compiler
type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
The z_vrfy_* functions forward parameters to the corresponding z_impl_*
with identical casts — (const struct device *)dev and (uint64_t *)cycles
— that are redundant since the variables already have those types. Drop
the casts to let the compiler type-check the arguments unobstructed.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
Scope channel_cfg, num_channels and dev_cfg to the touch
sensor version branches that use them.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This API was never intended to be "public" in the sense now documented
in the Glossary, as said in 559c72d7a6:
"Introduce public functions for GPIO pins configuration [...] in
stm32 drivers & routines such gpio_stm32 & poweroff."
Remove the header from the public API directory and move the definitions
to a private header in SoC-specific includes. Update all previous users
of the header (which are as expected only those documented in the commit
message quoted above: gpio_stm32 and SoC poweroff.c).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>