Commit graph

23353 commits

Author SHA1 Message Date
Yicheng Li
dea8cd3fcf dma_mcux_lpc: Fix descriptor address conversion when used by DSP
The SDK FSL DMA driver converts descriptor addresses to DMA's address
space when linking descriptors. The Zephyr dma_mcux_lpc driver is
missing the inverse conversion when dereferencing the linked next
descriptor pointer.

This isn't a problem when this driver is used on the M33 core
of the MIMXRT595S because the M33 can access the address space
of the DMA (0x20000000+). But when the Fusion F1 DSP core uses
this driver, the DSP cannot access the DMA's address space
so the inverse conversion is needed.

Signed-off-by: Yicheng Li <yichengli@google.com>
2025-06-17 07:23:31 +02:00
Armando Visconti
a2d230bd88 drivers/sensor/: lis2dux12: support FIFO modes
Support three different FIFO contents which are selectable through
a new DT property, fifo-mode-sel, which may be set to one of the
following values:

    - 0x0 # 1x Accelerometer @12bit and 1x temperature @12bit samples
    - 0x1 # 1x Accelerometer @16bit sample
    - 0x2 # 2x Accelerometer @8bit samples (previous and current)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-06-17 07:23:23 +02:00
Benjamin Cabé
1787e5cdab drivers: misc: fix condition in gpio_ra_interrupt_unset function
Updated the condition in the gpio_ra_interrupt_unset function to use a
logical OR instead of AND, since it should return if either port_num or
pin is not the same as the current callback.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 07:23:04 +02:00
Hao Luo
e05abfdcf4 drivers: mspi: ambiq: optimize ambiq mspi device pm
This commit optimizes the device pm for ambiq mspi driver
by adding pinctrl sleep/resume.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-06-17 07:22:44 +02:00
Hao Luo
373ab289ce drivers: spi: ambiq: optimize ambiq spi device pm
This commit optimizes the device pm for ambiq spi driver
by adding pinctrl sleep/resume.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-06-17 07:22:44 +02:00
Hao Luo
37134f5a4e drivers: i2c: ambiq: optimize ambiq i2c device pm
This commit optimizes the device pm for ambiq i2c driver
by adding pinctrl sleep/resume.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-06-17 07:22:44 +02:00
Hao Luo
fe632259c9 drivers: uart: ambiq: optimize ambiq uart runtime pm
This commit optimizes the runtime pm for ambiq uart driver
by adding pinctrl sleep/resume.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-06-17 07:22:44 +02:00
Alexander Apostolu
2e7ec2bc29 drivers: sensor: adi: adxl372: Remove logically dead code
Remove logically dead if and else-if conditions as shown by the static
analysis, replacing with the else statement.

When data_opt is assigned to the MIN of fifo_wmark_cfg and fifo_full_cfg,
both those variables will be non-NULL as an earlier condition ensures the
function returns if either one of the variables is NULL before assigning
to data_opt.

