Add the possibility to configure the interrupt gpio in one of the
two possiblities:
- GPIO_INT_EDGE_TO_ACTIVE
- GPIO_INT_LEVEL_ACTIVE
Default is GPIO_INT_EDGE_TO_ACTIVE, which matches with old fixed
configuration.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Add support for using RTI hardware as system timer:
- Add headers, driver code, Kconfig, and bindings for TI RTI Timer
- Make changes in CMakeLists.txt and Kconfig to support ti_rti_timer
- Add documentation and usage instructions in bindings file.
NOTE: Each RTI has 2 Counter blocks, 4 Counter Compare blocks.
This driver assumes that Counter block 0, Compare block 0 of
chosen RTI instance are used as RTI Timer.
Signed-off-by: Shreyas Shankar <s-shankar@ti.com>
Fix devicetree coding style regarding whitespaces through the tree.
This affects code snippets inside documentation, comments, error messages
as to encourage a style that passes CI. Follow-up of #101619
Signed-off-by: Josuah Demangeon <me@josuah.net>
The TI DAC43608 has 8 bit resolution, the DAC53608 has 10 bit
resolution. According to the datasheet from Texax Instruments,
the MSB of DACn_DATA must be left aligned.
This fix aligns the data correctly, allowing the DAC value to
be set to 100% and not only 25% max for the DAC43608.
Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
The MAC_CONFIGURATION register was unconditionally OR'ed with the FES
(speed) and DM (duplex) bits, forcing 100 Mbps full-duplex during MAC
initialization. The PHY link callback later updates these bits to match
the actual link state, but on 10BASE-T1S (PLCA) links the temporary
100 Mbps/full-duplex setting causes the MAC to ignore the COL signal
from the internal TENBASET_PHY block. As a result the MAC transmits
during another node's transmit opportunity, producing collisions and
lost data.
Initialize MAC_CONFIGURATION with FES and DM cleared (10 Mbps,
half-duplex, which is also the register's reset value) and let the PHY
callback set the correct speed/duplex once the link is up. Read-modify-
write is done via a local variable so both the set and clear masks are
applied in a single register write.
Fixes#109682
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
the option MPU_ALLOW_FLASH_WRITE is only needed
when ARM_MPU. Only files in include/zephyr/arch/arm/mpu/
and include/zephyr/arch/arm64/cortex_r use it. it is not used in
xtensa or riscv.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Update drivers/interrupt_controller/intc_clic.c to use BIT_MASK(2)
rather than BIT_MASK(3) in "riscv_clic_irq_priority_set". The .trg
attribute of the CLICINTATTR that is initialized in this function is
2 bits while the current mask is 3 bits. To ensure only 2 bits are
used, we need to correct the mask.
Signed-off-by: Omar Naffaa <onaffaa@qti.qualcomm.com>
Others socs series also have a DIEROK flag to check.
The stm32_lptim_timer has been modificated accordingly
Signed-off-by: Romain Jayles <romain.jayles@st.com>
Provide the necessary changes for the ST HCI SPI Bluetooth driver
to support X-NUCLEO-WBA25A1 shield.
Update ST BLE shields' overlays with the new properties.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Added support for autanalog PRB for PSE84.
This implementation uses the shared autonomous controller (AC) MFD
with the other autanalog drivers.
The PRB is a programmable reference block inside the autonomous
(aut) analog subsystem. It is controlled using the autonomous
controller (AC), which is a programmable state machine. The AC is
shared across all autonomous analog peripherals including the
SAR, PRB, PTComp, CTB, and CTDAC.
The PRB contains two variable voltage references derived from
either VDDA(1.8V) or VGBR(0.9V). These need to be configured
together and accessed using the AC. A PRB MFD is used to bring
together the two voltage reference configurations. AC MFD then
references the combined PRB MFD configuration, and brings together
all other autanalog peripherals into a single AC setup for the
application.
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Remove the driver-local struct ring_buffer in favour of sys_ringq.
Pointers are stored directly in the ring queues, which removes the need
for the POINTER_TO_UINT casts and fixes a potential platform-specific
pointer truncation issue on 64-bit architectures.
gmac_desc_list rings are unchanged as they require
in-place DMA descriptor access.
closes: #21155
Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
Updated pse84 autanalog sar to support muxed inputs.
This implementation uses the autonomous controller (MFD).
The autonomous controller (AC) a programmable state machine. The AC
is shared across all autonomous analog peripherals including the
SAR, PRB, PTComp, CTB, and CTDAC.
The device supports 8 direct GPIO inputs and 16 muxed inputs.
The muxed inputs can be sourced from pins or from interal signals
from other autanalog blocks. Muxed inputs can be chosen by assigning
channels 8 and above. Only 2 muxed channels are allowed per sequencer
when operating in high-speed mode. 1 muxed channel is permitted per
sequencer when operating in low power mode.
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Add sleep retention support for die temp 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 LEDC PWM 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 WDT 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 counter 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 UART 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 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>