Commit graph

24538 commits

Author SHA1 Message Date
Ioannis Damigos
6b9eaa9f47 smartbond_timer: Use hw clock frequency for watchdog expire ticks
Use hardware clock frequency to calculate watchdog expire ticks
instead of kernel's "ticks".

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2025-01-15 15:04:29 +01:00
TOKITA Hiroshi
ecefb5de5d drivers: input: ft5336: Enable interrupts in conjunction with DT config
Enabling `CONFIG_INPUT_FT5336_INTERRUPT` if the ft5336 node in DT
has `int-gpios` property.

As a result of this change, some boards can eliminate lines that
explicitly configure `CONFIG_INPUT_FT5336_INTERRUPT`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-01-15 15:04:13 +01:00
Patrick Günzel
66dceba537 driver: adjust res when oversampling
The SAM0 ADC has an internal register to divide the accumulated results
of oversampling the ADC by the amount of samples collected. This value
has to be set by the driver and was missing.

Signed-off-by: Patrick Günzel <patrick.guenzel@kinexon.com>
2025-01-15 07:19:03 +01:00
Haiyue Wang
03eb4791a4 drivers: spi: stm32: correct the operation flag type
The commit 2c3165d187 ("drivers: spi: add opaque type to encode SPI
operation flags") introduces new type for operation flag, since it is
16/32-bit depending on CONFIG_SPI_EXTENDED_MODES.

Use the new type for safe, if the function 'spi_stm32_shift_frames' may
use extended operation flag later.

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
2025-01-15 01:38:39 +01:00
Jordan Yates
30e0d3bb14 disk: sdmmc: runtime structure initialisation
Move all initialisation of the data struct to the init function to avoid
creating the very large `struct sd_card` in `.bss`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-15 01:37:32 +01:00
Andriy Gelman
f5bf7df50c drivers: dma_xmc4xxx: Support calling dma_stop() after dma_config()
In the dma loop_transfer test (test_loop_repeated_start_stop()), the
order of calls is dma_config() -> dma_stop() -> dma_start().  This
currently does not work on xmc4xxx because after calling dma_stop(), the
dma would be in a suspended state. Fix this by leaving the suspended state
before exiting dma_stop().

Also don't clear the context (dma_channel->dlr_line and dma_channel->cb)
that was setup by dma_config().

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2025-01-15 01:36:59 +01:00
Andriy Gelman
9c4cd3057d drivers: dma_xmc4xxx: Use DAR instead of CTL.BLOCK_TS to set pending_length
When quering the DMA status we need to return the number of pending bytes
left in the transfer. Currently this is inferred by calling
XMC_DMA_CH_GetTransferredData(). However, this function actually returns
the number of items read from the source peripheral (via CTL.BLOCK_TS).
It doesn't guarantee that the last item was fully transferred to the
destination.

When using the ADDR_ADJ_INCREMENT/DECREMENT options it is better to use
DAR register to infer the number of transferred bytes. This points to the
memory address where the next data will be written. It only increments
after the ongoing transfer from source to destination is completed.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2025-01-15 01:36:59 +01:00
Patrick Günzel
2a999e14e8 sensors: reconfig adc for channel
Some ADCs (e.g. SAM0) can only convert one channel at a time
    and therefore need to be reconfigured for every voltage
    divider prior to startin the conversion

Signed-off-by: Patrick Günzel <patrick.guenzel@kinexon.com>
2025-01-14 22:55:07 +01:00
Cyril Fougeray
89594e3ada apa102: fix end frame
end frame is used to supply clock pulses so that data goes to last
LED in the chain. Thus, it depends on the number of LEDs in the chain.
Previously, the number of ones sent into the end frame was
hard-coded and limited the usage of the driver to 64 LEDs in the
strip.

Signed-off-by: Cyril Fougeray <cyril.fougeray@toolsforhumanity.com>
2025-01-14 20:52:08 +01:00
Henrik Brix Andersen
fd5b97690d drivers: pwm: sam: move SAM V71 register fixup from SoC to PWM driver
Move the SAM V71 register name fixup from the SoC code into the PWM driver
next to the other PWM driver fixup.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-01-14 20:50:20 +01:00
Mathieu Choplain
fc61e64a3a drivers: counter: stm32: add support for STM32WB0
This commit adds support for the STM32WB0 series to
the existing STM32 timer-based counters driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-14 20:49:30 +01:00
Mathieu Choplain
7e1074631e drivers: pwm: stm32: add support for STM32WB0
This commit adds support for the STM32WB0 series to
the existing STM32 PWM driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-14 20:49:30 +01:00
Nazar Palamar
415cc17c54 drivers: ifx_cat1: Updates to support latest version of HAL/PDL
- Refactoring to support latest versions of HAL/PDL

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2025-01-14 20:49:14 +01:00
Gerson Fernando Budke
ea7922195b clocks: atmel: sam0: Fix gclk and mclk clock bindings
The Atmel SAM0 SoC enable peripherals clocks in distinct places: PM and
MCLK. The old devices had defined the peripheral clock enable bit at PM.
On the newer devices this was extracted on a dedicated memory section
called Master Clock (MCLK). This change excludes the dedicated bindings
in favor of a generic approach that cover all cases.

Now the clocks properties is complemented by the atmel,assigned-clocks
property. It gives the liberty to user to customize the clock source
from a generic clock or configure the direct connections.

All peripherals drivers were reworked with the newer solution.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-01-14 20:49:03 +01:00
Gerson Fernando Budke
ac579a8f89 drivers: sensors: Add SENSOR_CHAN_FREQUENCY channel
Add new SENSOR_CHAN_FREQUENCY constant to allow implement sensors that
output frequency values in Hertz.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2025-01-14 17:58:41 +01:00
Tom Chang
549def6b10 drivers: espi: npcx: update the handler for accessing the flash
This commit updates the handler of the eSPI TAF request for accessing
two external flashes.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2025-01-14 17:57:50 +01:00
Tom Chang
5c62097bda drivers: flash: npcx: add setting of low flash device
This commit adds functions to select the low flash device and set the
size of the low flash device.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2025-01-14 17:57:50 +01:00
Lorenz Clijnen
31855964f1 drivers: i2c: cc13xx_cc26xx: Add support for I2C_MSG_RESTART
Add support for the I2C_MSG_RESTART flag to be able to use a
repeated start in between chained transactions.
The driver now uses the stop/restart flags set in the i2c_msg,
instead of starting and stopping for each transaction in the chain.

Signed-off-by: Lorenz Clijnen <github@lorc.be>
2025-01-14 17:57:40 +01:00
Lucien Zhao
87e4db9b86 drivers: gpio: update gpio_mcux.c driver
update gpio driver to adapt rt7xx gpio model:
1. There is no PORT_Type on RT7xx,so set PORT_Type as void
2. Add port_no parameter in gpio_mcux_config to adapt IOPCTL driver
3. Add gpio-port-offest parameter in blinding, it will help map the
   relation between index n and gpio port when some soc have domain
   access attribution.
3. Splite gpio_mcux_configure function into two functions(
   gpio_mcux_iopctl_configure and gpio_mcux_port_configure)
   according to CONFIG_PINCTRL_NXP_IOCON macro
4. Add code to adapt RT700 GPIO attribute configuration

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-14 17:56:53 +01:00
Lucien Zhao
7f64d8f214 drivers: gpio: format gpio_mcux.c
use clang-format to format gpio_mcux file

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-14 17:56:53 +01:00
Lucien Zhao
885c22406b drivers: pinctrl: update pinctrl_lpc_iocon.c driver
Define iocon array to store iocon base address
add index parameter support to support multi iocon instances

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-14 17:56:53 +01:00
Lucien Zhao
47cc069cb9 drivers: clock_control: update mcux_lpc_syscon_clock.c drivers
add more flexcomm instances clock support to adapt
rt700 instances number

add xspi clock support

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-14 17:56:53 +01:00
Declan Snyder
6cbe52b23c spi_nxp_lpspi: Move DMA-based code to own file
The DMA-based path of the lpspi driver is basically
almost a driver of it's own, move it to it's own file.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-14 15:39:04 +01:00
Declan Snyder
1d5cd0308c spi_nxp_lpspi: Move RTIO driver into own file
There is (almost) a whole separate driver for RTIO,
move this code to its own file and move shared code
and definitions to a common file.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-14 15:39:04 +01:00
Declan Snyder
b8a6e0b457 spi_mcux_lpspi: Move to own subfolder
Move this driver to its own subfolder to organize it
since there will be new files added for this hardware.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-14 15:39:04 +01:00
Martin Jäger
2a95996a03 drivers: ieee802154: nrf5: cast payload ptr to void for debug output
Without this fix I get an MPU fault in samples/net/openthread/shell/
with CONFIG_IEEE802154_DRIVER_LOG_LEVEL_DBG=y.

Related commit: a7224830ce

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-01-14 13:26:47 +01:00
Aksel Skauge Mellbye
e77ea215bd drivers: hwinfo: silabs: Add hwinfo driver for Series 2
Add hwinfo driver for Silicon Labs Series 2 devices. The driver
is separate from the Series 0/1 Gecko driver because the available
reset causes are completely different.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-01-14 13:26:23 +01:00
Marcin Lyda
f0a70b0366 drivers: rtc: Fix failing RV8803 driver build when int-gpios not used
This PR fixes the issue that building the driver with either
CONFIG_RTC_CALIBRATION=y or CONFIG_RTC_ALARM=y and without
'int-gpios' used will cause
'undefined reference to `rv8803_write_reg8'' error.

Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
2025-01-14 13:24:42 +01:00
Maochen Wang
f7df2a7445 drivers: wifi: nxp: add WPA3 H2E/AUTO and mixed mode
Add WPA3 H2E/AUTO and mixed mode for STA and SAP in
NXP shim driver layer.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-14 13:24:30 +01:00
Krzysztof Chruściński
70118c06a5 drivers: serial: nrfx_uarte: Deprecate non-legacy shim
Some time ago a new shim for nRF UARTE was added (uart_nrfx_uarte2.c)
which used nrfx_uarte.c driver underneath. It was supposed to support
nrf54x platforms. However, later on legacy driver (uart_nrfx_uarte.c)
was extended to support nrf54x platforms and it takes less code size,
has better performance and more features. Shim uart_nrfx_uarte2 will
no longer be supported. As new shim is the default and there is a
Kconfig to pick the legacy shim (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y)
it cannot be deprecated in the normal way. Additional Kconfig option
is created (DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM) which is enabled
if CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n and it selects DEPRECATED.
A warning was also added to the CMakeLists.txt.

Patch removes use CONFIG_UART_NRFX_UARTE_LEGACY_SHIM in tests.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-14 13:23:32 +01:00
Michał Stasiak
b578ffa49a drivers: watchdog: nrfx: add synchronization after stop
In order to ensure that watchdog channels are freed in proper
driver state, synchronization in form of simple loop needs
to be added after stopping. In no irq variant, it is already done
on nrfx level. NRFY function can be replaced by NRFX one in
the future.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-01-14 08:59:04 +01:00
Pisit Sawangvonganan
c96f236a1b drivers: ethernet: ksz8081: simplify gpio reset logic in reset
Simplifies GPIO reset logic in `phy_mc_ksz8081_reset()` by introducing
a dedicated function, `phy_ksz8081_reset_gpio`. If this function returns
`-ENODEV`, it will fall back to using a command-based reset instead.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-01-14 08:58:53 +01:00
Pisit Sawangvonganan
38ef52b1d4 drivers: ethernet: ksz8081: simplify error handling in get_link
Simplifies error handling in `phy_mc_ksz8081_get_link()` by
centralizing mutex unlocking with a `done` label.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-01-14 08:58:53 +01:00
Petri Pitkanen
51efc60087 silabs: drivers: bluetooth: Fix temporarily observer configuration
Link layer needs some fixing before hci driver can be minimally configured
and hence must revert conditional inclusion of core functionalities untill
new link layer is available.

Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
2025-01-14 02:24:04 +01:00
Petri Pitkanen
294b7b0da0 silabs: drivers: bluetooth: Add support for controller privacy
Added support for contoroller privacy support.

Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
2025-01-14 02:24:04 +01:00
Petri Pitkanen
5748738c60 silabs: drivers: bluetooth: Move configurations to Kconfig
Several driver setting were as defines in driver file which made hard to
change by application programmers. Fixed by adding
silicon labs specific Kconfig file for bluetooth driver configurations.

Also some cleaning for handling Kconfig conditional to conform
preferred style.

Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
2025-01-14 02:24:04 +01:00
WenBin Zhang
ab0915630e tracing: Add systick tracing
Add the missing SysTick tracing.

Signed-off-by: WenBin Zhang <freey7955@gmail.com>
2025-01-14 00:01:09 +01:00
Bjarki Arge Andreasen
2e0092356f drivers: i2c: nrfx_twim_rtio: cast buf to non-const
RTIO correctly declares tx buffers as const, however, the
existing I2C API and NRFX (SDK) drivers don't. Therefor cast the
const buf to non-const when passing the tx buf to the twim driver
from the RTIO call to avoid the const warning.

The tx buffer is being treated as const data naturally in the
NRFX driver, its just not declared as such since we reuse the
buffer for both RX and TX data.

Alternatively the SDK and "shim" drivers built on top of it need
to be updated, which is quite a bit of work :)

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-01-13 20:23:36 +01:00
Lucien Zhao
1f0bea6c08 driver: clock_control_mcux_ccm_rev2.c: update new lpspi support
On RT1180, two lpspis share the same clock root,
support lpspi in clock driver for RT118x

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-13 10:08:36 +01:00
Lucien Zhao
605ade6bc4 drivers: dma: dma_mcux_edma: support EDMA IP in edma drivers
Multi channels share one IRQ, add channels-shared-irq-mask on RT1180
attribution to describe the channel shared status, and add code
implementation to register the handler function for each channel
in different interrupts.

