Commit graph

23353 commits

Author SHA1 Message Date
Etienne Carriere
0926bdb444 drivers: clock_control: add HCLKx and PCLKx source clocks on STM32N6
Enable support for HCLK, PCLK1, PCLK2, PCLK4 and PCLK5 as subsystem
clock sources identifiers on STM32N6 SoCs. HCLKx relates to the AHBx
buses clock and PCLKx relate to the APBx buses clocks.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-26 16:19:09 +01:00
Jamie McCrae
5c027f270e drivers: sensors: kconfig: Add sort
Adds sort to individual sensor Kconfigs and sorts them

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-03-26 11:33:11 +01:00
Jamie McCrae
f6730f7db3 drivers: serial: kconfig: Fix unsorted additions
Fixes Kconfig files that have not been added in the right place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-03-26 11:33:11 +01:00
Tomasz Moń
6e3f8d4967 drivers: udc_dwc2: Set control endpoint CNAK only when necessary
SETUP data is unconditionally ACKed by the controller. Other DATA
packets sent to OUT control endpoint 0 (i.e. OUT Data Stage packets
and OUT Status Stage packet) are ACKed by the device only if the
endpoint was enabled with CNAK bit set.

In Buffer DMA mode controller will lock up in following scenario:
  * OUT EP0 is not enabled, e.g. OUT Status Stage has finished
  * Host starts Control Write transfer, i.e. sends SETUP DATA0 and
    device ACKs (regardless if endpoint is enabled or not)
  * host sends OUT Data Stage (OUT DATA1)
      - software enables endpoint to be able to receive next SETUP data
	while host is transmitting the OUT token. If CNAK bit is set
        alongside the EPENA bit, the device will ACK the OUT Data Stage.
        If CNAK bit is not set, the device will NAK the OUT Data Stage.

When the lockup occurs, from host perspective the OUT Data Stage packet
was successfully transmitted. This can result in host starting IN Status
Stage if there was only one OUT Data Stage packet. This in turn results
in device never getting the DOEPTINT0 SetUp interrupt. Besides just not
getting the SetUp interrupt, any subsequent control transfer won't be
noticed by device at all.

The lockup was first observed while stress testing. The host was issuing
endless sequence of Control Write, Control Read, Control Write, Control
Read, ... commands. When the controller did lock up in Buffer DMA mode,
from host perspective the device was timing out all control transfers.

Avoid the Buffer DMA lockup by setting CNAK bit only when necessary.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-03-26 11:32:33 +01:00
James Roy
bcbf69ed9f drivers: counter: nrf: Add nrfx-timer implementation
Implement the '.reset' interface in the nrfx-timer driver
to allow the upper layers to use the counter_reset
function.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-03-26 08:54:58 +01:00
James Roy
d019aea47b drivers: counter: Add native-posix implementation example
Implement the '.reset' interface in the native-posix driver
to allow the upper layers to use the counter_reset
function.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-03-26 08:54:58 +01:00
Jakob Riepler
7512eb0b65 drivers: fix support for U-Blox M10 modules with M8 driver
The U-Blox M10 seems to interleave UBX and NMEA messages in a way that
confuses the M8 driver leading to missing the same message that directly
follows the UBX part every time (leading to no navigation updates).
As the driver does not parse the UBX blocks during normal operation anyways
it can just be disabled.

Signed-off-by: Jakob Riepler <jakob+zephyr@chaosfield.at>
2025-03-26 07:08:27 +01:00
Ryan McClelland
248f7971e4 drivers: i3c: stm32: fix ibi build issue
Use the correct 'place' for the hj_pm_lock variable

Signed-off-by: Ryan McClelland <rymcclel@gmail.com>
2025-03-26 07:08:17 +01:00
Ryan McClelland
9628d97ad9 drivers: i3c: remove group addr definition
The i3c group address support is rather very incomplete here. Remove
references to it. This could all easily come back when/if group support
comes in.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-03-26 00:47:00 +01:00
Fabian Blatz
9564780564 drivers: input: sdl_touch: Associate display with instance
Make the zephyr,input-sdl-touch driver be multi instance and add the
possibility to associate it with a display. The input events are only
emitted if the events occured on this display.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-03-25 22:14:40 +01:00
Fabian Blatz
fdf9a6172b drivers: display: sdl: Store dev inside of window user_data
Adds storing of the zephyr display device struct inside of the windows
user_data, so it can be used inside of the SDL touch driver context for
checking the origin window of a received event.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-03-25 22:14:40 +01:00
Khoa Nguyen
9093598d86 drivers: dac: Update Renesas DAC driver to support for RA4
Update Renesas DAC driver to support DAC for RA4

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-03-25 22:13:12 +01:00
Robert Budai
1489038f3b drivers: gpio: add max14917
MAX14917 is an eight high-side switch, specified to deliver up to 700mA
(min) continuous current per channel. The high-side switches have
on-resistance of 120mΩ (typ) at 25°C ambient temperature

