Commit graph

24538 commits

Author SHA1 Message Date
Anas Nashif
470682d1a3 drivers: i2c: I2C_SAM0_TRANSFER_TIMEOUT depends on I2C_SAM0
I2C_SAM0_TRANSFER_TIMEOUT should depend on I2C_SAM0.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-19 14:51:04 +00:00
Krzysztof Chruściński
2cb2cf226c drivers: clock_control: nrf: Add workaround for XO start anomaly
Add workaround to HFCLK start and stop in nrf54l. In future workaround
will be in nrfx driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-19 14:50:50 +00:00
Sergei Ovchinnikov
b432a01c23 drivers: regulator: npm1300: add reference to anomaly 38
Added reference to nPM1300 anomaly 38 replacing generic "LDO bug"

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2025-02-19 14:50:02 +00:00
Maciej Panek
d611e28103 drivers: ethernet: adin2111: Add calculation of EBO in OA mode
Calculate the EBO properly, so the total frame written to TX FIFO
does not exceed maximum Ethernet frame length.
Makes the TCP stack to work properly, otherwise packets > 1472 are dopped,
as they would be padded by 64 more bytes
and hence exceed maximum Ethernet frame size.

Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
2025-02-19 14:49:11 +00:00
Maciej Panek
158fe71a6d drivers: ethernet: adin2111: Refactor the code in offload thread
Refactors the code in adin2111_offload_thread
to improve its readability. Adds code to read RX FIFO
in OA mode until it is empty.

Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
2025-02-19 14:49:11 +00:00
Xudong Zheng
e885c8c42f drivers: serial: pl011: prevent concurrent interrupt callback execution
Since the callback can be executed from either software or a hardware
interrupt, it's possible for multiple instances of the callback function
to run concurrently. That should not happen and can be particularly
problematic on SMP systems. This commit adds a spinlock to prevent
concurrent execution.

This addresses a Twister CI failure discovered in #85539.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2025-02-19 04:59:59 +01:00
Martino Facchin
56539d8ce4 hci_da1453x: consider polarity of reset gpio
Previously polarity was ignored so inverted reset were never toggled

Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
2025-02-18 18:40:08 +01:00
Aksel Skauge Mellbye
23c5144f9c drivers: pinctrl: silabs: Fix pin deallocation from digital bus
Fix the scenario where a pinctrl node intends to deallocate a pin
from a peripheral. If the GPIO mode is disabled the DBUS route
should be cleared, not set. This allows reuse of a pin for other
purposes when a driver is suspended and the pinctrl sleep state is
applied, as GPIOs are typically disabled in the sleep state.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-02-18 18:39:50 +01:00
Oskari Seppä
de91ecdc5f drivers: wifi: esp32: Fix AP-STA mode interface init order
Wi-Fi AP-STA mode fails on ESP32 due to incorrect interface
initialization. In AP-STA mode, esp32_wifi_init first sets the driver's AP
interface, followed by the STA interface. However, the driver initializes
them in reverse order, causing both to read incorrect device data and
resulting in a "Wi-Fi not in station mode" error.
This fix handles STA and AP initialization in separate functions and
checks for correct mode in esp32_wifi_status.
Tested on a custom ESP32-S3-WROOM-1-N4R2 board, where both STA and AP
can connect, send, and receive data.

Signed-off-by: Oskari Seppä <seppaoskari@gmail.com>
2025-02-18 18:37:49 +01:00
Adam Kondraciuk
a58588e49d drivers: timer: nrf_grtc: Add support for clock outputs
Add support for GRTC clock output pins.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-02-18 18:37:35 +01:00
Adam Kondraciuk
86dca04458 drivers: pinctrl: nrf: Add support for clock outputs
Add support for GRTC clock output pins.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-02-18 18:37:35 +01:00
Ryan McClelland
d225d1525c drivers: i3c: cdns: fix ibi thr write
The dts define for the ibi threshold (watermark) was be written to the
ibi response threshold. Fix it to write to the correct spot.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-02-18 09:56:17 +01:00
Ryan McClelland
1b7de61977 drivers: i3c: cdns: fix up deftgts mem alloc
deftgts could be a different length the second time around. Also, be
more efficient rather than just allocaing the max_devs each time.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-02-18 09:56:17 +01:00
Vit Stanicek
5a31ac1d6e drivers: wm8904: Fix audio input configuration
Change erroneous mask in wm8904_volume_config. Extend
WM8904_REGVAL_INSEL. Unflip register mask and value parameters.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-02-18 05:32:36 +01:00
Jun Lin
6c3b617bca drivers: watchdog: npcx: fix T0 timer reload procedure
The correct procedure to reload the T0 timer is:
    1. Load TWDT0 register with the new value or write 1 to RST bit in
       T0CSR register to load the old value.
    2. Wait until RST bit in T0CSR register becomes 1.
    3. Wait until RST bit in T0CSR register becomes 0.