Fix legacy building warning issue

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-13 10:08:36 +01:00
Minh Hoang
0b5e17f69b drivers: entropy: Add support for SCE9 to entropy driver
add support SCE9 to entropy driver for Renesas RA

Signed-off-by: Minh Hoang <minh.hoang.wm@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-01-13 08:44:53 +01:00
Pisit Sawangvonganan
ce2d907e4d drivers: clock_control: stm32: enable PLL1FRACN setting
Enables the fractional-N (FRACN) setting for PLL1 in the STM32H5XX
clock driver.
This feature allows achieving a system clock frequency of 250 MHz from
an 8 MHz `clk_hse`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-01-10 21:08:10 +01:00
Georgij Cernysiov
db28dbd888 drivers: flash: stm32 xspi: early init exit for memmap mode
Exit the init earlier when XSPI is in memory map mode. Avoid
unnecessary checks and prevent pin reconfiguration that might
cause line spikes. Clock check beforehand is preserved.

Remove '\n' from the LOG_DBG string.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2025-01-10 21:07:51 +01:00
Georgij Cernysiov
9040dee5ef drivers: flash: stm32 ospi: early init exit for memmap mode
Exit the init earlier when OSPI is in memory map mode. Avoid
unnecessary checks and prevent pin reconfiguration that might
cause line spikes. Clock check beforehand is preserved.

