Commit graph

28,390 commits

Author SHA1 Message Date
Armando Visconti
d0eca7bb2c drivers: sensor: shell: fix cmd_sensor_attr_get_handler()
Some of the sensore channels (e.g. SENSOR_CHAN_GRAVITY_VECTOR and/or
SENSOR_CHAN_GBIAS_XYZ) are returning three axis values. The current
code was passing a single value and was actually crashing.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-15 05:54:45 -04:00
Armando Visconti
80fc72b9d8 drivers: sensor: shell: fix sensor_attribute_name array
Add SENSOR_ATTR_CHIP_ID entry (last one) in sensor_attribute_name
declaration/initialization. This is fixing a sensor_shell crash.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-15 05:54:45 -04:00
Muhammad Waleed Badar
d131c6dd54 drivers: i2c: use helper APIs in i2c_dump_msgs_rw for msg flags
Replace direct flag checks in i2c_dump_msgs_rw() with helper
functions to improve readability and consistency.

Use i2c_is_read_op() instead of checking I2C_MSG_READ directly.
Introduce i2c_is_reset_op() to handle restart conditions and
use i2c_is_stop_op() for stop detection. Also change the loop
index type from unsigned int to uint8_t.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-04-15 05:51:41 -04:00
Jacob Wienecke
d0e6e01fe6 input: ft5336: add monitor mode PM support
Add CONFIG_INPUT_FT5336_PM_MODE_MONITOR to select monitor mode
(0x01) for PM suspend. Monitor mode reduces the scan rate and
auto-wakes on touch detection, allowing touch events to resume
without a hardware reset. When disabled, hibernate mode is used
which requires reset-gpios to be defined.

Reconfigure interrupt GPIO on PM resume for SoCs that lose
peripheral state in deep sleep.

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2026-04-15 05:49:46 -04:00
Tim Lin
c29906ccaf drivers/espi: it8xxx2: Make automatic boot done vwire configurable
Guard TARGET_BOOT_STS and TARGET_BOOT_DONE vwire signaling with
CONFIG_ESPI_AUTOMATIC_BOOT_DONE_ACKNOWLEDGE.

This allows boot status acknowledgment timing to be configurable
based on different eSPI boot flows.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-04-15 05:49:34 -04:00
Mohamed Azhar
294da648ff drivers: spi: microchip: bugfixes in SPI g1 driver
Fixed CTRLA register write bugs in spi g1 driver
Updated the transfer function for handling dma mode

Fixes #106580

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2026-04-15 05:48:55 -04:00
Andrzej Głąbek
4777244fbb drivers: spi_nor: Add support for supply-gpios and t-reset-recovery
Add support for the base DT property "supply-gpios" and related
"t-reset-recovery", as in the flash_mspi_nor driver.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2026-04-15 05:44:07 -04:00
Rex Chen
dc91be72e7 drivers: wifi: nxp: Fix CSI data overflow issue
Set the CSI data length accordfing to chips PHY usage in wifi driver
internal to fix the issue.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2026-04-15 05:43:02 -04:00
Yuzhuo Liu
d7c5fb5290 drivers: gpio: bee: return -ENOTSUP for simultaneous input/output
Realtek Bee series GPIO does not support configuring a pin as both
input and output simultaneously. Return -ENOTSUP to skip related
test cases.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-04-15 05:42:52 -04:00
Ren Chen
5f455612de drivers: gpio: it51xxx: add port_get_direction support
Add support for retrieving the direction of selected GPIO
pins. The it51xxx SoC does not support a combined
input-output mode, so return -ENOTSUP when such that mode
is requested.

