Commit graph

24538 commits

Author SHA1 Message Date
Nhut Nguyen
16c77ba448 drivers: gpio: Add support for RZ/A3UL
Add GPIO driver support for RZ/A3UL

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-03-19 03:34:15 +01:00
Nhut Nguyen
9ae595db9d drivers: serial: Add support for RZ/A3UL
This is the initial commit to support UART driver for Renesas RZ/A3UL.

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-03-19 03:34:15 +01:00
Nhut Nguyen
33d9487efc drivers: pinctrl: Add support for RZ/A3UL
This is the initial commit to support pinctrl driver for Renesas RZ/A3UL

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Phuc Pham <phuc.pham.xr@bp.renesas.com>
2025-03-19 03:34:15 +01:00
Mathieu Choplain
eec7bb5514 drivers: counter: stm32_rtc: disallow enabling on STM32WB0 series
Don't allow enabling the driver on STM32WB0 series due to hardware erratum.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-19 01:32:43 +01:00
Mathieu Choplain
5af226400d drivers: rtc: stm32: handle STM32WB0 series when RTC_ALARM is enabled
RTC alarm is not supported by the driver for now due to the complexity it
would take to work around an hardware erratum. However, it is not possible
to prevent CONFIG_RTC_ALARM from being enabled at Kconfig level.
Modify the RTC driver such that enabling CONFIG_RTC_ALARM on STM32WB0
series does not cause build errors anymore.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-19 01:32:43 +01:00
Mathieu Choplain
4a9f88378b drivers: rtc: stm32: add support for STM32WB0 series
Modify STM32 RTC driver to support the WB0 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-19 01:32:43 +01:00
Jilay Pandya
79221db413 dts: bindings: stepper remove property-allowlist from step-dir drivers
drop property-allowlist and implement invert-direction in step-dir-common

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-03-19 01:29:24 +01:00
Kent Stark Olsen
04e3a68f27 drivers: serial: xuartps: removing redundant include
This include seems redundant as the driver builds fine without
it being included. When including soc.h it also causes issues
if one utilises the xenvm board when compiling. I suggest this
is removed completely as it seems unnecessary to create this
tight coupling to a specific SoC as the driver implementation
is describing itself perfectly well, and works well without
this soc.h-file.

Signed-off-by: Kent Stark Olsen <kent.stark.olsen@gmail.com>
2025-03-19 01:27:01 +01:00
Kent Stark Olsen
5599bf5914 drivers: serial: xuartps: fixing set_baudrate function
The Xilinx xuartps driver fails to find the correct pre-scaler
parameters for the BAUDDIV and BAUDGEN registers. This fix
corrects that behaviour. The reason why it fails is due to
the stop condition for the search being ill-conditioned.
The stop condition is based on a baudrate error, and this
was chosen to be 3 percent. This would cause the parameter
search to stop too early returning ill-condotioned pre-scaler
parameters. This has been corrected by setting the stop condition
to be 3 permille instead of 3 percent. This change was tested
with an AMD Zynq Ultrascale+ MPSoC ZU3EG.

Signed-off-by: Kent Stark Olsen <kent.stark.olsen@gmail.com>
2025-03-19 01:27:01 +01:00
Aksel Skauge Mellbye
d2c49544c8 drivers: adc: iadc_gecko: Use pm_device_driver_init
Enable PM device support by making use of the pm_device_driver_init
helper.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-03-19 01:23:24 +01:00
IBEN EL HADJ MESSAOUD Marwa
30937d017b drivers: ethernet: eth_stm32_hal: Add stm32n6 ethernet support
-Update the ETH_STM32_HAL menu configuration to conditionally
 select USE_STM32_HAL_RIF if SOC_SERIES_STM32N6X is enabled.

-Align Ethernet descriptors to 32 bytes for STM32N6 to ensure
 efficient DMA operations and improve cache line efficiency
 and overall performance

-Add RISAF configuration in eth_initialize function for STM32N6
 series to set up master and slave security attributes
 for the Ethernet peripheral.

-Ensure RISAF configuration is done before enabling
 the Ethernet clock to maintain proper security attributes.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-03-18 19:53:05 +01:00
Christophe Tournery
2ba3bbe0d9 drivers: sensor: tdk: icm42688: fix wrap-around
When converting raw values to integer and fractional (micro) parts, the
fractional part must be a signed integer.

- Fix prototypes where the fractional part was declared as unsigned.
- Fix comments which did not match the declared type.

