Commit graph zephyr/drivers
Author SHA1 Message Date
Ryan McClelland
06f9155dcf drivers: i3c: dw: fix bus free timing for pure bus
For a i3c pure bus, the bus free timing shall be set to tcas
which is 38.4ns according to table 49 of the MIPI I3C v1.2
specification.

For a i3c mixed bus, the bus free timing shall be set to the scl
low time. Based on the i2cs' lvrs, it can determine if any devices
only support fast mode and won't do fast mode plus to determine
which tLOW setting it should use for bus free.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-10-07 23:00:47 -04:00
Khanh Nguyen
65bf8f9461 drivers: video: ctrls: correct assertion in video_cluster_ctrl
The function asserted `!sz && !ctrls`, which is the inverse of the
intended precondition. This caused assertion failures on valid inputs.

Update the check to `sz && ctrls` so it fails only when size is zero
or the control pointer is NULL.

Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
2025-10-07 23:00:05 -04:00
Khanh Nguyen
6f431a423b drivers: video: ov5640: support DVP bus-width and data-shift from DTS
Add support in the OV5640 driver to configure the bus-width and
data-shift properties from devicetree when operating in DVP
(parallel) mode.

This allows the number of parallel data lines and the bit shift
to be set directly via DTS, ensuring correct configuration across
different hardware designs.

Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
2025-10-07 23:00:05 -04:00
Khanh Nguyen
804f893e89 drivers: video: ov5640: Use CCI API helpers for register access
Replace the custom I2C read/write functions in the OV5640 driver
with the common Video CCI API helpers.

- Introduce OV5640_REG8/REG16 macros for register addressing
- Convert struct ov5640_reg to struct video_reg16
- Replace ov5640_{read,write,modify}_reg() with CCI API helpers
- Replace ov5640_write_multi_regs() with video_write_cci_multiregs16()

This aligns the OV5640 driver with other video sensor drivers
that already rely on the CCI helpers.

Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
2025-10-07 23:00:05 -04:00
Anisetti Avinash Krishna
709f453673 drivers: gpio: Enable support for latest GINF method
Enable support for latest GINF method which requires 3 paramters
for each GPIO group and enables gpio support for intel_ptl_h
platform.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2025-10-07 22:59:32 -04:00
Jakub Zymelka
e5ecbd2112 drivers comparator: nordic: Align drivers to changed analog input types
External analog input types changed from `string` to `int`.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-10-07 22:58:20 -04:00
Quang Le
77c1aed630 drivers: clock control: Add Clock Control support for RZ/N2L, T2M
Add Clock Control driver support for Renesas RZ/N2L, T2M

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-10-07 22:58:03 -04:00
Camille BAUD
a9b9416b28 drivers: display: Introduce SSD1357
It is almost identical to SSD1351

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-10-07 22:57:39 -04:00
Martin Jäger
866dff0eb0 drivers: flash: stm32g0: Implement set|get_rdp_level API
Allows to set readout protection bits for this series at runtime.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-10-07 22:56:52 -04:00
Martin Jäger
faf661e907 drivers: flash: stm32g0: Implement option_bytes_write|read API
Implementation based on STM32G4 series.

This is a preparation to enable reading and writing the RDP bits.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-10-07 22:56:52 -04:00
Hui Bai
50ac559152 drivers: wifi: Add WLAN wakeup for MIMXRT1060-EVK
Added wlan wakeup pin in IW610 overlay file. This WLAN wakeup
support is for IW610 and MIMXRT1060-EVK acts as host. Add wakeup
pin configuration when doing device related initialization.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2025-10-07 22:55:21 -04:00
Anas Nashif
bf82f7ffac copyrights: fix copyright line
Add space before (c) to allow correct parsing by linters.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-07 22:53:45 -04:00
Armando Visconti
ea072d31ff drivers/sensor/: lis2dux12/lsm6dsv16x: use helpers
Make use of rtio_read_regs_async() and rtio_flush_completion_queue()
helpers in lis2dux12 and lsm6dsv16x sensor drivers.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-10-07 17:43:32 +03:00
Raffael Rostagno
1d2f012fbe drivers: counter: rtc: esp32: Add LP TIMER support
Add support to LP TIMER peripheral, for ESP32-C6 and ESP32-H2
RTC counter support.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-10-07 12:47:45 +02:00
Raffael Rostagno
01d430826e drivers: counter: rtc: esp32: Fix cancel alarm condition
Disable RTC interrupts when cancelling alarm, and clear callback
data, to make sure no ISR/callback is serviced after alarm is
cancelled. Also, check programmed ticks in ISR to make sure
alarm triggered is not an outdated/cancelled event.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-10-07 12:47:45 +02:00
Raffael Rostagno
16632333a2 drivers: counter: rtc: esp32: Fix overflow case
Fix alarm setting when timer has overflown beyond 32-bit boundary.
Timer is 48-bit, so it requires high word to be programmed along
the 32-bit word managed by the driver.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-10-07 12:47:45 +02:00
Seppo Takalo
5fa605af17 drivers: modem: cellular: nRF91: Remove periodic chat script
Remove periodic chat script as the AT+CEREG=1 notifications are already
enabled.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-10-07 12:47:19 +02:00
Fabian Blatz
bae6e3563b drivers: rtc: Add nxp,pcf85063a driver
Adds a driver implementation for the pcf85063a I2C rtc.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-10-07 12:47:07 +02:00
Davi Herculano
d1493b60d6 driver: i2s: fix nxp i2s fifo combine values
MCUX defined RX fifo combine names and the
references need to be adjusted in the i2s driver.

