Commit graph

23353 commits

Author SHA1 Message Date
cyliang tw
4a486ce51b drivers: spi: fix the update of spi_context tx & rx length
The unit of spi_context's tx_len and rx_len is byte instead of frame.
Thus, in spi_context_update_tx(), the value of ctx->tx_len should be
reduced by (len * dfs).
Also to fix the update of ctx->tx_len in spi_context_update_rx().

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2025-06-03 21:36:39 -07:00
Ryan McClelland
2bda9ad99b drivers: spi: cdns: fixup spi clk divisor
Remove the auto setting of the external spi clock if its not there,
also fix the calculation of calucation the spi divisor value.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-03 21:34:25 -07:00
Ryan McClelland
241bb057a0 drivers: spi: cdns: remove pm device call
The PM Device callbacks is rather unimplemented. There currently is
no device agnostic clock management api (yet), and the pinctrl isn't
fully implemented in this driver. Remove it all.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-03 21:34:25 -07:00
Ryan McClelland
0d61895385 drivers: spi: cdns: fix missing fifo config
This adds the missing fifo config from the dts which was missed in
the initial revision. This also adds the spi rtio fallback api.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-03 21:34:25 -07:00
Stephan Gatzka
c4c1d92cee drivers: gpio: Use BIT(n) macro to define GPIO constants
This change would also solve that according to the C11 standard,
section 6.5, paragraph 4, the usage of bitwise operators on
signed integers is implementation defined.

Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
2025-06-03 20:32:33 +02:00
Andrew Davis
2edb6d2517 drivers: timer: ti_dmtimer: Do not require systick_timer node label
This driver currently only supports one instance of this timer and uses
it as the system clock. The instance is selected by being the first one
listed in DT in all places except sys_clock_driver_init() where it uses
the node label "systick_timer".

This driver should be fixed to correctly support multiple instances
of this timer, and the one used for the system timer should be selected
based on a flag or alias, not based on label.

For now simply use the 0th instance like everywhere else which removes
the need to have this node labeled a special way and makes no functional
changes to current users.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-06-03 17:08:37 +02:00
Nhut Nguyen
a1874b11cc drivers: system timer: Initial support for RZ/G3S
Add System Timer driver support for Renesas RZ/G3S

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
2025-06-03 17:08:30 +02:00
Tomasz Moń
2248396873 drivers: udc_dwc2: Execute post enable quirk after enable
Device can be considered enabled only after the Soft Disconnect bit is
cleared. Move the post enable quirk past the SftDiscon bit clear.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-06-03 13:50:55 +02:00
Krzysztof Chruściński
4cf184773e drivers: serial: nrfx_uarte: Support for low power polling mode
Add support for getting to the lowest power mode when polling is
used with disable-rx property and interrupts are not used for
that UARTE. So far disabling of the UARTE peripheral was done in
the interrupt but in some cases interrupt may not be available
and in that case uart_poll_out shall wait until byte is transferred
and put UARTE into the lowest power state.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-06-03 13:50:38 +02:00
Manuel Argüelles
77c2c454f7 drivers: dma: esp32: guard driver's kconfig options
Wrap the driver's options to prevent them from showing up in the global
Kconfig menu.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-06-03 09:15:28 +02:00
Alain Volmat
2c2b2268af video: imx335: only include gpio code if needed
Rely on DT_ANY_INST_HAS_PROP_STATUS_OKAY to only build the
gpio handling code for reset pin if this is being used by
one or more instance of the device.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 22:35:45 -04:00
Alain Volmat
fc6d5c4871 video: imx335: increase T4 delay post reset
Increase the T4 delay after releasing the reset of the
sensor in order to avoid getting I2C communication issues
at initialization time.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 22:35:45 -04:00
Alain Volmat
4e63863b46 video: ov5640: only include gpio code if needed
Rely on DT_ANY_INST_HAS_PROP_STATUS_OKAY to only build the
gpio handling code for reset and powerdown pins if this is
being used by one or more instance of the device.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 22:35:45 -04:00
Alain Volmat
9f81f4f7ec video: ov5640: allow usage without reset or powerdown gpios
reset and powerdown pins are optionals.

gpio_is_ready_dt should not be called in case of reset or
powerdown are not present.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 22:35:45 -04:00
Mike J. Chen
e6d38ce11c drivers: clock_control_mcux_syscon: Added get support for I2S FLEXCOMM
Previously, I2S_MCUX_FLEXCOMM was expected to use the external
MCLK only but it's possible for I2S_MCUX_FLEXCOMM to be sourced
from other clocks like the audio_pll_clk, in which case the
driver needs to be able to get the current clock frequency
in order to properly set dividers for requested sample rate.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-06-02 22:35:29 -04:00
Sylvio Alves
ad3df1d0f2 driver: counter: esp32: make sure callback is executed
User callback can be used to re-trigger the alarm.
In such case, copy current callback before it is overritten.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-02 22:10:51 +02:00
Adib Taraben
293b8d6003 drivers: enet: eth_nxp_enet_qos_mac: handle errors in RX queue worker
Handle each error individually.
Do not skip RX loop on first error.
Revise DMA buf size to CONFIG_NET_BUF_DATA_SIZE.