Tested with:
- tests/drivers/gpio/gpio_hogs
- tests/drivers/gpio/gpio_get_direction

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2026-04-15 05:40:40 -04:00
Marcin Niestroj
0a7793fe09 drivers: modem_cellular: add "Ready" signal handling
This is the same as "APP RDY", but for other modems, such as nRF-SLM.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-15 05:38:40 -04:00
David Jewsbury
5087fd6acc drivers: mspi: mspi_dw: Update tmod register definition
Removed hard-coded QSPI transfer mode definitions and replaced them
with MSPI-specific constants which is part of the new MDK.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-04-15 05:38:17 -04:00
David Jewsbury
24aadb10ae drivers: mspi: mspi_dw: Update driver for NRF_QSPI_V2 peripheral rename
nRF7120's QSPI peripheral has been renamed to MSPI.
To align with this change, the driver has been updated to
use MSPI semantics instead of QSPI.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-04-15 05:38:17 -04:00
David Jewsbury
d82d544b67 dts: nrf7120: Rename QSPI peripheral to MSPI
QSPI peripheral is now called MSPI in the MDK. To align
with this change, peripheral has been renamed in the
devicetree to MSPI.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-04-15 05:38:17 -04:00
Jip Anema
a0cac43d94 drivers: eeprom: emu: increase CBS and add support for flash erase value
The emulator would not work when the write block size of the flash is
greater than 255 and have an erase value other than 0xff. This commit
fixes those problems by retrieving the flash erase value from the
flash device and by changing the flash_cbs variable type to support
larger write block sizes. Also fixed some typos

Signed-off-by: Jip Anema <janema@highvolteng.com>
2026-04-15 05:38:08 -04:00
Tim Lin
77be4b2126 drivers/rtc: ite: Add RTC driver for ITE IT8XXX2 series
The driver provides basic RTC functionality including time read and
write, alarm configuration(alarm1 and alarm2), and daylight saving
time (DST) support.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-04-14 22:38:09 -04:00
Ren Chen
5085c2333c drivers: intc: it51xxx: add either edge hw support for wuc
Add hardware support for either-edge triggering in it51xxx
wake-up controller.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2026-04-14 22:38:03 -04:00
Ryan McClelland
ba7c069401 drivers: i3c: dw: implement ibi_crr_response
Implement ibi_crr_response for the DW driver by setting/clearing the
MR_REJECT bit (bit 14) in the target's DAT entry. The DW IP
automatically NACKs MR requests from targets with this bit set and
issues a directed DISEC CCC.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-14 22:36:39 -04:00
Ryan McClelland
2956bf3781 drivers: i3c: dw: allocate and attach unknown PIDs during DAA
When an unknown PID is discovered during ENTDAA, allocate a device
descriptor from the mem slab via i3c_device_desc_alloc(), populate it
with the PID, dynamic address, BCR, and DCR, assign controller
private data, and attach it to the bus device list. This matches the
Cadence I3C driver behavior and ensures dynamically discovered
devices are tracked.

Also set controller_priv for known PIDs in the same path, which was
previously missing.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-14 22:36:39 -04:00
Ryan McClelland
e70f090b42 drivers: i3c: dw: add dw_i3c_is_current_controller() helper
Replace 12 open-coded PRESENT_STATE_CURRENT_MASTER register checks
with a dw_i3c_is_current_controller() inline helper that takes the
device pointer, improving readability and reducing duplication.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-14 22:36:39 -04:00
Ryan McClelland
b906176b76 drivers: i3c: dw: handle DEFTGTS CCC in target mode
When a secondary controller receives a DEFSLVS/DEFTGTS CCC, the DW
IP writes SDCT (Secondary Device Characteristic Table) entries to the
DCT region and generates a response with TID=0xf and DATA_LENGTH set
to the device count.

Read the SDCT entries and populate data->common.deftgts with the
active controller and target device information, matching the pattern
used by the Cadence I3C driver. This is done via a k_work item to
avoid allocating memory in ISR context.

On bus owner update, when gaining controllership, enqueue
i3c_sec_handoffed() to consume the deftgts data and attach all
devices from the previous controller's bus state. Also invoke the
controller_handoff_cb if registered.

Guarded by both CONFIG_I3C_CONTROLLER and CONFIG_I3C_TARGET since
DEFTGTS is used for controller role handoff which requires both roles.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-14 22:36:39 -04:00
Ryan McClelland
0044b97c16 drivers: i3c: dw: add controller role handoff support
Add support for controller role (mastership) handoff using standard
DW I3C registers:

- Implement I3C_IBI_CONTROLLER_ROLE_REQUEST in target ibi_raise using
  SLV_INTR_REQ (0x8C, bit 3) with HW capability, DA validity, and
  DISEC checks before issuing the request.
