Commit graph

23353 commits

Author SHA1 Message Date
Derek Valleroy
ead1cfb1aa drivers: sensors: lsm6dsv16x: Fix bug in decoder
The lsm6dsv16x driver is using an incorrect value for the index
into the acceleration range. This results in using the wrong
range. The issue was found to be a bug in a MACRO in
lsm6dsv16x_decoder.h that was used to find the index in the
acceleration range. The MACRO was improperly counting zeros from the
leading edge, instead of the trailing edge.

Signed-off-by: Derek Valleroy <derekvalleroy@fb.com>
2025-04-11 06:34:24 +02:00
Darren Lu
129ccf981c drivers: sdhc: add sdhc driver for Ambiq MCU
Add SDHC/SDIO driver support for Ambiq Apollo4 MCU.

Signed-off-by: Darren Lu <dlu@ambiq.com>
2025-04-11 06:33:24 +02:00
Marcio Ribeiro
faea025cd4 drivers: i2s: esp32: remove block size limitation from rx channel
Removes block size limitation from rx channel

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-04-11 06:32:40 +02:00
Stefan Giroux
651ecab53e drivers: gpio: gpio_mcux_igpio: add pull strength configuration
The i.MXRT10xx series have configurable GPIO pull strengths.

These are available for configuration in the pinctrl system, but not for
regular GPIO use.

This commit adds SOC-series specific GPIO configuration bits for selecting
weak or strong GPIO pulls, similar to drive strengths available from other
GPIO pin configuration examples.

This has been tested on a custom i.MXRT1062 product.

Signed-off-by: Stefan Giroux <stefan.g@feniex.com>
2025-04-10 18:05:26 +02:00
Chaitanya Tata
5f67471532 drivers: nrf_wifi: Fix SR co-ex RF switch configuration
This was not getting enabled because label was passed instead of path
and dependency was not met.

Fix the DT function to use label.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-10 18:02:28 +02:00
Chaitanya Tata
260c4f6878 drivers: nrf_wifi: Extend the help on modes
These nRF70 driver operational modes are important, so, extend the help
to clearly communicate the mode's purpose.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-10 18:02:20 +02:00
Kiara Navarro
77c1414082 drivers: charger: add driver for bq25713
Create a driver implementation for the battery charge controller
TI BQ25713.

It includes the ability to enable / disable the controller and also
to setup max current and voltage charge parameters at initialization
time but also at run time.

On the other hand, it is possible to assign / obtain input voltage
and current regulation.

Signed-off-by: Kiara Navarro <knavarro@paltatech.com>
2025-04-10 18:01:02 +02:00
Isaac Yuki
94655d2a13 drivers: display_mcux_elcdif: enable RGB_888 pixel format
Add missing define in order to enable RGB_888 pixel format support
on the mcux_elcdif driver. Tested with TM070JVHG33 display