Remove '\n' from the LOG_DBG string.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2025-01-10 21:07:51 +01:00
Scott Worley
cbf867ff2c drivers: serial: mec5: Microchip MEC5 UART serial driver
We add a serial UART driver for Microchip MEC5 HAL based chips.
The driver supports polling, interrupts, and runtime configuration
features. Power management will be implemented in a future PR.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2025-01-10 18:58:58 +01:00
Nazar Palamar
01252ad877 drivers: dma: initial implementation CAT1 DMA driver
Initial implementation of DMA driver for CAT1 device

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2025-01-10 14:48:24 +01:00
Patryk Duda
bcaa59d444 drivers: dai: intel: ssp: Use IS_BIT_SET() macro from utils_macro.h
Replace DAI_INTEL_SSP_IS_BIT_SET() macro with IS_BIT_SET() macro from
utils_macro.h.

Signed-off-by: Patryk Duda <patrykd@google.com>
2025-01-10 14:48:13 +01:00
Patryk Duda
22d3173a61 include: zephyr: sys: Introduce IS_BIT_SET() macro
This macro is defined in a few places which leads to macro redefinition
error e.g. when compiling prometheus network sample for NPCX boards.

Provide one definition of IS_BIT_SET() in util_macro.h to fix the
problem.

Signed-off-by: Patryk Duda <patrykd@google.com>
2025-01-10 14:48:13 +01:00
Jordan Yates
5faf471ce0 drivers: watchdog: stm32 iwdg: constant to config
Move the instance pointer, which is a constant value, into a dedicated
config structure. At the same time, remove the type casting macros as
this pattern has been removed from the tree for some years now.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-10 11:58:31 +01:00
Jordan Yates
2509de7d3e drivers: watchdog: stm32 iwdg: explicit single channel
The STM32 IWDG is a single channel watchdog, and therefore should be
returning `-ENOMEM` when a user attempt to install additional timeouts,
instead of overwriting previous values.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-10 11:58:31 +01:00