Commit graph

23353 commits

Author SHA1 Message Date
Krzysztof Chruściński
972ec824f1 drivers: serial: nrfx_uarte: Add support for higher baudrates
nrf54x devices have UARTE instance capable of using baudrate higher
than 1M. Higher baudrates does not have predefined values for
BAUDRATE register. A formula can be used to calculate BAUDRATE
value that shall be used for desired baudrate. Add UARTE_ANY_HIGH_SPEED
macro which is set when high speed is enabled (uart00 in nrf54lx or
uart120 in nrf54h20). For high speed instance use formula for getting
value that shall be written to BAUDRATE register.

When runtime configuration is not used then same formula is used to
calculate fixed BAUDRATE value.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-03 11:17:31 +01:00
Krzysztof Chruściński
1573be5e9f drivers: serial: nrfx_uarte: Rename FAST to FAST_PD
Rename UARTE_ANY_FAST to UARTE_ANY_FAST_PD. There are 2 types of
'fast' UARTE instances. In nrf54h20 instance uart120 is in fast
power domain that requires additional power and clock management
of that domain. In nrf54lx fast uart00 instance does not require
that. Add _PD to indicate fast power domain.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-03 11:17:31 +01:00
Christian Galante
a1aaa6b8f2 drivers: comparator: implement the silabs_acmp compatible driver
This implements the comparator driver for silabs acmp peripherals
using the silabs,acmp compatible binding.

Signed-off-by: Christian Galante <christian.galante@silabs.com>
2025-02-03 11:16:57 +01:00
Ajay Neeli
b7d13ea6ca serial: xilinx: uartlite: update irq_enable to use DT_INST_IRQN_BY_IDX
Update the irq_enable macro to use the DT_INST_IRQN_BY_IDX helper.

This ensures proper handling of IRQ numbers in systems with multi-level
interrupt configurations.

Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
2025-02-03 09:05:19 +01:00
Benjamin Cabé
d29798f3cf drivers: pwm: sam0: Add missing semicolon in PWM initialization macro
Add missing ; that was causing the driver to fail compiling.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-03 01:03:09 +01:00
Benjamin Cabé
74cccfa1dc drivers: dac: sam: Fix typo in BUILD_ASSERT
Fixed a typo in BUILD_ASSERT macro causing driver to effectively fail to
compile as seen in:
west twister -p sam_v71_xult/samv71q21b -s drivers.dac.api

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-31 21:43:45 +01:00
Martin Hoff
2594eae6f1 drivers: uart: silabs: revert pm deletion for usart_gecko
Revert delete of the uart_gecko_pm_action function.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-01-31 19:51:27 +01:00
Algot Axelzon
3fd7f89f64 drivers: usb: stm32: add support for incomplete isochronous in transfer
Implement the HAL callback function `HAL_PCD_ISOINIncompleteCallback` in
which the endpoint write semaphore is given back, thus allowing subsequent
writes to the endpoint after an isochronous transfer has been incompleted
(not read by the host).

This approach was chosen because it is similar to what is done in the
already implemented HAL callback `HAL_PCD_DataInStageCallback` which also
gives the write semaphore back but also calls the endpoint callback
function.

The reason for not also calling the endpoint callback function is because I
do not see any appropriate cb_status (`enum usb_dc_ep_cb_status_code`) to
pass. If passing `USB_DC_EP_DATA_IN` is okay even though "In transaction
done on this EP" is not completely true, then this should also be added.

This has been tested by setting up an isochronous endpoint, writing to it,
and verify that `HAL_PCD_DataInStageCallback` is called and subsequent
writes are possible.

