Commit graph

23353 commits

Author SHA1 Message Date
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
Fabrice DJIATSA
450e63ea7a drivers: serial: add circular mode in uart driver
the following implementations are added:
- set cyclic variable to handle circular/normal mode :
  enable dest/source_reload_en variable to set CIRC bit to 1 for RX or TX.
- DMA_STATUS_COMPLETE(0), DMA_STATUS_BLOCK(1) macros to handle half
 and full irq
- add ASYNC_UART_STATUS_TIMEOUT(3)  macro to work with  default mode
- add status input in uart_stm32_dma_rx_flush function  to handle
 async events depending on the  mode we are in.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
co-authored-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
2025-01-10 11:58:18 +01:00
Lin Yu-Cheng
a3c0b03915 driver: serial: Add UART driver initial version of RTS5912.
Add UART driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
2656029c3a driver: gpio: Add gpio driver initial version of RTS5912.
Add gpio driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
cfb2074a5e driver: timer: Add timer driver initial version of RTS5912.
Add timer driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
2c25182572 driver: pinctrl: Add pinctrl initial version of RTS5912.
Add pinctrl driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
6ea7560ce2 driver: clock_control: Add clock controller initial version of RTS5912.
Add clock controller driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Gang Li
227f04a0ea driver: wifi: nxp: 11k neighbor request support for embedded supplicant
Add 11k neighbor request support for embedded supplicant.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-01-10 09:49:55 +01:00
Nicolas Pitre
46aa6717ff Revert "arch: deprecate _current"
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").

This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.

The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.

Hence this revert.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-01-10 07:49:08 +01:00
Marcin Lyda
5c8cf4c127 drivers: rtc: Add Micro Crystal RV-8803-C7 RTC driver
This PR adds support for Micro Crystal RV-8803-C7
RTC chip.

Supported functionalities:
* Update interrupt
* Alarm interrupt
* Time setting/reading
* Alarm setting/reading
* Aging offset calibration setting/reading
* CLKOUT configuration

Tested on nRF52833-DK using rtc_api test set.

Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
2025-01-09 23:26:37 +01:00
Dhruv Menon
83024740b0 drivers: i2c: Added Bus recovery support to OMAP I2C.
The bus recovery feature utilizing bit-bang operations, which sends
SCL clock pulses to recover the bus and checks if the line is down.
Upon recovery, it disables the system test register before resuming
the transactions.

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
2025-01-09 23:26:23 +01:00
Dhruv Menon
1d8ea45a8d drivers: i2c: Base OMAP I2C support for TI-K3 processor
The OMAP I2C provides support for I2C serial interface on TI K3 series.
It is compatible with Philips I2C physical layer.
The commit includes:
Zephyr i2c api implementation
Polling Mode

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
2025-01-09 23:26:23 +01:00
Declan Snyder
3c1dcf346c drivers: i2s_mcux_sai: Cleanup dma callbacks
The dma callback functions were written in a very confusing way, clean
them up, and this change also saves some bytes of ROM.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-09 21:41:52 +01:00
Declan Snyder
d22607ae27 drivers: i2s_mcux_sai: make word_size_bytes var
Creating this local variable saves some text space in ROM

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-09 21:41:52 +01:00
Declan Snyder
9e0e41ea1d drivers: i2s_mcux_sai: clock config readability
Change this code about the frame and bit clock to be more readable

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-09 21:41:52 +01:00
Declan Snyder
5a19c654ce drivers: i2s_mcux_sai: unduplicate code
move copy pasted code into common spot for when there is an invalid
configuration passed to the config function

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-09 21:41:52 +01:00
Declan Snyder
6cbba80c1b drivers: i2s_mcux_sai: use sai_sync_mode directly
Simplify some code by using the sai_sync_mode_t type directly instead of
converting from boolean

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-09 21:41:52 +01:00
Declan Snyder
cd334bef53 drivers: i2s_mcux_sai: optimize purge_stream
There's no need to put an if before i2s_purge_stream_buffers,
because this is handled already by the boolean values entered to the
function

Also remove the inline of the function, which allowed the compiler to
make optimizations and save some bytes.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-09 21:41:52 +01:00
Declan Snyder
693abfef9b drivers: i2s_mcux_sai: Clean up top of file
Put DT_DRV_COMPAT at top of file by custom

Consolidate logging macros

Clean up checks and use build assert

Remove header file which was not necessary

Remove unnecessary forward declarations