Signed-off-by: Christophe Tournery <christophe.tournery@freshape.com>
2025-03-18 19:52:42 +01:00
Jérôme Pouiller
8894fa42c0 soc: silabs: siwx91x: Rename UART instances
Currently, siwx917 have three instances of uart: ulpuart, uart1 and
uart2. However:

  - The other drivers on siwx91x (i2c, dma, i2s, etc...) rather use
    'ulp', '0' and '1'.

  - The reference manual also uses 'ulp', '0' and '1'.

The source of the confusion probably come from the clock driver in
WiseConnect which use clocks USART1 and USART2. However, this probably
not expected.

So, this patch renames uart1 and uart2 in uart0 and uart1. This change
also impacts the names of pins and the names of the clocks.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-03-18 16:43:54 +01:00
Jérôme Pouiller
1f73ca3919 driver: wifi: siwx91x: Fix scan timeout
WiseConnect documentation says:

  Default value of 100 millisecs is used when
  SL_WIFI_DEFAULT_ACTIVE_CHANNEL_SCAN_TIME is passed".

However, this is not true. Currently, DEFAULT_ACTIVE_CHANNEL_SCAN_TIME
is 0xFFFF and the scan time is set to 65 seconds.

To have the default scan time, the value '0' must be used.

Fortunately, '0' is also the value we get when the user does not specify
any default scan time. So the code can be simplified.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-03-18 16:43:44 +01:00
Cla Mattia Galliard
59b02d1772 ethernet: stm32_hal: Allow to configure preemtiveness independent of tc
Allow to configure the preemtiveness of the ethernet rx-thread independent
of the traffic-class queue.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2025-03-18 16:43:37 +01:00
Aksel Skauge Mellbye
7dc6fb442f drivers: timer: silabs: Fix calculation of next tick
In the case where more than a full tick was unannounced when
sys_clock_set_timeout() was called, the timer driver would
subtract it from the next timeout. However, this is already
done by the caller through the elapsed() function in timeout.c,
leading to the timer interrupt firing too early.

With this fix, SYS_CLOCK_TICKS_PER_SEC can be increased to the
full speed of the low frequency timer. The underlying sleeptimer
API must be called with a timeout of at least 1, and will if needed
increase the value to the minimum value required by the hardware.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-03-18 16:42:42 +01:00
Jilay Pandya
649ca563ab drivers: stepper: add stop function to common step-dir lib
add stop function to common step-dir lib

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-03-18 16:41:31 +01:00
Tomasz Leman
6249470b66 intel_adsp: ace30: mm: Set write permissions during memory mapping
The adsp_mm_save_context function was previously mapping memory without
explicitly setting write permissions, which could lead to a "store
prohibited" exception when attempting to write to the memory. This patch
adds the K_MEM_PERM_RW flag to the arch_mem_map call to ensure that the
memory is mapped with write permissions.

This change resolves the issue of accessing memory without the necessary
permissions, preventing potential exceptions and ensuring correct memory
operations. The issue was found when running the firmware on a
simulation with the MMU enabled.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2025-03-18 16:41:22 +01:00
Emil Gydesen
60a980185d Revert "drivers: adc: adopt new count_bits util function"
This reverts commit 17c42550f3.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-18 16:39:47 +01:00
The Nguyen
22b9a06327 soc: renesas: ra: enable wdt support on RA4M1
Add config to enable wdt after reset reflect wdt Kconfig value

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-03-18 08:26:40 +01:00
The Nguyen
710fb596df drivers: watchdog: initial support for watchdog driver on Renesas RA family
First commit to add support for Renesas RA watchdog driver

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-03-18 08:26:40 +01:00
Benjamin Cabé
17c42550f3 drivers: adc: adopt new count_bits util function
Adopt new count_bits helper from util.h and avoid
having conflicting definition

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-18 08:24:16 +01:00
Ole Morten Haaland
160ae23cd6 drivers: ethernet: stm32: Allow disabling carrier checking
On Zephyr devices that has an Ethernet switch IC with the Zephyr device
connected to the CPU port, there aren't necessarilly any register to
check the link state on that port. If the check is kept on such devices,
Zephyr will believe the link disappears
CONFIG_ETH_STM32_CARRIER_CHECK_RX_IDLE_TIMEOUT_MS after last message was
received, until a new message is received. If the application tries to
send data while the link is considered gone, sending returns an error,
sometimes indicating that the interface is down.

