Commit graph

25,525 commits

Author SHA1 Message Date
Jordan Yates
06c29b1b61 i2c: nrfx_twim: mark as PM_DEVICE_ISR_SAFE
Mark the I2C instances as `PM_DEVICE_ISR_SAFE`, as the transition
operations are short, it saves RAM resources, and the spin-locking fixes
the non-atomic behaviour of the PM usage counter.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-18 08:31:30 +01:00
Wei-Tai Lee
913fddb80e drivers: cache: andes: Decouple cache line size calculation
Eliminate the dependency on specific configuration options
for calculating the cache line size.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-12-18 03:04:57 +01:00
Wei-Tai Lee
c351a0e044 drivers: cache: andes: Fix incorrect DT_PROP usage
Remove redundant quotation marks when parsing
cache line size from DTS properties.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-12-18 03:04:57 +01:00
Wei-Tai Lee
b3d3c0f702 driver: cache: andes: Support enable/disable on CPUs lacking CCTL CSRs
For CPUs without CCTL CSRs, return ENOTSUP in cache operations.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-12-18 03:04:57 +01:00
Wei-Tai Lee
5cf6137b38 drivers: cache: andes: Dynamically calculate L2 cache parameters
Enhance the driver to calculate the L2 cache line size and number
of ways at runtime. The L2 cache line size is assumed to match
the L1 cache line size, while the number of ways is determined
based on the total L2 cache size.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-12-18 03:04:57 +01:00
Stoyan Bogdanov
92aeb787c7 drivers: gpio: max22190: Add MAX22190 octal input with diagnostics
Add max22190 gpio driver with input functionality, since device
support only input without output.

Implemented diagnostic functionality for all 8 channels
which include various check to over/under voltage and wire break.
Filtering configuration is done from devicetree on per channel
bases and is configured on chip start.

In case some fault condition occure FAULT pin drive LOW which
prop to FAULT registers to be read. Data is stored in data structure
for furter analizes and ERR message is printed in console.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-12-18 03:04:46 +01:00
Aurelie Fontaine
8a0469dc4f drivers: sensor: icm42670: supports icm42670-P/-S
Prepare to use official TDK Invensense Inc. driver for icm42670-P/-S
sensor in tdk_hal module. Simplify I2C and SPI transport files.
Driver code moves in hal_tdk module.
Adds APEX features, such as Pedometer, Tilt detection, Wake on Motion
and Significant Motion Detector.

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2024-12-18 03:04:31 +01:00
Lucien Zhao
c0b21f4a30 drivers: sensor: nxp: add code judge whether read back correctly
find a sensor driver bug don't judge the data whether read back
correctly, deal with buffer data directly.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-12-18 01:01:37 +01:00
Lucien Zhao
a831f7df6d drivers: clock_control: add i3c clock for clock_control_mcux_ccm_rev2.c
add i3c case to get i3c instance clock

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-12-18 01:01:37 +01:00
Immo Birnbaum
63b65299df drivers: ethernet: xlnx_gem: enable querying of HW checksum support
Add a get_config function for this driver as specified in the
Ethernet subsystem API. The implementation supports querying
the hardware checksum generation capabilities of the specified
GEM device instance. This prevents the transmission of packages
without a valid checksum for protocols such as ICMP, as the
hardware only supports IPv4/IPv6 TCP and UDP checksum generation.

Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
2024-12-18 01:01:22 +01:00
Piotr Pryga
233095c3f4 drivers: clock_control: nrf: hfxo: Remove redundad code
There were redundant code in full_irq_lock(), full_irq_unlock()
functions that supposed to be used when ZLI IRQs are disabled.
These functions are compiled in only when CONFIG_ZERO_LATENCY_IRQS
is set, hence the non-ZLI execution path was never included
in final binaries.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-12-18 01:00:56 +01:00
Mario Paja
9dde4b97c0 drivers: ethernet: lan9250: implement set_config
Implements set_config api to set mac address

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2024-12-18 01:00:00 +01:00
Teresa Zepeda Ventura
830fe6ec19 drivers: pwm: add a SAM0 TC based PWM driver
This runs the Timer/counter in 'normal' PWM mode (for 8-bits)
and in 'match' PWM mode (for 16-bits).