The current watchdog driver misses step 2.
Fix the issue in this commit.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-02-18 05:32:22 +01:00
Robin Kastberg
318019e0b3 drivers: gpio: unnamed parameters not allowed
This violates Zephyr Rule 44 and causes error Pe141 on IAR.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-02-17 21:15:35 +01:00
Jordan Yates
30f88d8bf5 sdhc: sdhc_spi: additional SPI PM calls
`sdhc_spi_card_busy` requires additional PM calls to ensure the bus is
enabled in the API call.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-02-17 21:03:47 +01:00
Jun Lin
aec991ef1a driver: espi: npcx: add option to reset SLP_Sx virtual wire
Add a Kconfig option ESPI_NPCX_RESET_SLP_SX_VW_ON_ESPI_RST.
When the option is enabled, the hardware resets the SLP_S3/SLP_S4/SLP_S5
virtual wires when the eSPI_Reset is asserted. This is required to
synchronize these virtual wires on the ungraceful global reset.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-02-17 15:47:23 +00:00
Bjarki Arge Andreasen
125752e7cc drivers: i2c: nrfx_twim_rtio: use msg_buf for rx if required
The DMA buffer needs to be used both for tx and rx if required.
Extend RTIO driver variant to use DMA buffer and copy received
data from it to user buffer.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-02-17 14:07:55 +01:00
Bjarki Arge Andreasen
62815dd9e7 drivers: i2c: nrfx_twim_rtio: fix dma buf section attr
The buffer used for the TWIM DMA needs to be allocated to the
section provided with the memory-regions dt prop. The macros for
doing this where malformed. This commit fixes and cleans up the
macros.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-02-17 14:07:55 +01:00
Sebastian Głąb
99c398845d drivers: adc: Fix Vref selection for nRF54L20pdk
Select Reference voltage of 900mV for ADC on nRF54L20pdk.

Add ADC to the list of supported peripherals.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-02-17 10:22:03 +01:00
Corey Wharton
f6d0e7d97c tests: drivers: regulator: add api test for count/list current_limit APIs
Adds missing fake methods to regulator_fake and corresponding API tests.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2025-02-17 08:09:48 +01:00
Rex Chen
8a814dd355 drivers: wifi: nxp: fix sap stations list shows empty in open mode
Start ap with open mode, external station connected to sap,
wifi ap stations list shows empty, because no
'WLAN_REASON_UAP_CLIENT_CONN' is received, skip add
station infomation to station list,so station list shows empty.
Fix issue by trigger this event with
'WLAN_REASON_UAP_CLIENT_ASSOC'in open mode.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-02-17 05:39:41 +01:00
Maochen Wang
2383a5f23c drivers: wifi: nxp: fix wifi stats cmd hang when net_if down
After net interface is down and the driver deinit, should not interact
with driver and FW when call the 'wifi statistics' CMD.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-02-17 05:39:28 +01:00
Alberto Escolar Piedras
22cd514048 drivers display_nrf_led_matrix: Init variable to avoid compile warning
Initialize row_index to avoid a compile warning.
The warning seems incorrect, as row_index is initialized in the first
interation of the loop, but the overhead of initializing it is trivial,
so we may as well just do it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-02-15 07:23:47 +01:00
The Nguyen
b0debcc302 drivers: can: add DLL bitrate limit check for can_renesas_ra
Add condition to check uppper/lower limit of DLL clock rate

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-02-15 07:23:10 +01:00
The Nguyen
d75125bfaa drivers: can: correct the CAN core clock setting for can_renesas_ra
Correct bit setting for CAN DLL clock as CANFDCLK

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-02-15 07:23:10 +01:00
Paul Alvin
d12686269f drivers: gpio: xlnx: Add support for versal2 PS/PMC GPIO
Add driver support for Versal Gen 2 PS/PMC GPIO controller by updating
the logic of bank index calculation.

