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>
The TTC provides three independent hardware counters supporting
free-running and interval modes, accessed via MMIO registers.
This driver implements the Zephyr counter API, including start/stop,
read, alarm, and top value configuration. Alarm events are delivered
using match interrupts.
Dynamic IRQ connection is used to support platforms where multiple
TTC counter instances share the same interrupt line. Each IRQ is
registered only once at runtime, and the ISR dispatches pending
events to all TTC instances mapped to that interrupt, ensuring correct
handling for both shared and dedicated interrupt configurations.
Signed-off-by: Satya Sri <satyasri.katru@amd.com>
The BMI270 exposes an on-chip temperature sensor in registers
TEMPERATURE_0/1 (0x22/0x23). Add support for SENSOR_CHAN_DIE_TEMP so
applications can read it through the standard sensor API.
bmi270_init() now sets PWR_CTRL.temp_en, bmi270_sample_fetch() reads
the 16-bit value, and bmi270_channel_get() converts it using the
datasheet formula T = raw / 512 + 23 degrees C, returned in micro-
degrees through val1/val2.
Signed-off-by: Vignesh Pandian <vignesh@aerlync.com>
Rename CONFIG_STM32_MEMMAP to CONFIG_FLASH_STM32_NOR_MEMMAP for clarity
since it only concerns STM32 Flash drivers.
Same change is applied on MCUboot side upstream.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Adding a binding property to enable speaker output and updating the
driver to support driving the speaker in addition to the headphone
outputs.
Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
Advanced scan ignored the configured dwell times because the
driver only updated local variables instead of the advanced scan
configuration structure. Set the active and passive channel times
on the advanced scan config directly.
Signed-off-by: Tejus Subramanya <ters@silabs.com>
Enable the GPIO subsystem when the driver is enabled if disconnect-gpios
are provided on a node with compatible `st,stm32-usb` or if an ULPI PHY
provides reset-gpios.
The second case should be handled at a generic level, but ULPI PHYs have
always been managed as part of the STM32 driver for historical reasons.
Since no SoC family other than STM32 seems to use ULPI PHYs, this code
remains vendor-specific for now.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Enable the GPIO subsystem when cd-gpios or pwr-gpios are used on
any STM32 SDMMC node and the corresponding driver is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Enable the GPIO subsystem when ce-gpios are used on any STM32 QSPI,
OSPI or XSPI node configured as MSPI controller and the corresponding
driver is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Enable the GPIO subsystem when reset-gpios or power-gpios are used on
any STM32 FMC node configured for usage as MIPI DBI host controller
and the corresponding driver is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Enable the GPIO subsystem when reset-gpios are used on any STM32 QSPI,
OSPI or XSPI flash node and the corresponding driver is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use Zephyr's standard MMIO abstraction API by introducing
DEVICE_MMIO_NAMED_RAM/ROM(core) in the driver's data and
config structs, mapping the region at initialization time
with DEVICE_MMIO_NAMED_MAP, and routing all register accesses
through a uhc_dwc2_get_base() helper that calls DEVICE_MMIO_NAMED_GET.
These changes allows the driver to be useful on MMU-based
platforms like Broadcom BCM2711 SoC.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Allow the MCUX QTMR counter driver to use clock providers without a
named clock cell, such as fixed-clock.
Existing users with named clock cells keep the previous behavior.
Also use the filter-period devicetree property when configuring the
QTMR fault filter period.
Signed-off-by: Samuel Slesar <samuel.slesar@nxp.com>
Fix two issues in fpga_mpfs.c:
1. Remove invalid (uint8_t *) cast on format string literal.
sprintf() expects const char*, not uint8_t*. The cast suppresses
the implicit-function-declaration warning but is semantically wrong
and produces -Wint-conversion warnings on strict compilers.
2. Replace sprintf() with snprintf() to prevent potential buffer
overflow. The FPGA_design_ver buffer is 30 bytes and the formatted
string "Design Version : 0x%x" can reach 29 characters with a
full 32-bit value (0xffffffff), leaving no margin.
Signed-off-by: Srikanth Patchava <spatchava@meta.com>
Implement a driver for the ADC ADS1220.
Currently only the single shot mode is supported.
Origin: Original
Signed-off-by: Hasler Pauline <phasler@baumer.com>
The RX buffer was cleared only when a message was consumed by
ucpd_get_rx_pending_msg(). Receptions not passed to the TCPM layer
(GoodCRC, filtered SOP'/SOP'', BIST or an errored message) left
stale order-set and header bytes behind, which the next poll of
ucpd_get_rx_pending_msg() reported as a pending message.
Discard the buffer at the end of the RXMSGEND handler whenever
UCPD_EVT_RX_MSG was not set, so only delivered messages remain
readable.
Signed-off-by: Nicholas Cadieux <ncadieux@qti.qualcomm.com>
Three comment-only fixes found while auditing the arch interface:
- include/zephyr/arch/common/addr_types.h still carried the 'x86
address types' banner from before it was generalized into the
common arch headers.
- include/zephyr/arch/exception.h documented its callback typedefs
as exception_dump_hook_t and exception_drain_hook_t while the
actual typedef names are arch_exception_dump_hook_t and
arch_exception_drain_hook_t.
- intc_gicv3.c referenced z_arch_el3_plat_init, which does not
exist; the platform hook is named z_arm64_el3_plat_init.
No functional change.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is useful to reduce the size of mcuboot builds, so it can fit into the
16K bootloader flash area outside of the main flash, which many Silabs SoCs
have.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
The set_contrast function of the ST7567 display driver now expects a
contrast value in the range 0-255, instead of 0-63.
The driver now scales the value to the 6-bit range expected by the
controller.
CONFIG_ST7567_DEFAULT_CONTRAST has been updated.
Signed-off-by: Florian Moesch <florian.moesch@draeger.com>