Signed-off-by: Davi Herculano <davi.herculano@adam-audio.de>
2025-10-07 11:01:01 +02:00
Elmo Lan
c0a421c329 drivers: i2c_dw: Avoid spamming NACK error messages
NACK message now log with LOG_ERR_RATELIMIT
instead of LOG_ERR to reduce log noise.

When scanning I2C device,
receiving a NACK is expected behavior and not necessarily an error.
Logging it at LOG_ERR causes unnecessary clutter in the logs.

Therefore, the log level is change to LOG_ERR_RATELIMIT for NACK cases.

Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
2025-10-07 10:59:52 +02:00
Jordan Yates
adecb09978 modem: select UART_USE_RUNTIME_CONFIGURE
Override any defaults for `UART_USE_RUNTIME_CONFIGURE` when using
`CONFIG_MODEM_CELLULAR`, as the baudrate update feature depends on it.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-07 10:59:18 +02:00
Charles Hardin
2bfd76425a net: ip: account for the size in the inet_ntop code path
The code was writing to the dst without a verification check on
size which is not appropriate. The guard on the arguements should
be enforced and so just ensure the size is larger then the
definition of the strings from POSIX and return an error in those
cases.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-10-07 10:59:08 +02:00
Alexander Kozhinov
7eb3b41e7d drivers: comparator: implement stm32 comparator driver
implement the driver for the stm32 comparator peripheral

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2025-10-07 10:58:31 +02:00
Jiafei Pan
8e0486d291 drivers: watchdog: wdog32: add imx9352 support
On i.MX 93 platform, no need to clear interrupt flags, otherwise it
will not trigger reset.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Joe Zhou <zhongcai.zhou@nxp.com>
2025-10-06 20:17:50 -04:00
Jiafei Pan
9f6a74506f drivers: watchdog: wdog32: add MMIO mapping support
Added MMIO mapping support in order to support on Cortex-A Core.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-10-06 20:17:50 -04:00
Jan Kablitz
be0e98388c drivers: sensor: st: lis2du12: add SENSOR_TRIG_DELTA support
Extend the LIS2DU12 accelerometer driver with SENSOR_TRIG_DELTA
support. The detection is based on the slope between successive
channel readings. Support for setting SENSOR_ATTR_SLOPE_TH and
SENSOR_ATTR_SLOPE_DUR is added as well. In line with other sensors,
SENSOR_ATTR_SLOPE_TH is configured in SI units (m/s^2) and
SENSOR_ATTR_SLOPE_DUR in samples relative to the ODR. The new trigger
can be mapped either to the same GPIO as the data-ready interrupt or
to a dedicated one.

Signed-off-by: Jan Kablitz <jan.kablitz@8tronix.de>
2025-10-06 15:10:01 -04:00
Daniel Schultz
15d2990b24 drivers: gpio: Add driver for Aesc Silicon
Add basic support for the Aesc Silicon GPIO controller.

This IP core has internal tri-states and therefore a read,
write and direction registers. Additionally, it has advanced
monitoring capabilities for interrupt generation; low or
high leve and rising or falling edge.

