Commit graph zephyr/drivers
Author SHA1 Message Date
Sarah Renkhoff
95ff84434f drivers: entropy: stm32: Lock semaphore before hardware register access
Resuming the device involves hardware accesses including register
writes, so we need to acquire the semaphore lock first to avoid
interference with other cores also using the RNG.

Signed-off-by: Sarah Renkhoff <sarah.renkhoff@gmail.com>
2026-04-24 19:06:12 +02:00
Fin Maaß
a551f2fac2 drivers: ethernet: mdio: stm32: use k_mutex
use k_mutex instead of the k_sem

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-24 19:05:49 +02:00
Fin Maaß
c29fb364ed drivers: ethernet: mdio: stm32: refactor driver
now that the ethernet mac is the parent of
the mdio node, we can improve the mdio
driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-24 19:05:49 +02:00
Fin Maaß
747adf26e7 drivers: ethernet: stm32: remove parent child structure
remove parent child structure in the dt,.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-24 19:05:49 +02:00
Ryan McClelland
80fc0860dd drivers: i3c: cdns: implement I2C asynchronous callback API
Wire up the i2c_api.transfer_cb endpoint so I2C transfers routed through
an I3C controller can use the asynchronous completion callback when
CONFIG_I2C_CALLBACK is enabled. The async path mirrors the existing
CONFIG_I3C_CALLBACK implementation and shares the same async_sem,
timeout timer, cb/userdata state, serialized through async_sem.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-24 19:04:45 +02:00
Ryan McClelland
09b483ae67 drivers: i3c: cdns: implement asynchronous callback API
Implement i3c_transfer_cb and i3c_do_ccc_cb in the Cadence I3C
controller driver. The existing transfer functions are refactored
with an async flag that skips waiting for completion and instead
starts a kernel timer for timeout handling. A semaphore serializes
async operations, and the user callback is invoked from the
transfer completion ISR or the timeout handler.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-24 19:04:45 +02:00
Ryan McClelland
fd7d01fdd4 drivers: i3c: add asynchronous callback API
Add an asynchronous callback API for I3C, similar to the existing
i2c_transfer_cb interface. This introduces i3c_transfer_cb and
i3c_do_ccc_cb, which start a transfer and return immediately,
invoking a user-provided callback upon completion or timeout.

A new CONFIG_I3C_CALLBACK Kconfig option gates the feature. The
driver API struct is extended with do_ccc_cb and i3c_xfers_cb
function pointers under CONFIG_I3C_CALLBACK.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-24 19:04:45 +02:00
Archit Anant
3c8e70f816 display: ssd1322: enforce width alignment for L4 display
When writing to the SSD1322 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check to prevent invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Archit Anant
257388199d display: ssd1363: enforce width alignment for L4 display
When writing to the SSD1363 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check (multiple of 4) to prevent
invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Archit Anant
179f317e69 display: ssd1327_5: enforce width alignment for L4 display
When writing to the SSD1327 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check to prevent invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Archit Anant
98cba50226 display: ssd1320: enforce width alignment for L4 display
When writing to the SSD1320 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check to prevent invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Archit Anant
f6ce947e4c display: sh1122: enforce width alignment for L4 display
When writing to the SH1122 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check to prevent invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Camille BAUD
0b3c77eef3 drivers: sensor: Add Sensylink CHT8315
Add a temperature and humidty sensor with advanced trigger functions

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-04-24 19:02:52 +02:00
Henrik Brix Andersen
09f4511297 drivers: sensor: st: lsm6dsv80x: fix lsm6dsv80x_gy_setup() call params
Use the correct parameters for setting the ODR to "off" when calling
lsm6dsv80x_gy_setup().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-04-24 19:02:15 +02:00
Henrik Brix Andersen
4fc2b02601 drivers: sensor: st: lsm6dsv320x: fix lsm6dsv320x_gy_setup() call params
Use the correct parameters for setting the ODR to "off" when calling
lsm6dsv320x_gy_setup().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-04-24 19:02:15 +02:00
Benedek Kupper
1c27adc708 drivers: flash: stm32f1: implement option bytes R/W
While other lines of the STM32 family have their flash controllers with
option bytes driver support, the STM32F1 line was missing it.
(Which might have something to do with the rather complex handling that
it needs to program them.) This patch adds support for modifying the
option bytes as they are represented in FLASH/OBR, which involves erasing
all option bytes (including the write protection bytes), then writing
back the new values for each (restoring the write protection to its
previous value).

Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
2026-04-24 10:30:02 -04:00
Benjamin Cabé
6c1ae30866 drivers: charger: add support for Silergy SY6974B
Add support for Silergy SY6974B 3A single-cell Li-Ion switching battery
charger with I2C control, USB BC1.2 detection, OTG boost and power-path
management.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.7
2026-04-24 10:28:49 -04:00
Jisheng Zhang
5f1892d707 usb: udc_dwc2: Fix warnings on 64 bit platforms
Fix below warnings on 64bit platforms:

drivers/usb/udc/udc_dwc2.c: In function 'dwc2_tx_fifo_write':
rivers/usb/udc/udc_dwc2.c:454:29: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
  454 |                 sys_write32((uint32_t)buf->data,
      |                             ^
drivers/usb/udc/udc_dwc2.c: In function 'dwc2_prep_rx':
drivers/usb/udc/udc_dwc2.c:651:29: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
  651 |                 sys_write32((uint32_t)data,
      |                             ^

drivers/usb/udc/udc_dwc2.c: In function 'dwc2_read_fifo_setup':
drivers/usb/udc/udc_dwc2.c:2324:25: warning: format '%d' expects argument
of type 'int', but argument 2 has type 'size_t' {aka 'long unsigned int'}
 2324 |         LOG_ERR("%d bytes SETUP", size);
      |                 ^~~~~~~~~~~~~~~~  ~~~~
      |                                   |
      |                                   size_t {aka long unsigned int}
include/zephyr/logging/log_core.h:336:50: note: in definition of macro
'Z_LOG2'
  336 |                         z_log_printf_arg_checker(__VA_ARGS__);
      |                                                  ^~~~~~~~~~~
include/zephyr/logging/log.h:62:22: note: in expansion of macro 'Z_LOG'
   62 | #define LOG_ERR(...) Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                      ^~~~~
drivers/usb/udc/udc_dwc2.c:2324:17: note: in expansion of macro 'LOG_ERR'
 2324 |                 LOG_ERR("%d bytes SETUP", size);
      |                 ^~~~~~~
drivers/usb/udc/udc_dwc2.c:2324:27: note: format string is defined here
 2324 |                 LOG_ERR("%d bytes SETUP", size);
      |                          ~^
      |                           |
      |                           int
      |                          %ld
drivers/usb/udc/udc_dwc2.c: In function 'dwc2_handle_oepint':
drivers/usb/udc/udc_dwc2.c:2615:51: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
 2615 | sys_cache_data_invd_range((void *)(addr - 8), 8);
      |                                   ^
drivers/usb/udc/udc_dwc2.c:2616:45: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
 2616 | memcpy(priv->setup, (void *)(addr - 8), sizeof(priv->setup));

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
2026-04-24 10:28:34 -04:00
Khai Cao
6168031e21 drivers: ethernet: recover stuck mode transition using MIOC
When switching ETHA operating modes, the transition may fail to
complete if the PHY-derived clock is unexpectedly stopped, leaving
RMAC in an indeterminate state.

If the requested mode is not reached within the timeout, enable
RMAC emergency clock recovery (MIOC0) to flush internal RMAC state
and temporarily switch to a free‑running clock. Wait for the ETHA
mode transition to complete, then restore normal PHY clocking.

This improves robustness of RMAC/ETHA mode transitions without
requiring a full device reset.

Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
2026-04-24 13:02:27 +02:00
Armando Visconti
896e8819af modules/hal_st: Align to stmemsc HAL i/f v2.13.2
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.13.2

Requires https://github.com/zephyrproject-rtos/hal_st/pull/35

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-24 13:02:14 +02:00
Haoran Jiang
c64977b722 drivers: sf32lb: fix DMA completion polling
SF32LB DMA cleared its software busy bit on half-complete.
The QSPI NOR write path polled that bit while holding the flash lock.

Clear the DMA status bit only on completion or error.
Derive busy from the active state plus pending_length.
Poll pending_length until the flash DMA transfer reaches zero.

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2026-04-24 13:02:05 +02:00
Haoran Jiang
5aa494194f drivers: flash: sf32lb: re-enable write before erase
The SF32LB MPI QSPI NOR erase path issued WREN only once before
entering the erase loop. On SPI NOR devices the write-enable latch
is typically cleared after each erase command, so a multi-block erase
can fail after the first block.

Move WREN into the loop and issue it while holding the driver lock,
immediately before the selected erase command. This matches the write
path and aligns the driver with Zephyr's generic SPI NOR erase flow.

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2026-04-24 13:01:53 +02:00
Antoniu Miclaus
073415a294 drivers: adc: ad405x: fix sample rate bit position
ad405x_reg_update_bits() performs a raw read-modify-write without
shifting the value into the field position. The sample rate field
in TIMER_CONFIG occupies bits [7:4] (AD405X_FS_BURST_AUTO_MSK =
GENMASK(7, 4)), but ad405x_set_sample_rate() passes the raw enum
value (0-15) without shifting it.

This causes the rate value to be written into bits [3:0] instead
of bits [7:4], corrupting unrelated fields and setting the wrong
sample rate.

Shift the value by 4 to place it into the correct bit position,
consistent with how other callers handle non-zero-based fields
(e.g., ad405x_set_gp_mode() manually shifts for GP1_MODE_MSK).

Fixes: 4a9d1473d3 ("drivers: adc: ad405x: Add AD405X driver")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2026-04-24 13:01:39 +02:00
Jordan Yates
97c713c112 modem: cellular: consistent AT command DLCI channel
Instead of switching the DLCI channel used for AT commands from DLCI1 to
DLCI2 halfway through the setup process, always use DLCI1. For PPP, use
the clean DLCI2 channel. The only "command" sent on the DLCI2 channel
before handing over to the PPP module is the dial script.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-24 13:01:29 +02:00
Jordan Yates
07ff624f6b Revert "drivers: modem: cellular: Don't keep DLC2 open when not reading"
This reverts commit 8d45e18d23.

With the intent to keep the AT command channel on DLCI1 and use DLCI2
exclusively for PPP, the concern about buffered messages when the
channel switches is no longer relevent.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-24 13:01:29 +02:00
Ali Hozhabri
2e933d3fec drivers: bluetooth: hci: Calculate the future time correctly
Calculate the future time correctly to avoid negative value for "value_ms".

Register the pm_policy_event when HAL_RADIO_TIMER_SetRadioTimerValue
returns success.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2026-04-24 13:00:07 +02:00
Ali Hozhabri
a2d701976b drivers: entropy: Fix repetition and adaptive health test errors for WB09
Handle repetition and adaptive health test errors for STM32WB09 properly.
Resetting Health error flags is not enough. See also RM0505 §14.7.11

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2026-04-24 13:00:07 +02:00
Ali Hozhabri
59ccf80915 drivers: entropy: stm32: Skip low power during TRNG wait in S2RAM
Avoid entering low power mode while waiting for an event to be
generated by TRNG interrupt when CONFIG_PM_S2RAM is set.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2026-04-24 13:00:07 +02:00
Ali Hozhabri
ba7a20af97 drivers: entropy: stm32: Avoid RNG reacquisition
Bypass acquiring RNG when it is already acquired.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2026-04-24 13:00:07 +02:00
Lucien Zhao
c8512077b8 drivers: sdhc: imx_usdhc: support no-3-3-v and no-3-0-v voltage options
Add support for the no-3-3-v and no-3-0-v devicetree properties in the
IMX USDHC driver. When both are set, the driver overrides the host
capability flags to disable 3.3V and 3.0V support, and sets the USDHC
VSELECT bit at init time to configure the data line sampling threshold
for 1.8V I/O without triggering the SD voltage switch protocol.

Update the reset function to respect the voltage configuration: when
both no-3-3-v and no-3-0-v are set, the reset path now restores 1.8V
signaling instead of unconditionally switching to 3.3V, ensuring correct
behavior after card re-initialization on fixed 1.8V I/O boards.

This is required for boards like the MIMXRT700-EVK where the USDHC1
I/O voltage domain (VDDIO_0) is fixed at 1.8V.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2026-04-24 12:59:09 +02:00
Haoran Jiang
52155cc38f drivers: flash: sf32lb_mpi_qspi_nor: initialize DR temp words
Initialize the 32-bit DR temporary at declaration before copying a
partial tail chunk in qspi_nor_write_fifo(). Without this, 1-3 byte
writes can leave the upper bytes unchanged and push stale bits into
MPI_DR.

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2026-04-24 10:58:38 +02:00
Jari Tervonen
1f2464f66b Revert "drivers: clock_control: Add handling of missing NRF_BICR LFOSC modes"
This reverts commit 36ce7ae44b.

Signed-off-by: Jari Tervonen <jari.tervonen@nordicsemi.no>
2026-04-24 10:57:42 +02:00
Antoniu Miclaus
e1af90d636 drivers: sensor: adxl362: fix LINKLOOP mode not being applied
In adxl362_set_interrupt_mode(), the LINKLOOP field is first cleared
from the register value, but then the original uncleared register
value is OR'd back in on the next line, restoring the old LINKLOOP
bits. This makes it impossible to change the interrupt mode from its
current value.

Remove the erroneous OR of old_act_inact_reg so the cleared field is
properly set to the new mode value.

Fixes: 11295c190b ("drivers: sensor: Add ADXL362 interrupt handling")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2026-04-24 10:57:16 +02:00
Tim Pambor
9ff3bc5605 flash: spi_nand: support multiple plane devices
Add support for multiple plane devices to the SPI NAND driver.
This includes adding a new plane-bytes property to the device
tree bindings, which indicates the size of each plane in the
flash device. For devices with a single plane, this should be
set to the same value as size-bytes.

Some devices require the plane address as part of read and/or
program commands. For these devices, the new has-read-plane-select
and has-program-plane-select properties can be set to indicate
that the driver should include the plane address in read and
program commands.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-04-24 10:56:51 +02:00
Sudarshan Iyengar
f9bbf19f85 drivers: i3c: free dynamic addresses in i3c_bus_rstdaa_all
i3c_bus_rstdaa_all() sends the RSTDAA broadcast and clears every
attached descriptor's dynamic_addr, but does not return those
addresses to the address-slot pool. Subsequent calls to
i3c_addr_slots_next_free_find() therefore skip the freed DAs and
the bus monotonically exhausts the valid dynamic-address range
across successive RSTDAA + DAA cycles.

Free each target's DA in the address-slot bookkeeping in the same
loop that clears dynamic_addr, so RSTDAA is fully reversible at
the software level.

This fixes sustained RSTDAA+DAA test cycles across all I3C
controller drivers (cadence, dw, mcux, max32, stm32, npcx,
renesas, it51xxx). Previously, after ~10-20 RSTDAA cycles the
bus would run out of assignable dynamic addresses.

Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Assisted-by: Claude:claude-opus-4.7
2026-04-24 10:56:40 +02:00
Sudarshan Iyengar
eaed94d49e drivers: i3c: i3c_dw: fix stale state after re-DAA
The DesignWare I3C controller driver maintained several pieces of
per-target state that went out of sync with hardware whenever DAA ran
more than once on the same bus (e.g., boot DAA, RSTDAA + DAA, or a
second explicit i3c_do_daa() call).This desynchronization between
software state and hardware resulted in persistent -ENXIO errors
on all transfers after bus re-enumeration.

Root cause (shared by all three fixes below):

The DW controller's ENTDAA implementation treats DAT slots as a free
pool. It fills empty slots starting at COMMAND_PORT_DEV_INDEX in
arbitration order (lowest PID wins first). This order is unrelated to
the slot chosen by dw_i3c_attach_device() at subsystem init. The driver
previously assumed the attach-time binding was stable across DAA
cycles and never re-read hardware state; any target that participated
in ENTDAA (i.e., had no "assigned-address" in DT, or lost its DA via
RSTDAA) ended up with desc->controller_priv pointing to one DAT slot
while hardware had placed the target in another.

Three related issues are fixed together:

1. add_slave_from_daa() did not refresh BCR/DCR on re-DAA. The I3C
   spec allows a target to publish different BCR/DCR after a reset,
   and after RSTDAA the cached values may no longer reflect the
   target's current capabilities. Always re-read from the Device
   Characteristic Table when a new DA is assigned.

2. add_slave_from_daa() did not detect the priv->id != pos case
   described above. When it occurs (the common case for any DT
   target without "assigned-address"), rebind controller_priv to
   the DAT slot hardware chose and return the old slot to the free
   pool. Without this, subsequent transfers write the command DAT
   index of an empty slot and NACK with -ENXIO.

3. dw_i3c_device_find() only searched the static dev_list built
   from DT. Targets allocated dynamically for non-DT devices on the
   bus were invisible to PID lookups, so add_slave_from_daa() kept
   allocating fresh descriptors on every DAA cycle and eventually
   exhausted the descriptor pool. Fall back to scanning the
   attached-device runtime list by PID when the static lookup
   misses.

Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Assisted-by: Claude:claude-opus-4.7
2026-04-24 10:56:40 +02:00
Sudarshan Iyengar
0daeffee3b drivers: i3c: i3c_dw: implement recover_bus callback
Implement .recover_bus for both the i3c and i2c_api entries in the
DesignWare I3C driver so that i3c_recover_bus() and the i3c shell
can actually recover a stuck bus. Previously the callback was not
wired up and calls returned -ENOSYS.

The implementation deliberately avoids RESET_CTRL_SOFT and the
RESET_CTRL_ALL superset, because those clear the Device Address
Table (DAT) and Device Characteristic Table (DCT), destroying the
driver-to-hardware mapping of attached targets. Instead the
recovery path:

  - drains any pending IBIs that could block a resume,
  - flushes the command, response, RX, TX, and IBI queues,
  - asserts DEV_CTRL_RESUME to clear a halt caused by a prior
    transfer error.

This is the same FIFO flush + RESUME sequence already used by the
driver's per-transfer error path, so the safety properties are
well understood. The operation is mutex-guarded to avoid racing
with in-flight transfers.

Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Assisted-by: Claude:claude-opus-4.7
2026-04-24 10:56:40 +02:00
Emil Gydesen
11c4b2b295 Bluetooth: Driver: Move bt_hci_evt_hdr to end of struct
Since bt_hci_evt_hdr is a variable sized struct, it shall be
located at the end of the struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-04-24 10:56:33 +02:00
Aiman Mazlan
25648ff085 drivers: ethernet: w5500: add polling mode
For devices that does not have interrupt pin, default to polling mode
instead.

Polling period can be configured through
CONFIG_ETH_W5500_POLL_PERIOD.

Signed-off-by: Aiman Mazlan <mohammad.aiman@stratusauto.com>
2026-04-24 10:55:11 +02:00
Anas Nashif
d5178bbc46 drivers: timeaware_gpio: move under drivers/
This is generic enough to be a driver class and does not need to be
maintained under misc/.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-04-24 10:53:43 +02:00
Andy Lin
add4db27b3 driver: intc: hazard3: fix interrupt being enabled too early
`hazard3_irq_init` enables `MSTATUS_IEN` too early,
which allows ISRs, specifically machine timer ISR,
to be fired before `_kernel.cpus[0].irq_stack` is
initialized in  `prepare_multithreading()` /
`z_init_cpu()`.

This can result in interrupt being handled with
uninitialized IRQ stack, causing system to crash.

Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
2026-04-24 10:53:11 +02:00
Mario Paja
c829aabc7f drivers: i2s: stm32 sai add sai fifo threashold config
This change adds sai fifo configuration option

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2026-04-24 09:22:11 +02:00
Ryan McClelland
1da88ef918 drivers: i3c: cdns: honor scl_od_min configuration timings
Use the scl_od_min.low_ns and scl_od_min.high_ns fields from
i3c_config_controller to configure Open Drain SCL timing instead
of hardcoding. The OD low period is programmed via PRESCL_CTRL1.od_low
and the OD high period is honored by adjusting PRESCL_CTRL0.i3c if
the base period's T/2 is insufficient.

- Load od-thigh-min-ns and od-tlow-min-ns from devicetree in the
  instantiation macro
- Copy scl_od_min from incoming config in cdns_i3c_configure
- Adjust I3C prescaler upward if needed to meet high_ns minimum,
  warning that push-pull speed will also be reduced
- Use scl_od_min.low_ns for OD low calculation, falling back to
  I3C_OD_TLOW_MIN_NS (200ns) when unset
- Remove duplicate I3C_BUS_TLOW_OD_MIN_NS in favor of
  I3C_OD_TLOW_MIN_NS from i3c.h
- Replace magic 1000000000 constants with NSEC_PER_SEC

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-23 18:23:59 -04:00
Abderrahmane JARMOUNI
d9b7fcd16f drivers: display: ili9xxx: fix BGR mode (R/B swap)
commit 9b2593b8c5 has changed the internal
ili9xxx driver color config from setting BGR mode (Blue-Red channels
swap, not pixel format byte-swap) by default, to conditioning it on the
use of PIXEL_FORMAT_BGR_565 (ILI9XXX_PIXEL_FORMAT_BGR565 in devicetree),
but without updating all boards/shields to use
ILI9XXX_PIXEL_FORMAT_BGR565 to preserve their old config.

Then commit 69e353904c replaced
ILI9XXX_PIXEL_FORMAT_BGR565 to PANEL_PIXEL_FORMAT_BGR565.
Later, commit b13d9a0510 renamed
PANEL_PIXEL_FORMAT_BGR565 to PANEL_PIXEL_FORMAT_RGB565X, and defined it
as "Byte swapped version of the PIXEL_FORMAT_RGB_565 format", which is
different from how it was interpreted by ili9xxx devices (B/R channel
swapped format).

The fix for this mess is:
- separate BGR mode (B/R channel swap) setting for ili9xxx from pixel
format,
- restore the initial driver config that sets BGR mode by default, in
order to not break in-tree and out-of-tree panels that relied on that
behavior,
- introduce a DT property that allows disabling BGR mode.

A bonus enhancement is to set BGR mode in ili9xxx driver outside
set_orientation() function, since they are unrelated.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/105521

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2026-04-23 18:23:49 -04:00
Sunil Hegde
c4a791d712 drivers: watchdog: wdt_ti_rtc: Configure reset or NMI using DT property
If DT has IRQ defined, the board supports NMI mode, if reset-capable
property is set then the board can support reset as well. Based
on these DT properties and the flags passed by the application,
NMI mode or Reset mode can be set.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>
2026-04-23 18:23:29 -04:00
Andrzej Puzdrowski
fe71aa6df1 drivers/flash/nrf_rram: Kconfig: fix defult RRAMC buffering conf.
CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE sets how many line buffers
should be used for the driver. When ther is no need to synchronize
the buffering default value should be maximal
(optimized write performance).
Whe ther is need for synchronize - value should be minimal
buffering - x1 (optimized radio firmware execution).

By mistake the default values were mixed eatch other.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2026-04-23 13:12:35 -04:00
Jeppe Odgaard
f990995cb4 drivers: i2s: stm32: initialize mem_block_size
Fix compile errors if -Werror=maybe-uninitialized is used.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2026-04-23 13:12:21 -04:00
Tahsin Mutlugun
9a8657193a arch: xtensa: semihost: Add simulator support
Add semihosting for Xtensa Instruction Set Simulator (ISS) via `simcall`
instruction.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-04-23 13:12:03 -04:00
Armando Visconti
51674f69ae drivers/sensor: lsm6dsvxxx: add gyro support
Add support to gyro channels for polling read.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-23 13:11:53 -04:00
Etienne Carriere
bf56fb5142 drivers: rtc: stm32: H7RS series needs backup domain access to read RTC
Enable STM32 backup domain access on H7RS series when accessing some
RTC alarm configuration registers that otherwise would be read as 0.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-04-23 13:11:10 -04:00