- Handle mastership request IBIs on the controller side via
  i3c_ibi_work_enqueue_controller_request() instead of dropping them.
- Handle INTR_BUSOWNER_UPDATE_STAT in the ISR to flush FIFOs, resume
  the controller, and reconfigure interrupt masks for the new role.
  Guarded by both CONFIG_I3C_CONTROLLER and CONFIG_I3C_TARGET since
  role switching requires both roles compiled in.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-14 22:36:39 -04:00
Julien Panis
7d7863c667 drivers: firmware: scmi: Add option to force polling mode
Add an ARM SCMI option to force polling based communication flow.
This may be needed if SCMI platform does not support interrupt-driven
communication flow.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
2026-04-14 22:36:01 -04:00
Carlo Caione
590c9a0683 syscon: reject misaligned register accesses
syscon_sanitize_reg() was silently rounding down misaligned offsets to
the nearest aligned address via ROUND_DOWN(). This masks caller bugs:
an offset of 0x03 with reg_width=4 would silently become 0x00, reading
the wrong register with no error reported.

Change to reject misaligned accesses with -EINVAL instead.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-04-14 22:35:36 -04:00
Carlo Caione
a5e3a81d56 syscon: add per-device spinlock and update_bits API
Add a spinlock to the generic syscon driver data so that concurrent
register accesses from multiple consumers are serialized per-device.

Also introduce syscon_update_bits() which performs an atomic
read-modify-write under a single lock hold.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-04-14 22:35:36 -04:00
Zayne Stites
00fa90d6b8 drivers: hwinfo: Added hwinfo_infineon support
Added hwinfo driver support for infineon devices

Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
2026-04-14 22:35:00 -04:00
David Chalco
81c041921a input: analog_axis: Fix self-deadlock when raw callback gets calibration
When analog_axis_calibration_get and similar are called in
analog_axis_set_raw_data_cb installed callback, analog_axis_loop
can self-deadlock. Loop takes cal_lock before invoking callback
and analog_axis_calibration_get (ex.) tries to aquire cal_lock again
at K_FOREVER in same context. Fixed by reducing cal_lock scope
and taking copy of callback ptr while under cal_lock, so cal_lock is
released before running raw callback in analog_axis_loop.

Signed-off-by: David Chalco <david@chalco.io>
2026-04-14 22:34:52 -04:00
Manimaran A
940c14d16c drivers: input: kscan: mec: enable kscan for mec174x/5x/165xb
Used Zephyr inline register access functions (sys_read/write)
instead of CMSIS register structure.

Used soc helper api to access/configure girq registers.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2026-04-14 22:34:33 -04:00
Manimaran A
f394a29aa5 dts: arm: microchip: update kscan node with new macros
Update PCR and GIRQ properties of kscan node to use new macros

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2026-04-14 22:34:33 -04:00
Tejus Subramanya
304a02cb50 drivers: wifi: siwx91x: raise NET_EVENT_WIFI_TWT from WiseConnect
Register SL_WIFI_TWT_RESPONSE_EVENTS and map sl_wifi_event_t /
sl_wifi_twt_response_t into struct wifi_twt_params, then call
wifi_mgmt_raise_twt_event() so applications receive TWT setup/teardown
results (resp_status, setup_cmd, negotiated parameters).

Signed-off-by: Tejus Subramanya <ters@silabs.com>
2026-04-14 22:34:02 -04:00
Fin Maaß
2820b49a40 drivers: wifi: esp32: fix ESP32_WIFI_STA_AUTO_DHCPV4
When ESP32_WIFI_STA_AUTO_DHCPV4 is
enabled functions from the dhcpv4 clients are
used, therefore we need to depend on it, otherwise
a user could activate that Kconfig without the dhcpv4
client being enabled, which would lead to a build error.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-14 22:33:12 -04:00
Guðni Már Gilbert
04ab47f24d build: avoid including unnecessary directories
Folders which have menuconfig can be conditionally included

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
2026-04-14 22:32:15 -04:00
Matin Lotfaliei
d53115be07 drivers: pinctrl: esp32: fix BIT overflow for pins >= 32
Same issue as the GPIO driver: esp32_pin_is_valid() and
esp32_pin_is_output_capable() use BIT() which overflows on 32-bit
Xtensa for pin numbers >= 32.