Signed-off-by: Isaac Yuki <isaaclucas.delimayuki@tq-group.com>
2025-04-10 15:51:27 +02:00
Armando Visconti
4f8572c35a sensor: lsm6dsv16x: fix building in rtio config
Fix build error which happens when LSM6DSV16X_STREAM=y and there
are no lsm6dsv16x driver instances on i3c bus.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-04-10 14:43:53 +02:00
cyliang tw
ea1129ee1a drivers: ethernet: support for numaker m55m1x series
Add support for Nuvoton numaker m55m1x series EMAC controller.
Also include NOCACHE_MEMORY allocation.
Support to generate random mac address and remove emac data flash.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2025-04-10 14:43:43 +02:00
Johann Fischer
0f4fc767be drivers: udc_rpi_pico: use atomic_t instead of k_event for value passing
Use atomic_t instead of k_event for event value passing.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-10 12:57:43 +02:00
Johann Fischer
dfe483dbcc drivers: udc_rpi_pico: fix restart of the new transaction
At high throughput, the controller sometimes fails to start a new
transaction. Clearing the corresponding endpoint bit in the BUFF_STATUS
completion register before initiating a new transaction solves this
problem.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-10 12:57:43 +02:00
Johann Fischer
6c90673a32 drivers: udc_rpi_pico: fix OUT transfer handling in ISR
Do not check if the tailroom is greater than or equal to MPS because the
controller does not write directly to the buffer and therefore cannot
write outside the buffer.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-10 12:57:43 +02:00
Johann Fischer
a2c5861568 drivers: udc_rpi_pico: fix set/clear endpoint halt
For the IN endpoint, we only need to set/reset the STALL bit in the
endpoint control register.
To set halt on the OUT endpoint, the AVAILABLE bit must also be set,
which is similar to starting a new transfer, but first any transfer in
progress must be canceled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-10 12:57:43 +02:00
Johann Fischer
e98e774b75 drivers: udc_rpi_pico: mark endpoint as not busy after transfer canceled
Mark endpoint as not busy after transfer is canceled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-10 12:57:43 +02:00
Johann Fischer
f701357675 drivers: udc_rpi_pico: support VBUS state change detection
Support VBUS state change detection and enable/disable DP pull-up
according to VBUS state when pinctrl property is provided.

It brings the similar functionality introduced in commit 4c0317fa47
("drivers: usb_dc_rpi_pico: Implemented vbus detection handling")
for the legacy device controller driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-10 12:57:43 +02:00
Johann Fischer
06232bb491 drivers: udc_rpi_pico: replace message queue with k_events
Using k_events eliminates the drawback of the queue potentially dropping
messages and provides a reliable event notification mechanism. It is
similar to commit c2f2d8ce5d
("drivers: usb: udc_dwc2: Replace queue with events")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-10 12:57:43 +02:00
Johann Fischer
2f64a422e2 drivers: udc_rpi_pico: fix suspend/resume ISR handling
Set suspended state on suspend/resume ISR.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-10 12:57:43 +02:00
Tomasz Moń
d6a8bd5870 usb: device_next: Change speed selection Kconfig dependency
In my opinion, the user is supposed to configure the speed of the stack
and drivers ough to honor that choice. However current Zephyr USB
maintainer imposes that the dependency is the other way round, i.e.
that user first needs to disable High-Speed chirp at driver level and
only then can select Full-Speed only operation. Adhere to the
arbitrarily set up rule to allow this really necessary functionality to
enter Zephyr.

I consider this change to be harmful because it opens up a Kconfig trap
that allows configuring High-Speed capable stack with a device driver
limited to Full-Speed only operation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-10 12:57:19 +02:00
Tomasz Moń
79f2615f1a drivers: udc_dwc2: Limit operating speed to stack configuration
Limit maximum operating speed in DCFG register if USB stack is
configured to support only Full-Speed.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-10 12:57:19 +02:00
Tomasz Moń
faeabc63c9 usb: device_next: Add Kconfig to set maximum speed
Two main ideas behind setting maximum speed are:
  * Allow code and RAM optimizations at compile time
  * Allow High-Speed capable drivers to limit operating speed to user
    choice.

This commit only introduces the necessary Kconfig options but does not
implement any code or RAM optimizations and does not modify any driver.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-10 12:57:19 +02:00
Ryan McClelland
28a7ad4a57 drivers: i3c: add primary controller da property
Add a way to assign the dynamic address for a primary controller. This
is the address that is broadcasted out with the ccc DEFTGTS, and is the
address that secondary controllers use to communicate with the primary
controller.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-10 10:11:37 +02:00
Adam Openshaw
797e03258b drivers: gicv3: fixed typo
fixed typo

Signed-off-by: Adam Openshaw <quic_adamo@quicinc.com>
2025-04-09 21:09:43 +02:00
Adam Openshaw
1146574b67 drivers: gicv3: Add Support for Extended SPI
Added support to gicv3 driver to utilize the
extended SPI MMIO registers introduced in
GICv3.1 for the extended SPI range.