Interrupt support will be added later when ElemRV supports
interrupt in Zephyr.

Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
2025-10-06 20:03:28 +03:00
Mike J. Chen
8cd010b701 drivers: mbox: imx_mu: return early in ISR when done
Change the ISR code to return once all pended interrupts
are handled instead of continuing to iterate over
all channels. Common occurence is just for one interrupt
bit to be set so no need to check all bits in all channels
if only one bit is pending.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-10-06 20:03:16 +03:00
Mike J. Chen
13e0588cd2 drivers: mbox: imx_mu: change order of interrupt handling
Handle notification interrupt before data interrupt of
a channel. Notification interrupts are more commonly
used (e.g. for ipc) and clearing the interrupt ASAP
helps reduce the possiblility that the sender finds
the interrupt already pending if it tries to send multiple
ipc messages in quick succession.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-10-06 20:03:16 +03:00
Mike J. Chen
3c80b15aef drivers: mbox: imx_mu: handle all interrupts for a channel
Handle all interrupts for a channel before going to next
channel. Previous code did an if/else check, so if both
a data rx interrupt and a notification interrupt were pending
for a channel, only one would be handled in the ISR. The
ISR would have to fire again (probably would be still pending)
for the other interrupt to be processed. This could even
lead to starvation/delay if another data rx interrupt got
pended again.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-10-06 20:03:16 +03:00
Mike J. Chen
593e2b5fed drivers: mbox: imx_mu: Remove extra interrupt handler layer
Change to pass the device node to IRQ_CONNECT and remove
the intermediate interrupt handler that has to call
DEVICE_DT_INST_GET() to get the device pointer.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-10-06 20:03:16 +03:00
Mike J. Chen
04778ff6cc drivers: mbox: imx_mu: ignore TriggerInterrupt failures
The ipc backends, like icmsg.c, don't expect errors when
using mailbox send for notifications. In some places,
icmsg.c ignores the return value of the mailbox send,
in some places it propagates the error up, and in some
places it asserts.

icmsg only uses the mailbox send with NULL msg as a means
to interrupt the other processor, and all data is passed
via shared memory. So it is safe to ignore the case when
the interrupt is already pending, since the other
processor should handle the pending message when it gets
around the handling the interrupt. As long as the order
of clearing the interrupt is before the handling of the
data, there should be no case where not pending a new
interrupt when one is already pending would result in missing
any new message.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-10-06 20:03:16 +03:00
Adam Kondraciuk
60af28e3f5 drivers: timer: nrf_grtc: Move GRTC initialization to early init
GRTC is used by the logger, so it must be initialized
as early as possible. On the other hand, clock requests
are allowed once the clock control API has been initialized.
This PR introduces a two-stage GRTC initialization to meet
these requirements.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-10-06 20:02:28 +03:00
Daniel DeGrasse
79bfd9525e drivers: sdhc: mcux_sdif: report 4 bit bus support
SDIF peripheral supports 4 bit bus width, report this correctly

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-10-06 20:00:29 +03:00
Alberto Escolar Piedras
61e12a4c75 drivers: wifi: eswifi: Fix callback prototype
net_tcp_accept_cb_t takes a socklen_t as 3rd argument,
which type was changed in
c546c1cad1
and is not anymore equivalent to size_t.
So let's correct it.

