Add sleep retention support for GSPI driver. When peripheral
power down is enabled for light sleep, register data is lost,
so REGDMA backup is needed to mantein peripheral operational.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Add sleep retention support for GDMA driver. When peripheral
power down is enabled for light sleep, register data is lost,
so REGDMA backup is needed to mantein peripheral operational.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Add I2C bus support to the BMI323 sensor driver. The BMI323
supports I2C communication with a dummy byte offset protocol
where 2 dummy bytes precede actual data in read operations.
Changes:
- Add bmi323_i2c.c/.h with I2C read/write and chip ID validation
- Add BMI323_BUS_I2C Kconfig option
- Update BMI323_DEVICE_BUS macro to handle I2C bus type
- Add bosch,bmi323-i2c.yaml device tree binding
The I2C implementation handles the dummy byte offset required
by the BMI323 when reading registers over I2C.
Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Add Real-Time I/O (RTIO) asynchronous sensor API support to the
BMI323 driver. This enables non-blocking sensor reads with
kernel-managed buffering.
Features added:
- RTIO submit and decode operations for accel, gyro, and temp channels
- Q31 fixed-point format encoding for consistent sensor data scaling
- Unified sample fetch implementation shared between sync and async paths
- Decoder API with timestamped frame headers
The driver now supports both blocking (sensor_sample_fetch) and
non-blocking (sensor_read) operation modes when CONFIG_SENSOR_ASYNC_API
is enabled.
Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Assisted-by: GPTCodex:GPT-5.4
Add Real-Time I/O (RTIO) support to the BME680 sensor driver to enable
asynchronous sensor operations. This implementation follows the pattern
established by other Bosch sensor drivers in Zephyr.
Changes include:
- Add bme680_async.c implementing the sensor async API submit function
using RTIO lock free queues asynchronous read operations
- Add bme680_decoder.c implementing the sensor decoder API for
Q31-format data conversion of temperature, pressure, humidity, and
gas resistance channels
- Add RTIO encoded data structures (bme680_encoded_data, bme680_reading)
to bme680.h with proper bit-packed flags for channel presence
- Update CMakeLists.txt to conditionally build async sources when
CONFIG_SENSOR_ASYNC_API is enabled
The driver supports fetching temperature, pressure, humidity, and gas
resistance channels via the RTIO interface.
Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Assisted-by: Claude:claude-opus-4.6
The LL function is named differently on STM32C5 because the hardware is
different: the `RMVF` bit must be cleared by software, whereas hardware
clears it automatically on all other series.
Rework the implementation to be functional, and rename the function to
match intent while at it. Also, switch to a series-specific #if guard
since this is hardware-specific rather than related to HAL1/HAL2.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
stallguard_threshold_velocity is always present on the controller node,
so COND_CODE_1(DT_PROP_EXISTS()) always evaluates true making the
BUILD_ASSERT unreachable and futile. Remove it.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
stallguard_threshold_velocity is always present on the controller node,
so COND_CODE_1(DT_PROP_EXISTS()) always evaluates true making the
BUILD_ASSERT unreachable and futile. Remove it.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
stallguard_threshold_velocity is always present on the controller node,
so COND_CODE_1(DT_PROP_EXISTS()) always evaluates true making the
BUILD_ASSERT unreachable and futile. Remove it.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
as in the spi_nor driver, so that the DPD mode can be used even if
the flash API caller does not perform the runtime device PM calls.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add proper handling of the `has-dpd`, `t-enter-dpd`, and `t-exit-dpd`
devicetree properties that could be applied to "jedec,mspi-nor" nodes,
but caused no effect so far.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Correct alignment of `\` characters in the `FLASH_MSPI_NOR_INST(inst)`
macro definition.
Use `NSEC_PER_USEC` symbols instead of 1000 when doing conversion from
nanoseconds to microseconds.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The GPIO subsystem forwards GPIO_INT_WAKEUP from dt_flags into the trig
argument of pin_interrupt_configure(). Wakeup source configuration is
already handled in gpio_esp32_config(); strip the bit before passing trig
to convert_int_type() to avoid -EINVAL return.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Convert the ENC424J600 Ethernet driver from a single hardcoded
devicetree instance to the standard Zephyr multi-instance pattern using
DT_INST_FOREACH_STATUS_OKAY().
Before this change, only instance 0 was registered, so boards with
multiple microchip,enc424j600 nodes could only create one Ethernet
interface.
This allows all status = "okay" ENC424J600 devicetree instances to be
registered.
Fixes#109849
Signed-off-by: Arayik Gharibyan <arayik.gharibyan.1999@gmail.com>
Accepted sockets had uninitialized poll fields and timeouts. A zero
k_timeout_t equals K_NO_WAIT (not K_FOREVER), so blocking recv()/send() on
accepted sockets returned immediately instead of waiting.
Signed-off-by: Jonas Remmert <j.remmert@smight.com>
The I2C Rise Time Register (TRISE) is present on the CH32V20x and
CH32V30x but not on the CH32V003 or CH32V00X. Change the test from
"not on the CH32V003" to "only present if the HAL defines the macro".
Tested by patching the board DTS to enable i2c1 and then building
`tests/drivers/i2c/i2c_api` for the ch32v003evt, ch32v006evt, and
linkw.
Signed-off-by: Michael Hope <michaelh@juju.nz>
Route the ESP32_BT_* defaults through the generic BT_CTLR_* symbols
so a standard BT_CTLR_* toggle reaches the vendor knobs without
further user intervention. Select the matching BT_CTLR_*_SUPPORT
capabilities from BT_ESP32, and add Kconfig entries for the BLE 5.x
feature gates, controller power placement and light-sleep XTAL.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The MFX does not natively support BOTH direction edge
detection. In order to support it, adapt the requested edge
depending on the level at configuration time and toggle the
edge whenever an interrupt is received.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
So far the driver was setting the PU/PD bit properly however
missed setting another bit indicating of a Pull-Down or Pull-Up
are necessary.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The four irq_{rx,tx}_{enable,disable} helpers each wrote a single
constant value to IER -- BIT(N) on enable, ~BIT(N) on disable. As
a result they did not toggle a single bit; they overwrote the
entire register. Two side effects:
* irq_tx_disable() set the RX-enable bit (because ~BIT(1) has bit 0
set), and vice versa. The expected sequence
irq_rx_disable(); irq_tx_disable();
ends with the RX bit on, even though the caller asked for both
channels to be quiesced.
* On the BCM283x mini-UART, the upper bits of IER carry FIFO-clear
shortcuts (see BCM2837 ARM Peripherals manual, "AUX_MU_IER_REG").
Writing 0xfffffffd or 0xfffffffe arbitrarily perturbs them.
Fix: each helper reads IER, sets or clears its own bit, writes
back. The TX/RX-enable side now also preserves the other channel's
state correctly.
Signed-off-by: Jonathan Elliot Peace <jep@alphabetiq.com>
The current implementation spins forever waiting for a character and
unconditionally returns 0. The uart_poll_in() API contract is that
the function returns -1 (or another negative value) immediately when
no character is currently available, and 0 only after writing a
received character to *c.
Without this, callers that use the canonical drain pattern --
while (uart_poll_in(dev, &c) == 0) {
;
}
-- hang. drivers/console/uart_console.c::console_input_init() does
exactly this when registering an input handler, so any application
that calls uart_register_input() (e.g. via Zephyr's console handler
subsystem) can deadlock at startup waiting on idle UART RX.
The fix is to test once and return -1 on the no-char path. The
"got a character" path is unchanged.
Signed-off-by: Jonathan Elliot Peace <jep@alphabetiq.com>
WIFI_SILABS_SIWX91X_FEAT_HIDE_PSK_CREDENTIALS impacted the way the NWp
print the log message. However, these logs are not available on production
firmware. So, it does not make sense to expose this parameter.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Until now, the siwx91x wifi driver used the default log level. It make more
sense to the use the log level provided b the Wifi subsystem.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Reorganize the Kconfig options in preparation for a future rework of the
Wi-Fi driver. The new ordering groups related options together:
1. Hidden configdefault entries that tune network stack parameters
2. Native vs. offloaded network stack choice
3. Driver feature options
4. Scan and roaming fine-tuning options
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Defining a Kconfig symbol several times is dangerous. It is better to use
configdefault for the CMSIS related symbols.
Bluetooth configdefault depends on NWP driver. It is more accurate to
depend on the Si91x Bluetooth driver.
Finally, configdefault is supposed to be only used in Kconfig.defconfig
files. So, relocate BT_HCI_ACL_FLOW_CONTROL.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Remove the redundant cast to struct device * from struct device * in
some of the GPIO API syscall handlers in gpio_handlers.c
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The following APIs
- gpio_port_set_masked()
- gpio_port_set_bits()
- gpio_port_clear_bits()
- gpio_port_set_clr_bits_raw()
- gpio_port_set_clr_bits()
- gpio_pin_get_raw()
- gpio_pin_get()
- gpio_pin_set_raw()
- gpio_pin_set()
- gpio_pin_toggle()
are currently not syscalls, while the following are:
- gpio_port_set_bits_raw()
- gpio_port_get_raw()
It is therefore possible to set and get any pin of the entire port
from userspace, but only through a few of the APIs.
These APIs should all be either syscalls, or not syscalls.
Align the APIs so they are all syscalls and add syscall handlers for
them in gpio_handler.c
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
After DWC2 core is disabled the registers should no longer be accessed
to prevent CPU hangs. While the concurrent access is guarded by mutex,
there was no mechanism to ensure that driver thread won't access any
register after udc_disable() was called. Solve the issue by executing
disable in driver thread context.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add driver for Nordic USB PD Charging-Type detector.
This driver depends on the USBHS wrapper driver.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Use USBHS wrapper driver to register VREGUSB regulator callback and
enable USB peripheral.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Nordic USBHS wrapper is a set of registers used by both USB BC12 driver
and vendor specific part in UDC driver. The wrapper can be considered
to be MFD device. Both drivers depends on the VBUS regulator driver and
require some synchronisation when accessing wrapper register.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add the option to explicitly request the HFXO while the UARTE peripheral
is active for nRF54L series devices. While the UARTE peripheral requests
a high frequency clock from the clock controller, both the HFINT and
HFXO oscillators satisfy this request. The problem is that the HFXO
oscillator is required to reach the highest bitrate accuracies (and
mitigate errata 30).
Signed-off-by: Jordan Yates <jordan@embeint.com>
make CONFIG_SSD135X a hidden symbol similar to other display driver groups
so that it doesn't bleed into the main display drivers menu.
Fix spelling of the prompt for the actual drivers to also align with other
drivers.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
In addition to `ERROR`, also abort on `+CME ERROR`, which is a 3GPP
documented (TS.128.007 v18.6.0 9.2) alternative error code.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move standalone (not using `modem_cellular.c`) drivers to a dedicated
subfolder, keeping the top level folder clean for common utilities.
Signed-off-by: Jordan Yates <jordan@embeint.com>
A flash manager thread is created and allocated to
process Flash Manager Process.
Definition of KConfigs STM32WBA_FLASH_MNGR_THREAD_STACK_SIZE,
and STM32WBA_FLASH_MNGR_THREAD_PRIO to configure the
flash manager thread.
STM32WBA_FLASH_MNGR_THREAD_STACK_SIZE is setting by default
to 768 bytes. This value was chosen empirically since reasonable
to cover generic cases.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Repeat the call to `i2c_nrfx_twim_rtio_start` until there are either
no more operations queued, or an asynchronous operation is pending
completion. This fixes a queue of operations that contains an operation
that completes inside of `i2c_nrfx_twim_rtio_start` (e.g.
`RTIO_OP_I2C_CONFIGURE`) from not starting the remaining operations,
which then forever blocks any pending callers.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fixes a compilation failure on NXP MCX E-series (and other NXP SoCs)
where FSL_FEATURE_SAI_HAS_BIT_CLOCK_SWAP is 0 or undefined.
The driver was unconditionally assigning to a non-existent struct
member. Resolved by wrapping the assignment in the proper feature
macro checks.
Signed-off-by: Jan Willem Smaal <usenet@gispen.org>
3GPP TS 27.010 section 5.4.6.3.2 specifies a PSC frame exchange when
entering power save and section 5.4.7 specifies a flag-byte exchange
when exiting. modem_cmux blocks at T3 timeout on either half if the
peer does not implement the exchange, which is the case for modems
that manage sleep and wake out-of-band (hardware lines or
modem-control AT commands).
Add an opt-in DT property cmux-no-powersave-handshake (default off)
on the cellular-modem common binding. When set,
modem_cmux_runtime_pm_handler skips modem_cmux_send_psc and the T3
reschedule on entry and transitions directly to STATE_POWERSAVE;
powersave_wait_wakeup skips the wake-pattern transmission and the
STATE_RESYNC wait on exit and transitions directly to STATE_CONNECTED.
Signed-off-by: Paulo Santos <paulo.santos-ext@hexagon.com>