Fix the type of the stream state to be more precise, it is used as the
enum i2s_state type. This requires handling all the enum cases in switch
statements

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-09 21:41:52 +01:00
Chaitanya Tata
f8b3320c68 drivers: nrf_wifi: Remove unused macros
These are duplicates of nRF7o bus library.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-09 11:51:17 +01:00
Chaitanya Tata
f74ff15101 nrf_wifi: Build OSAL as a standalone library
Move the cmake file of OSAL to it's own repo and build as a standalone
library, this is porting friendly.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-09 11:51:17 +01:00
Andreas Ålgård
7e36b028a9 drivers: wifi: winc1500: Rename functions to avoid multiple definitions
Renamed socket functions to avoid multiple definitions in the HAL library

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2025-01-09 11:50:43 +01:00
Andreas Ålgård
fc7afc3178 drivers: wifi: winc1500: Set context state to connected
When we accept a message the context state should be set to connected

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2025-01-09 11:50:43 +01:00
Andreas Ålgård
cb50748300 drivers: wifi: winc1500: Fix wifi module so that it is not held in reset.
The "nm_bsp_reset" is used to apply a hard reset to the WINC board by
setting CHIP_EN and RESET_N signals low,then after specific delay
the function will put CHIP_EN high then RESET_N high.
reset-gpio is however defined as active low , causing this function
to hold the wifi module in reset.

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2025-01-09 11:50:43 +01:00
Gerard Marull-Paretas
d78952b7ba drivers: can: nrf: make sure HSFLL frequency >= AUXPLL
When CAN is used, HSFLL frequency must >= AUXPLL frequency. Make sure to
send a request to the HSFLL clock instance.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-09 09:51:52 +01:00
Riku Karjalainen
5011ebad3b drivers: spi: stm32 half duplex support
Add support for SPI_HALF_DUPLEX flag for STM32 SPI driver

Signed-off-by: Riku Karjalainen <riku.karjalainen@vaisala.com>
2025-01-09 09:51:29 +01:00
Stoyan Bogdanov
9b194e1d33 drivers: gpio: Remove logically dead code for MAX149x6
Remove logically dead code detected from Coverity.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2025-01-09 08:20:55 +01:00
Luis Ubieda
5a1dfc82c3 sensor: default_rtio_sensor: fix: Treat individual axis data as q31_t
Instead of assuming that an individual axis must contain all
data-values. Additionally, for determining that there's XYZ data, all
three channels must be present in the header.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-01-09 08:20:32 +01:00
Luis Ubieda
36dfea121d sensor: shell: Allow individual axis data to be processed
For the supported channels, instead of just allowing 3-axis data being
printed out, allow individual channels to be processed (e.g: accel_x,
gyro_y, etc).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-01-09 08:20:32 +01:00
Emilio Aguila Escalante
4c9b6b6ff7 Sensor: VCNL4040: Update to lux/step constants
Right now, the driver uses the lux/step constants from the datasheet
https://www.vishay.com/docs/84307/designingvcnl4040.pdf
However, the newest datasheet from 2024
indicates that the lux/step have changed (page 12)
https://www.vishay.com/docs/84274/vcnl4040.pdf

Signed-off-by: Emilio Aguila Escalante <emilio.aguila@hotmail.com>
2025-01-09 08:20:22 +01:00
Jordan Yates
1201c2404d sensor: bme280: wait for sampling period before checking
Wait until the typical time that the sample would be ready before
starting to poll the status register.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-09 08:20:10 +01:00
Sven Ginka
804e3f6497 soc: sensry: add pinctrl
Add pin control support for the sy1xx soc.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-01-09 04:04:06 +01:00
Junho Lee
5edfd02691 drivers: pcie: add brcmstb pcie controller driver
Add PCIe controller driver for brcmstb, required by Raspberry Pi 5.

Signed-off-by: Junho Lee <junho@tsnlab.com>
2025-01-08 21:03:03 +01:00
Stephan Linz
91c10f14f9 drivers: mipi-dbi-spi: rename underscored macro names
Rename _XFR_.*BITS and _WRITE_ONLY_ABSENT according to MISRA-C standard
rules 21.1 and 21.2 (Zephyr rules 121 and 122). For details see Zephyr
coding guidelines in table "Main rules".

Signed-off-by: Stephan Linz <linz@li-pro.net>
2025-01-08 21:01:51 +01:00
Stephan Linz
7cd7c82aa1 drivers: mipi-dbi-spi: use string for xfr-min-bits property
Use a string for the xfr-min-bits property over an integer value, as this
significantly improves the readability of the MIPI DBI SPI device binding.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2025-01-08 21:01:51 +01:00
Anas Nashif
57b8b05221 console: winstream: fix conditional
should be CONFIG_SOC_FAMILY_INTEL_ADSP and not SOC_FAMILY_INTEL_ADSP.

Partially fixes #83636

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-08 19:11:29 +01:00