This logic depends on "register" DT property to identify bank index
instead of depending on node instance ID as Versal Gen 2 GPIO banks
are not in sequential order as Zynqmp.

- Versal Gen 2 PS GPIO: Banks(0,3,4)
- Zynqmp PS GPIO: Banks(0,1,2,3,4,5)

Signed-off-by: Paul Alvin <alvin.paulp@amd.com>
2025-02-14 21:02:53 +01:00
Terry Geng
1d0dcb6371 drivers: spi: spi_pico_pio: Correct log message
Remove the trailing `\n`.

Signed-off-by: Terry Geng <terry@terriex.com>
2025-02-14 20:44:06 +01:00
Terry Geng
c8a9b5f00d drivers: spi: spi_pico_pio: Add support for SPI mode 1 (CPOL=0, CPHA=1)
By including an other PIO program with the side-set pin polarity inverted.

Signed-off-by: Terry Geng <terry@terriex.com>
2025-02-14 20:44:06 +01:00
Rex Chen
fb8b28a9ec drivers: wifi: nxp: embedded supplicant support 11v BTM query
Add 11v BTM query implementation for embedded supplicant L2 cmd.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-02-14 19:40:09 +00:00
Mert Ekren
b11b640571 drivers: sdhc: Add MAX32666 SDHC driver
This commit adds MAX32666 SDHC driver.

Co-Authored-By: Anil Kara <Anil.Kara@analog.com>
Co-Authored-By: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2025-02-14 20:20:03 +01:00
Aleksandr Senin
12ad8f0f6e drivers: eth: dsa_ksz8xxx: Add support for KSZ8463/KSZ8463F
This commit adds basic support for KSZ8463/KSZ8463F chips to the
dsa_ksz8xxx.c driver.

These chips have limited register compatibility with other members
of the KSZ8XXX family - their registers are 16 bits wide as opposed
to the 8-bit registers supported by the driver for KSZ8794 and
KSZ8863. Following the general logic of the existing code,
the 16-bit registers of KSZ8463 are split into 8-bit halves.

For the KSZ8463F chip, it is assumed that both ports are used
in Fiber mode.

A new configuration option, CONFIG_DSA_KSZ_PORT_ISOLATING, has been
added to isolate traffic between DSA slave ports.

The driver has been tested on a custom board with an STM32F7 SoC.

Signed-off-by: Aleksandr Senin <al@meshium.net>
2025-02-14 20:16:25 +01:00
Anthony Williams
291a688de6 drivers: spi_nrfx: Fix NRFX_ASSERT crash when sck pin is set to no-connect
Fixes a bug in nrfx spi when used in modes where only MOSI is needed such
as driving a WS2812. In this mode NRFX_ASSERT() is triggered when sck pin
is configured as no-connect.

Signed-off-by: Anthony Williams <anthony289478@gmail.com>
2025-02-14 19:15:21 +00:00
Egill Sigurdur
18acd4ce40 drivers: sdhc: Fix acronym expansion for SD Host Controller in Kconfig
Fixes an issue in which "SDHC" had been incorrectly expanded to
"Secure Digital High Capacity" instead of "SD Host Controller".

Signed-off-by: Egill Sigurdur <egill@egill.xyz>
2025-02-14 19:14:21 +00:00
Arunmani Alagarsamy
9d64cb4186 driver: wifi: siwx91x: Add active and passive dwell time
This commit adds support for configuring dwell times for both active and
passive Wi-Fi scans. The dwell time specifies the duration the device
spends on each channel during a scan.

Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-14 19:14:08 +00:00
Arunmani Alagarsamy
2e668cfc1e driver: wifi: siwx91x: Add single and multi-channel scan support
This commit introduces support for single and multi-channel Wi-Fi scans.
The device can now scan one specific channel or multiple specified
channels.

Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-14 19:14:08 +00:00
Arunmani Alagarsamy
4ee4cc39a3 driver: wifi: siwx91x: Add configurable maximum BSS scan
This commit introduces support for limiting the number of BSS scan
results returned by the siwx91x Wi-Fi driver. If scan_max_bss_cnt is
specified, the driver will return up to the specified count of BSS
results. If not specified, the driver defaults to returning all
available results.

Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-14 19:14:08 +00:00
Arunmani Alagarsamy
271bb8b7b0 driver: wifi: siwx91x: Add direct ssid scan support
This commit introduces support for direct SSID scans The feature allows
the device to send the probe requests and listen the beacon frame on the
specified SSID.

Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-14 19:14:08 +00:00
Riku Karjalainen
02aa01ddcf drivers: usb: stm32: fix for stm32u5 embedded hs phy
Select embedded high speed phy if "st,stm32u5-otghs-phy" is enabled in
the device tree.