Documentation for the Extended Shared
Peripheral Interrupts extension can be found
in the ARM General Interrupt Controller
Architecture Specification:

https://developer.arm.com/documentation/ihi0069/latest/

Signed-off-by: Adam Openshaw <quic_adamo@quicinc.com>
2025-04-09 21:09:43 +02:00
Adam Openshaw
b664d3a925 drivers: gicv3: clang-format
Formatting files for compliance

Signed-off-by: Adam Openshaw <quic_adamo@quicinc.com>
2025-04-09 21:09:43 +02:00
Jan Behrens
f75c057e85 drivers: stepper: Renamed DRV8424 to DRV84XX
Renamed the drv8424 stepper driver to indicate its support of the drv8424,
drv8425, drv8426, drv8434 and drv8436 stepper controllors. Also made the
microstep pins optional. All test files are renamed as well.

Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
2025-04-09 19:34:00 +02:00
Jan Behrens
d486c7794a drivers: stepper: DRV8424 Fault Event
Adds support for the fault event via the fault pin to the drv8424 driver.

Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
2025-04-09 19:34:00 +02:00
Jan Behrens
c8c79a9fc6 drivers: stepper: Renamed Fault Event + Non Static Event Trigger
Renamed fault event to be more in line with other events and added it to
the stepper shell.
Makes the event callback trigger function of the step-dir implementation
non-static so that step-dir stepper drivers can use it to trigger events
themself.

Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
2025-04-09 19:34:00 +02:00
Nitin Pandey
2b8af597ce driver: wifi: siwx91x: Handle MFP configuration
- Handled MFP configuration for STA and AP modes
- Updated the MFP configuration based on security modes

Signed-off-by: Nitin Pandey <nitin.pandey@silabs.com>
2025-04-09 19:32:26 +02:00
Nitin Pandey
0259bf56c8 driver: wifi: siwx91x: Add check for SAE password
- Modified conditions in WIFI_CONNECT()
  function to reject SAE password and
  PSK based on length parameter

Signed-off-by: Nitin Pandey <nitin.pandey@silabs.com>
2025-04-09 19:32:26 +02:00
Jordan Yates
c7bc268656 sensor: current_amp: add a noise threshold
ADC output values can have noise, even if the input is 0V. Add a noise
threshold so that raw ADC readings below the threshold can be zeroed
out. By default the threshold is disabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-09 19:32:02 +02:00
Furkan Akkiz
65883ed513 drivers: udc: Add MAX32xxx UDC driver
Add UDC driver for MAX32xxx USB device controller.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-04-09 19:31:24 +02:00
Mathieu Choplain
fe9f0a9711 drivers: entropy: stm32: configure prescaler on STM32WB09
The STM32WB09 TRNG has a prescaler that defaults (on reset) to 256, making
the entropy generation process unbearably slow. Change the prescaler value
to 1 instead, in order to make the IP about as fast as other STM32's.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-04-09 17:32:59 +02:00
Okan Sahin
be1218081a drivers: adc: Introduce AD4130 adc driver
This commit introduces ad4130 adc driver.