As a freebie, let's define that function as static as it is.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-06 20:00:20 +03:00
Jordan Yates
f047a412e0 modem: cmux: auto calculate work buffer sizes
Automatically size the CMUX work buffers based on
`CONFIG_MODEM_CMUX_MTU`. This eliminates a Kconfig variable that would
otherwise need to manually be kept in sync. The option to extend the
size of these buffers is still provided through
`CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 09:37:26 +02:00
Jordan Yates
e15a65ca23 cellular: update access technologies
Update the defined access technologies to align with the 3GPP standard
TS 27.007. Definitions were copied from version v18.6.0.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 09:37:00 +02:00
Jilay Pandya
215df9f320 tests: stepper_api: check is_moving in stepper_api tests
add is_moving check to already existing stepper_api move_by
and move_to tests.
delete corresponding redundant test cases from drv84xx

bugfixes in step_dir_stepper_common.c
- start_stepping shall return 0 instead of return ret since
timing_source_start can return 1 depending on which timing
source in selected
- stop timing source before triggering steps_completed event

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-10-06 09:36:35 +02:00
Jilay Pandya
ee909efaf8 tests: stepper_api: drop test_run_zero_step_interval_correct_position
Setting 0 as microstep interval is invalid. If microstep_interval is
not set then the motion related functions should return -EINVAL.

drop test_run_zero_step_interval_correct_position

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-10-06 09:36:35 +02:00
Ali Hozhabri
51fc4405ac drivers: bluetooth: hci: Add PM support to the STM32WB0x HCI driver
Add PM support to the STM32WB0x Bluetooth HCI driver.

Implement PM event register to wake up the device for its BLE events.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
e4a8b272ec drivers: serial: Enable UART wake-up line in STM32
Enable UART wake-up line in STM32 driver.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
85318a9e19 soc: st: stm32: Provide PM support for STM32WB0x
Provide PM support, specifically suspend-to-ram, for STM32WB0x.

Enable STM32_RADIO_TIMER Kconfig parameter when PM is set.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
bdb41c0ebd drivers: timer: Enable STM32WB0_RADIO_TIMER Kconfig parameter
Use radio timer as the system timer when Bluetooth is used.

Modify CMakeLists.txt to compile radio timer driver when
STM32WB0_RADIO_TIMER is enabled.

Remove the common parts from hci_stm32wb0.c that are present
in the radio timer driver.

Set and retrieve the appropriate value for SYS_CLOCK_TICKS_PER_SEC and
SYS_CLOCK_HW_CYCLES_PER_SEC respectively.

Define radio_timer node and its properties.

Enable radio_timer node in nucleo_wb0x boards.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
84f7098f8f drivers: timer: Provide radio timer driver for STM32WB0x SoCs
Provide radio timer driver for STM32WB0x SoCs.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
f9655654ab drivers: Fix the improper use of CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
Fix the improper use of CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC for STM32WB0
drivers due to the misunderstanding of its definition.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Fabio Baltieri
37717b229f sys: util: rename Z_MIN Z_MAX Z_CLAMP to min max and clamp
Rename these three macros to an unprefixed lower-case variant. This is
normally not done for Zephyr macros (see container_of) but in this case
it seems like a good idea to adopt the lowercase names to:

1. have the same convention as the equivalent Linux macros, helping devs
   working cross project recognizing (mis)use patterns.
2. make it somewhat intuitive that the lowercase ones are meant to be
   used in functions while the uppercase ones are to be used for static
   evaluation.

Add few c++ guards to avoid colliding with std::min and std::max.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Loic Domaigne
0dddf35b40 drivers: mfd: axp192 fix EXTEN switch control value
Currently, EXTEN switch control (mapped to GPIO5) is always 0, due to a bug
in the shift value. This has been reported in Coverity CID 353647.

Following the AXP192-X Datasheet, the EXTEN switch control status is
given by bit 2 of the register 10h. If "GPIO5" corresponds to EXTEN
Switch control (AXP192_GPIO5_OUTPUT_MASK is 0x04U), then the shift
AXP192_GPIO5_OUTPUT_SHIFT should be 2, not 3.

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-10-03 21:13:31 -04:00
Sylvio Alves
b96687170f driver: led_strip: do not set uart supported
Let the vendor driver defines whether ASYNC is supported.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-10-03 21:07:33 -04:00
Michał Stasiak
ccef0cf132 drivers: pinctrl: nrf: use HAL defines
Replaced MDK symbols with defines from HAL.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-10-03 21:07:13 -04:00
Daniel Baluta
54545430e4 drivers: sai: Fix compile time error with clang
After commit 524b72ce40 ("toolchain: llvm: Provide working
BUILD_ASSERT macro") when compiling with clang we have actual
checks and a real assert check using _Static_assert.

Now, when compiling with clang (used by Xtensa internal toolchain)
we get the following error.

$ zephyr/drivers/dai/nxp/sai/sai.c:968:29: error: static_assert expression
 is not an integral constant expression

We get this in asserts like this:

BUILD_ASSERT(SAI_DLINE_COUNT(inst) != -1, "...").

This expands to (reduced the macro to easier understand the context):

_Static_assert(((((((I2S_Type *)(uintptr_t)(1493499904U))) ==
((I2S_Type *)(0x59040000u)))

... and clang complains that this is not a constant expression.

So, in order to fix the compile time error remove the compile time
asserts and replace them with runtime checks.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Fixes: commit 524b72ce40 ("toolchain: llvm: Provide working
BUILD_ASSERT macro")
2025-10-03 21:02:45 -04:00