Signed-off-by: Teresa Zepeda Ventura <teresa.zvent@gmail.com>
2024-12-17 23:14:32 +01:00
Raffael Rostagno
b313344e22 drivers: mcpwm: esp32: Clock update for new devices
Update clock configuration to support newer devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-17 23:14:19 +01:00
Raffael Rostagno
15cb7d3d74 drivers: mcpwm: esp32: Driver update for new HAL
Remove deprecated functions to comply with new HAL versions.
Handle capture interrupts more appropriately by clearing status
bit for only one channel.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-17 23:14:19 +01:00
Derek Snell
b3d8766126 drivers: dma: dma_mcux_edma: fix previous TCD index
fixes issue calculating index of previous TCD in circular list.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-12-17 20:54:58 +01:00
Rafał Kuźnia
6f6402418a drivers: serial: nrfx_uarte: Fix bool endtx-stoptx prop check
The dt_nodelabel_bool_prop must be used to check for a boolean property,
not the dt_nodelabel_has_prop. Using the latter caused the
UART_X_ENHANCED_POLL_OUT condition to be not fulfilled, despite the
fact that the property was not set on nRF52840 and nRF91.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-12-17 17:52:26 +01:00
Raffael Rostagno
0d5c76a2b3 drivers: counter: esp32: Spinlocks cleanup
Remove unnecessary spinlock directives.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-17 15:23:38 +01:00
Raffael Rostagno
203c71d1f7 drivers: counter: esp32: Driver update
Cleanup and timer frequency management improvement to support
new devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-17 15:23:38 +01:00
Bjarki Arge Andreasen
7487eabd33 drivers: serial: nrfx_uarte: rm NRF_GPD_FAST_ACTIVE1 build assert
The assert BUILD_ASSERT(NRF_GPD_FAST_ACTIVE1 == 0); is not correct
given that NRF_GPD_FAST_ACTIVE1 is defined as 1U, and is not used
in the file anyway. Remove the build assert.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-17 15:22:37 +01:00
Bjarki Arge Andreasen
ef8bf34e61 drivers: clock_control: nrf2: add support for global hfsll clock
Add device driver support for global hsfll clock.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-17 15:22:37 +01:00
Bjarki Arge Andreasen
777adf4231 dts: bindings: update nrf-hsfll to nrf-hsfll-local
The nrf-hsfll was previously the only supported HSFLL clock, hence it
was not namespaced fully. Since we added nrf-hsfll-global, we should
add the namespace to nrf-hsfll as well.

Updates drivers and devicetree uses of HSFLL as well.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-17 15:22:37 +01:00
Petri Pitkanen
07094783e7 silabs: drivers: bluetooth: Conditional compiling of optional components
Conditionally compile in controller features based on what features
have been enabled in Kconfig

This commit allow saving in flash size. Over 10k in peripheral_hr
and central_hr. In observer and broadcaster about 20k

Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
2024-12-17 11:38:31 +00:00
Johann Fischer
704b36f78f usb: device_next: remove redundant memset() after net_buf_alloc.*()
With changes introduced in commit 6a3602a306
("net: buf: Clear `user_data` on allocation")
our memset() calls are redundant.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-12-17 11:38:22 +00:00
Francois Ramu
424c187e2a drivers: flash: stm32wba flash driver moves sem functions
When the CONFIG_BT_STM32WBA the stm32wba_fm flash driver is compiled
and must takes flash_stm32_sem_take/give functions from the
flash_stm32.h header file, like other stm32 series.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-17 11:37:14 +00:00
Fabio Baltieri
5b92e7af0e drivers: flash: stm32: add STM32 option bytes extended ops
Add two new flash extended operations for reading and writing STM32
option bytes from the application code.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-17 11:35:13 +00:00
Maochen Wang
07328d962b drivers: wifi: nxp: Enable WIFI_NM for WIFI_NXP
Default enable WIFI_NM for both supplicant and embedded supplicant
case, to distinguish STA and SAP interface when use L2 layer.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-17 09:48:29 +01:00
Hao Luo
63904f3a19 drivers: rtc: add rtc support for apollo3&3p
Add RTC support for Apollo3 and Apollo3 Plus Soc

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-12-17 05:48:58 +01:00
Jilay Pandya
e01107ebb2 drivers: haptics: drv2605 fix unchecked return value
return -EIO if i2c_read does not work as expected.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-17 03:39:06 +01:00
Pieter De Gendt
a0eb112774 drivers: Move device driver APIs into iterable sections
These device driver APIs were merged after the DEVICE_API macro was
introduced.
Cleanup these leftover drivers.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-17 02:02:54 +01:00
Girisha Dengi
36e71c839f drivers: clock_control: Agilex5 clock control driver updates
The clock controller/manager registers are updated with
the correct divider values by bootloader via hand-off
data, so now we can use the clock controller to get the
clock value of each peripheral during the run time.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2024-12-16 17:12:34 -05:00
Ryan McClelland
f888e781ba drivers: i3c: stm32: add api call for default handler
add api calls for the default handlers for i3c rtio

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-12-16 20:54:42 +01:00
Ryan McClelland
622732e854 drivers: i3c: npcx: add api call for default handler
add api calls for the default handlers for i3c rtio

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-12-16 20:54:42 +01:00
Ryan McClelland
b7492cb671 drivers: i3c: mcux: add api call for default handler
add api calls for the default handlers for i2c and i3c rtio

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-12-16 20:54:42 +01:00
Ryan McClelland
ee0abb15b0 drivers: i3c: cdns: add api call for default handler
add api calls for the default handlers for i2c and i3c rtio

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-12-16 20:54:42 +01:00
Ryan McClelland
0e5916f8e4 drivers: i3c: add i3c-rtio
This adds rtio along with a default handler for i3c

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-12-16 20:54:42 +01:00
Michal Morsisko
c4923b6be0 drivers: spi_bitbang: Make SPI_LINES_OCTAL explicitly unsupported flag
Prevent the driver from perfroming transfer when SPI_LINES_OCTAL flag
is specified, as this driver supports only SPI_LINES_DUAL for now.