It also seems conceptually meaningless to try determining link state on
such devices, since as long as both the microcontroller and the switch
IC is powered, the link should always be up.

This commit therefore introduces a new Kconfig to allow disabling the
entire checking of link state, so that on devices where there is no
relevant PHY register to read, the check can be disabled.

Signed-off-by: Ole Morten Haaland <omh@ixys.no>
2025-03-17 19:58:42 +01:00
Jukka Rissanen
ac3cb9dac0 net: Change the net_linkaddr struct to not use pointers
Previously the net_linkaddr struct had pointers to the link address.
This is error prone and difficult to handle if cloning the packet as
those pointers can point to wrong place. Mitigate this issue by
allocating the space for link address in net_linkaddr struct. This will
increase the size of the net_pkt by 4 octets for IEEE 802.15.4 where the
link address length is 8, but there no increase in size if link address
is 6 bytes like in Ethernet/Wi-Fi.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-17 16:25:22 +01:00
TOKITA Hiroshi
cbcf36e1a7 dts: arm: renesas: ra: Remove old R7FA4M1AB3CFM configurations
Due to historical reasons, there were two implementations of
R7FA4M1AB3CFM. However, the migration has been completed,
so the old one is now being removed.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-17 16:24:42 +01:00
Triveni Danda
3a3f4ab3ea drivers: nrf_wifi: Set default stack size of net_mgmt thread
Fixes overflow issue in the net_mgmt thread
during network interface state changes.

Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
2025-03-17 13:57:22 +01:00
Yassine El Aissaoui
12e2aeda11 drivers: entropy: mcux_trng: Add PM device action
The entropy driver shall re-init trng when
a power state turns off the device.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2025-03-17 13:57:13 +01:00
Luis Ubieda
8258cba2c6 sensor: icm45686: Add Streaming Mode
Enable Streaming mode with the following modes:
- DRDY
- FIFO Watermark
- FIFO Full

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-17 13:56:41 +01:00
Luis Ubieda
356480c4cb sensor: icm45686: Simplify decoder to directly receive fs
Instead of requiring the edata struct, just receive full-scale
parameter. This simplifies the decoding process for FIFO data
during streaming.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-17 13:56:41 +01:00
Sai Santhosh Malae
c6198008f5 drivers: watchdog: siwx91x: Add siwx91x WDT driver
Implement Watchdog driver for siwx91x device

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-03-17 13:56:24 +01:00
Arif Balik
1c8f06c7c2 driver: input: added input_tsc_keys
input_tsc_keys to detect key press releases
using STM32 TSC

Signed-off-by: Arif Balik <arifbalik@outlook.com>
2025-03-17 13:55:48 +01:00
Benjamin Cabé
06e86e95da Revert "drivers: gpio_cc13xx_cc26xx: Update for latest sdk"
This reverts commit 99e7223a1c.

Breaks CI with the following compilation error in SPI.c:52:
error: 'SPI_MASTER' undeclared here (not in a function)

Failing tests (cc3220sf_launchxl/cc3220sf)
- sample.net.sockets.echo.offload.simplelink
- sample.net.sockets.http_get.offload.simplelink
- sample.net.wifi

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-17 13:55:34 +01:00
Mika Braunschweig
cc6eaa0cf9 drivers: gpio: davinci: fix config layout
Zephyr GPIO drivers require the pin mask `struct gpio_driver_data` to be
the first element of the driver config. Reordering fixes failures in ASSERT
statements of the GPIO driver due to the base address being interpreted as
supported pin mask.

Signed-off-by: Mika Braunschweig <mika.braunschweig@siemens.com>
2025-03-17 09:26:45 +01:00
Nhut Nguyen
9077d46c5d drivers: gpio: Add support for RZ/T2L
Add GPIO driver support for RZ/T2L

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
2025-03-17 09:26:13 +01:00
Nhut Nguyen
6a5ccb6358 drivers: interrupt_controller: Add support for RZ/T2L
Add interrupt controller for RZ/T2L

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
2025-03-17 09:26:13 +01:00
Nhut Nguyen
be6abc3208 drivers: pinctrl: Add support for RZ/T2L
This is the initial commit to support PINCTRL driver for Renesas RZ/T2L

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
2025-03-17 09:26:13 +01:00
Ayush Singh
99e7223a1c drivers: gpio_cc13xx_cc26xx: Update for latest sdk
- It seems that the mask variants of GPIO functions are not present in
  the latest sdk, so replace those with direct register access.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-17 09:25:58 +01:00