Signed-off-by: Alexander Apostolu <apostolu240@gmail.com>
2025-06-17 07:22:34 +02:00
Armando Visconti
afe0abea42 sensor: lsm6dsv16x: add SENSOR_TRIG_DATA_READY trigger
Add SENSOR_TRIG_DATA_READY trigger support to RTIO streaming.
Currently it just handle XL drdy.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-06-17 07:21:04 +02:00
Benjamin Cabé
c4ed1c01eb drivers: sensor: tdk: fix double tap trigger handler
Ensure that the appropriate trigger is passed when a double tap is
detected.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 14:15:31 -04:00
Ioan Dragomir
92a11405f7 drivers: can: Add CAN support for max32662
Adapt MAX32690 driver to use Wrap_MXC_CAN_Init to handle differences
in the MSDK API (see analogdevicesinc/msdk#1306) between the
MAX32690 and MAX32662.

can_driver_api.timing_min required phase_seg1 >= 3 and phase_seg2 >= 2
when configuring CAN bit timing. Both microcontrollers covered by this
driver (MAX32662, MAX32690) support values down to 1 for both of these
timing parameters.

Refer to the docs for registers CAN_BUSTIM1, CANn_BUSTIM1.

Add a can0 node to the MAX32662 dtsi.

Signed-off-by: Ioan Dragomir <ioan.dragomir@analog.com>
2025-06-16 14:13:59 -04:00
Anıl Kara
7f3b002210 drivers: can: Add max32xxx CAN driver
This commit adds CAN driver for max32xxx.

Signed-off-by: Anıl Kara <anil.kara@analog.com>
2025-06-16 14:13:59 -04:00
Benjamin Cabé
a3aa06521e drivers: haptics: drv2605: drop redundant include
haptics.h was being included twice.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 14:04:22 -04:00
Benjamin Cabé
0017c5bb33 drivers: haptics: handlers: propagate stop_output return value
Actually propagate the return value of haptics_stop_output.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 14:04:22 -04:00
Benjamin Cabé
005377b4c5 drivers: dac: adopt SHELL_HELP
Adopt SHELL_HELP macro for dac_shell

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 14:03:57 -04:00
Fabrice DJIATSA
eccf541ea6 drivers: spi: stm32: dynamically update spi word/frame size
Update the source_data and dest_data sizes with the frame size
in bytes before performing the transfer.
With these changes, we can handle cases where the buffers switch
between 8-bit and 16-bit modes.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-06-16 14:03:05 -04:00
Fabrice DJIATSA
994efc0b92 drivers: spi: update error type to skip word_size testcases
Workaround to avoid getting the -EFAULT (14) error when running
the test_spi_word_size_x (x = 7, 9, 24) test cases:
Since these testcase configurations aren't supported, update
the error type to ENOTSUP to allow skipping the test cases using ztest.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-06-16 14:03:05 -04:00
c37abf115d drivers: dma: fix the WCH DMA transfer width
The driver treats the `source_data_size` and `dest_data_size` as a
width in bits and converts 8 bits to 1, 16 bits to 2, and 32 bits to 3.

This should be a width in bytes with 1 byte mapping to 0, 2 bytes to
1, and 4 bytes to 3.

Note that this preserves the current behaviour of silently accepting
invalid transfer bit widths.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-06-16 14:01:54 -04:00
Tien Nguyen
5599bc2ecb drivers: gpio: Add support for RZ/V2N
Add support for RZ/V2N

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
2025-06-16 14:00:22 -04:00
Khaoula Bidani
70ebb0a6a3 drivers: flash: add stm32u3 devices
Introduce the stm32u3 serie to the the existing flash driver
It is based on the stm32l5 model.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-06-16 13:59:38 -04:00
Khaoula Bidani
a9aa341ed5 drivers: gpio: fix gpio warning
Implement conditional compilation to avoid the warning:
- Use LL_PWR_EnableVDDIO2() for STM32U3 series.
- Use LL_PWR_EnableVddIO2() for other series.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-06-16 13:59:38 -04:00
Khaoula Bidani
6ac4b20e2b drivers: clock_control: Add STM32U3XX clock support
add clock support for STM32U3X SoC series.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-06-16 13:59:38 -04:00
Amneesh Singh
9814590eb3 drivers: pinctrl: make ti_k3 multi-instance
Some devices have multiple pinctrl regions; for instance, main pinctrl and
mcu pinctrl. Currently there can only be a single pinctrl instance picked
form a DT label. This patch makes the pinctrl driver initialise one
instance for each node with correct compatible string.

Signed-off-by: Amneesh Singh <a-singh7@ti.com>
2025-06-16 13:59:09 -04:00
Benjamin Cabé
c2d52c7f4b drivers: ethernet: remove stray semicolon vnd,ethernet
Fix trivial typo

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 10:43:20 -04:00
Benjamin Cabé
bc03f23d50 drivers: dma: fix off-by-one error in silabs LDMA
Channel numbers are 0-based so a channel number equal to the number of
channels is invalid.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 10:43:00 -04:00
Alvis Sun
2027d97dac drivers: clock_control: add validation for SYS_CLOCK_HW_CYCLES_PER_SEC
Check whether the value of SYS_CLOCK_HW_CYCLES_PER_SEC is valid.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2025-06-16 14:13:55 +02:00
Tomasz Bursztyka
3703027b42 i2c: Add target related commands to the shell module
For testing/debugging purposes, it will be possible then to register
or unregister an i2c target.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
Co-authored-by: Hans Binderup <habi@bang-olufsen.dk>
2025-06-16 14:13:13 +02:00
Tim Lin
a62f157118 drivers/espi: ite: Add it51xxx compatibility with it8xxx2 support retained
The driver originally supported only it8xxx2 series. This updates
introduces compatibility allow it to also support it51xxx series
with minimal changes.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-06-16 14:12:44 +02:00
Van Petrosyan
b12717bee1 sensor: lis2dh: add device runtime PM support
Registers driver with pm_device_driver_init(). Moved
chip init routine into separate function to be called
from PM_DEVICE_ACTION_TURN_ON. Added a delay after
power-up.

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-06-16 14:12:32 +02:00
Jacky Lee
47e43d552e drivers: serial: ns16550: Fix TX IRQ not triggered when FIFO is empty
When uart_ns16550_irq_tx_enable() is called and the TX FIFO is already
empty, no new interrupt is generated, causing data transmission to stall
in some cases. This patch introduces a workaround to simulate an ISR
callback if the FIFO is empty when enabling the TX IRQ.

Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
2025-06-16 14:12:12 +02:00
Rene Colato
7fa815c929 regulator: Updated function call use flag that initalizes GPIO.
Fixes bug where GPIO_ACTIVE_LOW would not initialize properly.

Signed-off-by: Rene Colato <rcolato@boston-engineering.com>
2025-06-16 14:12:03 +02:00
Ruibin Chang
962d8dfd18 drivers/counter/it8xxx2: fix loss timer interrupt potential risk
1.correct timer register control flow
2.select timer interrupt rising edge trigger, instead of default
level trigger

Stress test: top timer fires interrupt every 300ms for 18 hours.
The result is that we don't lose any interrupts.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2025-06-16 08:31:17 +02:00
Benjamin Cabé
f3c43cc393 drivers: hwinfo: esp32: fix reset cause handling for ESP_RST_PANIC
Added a missing break statement for the ESP_RST_PANIC case.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 04:27:33 +02:00
Benjamin Cabé
3b918cc9da drivers: sensor: adopt SHELL_HELP
Adopt SHELL_HELP macro for sensor shell

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-13 15:41:58 -07:00
Jérôme Pouiller
f6f6196cf0 drivers: wifi: siwx91x: Also update interface state on AP
It seems there is no functional impact, but it makes sense to also update
the state of the interface when AP is started/stopped.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-13 15:41:27 -07:00
Jérôme Pouiller
b0b197fd17 drivers: wifi: siwx91x: Fix SLAAC other configuration issues
The interface was properly set "dormant" on disconnect. However on startup,
it arrived in the system with "awake" status. Hence, some configuration
frames were sent before the interface was connected. Then, when the
interface was marked awake after the connection, the frames were not sent
again since the operational mode did not changed.

Therefore, Router Solicitations were not send, the Router Advertisements
were not received and the IPv6 address was not set.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-13 15:41:27 -07:00
Sylvio Alves
2742eb4dc7 driver: gpio: esp32: move config to iram
Make gpio configuration in IRAM area to speed up
access.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-13 15:40:42 -07:00
Benjamin Cabé
4ad921660f drivers: gpio: rpi_pico: fix typo in gpio_set_dir_masked_n
gpio_set_dir_masked_n on port 1 should manipulate gpio_hi_oe_togl, not
gpio_oe_togl

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-13 15:39:50 -07:00
Benjamin Cabé
d9dedff71a drivers: gpio: rpi_pico: route ISR to the right irq_ctrl
gpio_rpi_isr() always addressed io_bank0->proc0_irq_ctrl, so any
interrupts taken while code was running on core 1 were invisible and
left pending.
Use get_core_num() to pick proc1_irq_ctrl when the ISR executes on core
1, ensuring callbacks fire from both cores.
Also fix stray `iobank0_hw` symbol for the correct `io_bank0_hw`.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-13 15:39:50 -07:00
Benjamin Cabé
67b4055d57 drivers: gpio: rpi_pico: fix call to gpio_set_dir
Ensure gpio_set_dir() receives GPIO_IN or GPIO_OUT by mapping
INIT_{LOW,HIGH} flags explicitly, instead of passing raw bitmasks.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-13 15:39:50 -07:00
Benjamin Cabé
d1fc8c7f29 drivers: gpio: rpi_pico: add missing offsets
Fixed several occurrences of offset not being calculated in case
multiple GPIO ports are present.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-13 15:39:50 -07:00
Benjamin Cabé
b10d56e143 drivers: gpio: rpi_pico: fix bad RP2350 ifdef
Fix bad ifdef and typo in rp2350 gpio_configure code.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-13 15:39:50 -07:00
Benjamin Cabé
e10904eb3c drivers: pinctrl: eos_s3: fix logical OR in pinctrl_eos_s3_configure_pin
Fix incorrect use of bitwise OR operator when checking pull-up and
pull-down resistor configuration.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-13 15:37:30 -07:00
Maochen Wang
02b5edd7d6 drivers: wifi: nxp: return error for unsupported AP bandwidth
Starting SAP should return failure, if the bandwidth is not supported
by the Wi-Fi chip.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-13 15:37:01 -07:00
Martin Gysel
812d33b7ab drivers: flash_stm32_qspi: fix conditional to assing jedec_id property
the jedec_id field is only available if CONFIG_FLASH_JESD216_API is set

Signed-off-by: Martin Gysel <me@bearsh.org>
2025-06-13 10:21:00 -07:00
Aksel Skauge Mellbye
651ddd69af drivers: adc: silabs: Don't fail to init if clock is on
It is not an error if the clock source is already enabled. This
may happen if a bootloader has used the peripheral and not
de-initialized it before booting the application.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-06-13 10:18:26 -07:00
Benjamin Cabé
cd78920785 drivers: pwm: adopt SHELL_HELP
Adopt SHELL_HELP macro for pwm_shell

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-13 10:17:55 -07:00
Aksel Skauge Mellbye
5878070178 drivers: spi: silabs: Don't fail to init if clock is on
It is not an error if the clock source is already enabled. This
may happen if a bootloader has used the peripheral and not
de-initialized it before booting the application.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-06-13 10:17:39 -07:00
Benjamin Cabé
b35ba2d40e drivers: video: adopt SHELL_HELP
Adopt SHELL_HELP macro for video_shell

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-13 10:17:08 -07:00
Aksel Skauge Mellbye
dadd657d89 drivers: serial: silabs: Don't fail to init if clock is on
It is not an error if the clock source for the UART is already
enabled. This may happen if a bootloader has used the UART and
not de-initialized it before booting the application.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-06-13 10:15:36 -07:00