Fix by using BIT64() to match the 64-bit SOC_GPIO_VALID_GPIO_MASK.

Signed-off-by: Matin Lotfaliei <matinlotfali@gmail.com>
2026-04-14 22:31:46 -04:00
Matin Lotfaliei
68398e706b drivers: gpio: esp32: fix BIT overflow for pins >= 32
gpio_pin_is_valid() and gpio_pin_is_output_capable() use BIT() which
expands to (1UL << n). On 32-bit Xtensa targets, unsigned long is
32 bits, so BIT(n) for n >= 32 is undefined behavior.

This causes gpio1 pins (GPIO32+) to always fail validation with
-EINVAL, breaking any peripheral connected to GPIO32-GPIO48 on
ESP32-S3 (and similar ESP32 variants with gpio1).

Fix by using BIT64() which correctly handles pin numbers >= 32
since SOC_GPIO_VALID_GPIO_MASK is already a 64-bit value.

Signed-off-by: Matin Lotfaliei <matinlotfali@gmail.com>
2026-04-14 22:31:46 -04:00
Nicolas Pitre
7e02a6847e drivers: timer: arm_arch: use WFxT in arch_busy_wait()
Use the WFET (Wait For Event with Timeout) instruction, introduced in
Armv8.8-A (FEAT_WFxT), to let the CPU enter a low-power state during
arch_busy_wait() instead of spinning on the counter.

The availability of WFxT is detected at runtime by reading
ID_AA64ISAR2_EL1. When the feature is absent, the existing polling
loop is used as before.

Also fix the cycles_to_wait computation to use 64-bit multiplication
to avoid truncation with large usec_to_wait values.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-04-14 22:31:36 -04:00
Ryan McClelland
caccbe5c82 drivers: i3c: add disable-hj-at-init controller flag
Add I3C_CONTROLLER_FLAG_DISABLE_HJ_AT_INIT as BIT(1) in the
controller config flags. When set via the devicetree boolean property
"disable-hj-at-init" on the I3C controller node, Hot-Join ACKs will
not be enabled at the end of bus initialization. Hot-Join events will
be NACKed until the application explicitly enables them.

Guard the ENEC HJ broadcast in i3c_bus_init() (i3c_common.c), the
cdns-specific HJ ACK register write, the dw HJ NACK clear, and the
stm32 LL_I3C_EnableHJAck() call with this flag.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-14 22:31:26 -04:00
Ryan McClelland
19efb68d56 drivers: i3c: add disable-bus-init controller flag
Add a flags field (uint8_t) to struct i3c_driver_config and define
I3C_CONTROLLER_FLAG_DISABLE_BUS_INIT as BIT(0). When set via the
devicetree boolean property "disable-bus-init" on the I3C controller
node, i3c_bus_init() will not be called during driver initialization,
allowing the application to perform bus initialization at a later time.

Add I3C_CONTROLLER_CONFIG_FLAGS_DT_INST() macro in devicetree.h to
read the flag from the devicetree, following the same FIELD_PREP
pattern used for per-device flags in I3C_DEVICE_DESC_DT.

Update cdns, dw, max32, it51xxx, mcux, npcx, renesas_ra, and stm32
drivers to populate the new flags field and check it before calling
i3c_bus_init().

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-14 22:31:26 -04:00
Ren Chen
7a9027c4a2 drivers: comparator: it51xxx: add support for higher adc channel range
This commit adds support for higher adc channel range. (8 and above)

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2026-04-14 22:30:17 -04:00
Jordan Yates
360e25ce58 modem: cellular: update carrier state locations
The `NET_IF_LOWER_UP` (carrier on/off) state is not intended to signify
network registration state, that is the job of `NET_IF_DORMANT`. The
example from the documentation is:

> An example of an event that changes the carrier state is Ethernet
  cable being plugged in or out.