Signed-off-by: Adib Taraben <theadib@gmail.com>
2025-06-02 22:10:27 +02:00
Borislav Kereziev
10e5753d20 drivers: sensor: Add support for BH1730 ambient light sensor
This commit adds support for BH1730 ambient light sensor.

Signed-off-by: Borislav Kereziev <b.kereziev@gmail.com>
2025-06-02 20:22:42 +02:00
Sylvio Alves
e0a915a178 soc: espressif: convert rtc peripheral to clock subsystem
Current ESP32 clock system is mixed with RTC labeling/registers,
but it doesn't implement a real-time clock (RTC) driver.

To avoid confusion and allow adding a proper RTC driver later,
this commit renames the existing RTC interface to CLOCK and make
it as a subsystem without any peripheral attached to it.

This better reflects its actual purpose as a general clock controller.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-02 17:38:08 +02:00
Ayush Singh
debdd80da1 drivers: i2c: omap: Make reg pointers volatile
Since the __IO macro use has been removed, make the whole reg pointer
volatile. This is similar to what is done in the gpio-davinci driver.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-06-02 17:37:43 +02:00
Ayush Singh
9c1f59264e drivers: i2c: i2c_omap: Fix for PocketBeagle 2 A53
Remove __IO macro.

Fix build errors for PocketBeagle 2 A53 target

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-06-02 17:37:43 +02:00
Piotr Ciura
29a191ad38 drivers: usb: Prevent from perpetual locked state
The USB CDC driver is unable to process any bulk IN transfers
after receiving spurious 'Clear Feature - Endpoint Halt' request
from host due to perpetual locked state caused by previously
scheduled transfer, that will never be finished, as the endpoint's state
is set to NAK. Fix by ignoring spurious request.

Signed-off-by: Piotr Ciura <piotr.ciura@hidglobal.com>
2025-06-02 17:37:14 +02:00
Jakub Michalski
c7107fc4d6 virtio: add API for VIRTIO devices and add VIRTIO PCI driver
This commit adds the API for accessing VIRTIO devices, and adds a driver
for a VIRTIO PCIE device based on the newly added API.

This commit is based on the Virtual I/O Device (VIRTIO) Version 1.3
specification:
https://docs.oasis-open.org/virtio/virtio/v1.3/csd01/virtio-v1.3-csd01.pdf

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-06-02 17:37:07 +02:00
31fe70805f modules: hal_wch: update the HAL to pull in CH32V00x support
Now that the HAL has been commited, pick it and fix the related build
errors.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-06-02 13:30:04 +02:00
Dawid Niedzwiecki
964aa56ea7 interrupt_controller: intc_plic: move unused function
Move function that is used only if some configs are defined.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-06-02 13:29:30 +02:00
Henrik Brix Andersen
362e17a0c0 drivers: can: mcp2515: reformat files using clang-format
Reformat the MCP2515 driver files using clang-format and remove excessive
newlines between variable declarations.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-02 13:29:17 +02:00
Henrik Brix Andersen
e4fa41e2ad drivers: can: mcp2515: merge nested if-statements into one
Merge two nested if-statements into one.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-02 13:29:17 +02:00
Henrik Brix Andersen
c4247c6430 drivers: can: mcp2515: terminate if...else if construct with an else
Terminate the if...else if construct with an else block in order to adhere
to coding guidelines.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-02 13:29:17 +02:00
Henrik Brix Andersen
214b9c5278 drivers: can: mcp2515: declare the variable "data_idx" inside the loops
Declare the variable "data_idx" inside the loops to limit it's scope.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-02 13:29:17 +02:00
Adam Kondraciuk
5676c65ee8 drivers: i2s: Add support for nRF TDM peripherals
Add a shim that allows using the nRF TDM
(Time division multiplexed audio interface) HAL by I2S Zephyr API.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-02 13:29:10 +02:00
Adam Kondraciuk
f691d8e020 drivers: pinctrl: nrf: Add support for TDM peripheral
Add support for configuring pins of the nRF TDM peripheral.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-02 13:29:10 +02:00
Josuah Demangeon
a3465f8f4d drivers: video: sw_generator: convert to use the devicetree
Make the video software generator a devicetree node, which allows enabling
several instances, and select it as chosen { zephyr,camera = &... }; node.
It can be enabled via a `video-sw-generator` snippet.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-02 05:48:21 +02:00
Alain Volmat
5fa26d9aea video: gc2145: use VGA resolution as default
Since QVGA resolution is currently not working in CSI, use VGA
as default resolution to avoid failing during the init of the
driver.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:12 +02:00
Alain Volmat
79e218aaf4 video: gc2145: add CSI mode of the GC2145 sensor
Add possibility to use the gc2145 sensor in CSI mode by
adding the bus-type property in the device-tree.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:12 +02:00
Alain Volmat
979d8ff0fe video: gc2145: avoid default DVP enabling
Do not enable by default the DVP streaming to avoid conflict
with the introduction of the MIPI mode of the GC2145.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:12 +02:00
Alain Volmat
eeab052505 video: st_mipid02: addition of ST MIPID02 CSI bridge
Addition of the support for the CSI to DVP bridge ST MIPID02.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:03 +02:00
Alain Volmat
b0432a8f48 video: add LINK_FREQ ctrl and a helper to retrieve it
Add a ctrl VIDEO_CID_LINK_FREQ to indicate to a sink
the frequency at which a device streams data over
CSI2. Since not all source device currently provide the
LINK_FREQ control, add a helper function to retrieve
it, with a fall-back by doing an approximate via the
PIXEL_RATE control.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:03 +02:00
Alain Volmat
b5d8aee7d7 video: common: addition of INTEGER_MENU control type
Add a new INTEGER_MENU type allowing to store signed 64bits
integer into a menu.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:03 +02:00
Ryan McClelland
8c7417a552 drivers: i3c: fix adv_info_get ret code
It's possible if a device is an i3c v1.0 spec, no hdr, no mxds,
no controller caps, and does not have a mrl nor mwl. It should
return 0 if it doesn't need to do anything.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-05-31 07:06:13 -04:00
Sven Depoorter
ff3d5f89a2 drivers: pwm: pwm_nrf_sw: use shutdown task if available
Add a workaround for NRF52 anomaly 78: "High current consumption when
using timer STOP task only. Use the SHUTDOWN task instead."

