Commit graph

24538 commits

Author SHA1 Message Date
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
Dong Wang
6ab5c00336 drivers: sedi: Update device definition macros to use DT_INST variants
Updated various device definition macros to use the DT_INST variants for
consistency and improved readability.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2025-01-08 19:10:52 +01:00
Krzysztof Chruściński
e9f9cc605a drivers: serial: nrfx_uarte: Request hsfll clock for fast instance
Request fast global domain to run at 320 MHz during fast UARTE
activity. As request is asynchronous it cannot be called from
an ISR. Due to complexity to handle that without device runtime
power management a requirement is added so that if fast UARTE
is used device runtime PM must be enabled. Clock is request
and released in PM resume and suspended actions which in case
of fast UARTE are only called from thread context.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-08 19:09:57 +01:00
Krzysztof Chruściński
573ed56be7 drivers: counter: nrfx_timer: Add request for global HFSLL
Add requesting for global HFSLL when fast instance TIMER (e.g.
TIMER120 in nrf54h20) is used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-08 19:09:57 +01:00
Khoa Nguyen
1275058979 drivers: flash: update source code Flash driver for Renesas RA
- Bring macro defined of RA8 in flash_hp_ra.h to device tree
- Change to use irq_lock instead of semaphore for code flash
- Modify and add conditions to check and make decision to perform
action at last block.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
2025-01-08 17:02:36 +01:00
Adib Taraben
cce082626e eth_nxp_enet_qos_mac: implement the nxp,unique-mac address feature
This implements to generate the MAC address of the device UUID.
The UUID is hashed to reduce the size to 3 bytes.
Ideas taken from eth_nxp_enet.c
Adding dependencies on: HWInfo and CRC

Signed-off-by: Adib Taraben <theadib@gmail.com>
2025-01-08 17:01:37 +01:00
Bart De Vos
4724c314ae drivers: adc: shell: add support for nxp RW61x
The compatible of NXP rw61x family is the 'nxp_gau_adc', which was
missing to the list.

Signed-off-by: Bart De Vos <bart.devos@verhaert.com>
2025-01-08 12:59:10 +01:00
Johan Carlsson
86de2d69ad drivers: i2c_mcux_flexcomm: add support for bus recovery.
use the bit bang driver to recover the i2c bus using gpio.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2025-01-08 09:33:16 +01:00
Yiding Jia
2bf61e51fe drivers: sensor: Fix TMAG5273/TMAG3001 by adding a TMAG3001 compatible
Fixes issue introduced in #76460

The previous code attempted to detect whether TMAG5273 or TMAG3001 was
connected based on DEVICE ID register. This doesn't work as the bits that
denote the version on one part are undefined on the other part, and cannot
be relied on to be zero.

This commit adds a TMAG3001 compatible which (for now) is just derived from
the TMAG5273 compatible. This allows TMAG3001 to be specified directly in
the DT. The driver code is updated to support both compatibles.

Signed-off-by: Yiding Jia <yiding.jia@gmail.com>
2025-01-08 09:33:02 +01:00
Gaël PORTAY
010bedb590 sensor_shell: fix missing channel and attribute names
The three sensor channels listed below were recently added by the commit
9471df95a5:
 - SENSOR_CHAN_GAME_ROTATION_VECTOR
 - SENSOR_CHAN_GRAVITY_VECTOR
 - SENSOR_CHAN_GBIAS_XYZ

Theses channel names are missing and causes a system crash if the
SENSOR_LOG_LEVEL is set to DEBUG.

Also, the two sensor attributes SENSOR_ATTR_GAIN and SENSOR_ATTR_RESOLUTION
were added by the commit f849140de7.

This adds these missing channel and attribute to the list of names in the
sensor shell.

Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
2025-01-08 07:51:04 +01:00
Mathieu Choplain
d173737479 drivers: sensor: stm32_vref: take calibration resolution into account
Update the driver to take the "vrefint-cal-resolution" property into
account when performing the calculations.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-08 07:50:44 +01:00
Daniel Schultz
307eca452e drivers: i2c: Add zephyr-keep-sorted defines
The previous re-organization has the zephyr-keep-sorted defines
missing. Add them for the I2C drivers and targets. Also
moved lines to fix out-of-order violations.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2025-01-08 01:30:34 +01:00
Jordan Yates
a5643a4664 flash: stm32l4/g4: force load option bytes after write
After writing option bytes, force them to be loaded. Failing to perform
this step means the values are never applied and not actually written
to non-volatile memory.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-08 01:29:53 +01:00
WenBin Zhang
59b1bb2059 driver: Add uart_emul work queue thread name
Add thread names to make debugging easier.

Signed-off-by: WenBin Zhang <freey7955@gmail.com>
2025-01-08 01:29:39 +01:00
Tristen Pierson
f634401f5c drivers: dma: sam0: Reset DMA during initialization.
Fixes issue #83555, where UART transmit operations fail in Zephyr
sysbuild projects using MCUboot and the asynchronous UART API
(`CONFIG_UART_ASYNC_API=y`) on SAM0 devices such as the
ATSAMC21G18A.

The issue occurs because the DMA controller is not reset during
initialization, causing `BASEADDR` and `WRBADDR` registers to retain
MCUboot's configuration. This prevents the application from reconfiguring
these registers to its own RAM addresses, leading to UART transmit
timeouts and triggering the `UART_TX_ABORTED` callback.

This patch resolves the issue by resetting the DMA controller during
initialization in `dma_sam0.c`. The following actions are performed:
- Disables the DMA and CRC modules.
- Applies a software reset to ensure a clean state for reconfiguration.

With this change, UART transmit operations work as expected, improving
stability and compatibility between MCUboot and the application.

Signed-off-by: Tristen Pierson <tpierson@electrohire.com>
2025-01-08 01:29:29 +01:00
Neil Chen
d7f0fbe7db drivers: watchdog: add wdt support on mcxa156 board
Update wdt clock frequency get function for mcxa156

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-01-08 01:28:51 +01:00