Signed-off-by: Riku Karjalainen <riku.karjalainen@vaisala.com>
2025-02-14 19:13:29 +00:00
Rex Chen
302089f311 drivers: wifi: nxp: support set override calibration data
Add OVERRIDE_CALIBRATION_DATA macro to support set specific
calibration data.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-02-14 19:13:02 +00:00
Thao Luong
e139d936cb drivers: gpio: Only configs for VBATT pin when RA MCU support
Update GPIO driver for RA: Only configs for VBATT pin when RA
MCU support.

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2025-02-14 17:15:43 +01:00
Bjarki Arge Andreasen
96c3cd6cd3 drivers: adc: nrf_saadc: add pm device support
Extend nrf saadc device driver with pm device runtime support.

To preserve previous behavior:

* if pm device is disabled, saadc is resumed on sampling start
  and suspended when sampling done.
* if pm device is enabled only, saadc does nothing on
  sampling start/stop. its resumed on init.
* if pm device runtime is enabled, saadc is got on
  sampling start, and put on sampling stop.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-02-14 17:12:03 +01:00
Tomas Galbicka
cfd3985bda drivers: nxp mbox imx mu driver fix Flags
This commit fixes flag handling in mbox driver.
There are two MU drivers mu/ and mu1/ in nxp sdk with
same API but different bit masks and register layouts.

To be compatible with both add mapping table for channel index.
This will use enum from relavant driver heder to select correct
flag mask.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2025-02-14 17:11:50 +01:00
Andrew Davis
e4beae15b2 drivers: ipm: Select MBOX from IPM_MBOX
Projects using IPM will select CONFIG_IPM=y, then the appropriate driver
will be enabled based on DT. For devices using the IPM over MBOX driver
this will be config IPM_MBOX. But this config depends on MBOX so if the
project has not also enabled that, then this driver will not be selected.

To fix this, select MBOX from IPM_MBOX. This causes the correct MBOX
driver to then be selected also based on DT. This allows projects using
only IPM to only need to select the same as before, MBOX will be selected
as needed based on DT.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-02-14 17:10:21 +01:00
Sylvio Alves
e36d702acd soc: espressif: move code start prior hw init
Make sure vector table and BSS clean up
is performed pior hardware initialization.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-02-14 17:07:40 +01:00
Nabil Elqatib
b2ec12edc8 drivers: sensor: bosch: bmg160: replace deprecated datasheet link
Use an internetarchive link instead

Signed-off-by: Nabil Elqatib <nabilelqatib@gmail.com>
2025-02-14 17:07:12 +01:00
Krzysztof Chruściński
a4625c2112 drivers: clock_control: hsfll: Add option to set lowest oppoint in init
Add option to set the lowest DVFS operation point during initialization.
Option is by default enabled for nrf54h cores with DVFS.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-14 17:05:16 +01:00
Krzysztof Chruściński
ff82048124 modules: hal_nordic: nrfs: dvfs: Deprecate Kconfig option
Deprecate NRFS_LOCAL_DOMAIN_DVFS_SCALE_DOWN_AFTER_INIT option for
scaling down CPU frequency during dvfs handler initialization.
Clock control API is managing access to DVFS and DVFS should not
be controlled bypassing this API. Deprecated feature will be added in
the clock control.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-14 17:05:16 +01:00
Etienne Carriere
c7c001405c drivers: clock: stm32: factorize clock selection macros
Factorize STM32_CLOCK_*_GET() and STM32_MCO_CFGR_*_GET() macros
into a single series of STM32_DT_CLKSEL_*_GET() macros based on
recently introduced new common macros STM32_DT_CLKSEL_*_SHIFT and
STM32_DT_CLKSEL_*_MASK.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-02-14 13:40:52 +01:00