In the context of an LTE network, I am interpretting the equivalent of
the "cable" to be the modem ready to start searching for networks to
join. The state combinations end up being:

 * `!LOWER_UP && DORMANT`: Modem off or booting
 * `LOWER_UP && DORMANT`: Modem searching for network
 * `LOWER_UP && !DORMANT`: Modem registered to network

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-14 22:28:46 -04:00
Jordan Yates
2bdcf37f99 modem: cellular: fix dormant state control
According to the networking documentation:

> The network association status is represented with NET_IF_DORMANT flag

Therefore, the flag should be set at any time that the network is not
associated with. This is achieved by setting the flag at boot, and only
controlling the dormant state at entry/exit from the `REGISTERED` state.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-14 22:28:46 -04:00
Jordan Yates
77bb728be3 modem: cellular: rename DORMANT to AWAIT_PPP_DEAD
The name of this state is misleading as it is the same as the internal
Zephyr networking interface state of dormant. Rename the state to match
what it is doing, in the same way other states are named.

The misapplication of the interface `dormant` state by `AWAIT_PPP_DEAD`
is fixed later.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-14 22:28:46 -04:00
Jordan Yates
0a2ee3cb8e modem: cellular: rename CARRIER_ON to REGISTERED
The driver transitions to this state upon registering to the LTE
network, not upon the internal Zephyr concept of `carrier_on`.
`carrier_on` is an internal (and incorrect) consequence of transitioning
to the registered state, and should not be the basis of the name.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-14 22:28:46 -04:00
Guillaume Gautier
dfab44e51c drivers: dac: stm32: adapt dac driver for stm32 hal2
Adapt the DAC driver for STM32 HAL2.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-04-14 22:23:50 -04:00
Fin Maaß
8ee6844036 drivers: ethernet: call net_if_carrier_off first
net_if_carrier_off() should be called before
phy_link_callback_set(), as itside it, the carrier could be
already changed.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-14 22:23:41 -04:00
Mathieu Choplain
b85fbd4c96 drivers: usb: udc: common: log requested endpoint configuration
In `ep_check_config()`, capabilities of the endpoint provided by the driver
are logged, but not the requested endpoint configuration. As a result, when
the function fails, it is not possible to determine why using only logs.

Add logging of the requested configuration in addition to the driver caps
to allow easily determining the cause of the failure (when logging is on).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-04-14 22:23:28 -04:00
Kate Wang
a403230c5e drivers: video: Add format size estimation for PNG and NV12/NV21
- PNG is treated similarly to JPEG with a rough worst-case estimate.
- Treat NV12/NV21 formats specially rather than fall into the default
condition. These 2-planar YUV formats have a pitch equal to width and
a total size of pitch * height * 2 (Y plane + interleaved UV plane).

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-04-14 22:23:18 -04:00
Robert Robinson
ea9c9bc12a drivers: sensor: nordic: Add sensor to monitor battery voltage
The need to monitor battery voltage on nordic devices and nRF7120
in particular is required among other metrics such as die temperature.
Creating a sensor to measure battery voltage allows to easily monitoring
of all required metrics in a consistent way.

This commit adds a new sensor driver to monitor battery.

Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
2026-04-14 22:22:51 -04:00
Camille BAUD
e7eae8d448 drivers: display Minor st7586s fixes
Implement post-merge review remarks:
- check return values correctly
- fix bad function naming
- fix binding no title
- use function instead of macro as is possible

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-04-14 22:22:31 -04:00
Guillaume Gautier
3beaaa7f92 drivers: usb: udc: stm32: adapt driver for stm32 hal2 and stm32c5
STM32 HAL2 brings many changes regarding structure, macro and function
names, so add a compatibility layer to keep the driver working for both
versions.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-04-14 22:22:14 -04:00
Carlo Caione
3186b4185d lora: native: sx126x: wake radio before aborting duty cycle
During RX duty cycle mode the SX126x keeps BUSY asserted even in
the sleep phase. The standby command cannot be sent because the HAL
waits for BUSY LOW first.

Fix by calling sx126x_hal_wakeup() before set_standby when
cancelling duty cycle reception. The wakeup function drives NSS low
directly (bypassing the BUSY check), which forces the radio out of
duty cycle and into STDBY_RC.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-04-14 22:22:05 -04:00