Signed-off-by: Algot Axelzon <algot.axelzon@satcube.com>
2025-01-31 19:51:00 +01:00
Sven Ginka
8d07f6b4d6 drivers: entropy: sy1xx add support for trng
Add entropy support for the sensry soc sy1xx, based
on trng.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-01-31 19:50:43 +01:00
Francois Ramu
73ab22e8ba drivers: clock control of some stm32f4x has no 48MHz from PLL i2s
Remove the LL_RCC_PLLI2S_ConfigDomain_48M for the stm32f4
w/o Q divider on the PLLI2S to configure the PLL48CK

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-01-31 16:12:03 +01:00
Francois Ramu
bba13ae22a drivers: clock control: some stm32f4 have no div-q on there plli2s
Check that the plli2s has a DIV-Q output or not. That depends
on the PLLi2S of some stm32F4xx devices

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-01-31 16:12:03 +01:00
Jamie McCrae
3142c51d87 drivers: kconfig: Fix menu items
Fixes items that are not properly in menus or have Kconfig
selections that make no sense

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-01-31 11:50:12 +01:00
Jamie McCrae
560db8509a drivers: kconfig: Fix bleeding options
Fixes a multitude of Kconfigs that wrongly appear on devices
where support is literally impossible

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-01-31 11:50:12 +01:00
Pisit Sawangvonganan
0ef38013b7 drivers: udc: stm32: update STM32_CLOCK_CHECK definition
Introduce `UDC_STM32_CLOCK_CHECK` Kconfig option since
`USB_DC_STM32_CLOCK_CHECK` was intended for use with `usb_dc_stm32.c`,
which is mutually exclusive with `udc_stm32.c`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-01-31 11:50:01 +01:00
Johan Hedberg
77a350efa7 drivers: bluetooth: silabs_efr32: Add support for vendor HCI extensions
Add a Kconfig option which can be used to enable vendor HCI extensions for
Silicon Labs EFR32 devices.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-01-31 09:40:33 +01:00
Terry Geng
49308e45d2 drivers: adc: ads1x4s0x: Add ADS124S0X support into existing drivers
Refactor code for ADS114S08 (12 ch, 16 bit) to accommodate ADS114S06
(6 ch, 16 bit), ADS124S06 (6 ch, 24 bit), and ADS124S08 (12 ch, 24 bit).

Signed-off-by: Terry Geng <terry@terriex.com>
2025-01-31 09:39:07 +01:00
Terry Geng
cbcb2d8f12 drivers: adc: ads1x4s0x: Rename files, preparing for adding new devices
Renamed ads114s0x/8 to ads1x4s0x.

Signed-off-by: Terry Geng <terry@terriex.com>
2025-01-31 09:39:07 +01:00
Terry Geng
43079c8086 drivers: adc: ads114s0x: Rename variables, preparing for adding new devices
Renamed ads114s0x/8 to ads1x4s0x.

Signed-off-by: Terry Geng <terry@terriex.com>
2025-01-31 09:39:07 +01:00
Sylvio Alves
e472fb603e drivers: adc: esp32: delete previous calibration curve
In case channel_setup is called with a new attenuation
config, make sure previous calibration scheme is deleted properly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-01-30 22:59:21 +01:00
Yasin Ustuner
d411b4f67b drivers: adc: Introduce AD7124 adc driver
This commit introduces ad7124 adc driver.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-30 20:33:10 +01:00
Lukasz Majewski
d0d68d6b0f drivers: net: ot: Provide structure instance for HDLC RCP context
Without this patch the hdlc_iface_init() function assigns to
ot_hdlc_rcp_context structure pointer (*ctx) value of 0, as in the
NET_DEVICE_DT_INST_DEFINE() preprocessor macro the 'data' field is
set to NULL.