Signed-off-by: Okan Sahin <Okan.Sahin@analog.com>
2025-04-09 17:32:29 +02:00
Peter van der Perk
818d9dc286 drivers: serial: uart_mcux_lpuart: RX IRQ Enable RxOverrun flag
If the RX FIFO buffer is full and there's nothing being transmitted
no LPUART interrupt will fire anymore. Thus the application will not
receive any bytes anymore. By enabling kLPUART_RxOverrunInterruptEnable
we will receive interrupts even though RX FIFO is full so we can recover
from this.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-04-09 15:24:11 +02:00
Tomasz Moń
33b9811536 drivers: udc_nrf: Remove doxygen comments
Update the comments to reflect refactored driver state.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
6f08055388 drivers: udc_nrf: Keep track of endpoint armed state
Arm OUT endpoints only when enqueueing first buffer. Disarm IN and OUT
endpoints on endpoint disable. Prevent ISO endpoints from being armed
twice before SOF.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
229fc1558e drivers: udc_nrf: Simplify control transfer processing
Use USB stack state instead of former HAL state to determine what to do
with control transfer buffers.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
41ebbe0033 drivers: udc_nrf: Replace driver queue with events
There is finite number of distinct events that are handled in thread
context and the order of handling is flexible. Therefore use events
instead of message queue because it is guaranteed to never get full.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
5d79ef9f8a drivers: udc_nrf: Do not notify about received OUT data
There is no need in notifying the driver that OUT data has been
received. This was only used for control transfers with OUT data stage
because dma waiting bit was not set when enqueueing buffer to receive
data stage.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
72f667b416 drivers: udc_nrf: Abort endpoints synchronously
Endpoint abort is guarded with DMA semaphore. The buffers can be freed
by the caller immediately after endpoint is aborted because the driver
won't access them anymore.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
34299f607f drivers: udc_nrf: Remove duplicate endpoint state
Use UDC endpoint state instead of the legacy hal state. Only functional
change relates to overload condition (buffer is too small to hold data
received on OUT endpoint). Previously the data would be completely
discarded and udc driver error would occur (overload event was
unhandled). Now buffer too small error is logged and as much data as
possible is copied to buffer.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
a10d00abe0 drivers: udc_nrf: Remove event handler
Post directly to driver queue because there is no longer shim
separation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
cc1ef5584b drivers: udc_nrf: Do not use nrf usbd common
This is preparatory commit for former nrfx USBD refactor. The refactor
towards native driver will only be performed on the udc driver (old USB
stack driver will continue to use nrf usbd common until it is removed).

Code is copied from nrf_usbd_common.c with minimal changes:
  * nrf_usbd_common_irq_handler renamed to nrf_usbd_irq_handler
  * usbd_enable renamed to nrf_usbd_peripheral_enable
  * all non-static nrf_usbd_common functions have prefix changed to
    nrf_usbd_legacy and are changed to static
  * functions not used by udc nrf driver are removed
  * braces are moved inside #if to pass compliance checks

No functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
afafa149cb drivers: udc_nrf: Do not trigger iso out transfer on SOF
The transfer is queued when buffer is available. There is no point in
delaying the wait until SOF. The check is completely unnecessary.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
264e9feca0 drivers: udc_dwc2: Replace transfer events with atomics
There is no need to wait on xfer_new and xfer_finished and therefore
atomic services can be used instead of events.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 12:36:04 +02:00
Tien Nguyen
3cba2221ed drivers: gpio: Add support for RZ/G2L
Add GPIO support for RZ/G2L

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-04-09 12:35:54 +02:00
Tomasz Moń
4e99b5b1bf drivers: udc_dwc2: Mark endpoint idle on disable while hibernated
When endpoint is disabled while hibernated, the UDC endpoint state has
to be reset. Set the busy to false to keep UDC endpoint state in sync
with peripheral register state.

Fixes: 2be960ad2b ("drivers: udc_dwc2: Disable endpoint while
hibernated")

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 11:43:48 +02:00
Ryan McClelland
5eb7ae34d4 drivers: i3c: cdns: remove +1 on len for abort limit
The datasheet erroneously suggested to add a + 1 to the abort len.
This was suggested because if a controller gave a EoD, then it was
afraid that the abort would take precedence over the EoD. This was
not true. The EoD will always take precedence over a controller
abort. Remove the + 1 as this can cause issues.

For example, when talking to a part that will auto-increment a read
address, having the +1 can unknownly move this address pointer further
than anticipated.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-09 11:43:08 +02:00
Ryan McClelland
393da0f953 drivers: i3c: cdns: secondary controllers can do_daa
It is most certainly 'okay' for a secondary controller to do a
ENTDAA. Remove the 'block' that was preventing this.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-09 11:43:08 +02:00