Ryan McClelland
705491e306 drivers: gpio: shell: fix warning
A warning is generated due to a cast-function-type. Remove the unused
arg.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-03-17 02:21:37 +01:00
Peter Mitsis
701aab92e2 kernel: Add Z_IS_TIMEOUT_RELATIVE() macro
Introduces the Z_IS_TIMEOUT_RELATIVE() macro to help ensure that
checking for relative/absolute timeouts is consistent. Using this
macro also helps ensure that we get the correct behavior when using
32-bit timeouts (CONFIG_TIMEOUT_64BIT=n).

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-03-17 02:21:02 +01:00
Ajay Neeli
d012b14f17 drivers: i2c: xilinx_axi: Remove nested spinlock
Removed nested spinlock acquisition in i2c_xilinx_axi_write to prevent
ztest failures due to invalid spinlock usage.
Ensured spinlocks are not consecutively acquired without unlocking,
preventing potential deadlocks.

Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
2025-03-17 02:20:20 +01:00
Jordan Yates
826e598218 console: winstream: add missing Kconfig dependency
Add a missed dependency to all sub-symbols of `WINSTREAM_CONSOLE`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-15 13:08:03 +01:00
Robert Hancock
df5ffc9165 drivers: serial: uart_xlnx_ps: Fix interrupt mode issues
This driver had some issues with interrupt-driven operation, which
manifested by the console breaking when enabling the Zephyr shell on the
kv260_r5 target for example. Fixed the following:

-Ensure device is fully hardware reset during initialization

-Changed poll_out to be more consistent with other drivers, i.e. only
wait for the UART to accept the character, not for it to be fully
transmitted.

-Added implementation for err_check function, as otherwise there was no
way to detect or clear the error interrupts enabled by irq_err_enable.

-Fixed logic for enabling/disabling interrupts. This should only be done
by explicit enable/disable calls, not as part of fifo_fill etc.

-This hardware does not produce interrupts for TX FIFO empty or RX FIFO
threshold when enabling them if the TX FIFO is already empty or RX FIFO
already contains data. When enabling interrupts in these cases, use a
timer to trigger a user callback to match the normal UART API usage,
similar to the xlnx_uartlite driver.

-Other minor cleanups to interrupt-driven functions.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-03-15 13:07:28 +01:00
Robert Hancock
a52230b8be drivers: serial: uart_xlnx_ps: run clang-format
Updated code formatting with clang-format. No functional change
intended.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-03-15 13:07:28 +01:00
Jordan Yates
f4fda91e0b watchdog: cmsdk_apb: don't reconfigure after start
Do not allow attempting to install new channels after the watchdog has
been started.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-15 13:07:05 +01:00
Jordan Yates
1f02f39b9e watchdog: cmsdk_apb: reset state before starting
Reset the watchdog back to the initial state before enabling the
expiry interrupt. This prevents the watchdog expiring immediately if
there is a long gap between `wdt_install_timeout` and `wdt_setup`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-15 13:07:05 +01:00
Ayush Singh
8a4fd9bb1f drivers: cc13xx_cc26xx: pwm: Fix pm bug
- The current code will cause stall if some other subsystem (like subg)
  also needs to manage pm states.
- So add a check to only re-enable suspend if it was disabled by PWM.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-15 13:06:39 +01:00
Sai Santhosh Malae
935c8e4701 drivers: pwm: siwx91x: Add siwx91x PWM driver
Implement PWM driver for siwx91x device

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-03-15 06:43:58 +01:00
Chia-Yang Lin
bd365a0bae drivers: rtc: rts5912: add rtc driver
Add rtc driver for Realtek rts5912.

Signed-off-by: Chia-Yang Lin <cylin0708@realtek.com>
2025-03-15 06:43:46 +01:00
Henrik Brix Andersen
d96e95ee76 drivers: serial: uart: neorv32: neorv32_uart_config_get() can be unused
Guard the neorv32_uart_config_get() function to avoid compilation warning
with CONFIG_UART_USE_RUNTIME_CONFIGURE=n.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-03-15 00:35:36 +01:00
Declan Snyder
4e1c4cd623 spi_nxp_lpspi: Fix resource leak in transceive
There is a bug here clearly which is that if there is some error in the
transceive function, it returns without releasing the context.
This should be fixed by properly handling the errors with a context release
before returning.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-14 17:55:15 +01:00