Commit graph

23353 commits

Author SHA1 Message Date
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
Gergo Vari
2759adaf1a drivers: rtc: maxim,ds3231: RTC driver
This is a squash of all the groundwork needed to
get a functioning driver for the DS3231 with the RTC API.

Signed-off-by: Gergo Vari <work@gergovari.com>
2025-01-07 23:00:05 +01:00
Adib Taraben
7e2d020df5 eth_nxp_enet_qos_mac: enable pass through of multicasts
first check if the chip has a hosh module to futher filter MAC addresses
if not then enabling the pass through for all multicast protocols

Signed-off-by: Adib Taraben <theadib@gmail.com>
2025-01-07 15:57:34 +01:00
Neil Chen
55f68b7ac3 drivers: syscon: update syscon driver to support mcxa flexcan clock
Add mcxa flexcan clock support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-01-07 15:56:57 +01:00
Martin Jäger
6046368e59 drivers: ieee802154: unify FCS configuration in L2 packet
Use the same Kconfig for all drivers to configure if the FCS bytes
(checksum) should be included in the packets passed to L2.

The description is slightly reworded to make clear that it does not
only affect the length, but the packet content itself.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-01-07 11:52:51 +01:00
Martin Jäger
075cb211e5 drivers: dac: dacx3608: Fix bad shift operation
The parameter provided to the `BIT()` macro must be checked so that
the shift operation does not overflow the variable.

Fixes #81990

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-01-07 11:51:39 +01:00
Kapil Bhatt
3f6d78c26c drivers: nrf_wifi: Fix offloaded raw tx deinit API
The osal apis spinlock - take, release and bus qspi sleep
are trying to use ops after deinit. So removing osal deinit
for temporary workaround.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-01-07 08:09:18 +01:00
Triveni Danda
b01ac955c6 drivers: wifi: nrfwifi: Enable variable network configurations
Add variable network configuration control into the driver to optimize
RAM usage by default. The pool sizes are default, and tuning is left to
the applications or samples.

Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
2025-01-07 08:08:58 +01:00
Jilay Pandya
da241fe722 drivers: serial: uart_async_to_irq.c check if baudrate is not zero
assert if baudrate is not zero in order to avoid division by zero error

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-01-07 00:26:56 +01:00
TOKITA Hiroshi
afd16b9e07 drivers: serial: pl011: Enable PINCTRL conjuction with dt prop 'pinctrl-0'
If there is a pinctrl-0 property, PINCTRL will be enabled in
conjunction with it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-01-07 00:26:37 +01:00
Jordan Yates
13df3b9f62 spi: context: update state when already locked
Update the context state parameters when the context is already locked.
This allows changing the callback information for asynchronous
operations while the context is locked.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-07 00:25:33 +01:00
Jordan Yates
ebc2ca59e3 spi: spi_context: extract lock condition
Extract the lock condition to a dedicated variable to make future
changes clearer.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-07 00:25:33 +01:00
Dawid Niedzwiecki
8aa4aa7edf drivers: flash: stm32h7: do not unlock CR at the end of init
Do not unlock CR at the end of initialization.

The lock mechanism is to protect unwanted registers modifications due to
software bugs. There is no point in leaving the registers unlock once
the driver is initialized.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-01-06 22:36:28 +01:00
Paul Wedeck
7405a25b58 drivers: uart_wch: add interrupt-driven device bindings
Currently, the uart_wch driver only supports the polling API.
This patch introduces bindings for the interrupt-driven API.

Signed-off-by: Paul Wedeck <paulwedeck@gmail.com>
2025-01-06 22:36:20 +01:00
Yishai Jaffe
6ba0563fe2 shell: uart: added shell command
Added shell command for UART. Currently only able to set baudrate and
flow control.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-01-06 20:34:52 +01:00
Ryan McClelland
57b3eb6213 drivers: i3c: cdns: fix rr slot lookup when dyn is 0
When attaching a device, it should look up if the dynamic addr is
already attached only, and not by the static addr.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-01-06 20:33:57 +01:00
Ryan McClelland
4991eef14d drivers: i3c: ccc: use SIZEOF_FIELD
Use the SIZEOF_FIELD macro to make things look prettier.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-01-06 20:33:37 +01:00
Ryan McClelland
6e271cfbb7 drivers: i3c: cdns: use SIZEOF_FIELD
Use the SIZEOF_FIELD macro to make things look prettier.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-01-06 20:33:37 +01:00
Ryan McClelland
a7ca9d8e66 drivers: i3c: cdns: report sdr error code
Report the i3c error code in the payload.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-01-06 20:33:37 +01:00
Ryan McClelland
08624b251f drivers: i3c: shell: add shell cmd for ibi hj response
Add a shell command the i3c ibi hj response api.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-01-06 20:33:26 +01:00
Ryan McClelland
71ad773f12 drivers: i3c: cdns: implement api for hj response
Implement the api for ibi hj response

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-01-06 20:33:26 +01:00
Ryan McClelland
b5f447ced2 drivers: i3c: split up i3c_device_basic_info_get
For ENTDAA, BCR and DCR is always transmitted back up to the controller.
When `i3c_bus_init` is done, it does the ENTDAA then it would get the
basic info would get the BCR and DCR again. This was rather reduntant.
This now splits it up so there is a function called
`i3c_device_adv_info_get` which gets the mrl, mwl, getcaps, and the
mxds. `i3c_device_basic_info_get` now only just gets the bcr and dcr.
There is also an inline function called `i3c_device_info_get` which
will get everything.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-01-06 20:33:16 +01:00
Andy Ross
14418a7f39 drivers/console: Add static buffer feature to winstream_console
The winstream code itself is reasonably generic, but the console
integration was written to the intel_adsp memory window driver only,
as that was the only consumer.