Signed-off-by: Robert Budai <robert.budai@analog.com>
2025-03-25 22:13:01 +01:00
Tilmann Unte
224b5b744d drivers: sensor: mpu6050: scale settings to DT, adds sample rate setting
Moves the MPU6050 accel/gyro scale settings from KConfig to Devicetree.
Adds a new setting for the MPU6050 sample rate divider register and
transmits it to the sensor upon initialization.
This helps to reduce the interrupt firing rate when combined with the
data ready trigger.
A default division factor is provided which ensures compatibility with
existing applications.
The MPU6050 sample application is extended and used for hardware tests.

Signed-off-by: Tilmann Unte <unte@es-augsburg.de>
2025-03-25 22:12:49 +01:00
Neil Chen
cec2bf0eee drivers: syscon: support mcxa156 i3c clock in syscon driver
Add mcxa156 i3c clock support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-03-25 22:12:36 +01:00
Fredrik Gihl
e6ed809a07 drivers: sensor: tmp114: device tree support for setting oversample
Add support for setting oversample from `attr_set` and device tree

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2025-03-25 22:12:11 +01:00
Fredrik Gihl
83b1422f9c drivers: sensor: tmp114: Support setting odr
Add support for setting the sample frequency via `attr_set` and the
output data rate from device tree source.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2025-03-25 22:12:11 +01:00
Fredrik Gihl
af0367f295 drivers: sensor: tmp114: Correct clang warning
Corrected clang warning introduced on commit 9eaf488

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2025-03-25 22:12:11 +01:00
Ryan McClelland
9bce73a6e0 drivers: i3c: cleanup const
There is const used in a few places and some hacks to get around
that const. Just remove the const as well as remove the hacks.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-03-25 08:44:02 +01:00
Alvis Sun
79b526f65a drivers: i2c: npcx: add support for multi-address in target mode
This commit introduces support for the NPCX I2C driver to handle up to
8 addresses in target mode

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2025-03-25 08:43:52 +01:00
Hao Luo
a460479ff7 drivers: ambiq: Correct peripheral instance calculation
This commit corrected ambiq peripheral instance calculations

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-03-25 05:59:42 +01:00
Yangbo Lu
605de63571 drivers: ethernet: eth_nxp_imx_netc: get irq from dts node
Added support to get irq from dts node, because some platforms may
use multi-level interrupts, and the system INTID may not be connected
directly to interrupt controller.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-25 05:59:30 +01:00
Sven Ginka
d7f6aa2f3c drivers: gpio: fixed - pin toggle (output reading)
Before that fix we read the inpupt register when toggling
gpios. With this fix, we now read the output register for
toggling a pin.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-03-25 00:32:01 +01:00
Pisit Sawangvonganan
a89060be0d drivers: i2c: shell: use shell_fprintf_normal instead of shell_fprintf
Due to the introduction of `shell_fprintf_normal` in PR #77192, we can
minimize caller overhead by eliminating direct `color` parameter passing.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-03-25 00:31:48 +01:00
Pisit Sawangvonganan
1991e57814 drivers: i2c: shell: align struct shell * argument name to sh
Aligned the `struct shell *` argument name from `shell_ctx` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-03-25 00:31:48 +01:00
Seppo Takalo
c78081e5cf modem: modem_cellular: Configurable MTU for CMUX
Allow configuring MTU for CMUX.
Some AT manual and specification define this as a
frame size. Linux ldattach default to 127 bytes,
3GPP TS 27.010 defaults to 31.

We should limit our CMUX frames to a size that
remote end is capable of handling.
Linux silently drops oversized frames.

Also, remove MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE as
this was only limiting a buffer sizes, and resulted
CMUX frames to be capped to same value.
Use MODEM_CMUX_WORK_BUFFER_SIZE and MODEM_CMUX_MTU instead.

