Commit graph

25,525 commits

Author SHA1 Message Date
Remi Buisson
a4d863163b drivers: sensor: icp101xx: Add icp101xx support
Use official TDK Invensense driver for icp101xx sensor in tdk_hal module.

Signed-off-by: Remi Buisson <remi.buisson@tdk.com>
2025-02-07 07:38:06 +01:00
Gerson Fernando Budke
f2fa8f965e drivers: rtc: sam0: Add realtime clock driver
Add Atmel sam0 rtc calendar driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-02-07 07:37:56 +01:00
Gerson Fernando Budke
fb6079999d dts: rtc: sam0: Add clock properties
Add properties to differentiate the timer counter operating modes. This
properties are necessary to spetialize the driver to be used as a normal
16/32-bit counter or to provide the clock/calendar functions.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-02-07 07:37:56 +01:00
David Leach
50a044a33d drivers: sensor: fxls8974: fix size misalignment memory access
Coverity identified out-of-bounds access. A uint8_t being cast to
an enum is undefined in that the enum can be allocated 4bytes.

Change the internal function to use the base type of the variable,
uint8_t to avoid potential compiler size alignement problems.

Fixes #81927

Signed-off-by: David Leach <david.leach@nxp.com>
2025-02-07 02:24:17 +01:00
Tom Hughes
57f38844ee drivers: mfd: mfd_adp5585: Fix -Wsometimes-uninitialized warning
When building with clang it warns:

drivers/mfd/mfd_adp5585.c:59:6: error: variable 'reg_int_status' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
        if (ret == 0) {
            ^~~~~~~~
drivers/mfd/mfd_adp5585.c:70:7: note: uninitialized use occurs here
        if ((reg_int_status & ADP5585_INT_GPI)
             ^~~~~~~~~~~~~~    && device_is_ready(data->child.gpio_dev)) {
drivers/mfd/mfd_adp5585.c:59:2: note: remove the 'if' if its condition
is always true
        if (ret == 0) {
        ^~~~~~~~~~~~~~
drivers/mfd/mfd_adp5585.c:54:24: note: initialize the variable
'reg_int_status' to silence this warning
        uint8_t reg_int_status;
                              ^
                               = '\0'

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-07 02:23:10 +01:00
Johann Fischer
ea3dbe99b3 drivers: udc_mcux_ehci: fix typo in transfer handler
If the to-host data stage length is less than that requested by the
host, but equal to or a multiple of MPS, the device should send a ZLP,
not receive it.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-06 17:46:42 +01:00
Kevin Wang
c6488fc5c6 drivers: flash: andes_qspi: check if spi is used as flash fetch device
XIP may indicate that the program is executed either in local memory
or flash. However, the SPI node is only used as a flash fetch device
when the program is executed in flash.
Therefore, optimize the related checks to ensure that when XIP is
enabled but the program is executed in local memory, the qspi flash
node can still be used.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2025-02-06 14:45:19 +01:00
Kevin Wang
72d7a0f548 drivers: flash: andes_qspi: Fix the bug when rx length exceeds 512 bytes
ATCSPI hardware limits single transfer to 512 bytes, so when reading
data over 512 bytes, it needs to be split into multiple transfers

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2025-02-06 14:45:19 +01:00
Dawid Niedzwiecki
3d372c048a drivers: flash: stm32h7: add support for blocking registers
Add support for blocking flash control registers and option bytes for
STM32H7 chips.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-02-06 14:45:06 +01:00
Dawid Niedzwiecki
def973f5b9 drivers: flash: stm32h7: add support for write protection
Add support for setting flash write protection per sector for STM32H7x
chips.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-02-06 14:45:06 +01:00
Dawid Niedzwiecki
4c6b097df3 drivers: flash: stm32h7: change place of memory barrier
Move the memory barrier to a function that commits option bytes.

This way the barrier doesn't have to be added before every call of the
commit_optb function.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-02-06 14:45:06 +01:00
Dawid Niedzwiecki
52f45b91a4 drivers: flash: stm32h7: change return value of write_opt
Change the return value of the write_opt function. If returns 0 if a
change of option bytes was not needed.

It gives callers of the function an information a commit of the option
bytes is needed.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-02-06 14:45:06 +01:00
Ibe Van de Veire
a21e9f02e6 drivers: dac: Add support for the SAM4S soc series
Add support for the SAM4S soc in the DACC driver.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2025-02-06 10:43:17 +01:00
Francois Ramu
3086c69fb8 drivers: clock control of stm32f4 serie w/o clk 48M on PLL I2S
Some stm32f4, like the sm32f411 mcu have clk 48M on the main PLL output q
Some stm32f4, like the sm32f412 mcu have clk 48M on the PLL I2S output q
This PR is for selecting the right one

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-02-06 10:42:36 +01:00
Kamil Krzyzanowski
6065ddb3b5 drivers: flash: spi_nor: make wait_until_ready erase delay configurable
The erase time varies between different SPI NOR flash chips.
Some have typical erase times in the 20-25ms range, at which point the
default 50ms poll interval means we get half the possible erase speed.
With slower memory, or larger erases, 50ms might not be a lot, but for
block erases, if we are unlucky we may end up polling just as the it's
about to finish erasing, and have to wait another poll interval.

Signed-off-by: Kamil Krzyzanowski <kamnxt@kamnxt.com>
2025-02-06 10:42:06 +01:00
Wajdi ELMuhtadi
03b075d35a drivers: sensor: wsen_pads_2511020213301: add sensor driver
Add wsen_pads_2511020213301 driver with
the corrected name and compatibility with
the hal update as well as added new features.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2025-02-06 07:45:13 +01:00
Konrad Sikora
6487b217ea drivers: sensor: Fix typos in TMAG5170 driver
Correct a couple of misspellings in the TMAG5170 sensor driver

Signed-off-by: Konrad Sikora <kontakt@konradsikora.pl>
2025-02-05 23:48:52 +01:00
Charles Dias
73afa0bcbe drivers: video: ov5640: add DVP support
Improve the ov5640 video driver to provide parallel interface (DVP) support

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2025-02-05 23:48:09 +01:00
Jonas Spinner
90b989cf0e drivers: sensor: st: add missing buffer size config
Previously, the Kconfig option CONFIG_STMEMSC_I3C_I2C_WRITE_BUFFER_SIZE
has been introduced to replace i2c_burst_write with i2c_write using a
buffer combining the address and data.
See commit 5f8da77ad3eaf0593107fd99253c1c13b3a98de0

Add missing buffer size config to stmemsc_i2c_write_incr to replace
fixed buffer size.

Signed-off-by: Jonas Spinner <jonas.spinner@burkert.com>
2025-02-05 21:01:34 +01:00
Armando Visconti
b6604f160c drivers/sensor: lis3mdl: fix lis3mdl_sample_fetch API
Fix a runtime bug when both CONFIG_LIS3MDL_TRIGGER and CONFIG_ASSERT
are set. The correct assertion should verify that sensor channel is
either SENSOR_CHAN_ALL or SENSOR_CHAN_MAGN_XYZ.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-02-05 21:01:18 +01:00
Mohammed Billoo
2850be690d drivers: sensor: ams/tsl2591: Don't check return code of initial reset
The TSL2591 driver fails to initialize because the sensor responds with a
NACK on the initial RESET. Although the datasheet from Adafruit claims that
this is operation should be valid (RESET is part of the CONTROL register),
other sample non-Zephyr drivers provided by Arduino don't explicitly reset
the sensor on initialization (see
https://github.com/adafruit/Adafruit_TSL2591_Library/blob/master/Adafruit_TSL2591.cpp).
Thus, the assumption is that when the sensor is reset via software, it
doesn't respond to an ACK.

After removing the check for this initial RESET, the driver initializes
successfully.

Signed-off-by: Mohammed Billoo <mab@mab-labs.com>
2025-02-05 21:00:36 +01:00
Marek Matej
6e6ab2f8ab soc: espressif: Remove ESP heap and use heap adapter
Remove ESP heap from the sources. System heap is default heap.
Use heap adapter layer to configure used heap.
Use MEM_POOL memory request config to Wi-Fi and Bluetooth drivers.
Update the Wi-Fi and BLE memory needs.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-02-05 17:49:54 +01:00
Sven Ginka
e38f3e1c3c drivers: mdio: sy1xx add support for mdio
Add mdio support for the sensry soc sy1xx.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-02-05 17:49:40 +01:00
Hieu Nguyen
3a7ccecdcd drivers: pwm: Initial support for RZ/G3S
Add PWM driver support for Renesas RZ/G3S

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-02-05 17:49:00 +01:00
Martin Hoff
4a31f0227c driver: serial: silabs: implement asynch usart with dma
First implementation of asynchronous usart driver with dma support.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-02-05 15:02:35 +01:00
Martin Hoff
6f1debe6e7 driver: dma: silabs: Add silabs_ldma_block_append function
This function allows to not restart DMA engine for driver that gives
new buffer to the DMA engine while a transfer is ongoing.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-02-05 15:02:35 +01:00
Martin Hoff
c901551825 driver: dma: silabs: Add signal binding to support P2M and M2P transfer
Improve the silabs ldma driver to support P2M and M2P transfer. It also
adds signal binding to support source request binding in the dts.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-02-05 15:02:35 +01:00
Johan Hedberg
4618a272ce drivers: serial: silabs: Fix build for efm32wg_stk3800/efm32wg990f256
The gecko_uart.c driver supports both `silabs,gecko_uart` and
`silabs,gecko_usart` compat strings, however `PM_DEVICE_DT_INST_DEFINE()`
was missing when defining `uart` type instances. The
efm32wg_stk3800/efm32wg990f256 platform enables by default one
`gecko_uart` DT node and no `gecko_usart` nodes. This results in the
following build warning/error:

uart_gecko.c:673:12: warning: 'uart_gecko_pm_action' defined but not used

Add the missing call to `PM_DEVICE_DT_INST_DEFINE()`.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-02-05 14:58:28 +01:00
Tomasz Moń
9e050cd325 drivers: udc_nrf: Do not submit buffer more than once
When the UDC buffer gets submitted it should no longer reside in the
endpoint queue. While this commit does not address the underlying issue
of not being able to start transfer for whatever reason, it prevents the
problem from cascading into buffer double completion (e.g. receive
buffer double free in UAC2).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-02-05 12:25:20 +01:00
Tomasz Moń
43880b930c drivers: udc_dwc2: Workaround hibernation exit glitch
DWC2 otg versions earlier than 5.00a are subject to randomly occurring
glitch on Hibernation Exit by Host Initiated Resume, Hibernation Exit by
Device Inititated Resume and Hibernation Exit by Host Initiated Reset.
When the glitch happens the device address is not correctly restored.
If the address is not correctly restored then the tokens addressed to
the device will timeout leading to host resetting the bus.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-02-05 10:21:13 +01:00
Tomasz Moń
b963c7d5eb drivers: udc_dwc2: Set bit 17 if needed on Hibernation Exit
Programming Guide states that bit 17 on PCGCCTL writes should be set if
the controller was enumerated for High Speed operation. Add the missing
bit set to adhere to the Programming Guide.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-02-05 10:21:13 +01:00
Peter Johanson
16b1d3c29e drivers: display: st7789v: Add ready time to startup
Add additional property to allow a configurable delay to the display
initialization to allow the st7789v to be ready to receive commands.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2025-02-05 10:20:52 +01:00
Duy Nguyen
633c5afb07 driver: eth: Fix phy-connection-type setting on RA8 ethernet
This commit fix the pin function configuration for mii and rmii
setting of Renesas RA8 ethernet driver
Correct pin function setting for mii is
PFENET = (uint8_t)(0x1 << R_PMISC_PFENET_PHYMODE0_Pos);
and rmii is:
R_PMISC->PFENET = (uint8_t)(0x0 << R_PMISC_PFENET_PHYMODE0_Pos);
Change code to intialize ping in driver init function, change
method of getting and checking via enum index of device tree.
Add build assert for invalid phy type.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-02-05 08:16:02 +01:00
Stephan Linz
98cf437d7a drivers: sensor: maxim,ds3231: avoid compilation error
As the C language treats 'cases' similar to 'labels' the following
error can also occur when using switch statements when it encounters
a declaration immediately after a label:

drivers/sensor/maxim/ds3231/ds3231.c:77:3: error: a label can only
        be part of a statement and a declaration is not a statement
   77 |   const uint16_t raw_temp = data->raw_temp;
      |   ^~~~~

Signed-off-by: Stephan Linz <linz@li-pro.net>
2025-02-05 01:16:03 +01:00
Stephan Linz
cca2053448 drivers: rtc: maxim,ds3231: avoid compilation error
Because of wrong integer type syntax following error occurred:

drivers/rtc/rtc_ds3231.c:361:76: error: unknown type name 'u'
  361 | static int rtc_ds3231_alarm_get_supported_fields(
      |                    const struct device *dev, u int16_t id,
      |                                              ^

Signed-off-by: Stephan Linz <linz@li-pro.net>
2025-02-05 01:16:03 +01:00
Stephan Linz
2a793cf0f8 drivers: rtc: maxim,ds3231: avoid warnings about unused code
Compile warnings occurred in common standard use case
w/o RTC alarm and update.

Warning was:

drivers/rtc/rtc_ds3231.c: In function 'rtc_ds3231_init':
drivers/rtc/rtc_ds3231.c:808:33: warning: unused variable 'data'
                 [-Wunused-variable]
  808 |         struct rtc_ds3231_data *data = dev->data;
      |                                 ^~~~
drivers/rtc/rtc_ds3231.c: At top level:
drivers/rtc/rtc_ds3231.c:195:12:
        warning: 'rtc_ds3231_get_ctrl_sts' defined but not used
                 [-Wunused-function]
  195 | static int rtc_ds3231_get_ctrl_sts(const struct device *dev,
      |                                    uint8_t *buf)
      |            ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Stephan Linz <linz@li-pro.net>
2025-02-05 01:16:03 +01:00
Jilay Pandya
8272b36b5b drivers: stepper: tmc50xx: extend tmc5041 to tmc50xx
Extend tmc5041 to tmc50xx in order to accomodate tmc5072

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-02-05 01:14:47 +01:00
Ilia Kharin
a0fddf6050 drivers: display: st7789v: Improve error handling
Add return error handling and logging in the driver in order to ease
debugging.

Signed-off-by: Ilia Kharin <akscram@gmail.com>
2025-02-05 01:13:12 +01:00
Måns Ansgariusson
36b3e9285d drivers: rtc: Add support for Epson RX8130CE RTC driver
This commit introduces a driver for the Epson RX8130CE rtc.
The driver provides the following functionalities:

- Time setting and retrieval
- Periodic update interrupt support (1Hz)
- Alarm setting and retrieval (minute, hour, day)
- Frequency output control (32.768kHz, 1.024kHz, 1Hz, off)
- Power management (automatic power switching & battery charging)
- Calibration setting and retrieval

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-02-05 01:12:41 +01:00
Iuliana Prodan
47839f8e34 drivers: mbox: imx: allow sending empty message
Allow sending empty messages - with size 0 or
msg data NULL.
In some cases these kind of messages are just an ack
(for example, in openamp_rsc_table sample).

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2025-02-05 01:12:17 +01:00
Michał Stasiak
a71f042a36 drivers: pwm: nrfx: 0/100% duty for PWM120
Fast PWM120 prevents GPIO from driving pin with low/high
state when PWM duty is 0% or 100%. In such case, regular
PWM signal generation needs to be used.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-02-05 01:12:02 +01:00
Aziz Sellami
02b2d5563c drivers: counter: gpt: fix init sequence
The current code is enabling the IRQ before calling the GPT_Init()
function which (beside being incorrect by design) opens the door to a
spurious irq to cause the isr function call before the init.  This
corner case can be easily observed for example when running the code
inside a hypervisor/jailhouse where restarting the cell without
previous proper exit (device deinit) can cause a crash (null pointer
dereference) when an IRQ is triggered before the init.

Signed-off-by: Aziz Sellami <aziz.sellami@nxp.com>
2025-02-04 20:26:37 +01:00
Marouen Ghodhbane
c7d9cc1f47 drivers: counter: tpm: fix init sequence
The current code is enabling the IRQ before calling the TPM_Init()
function which (beside being incorrect by design) opens the door to a
spurious irq to cause the isr function call before the init.  This
corner case can be easily observed for example when running the code
inside a hypervisor/jailhouse where restarting the cell without
previous proper exit (device deinit) can cause a crash (null pointer
dereference) when an IRQ is triggered before the init.

Signed-off-by: Marouen Ghodhbane <marouen.ghodhbane@nxp.com>
2025-02-04 20:26:37 +01:00
Aurelie Fontaine
262008a4a4 drivers: sensor: icm42670: fix serif type
Fix correct use of serif_type if the driver is compiled with both SPI
and I2C enabled by storing it in device config.

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2025-02-04 15:05:40 +00:00
Khaoula Bidani
fa2a3c39ff drivers : flash: replace dt_nodelabel_has_prop()in xspi
Replace dt_nodelabel_has_prop() with
dt_compat_any_has_prop() in Kconfig.stm32_xspi

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-02-04 15:01:13 +01:00
Khaoula Bidani
cd004dd84f drivers : flash: replace dt_nodelabel_has_prop()in qspi
Replace dt_nodelabel_has_prop() with
dt_compat_any_has_prop() in Kconfig.stm32_qspi

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-02-04 15:01:13 +01:00
Khaoula Bidani
0c9c6014fa drivers : flash: replace dt_nodelabel_has_prop()
Replace dt_nodelabel_has_prop() with
dt_compat_any_has_prop() in Kconfig.stm32_ospi

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-02-04 15:01:13 +01:00
Chris Desjardins
18d30e3535 drivers: i2s: Make the stm32 i2s driver use a msgq
Currently uses a home grown ringbuffer and a semaphore with irq locks.

Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
2025-02-04 12:02:52 +01:00
Karol Lasończyk
f551b2dc00 drivers: hwinfo: Support for reset reasons in nRF54H20
Adding support for reset reasons in the nRF54H20 SoC.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2025-02-04 11:56:15 +01:00
Vebjorn Myklebust
4d146175f9 drivers: serial: Add support for cc23x0 UART
Add support for UART to cc23x0 SoC.

Signed-off-by: Lars Thalian Morstad <l-morstad@ti.com>
Signed-off-by: Vebjorn Myklebust <v.myklebust@ti.com>
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
Signed-off-by: Julien Panis <jpanis@baylibre.com>
2025-02-04 11:56:05 +01:00