Signed-off-by: Sven Depoorter <svndepoorter@gmail.com>
2025-05-31 07:04:01 -04:00
Adrian Bonislawski
240b56008c drivers: ssp: unify clock selection flow across ACE platforms
During intensive testing, it was found that the clock should
be set the same way on all ACE platforms

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2025-05-31 07:03:39 -04:00
Ryan McClelland
af1ba95ba7 drivers: i3c: cdns: add busy status
Add busy status for cadence i3c.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-05-31 07:03:19 -04:00
Michal Morsisko
e87e0542b8 drivers: spi_bitbang: Increase supported word size to 32 bits
This change introduces support for words up to 32 bits size
to the spi_bitbang driver

Signed-off-by: Michal Morsisko <morsisko@gmail.com>
2025-05-31 07:02:06 -04:00
Bas van Loon
e7dd7abc0e drivers: i2c: Add support for clock stretching in the i2c-gpio module.
Some I2C peripherals like TI charger or gauge chips need support for I2C
clock stretching. This patch includes that and makes these modules
usable with I2C emulation over GPIO.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2025-05-31 06:55:10 -04:00
Ryan McClelland
d3a7b7df9a drivers: i3c: cdns: fix ibi length with no payload
If the BCR value is not set for ibi w/ payload, then it still
has a ibi length of 1 due to the MDB. Set the PL accordingly.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-05-31 06:54:59 -04:00
Daniel Kampert
a673871970 drivers: sensor: Remove broken reset from apds9306 driver
The reset may cause initialization issues because of a missing
ACK from the sensor. The error check for the I2C communication
is removed to avoid issues during the initialization.

Closes #89850

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2025-05-31 06:54:52 -04:00
Michal Kozikowski
df65918cfa drivers: spi: spi_context.h: remove multithreading dependency
Replace semaphores with proper atomic flags when used without
multithreading enabled.

Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
2025-05-31 03:36:14 +02:00
John Shelton
7af55237da driver: sensor: aosong,dht: fix sensor protocol broken since change #83192
A recent change 9eeb60c improperly removed a critical line in the driver.

This commit replaces that line and moves an irq_lock to above any pin

value manipulation since the timing is sensitive with the DHT protocol.

This should also fix the timing issue 9eeb60c attempted to fix.

Signed-off-by: John Shelton <moosery@gmail.com>
2025-05-31 03:35:47 +02:00
Dipak Shetty
358907b25f drivers: stepper: adi_tmc: tmc51xx uart support
Added support for tmc51xx uart support alongside the
existing spi support. The tmc51xx driver is now consolidated
into a dedicated folder.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
a66d064dc4 drivers: stepper: adi_tmc: extend rampstat mask range
Now added pos_reached_mask for polling rampstat when
position reached event is not supported, for example,
with uart drivers. Consequently, when the position is
reached, the position is reached, and the event flag is
set active. Hence, an additional value is now introduced.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00