Also rename CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZES to
CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZE as it is now
only used as a Chat module. DLCI pipes use
CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-03-24 19:33:07 +01:00
Daniel Hajjar
a4e139b9f8 drivers: intc_ioapic: Fix Out of Bounds shift
Hexadecimal integer literals are signed if they can fit into a signed int,
which causes undefined behavior.

This happens here because 0xFF can fit into a signed int and then gets
left-shifted by 24, undefined behavior for signed integers.

Signed-off-by: Daniel Hajjar <daniel.hajjar16@gmail.com>
2025-03-24 19:23:55 +01:00
Derek Snell
b259b18752 drivers: serial: uart_mcux_lpuart: add DTR, DSR, and DCD signals
Add support for additional line control signals.  Improved configuring
uart_config_flow_control options.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-03-24 19:22:42 +01:00
Mathieu Choplain
7288223a28 drivers: entropy: stm32: clear data available IRQ flag on WB09
The STM32WB09 TRNG does not clear FIFO_FULL IRQ flag in hardware once the
FIFO is no longer full, a behavior which differs from all other series.
This results in spurious IRQs, as the TRNG IRQ line effectively remains
high forever once a single interrupt has been generated.

Clear the flag in software after reading from the FIFO on STM32WB09 SoC.

N.B.: the error IRQ flag is already handled properly, as this flag must
also be cleared by software on other series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-24 19:22:30 +01:00
Mathieu Choplain
6cdc3ada3c drivers: entropy: stm32: simplify WB0-related #ifdef in LL wrappers
CONFIG_SOC_STM32WB09XX implies CONFIG_SOC_SERIES_STM32WB0X, making it
pointless to assert the latter is defined before checking the former.

Simplify #ifdef checks in the entropy driver's LL wrappers thanks to
this observation, by removing unnecessary nesting.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-24 19:22:30 +01:00
Khoa Tran
d0c0f1d036 drivers: i2c: initial support for i2c sci-b driver on Renesas RA family
First commit to add support for Renesas RA i2c sci-b driver

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2025-03-24 19:22:18 +01:00
David Lim
459a078d22 drivers: spi: cc13xx_cc26xx: Allow clocks below 2 MHz
Remove unnecessary check that the SPI clock is being set to a frequency
above 2 MHz to allow devices running at common lower frequencies (i.e.
1.2 MHz and 400 kHz).

Replace with check that the frequency is not below the minimum frequency
supported by the chipset to prevent overflow error which can occur if
the HAL sets a frequency too low resulting in a SPI clock much larger
than expected.

Fixes #69986

Signed-off-by: David Lim <dlim04@qub.ac.uk>
2025-03-24 15:11:01 +01:00
Tomasz Moń
2aa26ad261 drivers: udc_dwc2: Optimize endpoint event clear
There is no point in calling k_event_test() to determine what events are
posted and then passing that value to k_event_clear(). Simply pass
UINT32_MAX to k_event_clear() and use the return value to slightly
reduce overhead.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-03-24 15:10:25 +01:00
Tomasz Moń
2395452656 drivers: udc_dwc2: Reset core on shutdown
OUT endpoint 0 cannot be disabled and therefore the only way to forcibly
reclaim the buffer is to reset the core. The reset does not finish if
PHY clock is not running, but just triggering the reset seems to be
enough to be able to reclaim the buffer.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-03-24 15:10:13 +01:00
Tomasz Moń
437983e2c9 drivers: udc_dwc2: Ensure overlapping USBHS reset
Wait for PHY clock before triggering START task to ensure overlapped
reset for PHY and DWC2 core.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-03-24 15:10:13 +01:00
Tomasz Moń
2be960ad2b drivers: udc_dwc2: Disable endpoint while hibernated
When the endpoint is disabled while the core is hibernated, there are
timeouts waiting for interrupts. It is not clear how the stack should
behave when class and/or application wants to disable the endpoint while
device is suspended. The problem was originally observed when the
endpoints were disabled as a result of usbd_disable() call.

Avoid the timeouts by modifying the backup values instead of the real
registers (which are not accessible when hibernated).