Signed-off-by: Michal Morsisko <morsisko@gmail.com>
2024-12-16 20:52:44 +01:00
Michal Morsisko
b76b2bbc8c drivers: spi_bitbang: Add support for SPI_TRANSFER_LSB flag
Add support for sending and receiving the least significant bit first
for the spi_bitbang driver. This driver can now be used with
SPI_TRANFER_LSB flag.

Signed-off-by: Michal Morsisko <morsisko@gmail.com>
2024-12-16 20:52:44 +01:00
Corey Wharton
3e82647ba6 drivers: i2c_dw: add devicetree property to offset clock settings
The actual clock speed of the bus is partially determined by the
rising/falling edges of the SCL. These settings allow applications
to tune the clock based on board characteristics.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-12-16 20:51:32 +01:00
Neil Chen
89c9dc7f59 drivers: syscon: update syscon driver to add lpi2c clock
Add lpi2c clock support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-16 20:50:37 +01:00
Adam Kondraciuk
e8a327329a drivers: spi: nrfx_spim: Add support for device runtime PM
Enable the device runtime power management on the SPIM shim.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-16 18:26:39 +01:00
Daniel Schultz
fc48870669 drivers: i2c: Rename RENESAS_RA_I2C_IIC
Kconfig names follow the convention CONFIG_I2C_driver-name. Rename
RENESAS_RA_I2C_IIC to I2C_RENESAS_RA_IIC to align this config name
with all others.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-12-16 18:26:23 +01:00
Daniel Schultz
fe472aefad drivers: i2c: Reorganize Driver List
Organize all drivers in alphabetic order and move common
parts at the beginning.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-12-16 18:26:23 +01:00
Michał Stasiak
ff405eaebd drivers: audio: dmic_nrfx: Add DMM support to driver
Added support for DMM in PDM drivers in order to use it
with nRF54H20.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-12-16 18:26:08 +01:00
Pieter De Gendt
ee6f51537a drivers: i2c: Place API into iterable section
Add wrapper DEVICE_API macro to all i2c_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-16 18:25:36 +01:00
Pieter De Gendt
2d5f1ba9ff drivers: i3c: Place API into iterable section
Add wrapper DEVICE_API macro to all i3c_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-16 18:25:36 +01:00
Jilay Pandya
22a9f71b88 drivers: dma: place api in iterable sections
This commit places dma driver class in iterable sections

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-16 18:25:24 +01:00
Martin Hoff
fc562b9a7b drivers: dma: Add initial support for silabs LDMA
Initial support of silabs LDMA using hal library em_ldma.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2024-12-16 18:24:51 +01:00
Jun Lin
2bda7b87ee driver: timer: npcx: bypass timer counter reading issue
Originally, when the timer's source clock is 32.768 kHz, the timer driver
uses two consecutive reads to ensure the timer reading is correct.
However, it is not robust enough due to an asynchronous timing issue in
the chip. The workaround is to add at least two NOPs between the
LDR and CMP instructions. This commit implements the workaround in the
assembly code to ensure it is not affected by the compiler toolchain
or optimization flags.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-12-16 15:55:16 +01:00
Jun Lin
bdf0500497 driver: timer: npcx: fix possible vulnerabilities
This commit fixes some potential leakage in the timer driver.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-12-16 15:55:16 +01:00