Afterwards, the ctx->iface is set to iface address passed to the function
(as well as the ctx->ot_context is set).
Writing those values to address 0x0 is catastrophic to for example
mimxrt1020, which uses ITCM memory (mapped from 0x0) to store flash
handling functions, as those are used to XIP code directly from
SPI NOR memory (as mximxrt1020 doesn't have internal flash).

In this particular case - the flash_flexspi_nor_erase() function is mapped
(i.e. relocated) to ITCM's 0x0 address. Overwriting first 8 bytes of it
causes the SoC to enter "Precise data bus error" exception.

The fix is to define the static instance of struct ot_hdlc_rcp_context
and pass its address to the NET_DEVICE_DT_INST_DEFINE() macro. As a result
its storage is now in RAM, not ITCM.

This issue has been discovered on UART based HDLC RCP communication, but as
it also may be problematic on the NXP driver, this patch fixes it too.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2025-01-30 20:26:53 +01:00
Declan Snyder
62b911feea spi_nxp_lpspi: Rewrite driver, fix native chip sel
To fix the native hardware chip select, we need to rewrite this driver
to not use the MCUX SDK handle abstraction, which does not fit the
zephyr use case.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-30 20:26:36 +01:00
Declan Snyder
0bb7ccbb0c drivers: spi_context: Functions for remaining len
Add functions to get remaining length in the transfer. Refactor a bit to
avoid duplicate code for the for loop that is the same as in the total
length function.

The difference between the total length and left length function is that
the current buffer total length is counted in the former and the current
buffer remaining length is counted in the latter.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-30 20:26:36 +01:00
Declan Snyder
9966d29957 dts: nxp,lpspi: Fifo property and fix delay desc
Add properties for describing RX and TX fifo sizes.

Also reformat some descriptions and fix the description of the
transfer-delay property which was incorrect. Since zephyr spi bufs are
not continuous, every possible Zephyr LPSPI driver must use
continuous transfer mode, for which the meaning of this delay has
nothing to do with the chip select.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-30 20:26:36 +01:00
Aksel Skauge Mellbye
120691a155 drivers: pinctrl: silabs: Add support for analog bus allocation
The GPIO peripheral on Silabs Series 2 devices is responsible for
allocating analog buses to analog peripherals. Enable support for
this in the pinctrl driver. Since these bus allocations are not
digital pins, introduce a new property silabs,analog-bus for this
purpose.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-01-30 18:30:01 +01:00
Mahesh Mahadevan
85bdab00de soc: mimxrt1180: Add USB support
This was tested on the MIMXRT1180 EVK board

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-01-30 18:29:33 +01:00
Mahesh Mahadevan
c3533472c1 drivers: hwinfo: Add support for MIMXRT1180
Add HWINFO support for MIMXRT1180

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-01-30 18:29:33 +01:00
Marcio Ribeiro
c3b53d0fa3 soc: esp32xx: makes esp_console_init() calling conditional
Makes the esp_console_init() calling during hardware initialization
conditioned to CONFIG_ESP_CONSOLE

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-01-30 16:21:13 +01:00
Benjamin Cabé
ab9a2f52ba drivers: gpio: npm2100: properly handle I2C write return value
properly check return code from i2c_reg_write_byte_dt effectively
making it possible for gpio_npm2100_port_set_masked_raw to error out since:

if (ret != 0U) {
	return ret;
}

was dead code before this fix.

Fixes CID-444376

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-30 16:20:45 +01:00
Ibrahim Abdalkader
33ec0276b8 drivers: video: video_stm32_dcmi: Sanity-check frame size.
Add a check to ensure the frame size does not exceed the video buffer
size defined by `CONFIG_VIDEO_BUFFER_POOL_SZ_MAX`. Even if the sensor
supports the resolution, the frame size could overflow the buffer.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2025-01-30 16:20:17 +01:00
Ibrahim Abdalkader
a4ce71dc70 drivers: video: video_stm32_dcmi: Fix DCMI video buffer release.
Ensure the DCMI video buffer is released only after the DCMI
has been fully stopped. This prevents potential access to the
buffer while the DCMI is still active, avoiding undefined behavior.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2025-01-30 16:20:17 +01:00
Jukka Rissanen
ae978de237 drivers: wifi: winc1500: Use strncpy instead of strcpy
The strcpy is unsafe so use strncpy and pass the ssid length
as a maximum amount of chars to copy.

Fixes #81917
Coverity-CID: 434719

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 14:09:59 +01:00
Jukka Rissanen
c28baf830d drivers: wifi: winc1500: Initialize wifi_scan_result struct
The wifi_scan_result struct needs to be initialized to 0 so that
the ssid gets properly null terminated.

Fixes #81971
Coverity-CID: 434570

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 14:09:47 +01:00
Fabian Barraez
9c993bd0e3 sensor: grow_r502a: fix: untrusted array index read
- Fixed Coverity CID 366275 by adding bounds check on
packet length.

Signed-off-by: Fabian Barraez <fabianbarraez@gmail.com>
2025-01-30 07:20:29 +01:00
Hubert Miś
1ee6990fc4 drv: ft8xx: user data in the callback function
The user of the ft8xx driver can register a callback function called
on a touch detection interrupt event. This function is extended to
include a user-defined pointer. The user-defined pointer helps to share
a callback with multiple driver instances.

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2025-01-30 02:01:34 +01:00
Hubert Miś
51e732c3ac drv: ft8xx: support multiple instances
Improve the FT8xx display driver to support multiple driver instances.

The ft8xx_reference_api.h still follows the FT8xx programming guides,
limiting the usage of the driver to one instance.

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2025-01-30 02:01:34 +01:00
Nazar Palamar
fb1c9c880f drivers: serial: CAT1 UART driver: add ASYNC_API functionality
Add ASYNC_API functionality

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2025-01-30 02:00:50 +01:00
Eric Holmberg
de3ce03319 drivers: wifi: esp32: connect to highest signal AP
The station-mode channel scan method is currently set to WIFI_FAST_SCAN
which ignores the signal strength and connects to the first channel found
which may result in poor WiFi bandwidth.

Change the scan mode to scan all channels and connect to the channel with
the highest RSSI.

Fixes #84488

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2025-01-29 22:30:42 +01:00
Ryan McClelland
8f0ffbbb34 drivers: sensor: st: replace i2/3c_burst_write
i2/3c_burst_write comes with a warning where this combined write
synthesized by thsi API may not be supported by all I2/3C
devices. Replace with i2c_write instead with a buffer combining
the address and data.

The Kconfig STMEMSC_I2C_WRITE_BUFFER_SIZE was added to set the
size of the buffer pushed to the stack.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-01-29 22:30:25 +01:00
Gerson Fernando Budke
427749fe29 drivers: dma: sam0: Fix crc reset
The #83556 fixes an error related to DMA initialization which resets
the DMA CRC part. However, the samd/e5x do not have this module inside
DMA controller which causes a compile error. This fixes the issue
checking if the DMAC_CTRL_CRCENABLE macro is defined.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-01-29 20:33:56 +01:00
Benjamin Perseghetti
e399c168a1 sensor: icm42688: Fix broken build and streaming.
Makes driver actually build again.
Fixes scaling, q32 encoding, bit shifts, and register mappings.
Also enables High Resolution mode (a unique and beneficial
feature of the chip when used with streaming).

Co-authored-by: James Goppert <james.goppert@gmail.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2025-01-29 15:17:44 +01:00
Karol Lasończyk
057de458e2 drivers: adc: Add support for gain 2/7 in nRF devices
Extend current adc gains with new entry 2/7.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2025-01-29 15:13:19 +01:00
Sergei Ovchinnikov
2d343589bb drivers: regulator: npm1300: workaround for LDO HW bug
There is a HW bug in nPM1300 LDO which causes the LDO output voltage to
reach its target very slowly in specific cases. This is worked around by
performing an additional i2c read shortly after an LDO is enabled.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2025-01-29 15:12:40 +01:00
Alexandre Rey
033e2227b1 drivers: usb: Fix macro USB0 undefined for certain socs
Some NXP socs use USBFS0 macro as base address for accessing the USB
registers, rather than USB0.
It generates compile-time errors, since USB0 is not defined.
Fix by defining USB0 if USB0 is not defined and USBFS0 is.

Signed-off-by: Alexandre Rey <alx.rey@icloud.com>
2025-01-29 11:03:18 +01:00
Maxmillion McLaughlin
b50bb7c2e5 drivers: gnss: Add geoid separation to gnss_info
Currently altitude is only provided above MSL. Adding
geoid seperation allows for ellipsoidal height to be
determined.

Signed-off-by: Maxmillion McLaughlin <max@sorcerer.earth>
2025-01-29 11:02:42 +01:00
Thomas Stranger
3652918f5e drivers: sdhc: fix infineon cat1 gpio initialization
Initialize the cyhal_sdio_config, such that the init
function won't do the pin configuration.
The gpios are setup using the zephyr pinctrl driver already.

Before the latest hal update the values were ignored and
the gpio configuration completely skipped.
But this is no longer the case and this commit
fixes that by setting the gpio pins to nc,

Also, explicitly set sdio_config.clock to NULL, to make
it clearer that the driver will check for that.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2025-01-29 07:08:58 +01:00
Thomas Stranger
b0583fc9e5 drivers: sdhc: fix infineon cat1 resource type initialization
The driver should use resource type SDHC not SDIODEV.

In a older HAL version the value was not used as parameter
for clock initialization so it didn't matter, but breaks
the initialization of the driver with the latest hal.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2025-01-29 07:08:58 +01:00
Marcin Lyda
5100850767 drivers: rtc: Add Texas Instruments BQ32002 RTC driver
This PR adds support for BQ32002 RTC chip.

Supported functionalities:

* Time setting/reading
* Alarm setting/reading
* Calibration setting/reading
* IRQ frequency configuration

Tested on nRF52833-DK board.

Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
2025-01-29 07:08:28 +01:00
Vegard Storheil Eriksen
3dc60a68c4 drivers: pinctrl: stm32: Ignore NO_REMAP pins when handling AFIO remaps
Some peripherals (e.g. ethernet) have remaps only on some of the pins.
Pins without remaps do not conflict and must be ignored to correctly
process the remaps.

Signed-off-by: Vegard Storheil Eriksen <zyp@jvnv.net>
2025-01-29 07:08:06 +01:00
Fabio Baltieri
6ba3274373 rtc_shell: add shell device filtering
Add shell device filtering using DEVICE_API_IS.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-01-29 04:17:47 +01:00