Split the 32-bit txf_set variable into two 16-bit variables (txf_set and
pending_tx_flush) because maximum number of TxFIFO instances is 16.
The txf_set variable is used as-is, while the pending_tx_flush is used
to keep track of TxFIFOs that have to be flushed on hibernation exit.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-03-24 15:10:13 +01:00
Guillaume Gautier
33b2b1481b drivers: memc: add driver for stm32 xspi psram
Add a driver for STM32 XSPI PSRAM in memory mapped mode.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-03-24 15:09:47 +01:00
Florijan Plohl
78f05163d6 drivers: audio: Add driver for tlv320aic3110
Add driver for the Texas Instruments TLV320AIC3110 audio codec.

Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
2025-03-24 12:13:51 +01:00
Hao Luo
4744d138c2 drivers: ambiq: Change the way to power on ambiq drivers
This commit changes to use ambiq hal power control APIs
to replace the previous register settings to power on
ambiq drivers.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-03-24 09:54:17 +01:00
Eric Ackermann
4342d7108b drivers: ethernet: Add Xilinx AXI Enet driver
The Xilinx AXI Ethernet subsystem is commonly found in FPGA designs.
This patch adds a driver and device tree bindings for the Ethernet MAC
core and its MDIO controller.
The driver was tested on a RISC-V softcore in an FPGA design, with an
RGMII phy and Ethernet subsystem version 7.2 Rev. 14. Device tree
bindings match the device tree generated by Vitis hsi. Note that Vitis
generates one of the two included compatible strings depending on
version.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-03-24 09:53:43 +01:00
Fin Maaß
2a4b3148ed drivers: entropy: add maxq10xx
add maxq10xx entropy device.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-03-23 13:18:44 +01:00
Nikodem Kastelik
f13c8a59e2 drivers: spi: nrf: add support for SPIS120 instance
SPIS120 is a SPI slave device with >8 MHz SCK compatibility.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-03-22 13:38:34 +01:00
Krzysztof Chruściński
125e5d8334 drivers: spi: nrfx_spis: Extend support for device runtime PM
Extend runtime PM to support fast instance (spis120) which requires
additional action in suspend/resume phase.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-22 13:38:34 +01:00
Mathieu Choplain
d0639fedcf drivers: watchdog: iwdg_stm32: add support for STM32WB0
Add support for the STM32WB0 series to the existing STM32 driver for
Independent Watchdog peripheral.

NOTE: this commit only includes basic support for the watchdog.
STM32WB0 specificities such as the different possible clock sources, LSI
frequency measurement or window support are left for future implementation.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-22 13:38:22 +01:00
Jilay Pandya
b4b5d8b236 drivers: stepper: a4979: add stop function
add stop function to a4979 stepper controller

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-03-22 02:41:23 +01:00
Etienne Carriere
04ffa4edd1 drivers: clock_control: remove inline attributes in stm32 clock drivers
Remove the inline attribute from stm32 clock drivers functions
especially for functions that are only referenced in the clock API
operation structure and therefore cannot be inline. As a generic
comment, today compiler are smart enough to optimize embedded software
without needing inline function attributes in the source files.

This change hopes that next stm32 clock driver will no more replicate
this bad habit when using existing source files as implementation
examples.

No functional change.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-21 14:40:36 -04:00
Etienne Carriere
dcf4855fa4 drivers: clock_control: fix IN_RANGE() use in stm32 clock drivers
IN_RANGE() macro from zephyr/sys/util.h returns a boolean value
so it should be treated as such and not compared to a decimal value.
Fix stm32 clock drivers accordingly and simplify places where the
value is compared to true.

No functional change.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-21 14:40:36 -04:00
Etienne Carriere
6c2d354d9c drivers: clock_control: fix typo in STM32H7* clock init
Correct typo in STM32H7 HSI clock calibration directives introduced
in commit 6b167f2596 ("drivers: clock_control: add calibration for
h7 pllx_hsi") that currently has no functionnal impact but is worth
to be fixed for consistency.

No functional change,

Fixes: 6b167f2596
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-21 14:40:36 -04:00
Etienne Carriere
a6ae1d9268 drivers: clock_control: remove STM32H7RSX unused function
Remove function exported stm32_system_clock_update() defined in
STM32H7RS series clock driver but that is not used and not even declared.
There already exists a CMSIS SystemCoreClockUpdate() function in
STM32 HAL drivers for the exact same purpose one may use if needed.

No functional change.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-21 14:40:36 -04:00
Lucas Tamborrino
c6f84d0ba2 boards: espressif: esp32c6: Add LP Core board support
Add ULP Coprocessor board support for C6.
This requires a change in the board qualifier depending on the build
target.
Update esp32c6 overlay and configuration files to the proper name.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2025-03-21 17:05:20 +01:00