Add an alternative that allows the winstream to be pointed to by a
linker symbol instead.  The platform layer is responsible for putting
it where it needs to go.

Also includes a 20-byte "descriptor" recodr (with a very large magic
number) in the binary that points to the winstream, for the benefit of
external tooling that needs to find it at runtime.

Signed-off-by: Andy Ross <andyross@google.com>
2025-01-06 20:33:04 +01:00
Derek Snell
88b9cb6efc drivers: flash: soc_flash_mcux: remove CMD_MARGIN_CHECK
The CMD_BLANK_CHECK can return errors when the flash is readable, and
should only be used after programming, not in is_area_readable().  From
the LPC55S69 datasheet: "As cells age and lose charge, a correctly
programmed address will fail this check, while still being able to be
read successfully for the remaining duration of the data retention time."

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-01-06 17:13:49 +00:00
Grzegorz Runc
9fcb17400b soc: stm32: add support for stm32h757
Add support for STM32H757 SoC, which shares its design
with STM32H747 with added cryptography peripherals.

Signed-off-by: Grzegorz Runc <g.runc@grinn-global.com>
2025-01-06 17:12:55 +00:00
Jordan Yates
feaf21f80c drivers: watchdog: kconfig option for callback support
Add a non-configurable option which drivers can select to indicate that
they do not support callbacks on watchdog expiry.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-06 08:48:41 +01:00
Gerson Fernando Budke
bff3874eaf drivers: counter: sam: Allow empty pinctrl config
The Atmel counter driver requires a valid pinctrl list to initialize.
This relax this condition since the timer can be used as general purpose
timer, which may not require a pin associated with the timer unit.

Fixes #83509

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2025-01-03 11:37:21 +01:00
Kapil Bhatt
c595e6c00a wifi: nrf_wifi: Add Kconfig option to disabling priority window
Add Kconfig option to disabling priority window for scan.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-01-03 10:02:10 +01:00
Jianxiong Gu
948fbacd33 drivers: pinctrl: wch_afio: fix afio remap
Enable the AFIO clock before remap.

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2025-01-02 18:04:31 +01:00
Armando Visconti
21584003bf sensors: drivers: lsm6dsv16x: add SFLP FIFO support
Add the Sensor Fusion Low Power (SFLP) FIFO streaming capability,
using RTIO. The decode function is now aware of parsing following FIFO
tags:

    - LSM6DSV16X_SFLP_GAME_ROTATION_VECTOR_TAG
    - LSM6DSV16X_SFLP_GYROSCOPE_BIAS_TAG
    - LSM6DSV16X_SFLP_GRAVITY_VECTOR_TAG

To activate SFLP the user should put in DT the proper configuration.
For example, to activate a 60Hz SFLP FIFO batching rate of game rotation
vector, gravity vector and gbias components, the user should add in DT
the following:

  sflp-odr = <LSM6DSV16X_DT_SFLP_ODR_AT_60Hz>;
  sflp-fifo-enable = <LSM6DSV16X_DT_SFLP_FIFO_GAME_ROTATION_GRAVITY_GBIAS>;

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-01-02 18:04:19 +01:00
Armando Visconti
dc03fba586 sensors/lsm6dsv16x: fix interrupt handling
In case I3C IBI interrupt is not used do not skip reading the status
register, otherwise the interrupt event will not get cleared.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-01-02 18:04:19 +01:00
Armando Visconti
43a61a823b modules/hal_st: Align sensor drivers to stmemsc HAL i/f v2.8
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.8

Requires https://github.com/zephyrproject-rtos/hal_st/pull/24

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-01-02 18:04:19 +01:00
Krzysztof Chruściński
19526795c6 drivers: serial: nrfx_uarte: Fix low power mode for interrupt driven API
Low power mode for non-asynchronous API case is only available when
RX is not used (RX pin is not defined). In that case TX starting
function was using uarte_enable_locked() which tracks if UARTE is
used by TX or RX and TXSTOPPED interrupt was disabling UARTE
unconditionally. Because of that following attempt to TX start
was assuming that UARTE is already enabled when it was disabled.
Fixing it by using uarte_disable_locked function in TXSTOPPED
handling.

Code reordering was required to make uarte_disable_locked()
available earlier.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-02 16:03:59 +01:00
James Roy
364c555e21 drivers: counter: Fix unchecked return value in mcp7940
Fix unchecked return value scanned by Coverity.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-01-02 10:55:04 +01:00
Armando Visconti
4e503748a5 sensors: lsm6dsv16x: fix get_frame_count API
The get_frame_count() API must return the number of frames in FIFO
for a given channel type, and not the total number of generic FIFO
frames. This API may be also re-used in the decoder routine when
the timestamp baseline is adjusted.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-01-02 04:07:37 +01:00
Fabian Blatz
0ac9a6c512 drivers: stepper: drv8424: Use step_dir common code
Adapt the drv8424 driver to use the common step dir interface.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-01 02:04:53 +01:00