Commit graph

24538 commits

Author SHA1 Message Date
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
Fabian Blatz
39dbd49874 drivers: stepper: step_dir: Fix actual position increment
Address issue where the timing source is not stopped upon step completion
and not adjusting the actual position after performing a step.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-01 02:04:53 +01:00
Fabian Blatz
9e6366a01e drivers: stepper: step_dir: Add fallback for dual-edge-step
Adds a fallback for the dual-edge-step property in the step dir common
code. Without this drivers using the common code would have to declare the
dual-edge-step property so it can default to false when not set, even if
the IC does not support adjusting it.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-01 02:04:53 +01:00
Martin Jäger
9d3d67d3d1 drivers: ieee802154: b91: fix status variable type in RX ISR
The status variable stores the return value of `net_recv_data`, which
is an `int` and may be negative.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-12-30 19:47:05 +01:00
Jilay Pandya
0ab69fb19e drivers: crypto: crypto_ataes132a fix buffer overrun issue
fix buffer overrun issue by assigning more bytes to the param buf

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-29 05:51:51 +01:00
Fabian Blatz
0b124a2ff6 drivers: stepper: Add timing source for step dir stepper
Adds a timing source api which is used by the step-dir stepper common code.
This allows the reusable common code to configure different timing sources,
since the initial delayable work implementation was inacurate for higher
maximum velocities.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-28 04:37:05 +01:00
Fabian Blatz
fc2567939b drivers: stepper: shell: Use shell_device_filter
Use the shell_device_filter utils method and leverage the new api classing
to only suggest stepper devices via tab-complete within the shell.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-27 21:18:04 +01:00
Armando Visconti
f9eceaebf9 drivers/sensor: lis2dux12: add lis2duxs12 support
The LIS2DUXS12 is a smart, digital, 3-axis linear accelerometer whose
MEMS and ASIC have been expressly designed to combine the lowest current
consumption possible with features such as always-on antialiasing
filtering, a finite state machine (FSM) and machine learning core (MLC)
with adaptive self-configuration (ASC), and an analog hub / Qvar sensing
channel.

(https://www.st.com/en/mems-and-sensors/lis2duxs12.html)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-12-27 19:34:46 +01:00
Armando Visconti
0f76a4e519 drivers/sensor: lis2dux12: re-working to be DUX generic
Prepare the driver to be able to handle other DUX software compatible
devices. Currently the driver handles the st_lis2dux12 compatible only.

Do following major changes:

1. Introduce the lis2dux12_chip_api structure filled with device specific
   APIs. At the moment define following callback:

    - api_lis2dux12_set_odr_raw()
    - api_lis2dux12_set_range()
    - api_lis2dux12_sample_fetch_accel()
    - api_lis2dux12_sample_fetch_temp()
    - api_lis2dux12_handle_interrupt()
    - api_lis2dux12_init_interrupt()

2. Prepare specific APIs for st_lis2dux12 device.

3. Make DT instantiation on inst + name basis, and not only by inst. This
   commit only use "name = DT_DRV_COMPAT = st_lis2dux12".

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-12-27 19:34:46 +01:00
Jilay Pandya
8db97b5bf6 drivers: wifi: esp_at: fix null pointer dereference issue
fix null pointer dereference issue by checking if *sock is null or not

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-27 15:42:41 +01:00
Irfan Ahmad
cf2ce9d322 drivers: display: Fix typos in multiple display drivers
Found multiple similar typos in various display drivers - fixed them.

Signed-off-by: Irfan Ahmad <irfan.ahmad@siemens.com>
2024-12-27 07:18:28 +01:00
TOKITA Hiroshi
1207ccfb7e drivers: i2c: dw: Fix the "resets" property exists check logic
Regardless of the argument specified, it always references the
property of the 0th, so it was corrected to reference the instance
specified by the argument.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-26 19:43:54 +01:00
Hua Zheng
535c40d6d6 drviers: mipi_dbi: mipi_dbi_bitbang: fix 16-bit data_gpios exceed error
For a 16-bit data bus, "DT_INST_PROP_LEN(n, data_gpios)" returns 16
which is equals "MIPI_DBI_MAX_DATA_BUS_WIDTH(16)".
As a result, the assertion will always be triggered.

Use a "<=" condition for the assertion instead.

Signed-off-by: Hua Zheng <writeforever@foxmail.com>
2024-12-26 06:21:25 +01:00
Ruibin Chang
4ce0ff5ef4 drivers/timer/it8xxx2: fix busy wait timer race condition
Command "waitms 50" on ChromeBook EC console, then it will crash EC.

Because arch_busy_wait() is re-entried by two different tasks,
the second calling will reset the timer and may cause the first
calling to fail to reach the waiting destination
(if the first calling's wait time is longer enough).

Verified by follow test pattern:
west build -p auto -b it8xxx2_evb tests/kernel/timer/timer_api
west build -p auto -b it8xxx2_evb tests/kernel/timer/timer_error_case
west build -p auto -b it8xxx2_evb tests/kernel/timer/timer_monotonic
west build -p auto -b it8xxx2_evb tests/kernel/timer/starve
west build -p auto -b it8xxx2_evb tests/kernel/context

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2024-12-25 08:40:53 +01:00
Tran Van Quy
8f91d0c072 drivers: sdhc: support SDHC driver on Renesas RA8
This is initial commit to support SDHC driver on Renesas RA8
with r_sdhi modules

Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
Johan Hedberg
5f963feed4 modules: hal_silabs: Add stubs to support CONFIG_BUILD_ONLY_NO_BLOBS
Add empty function stubs to support building with the newly introduced
CONFIG_BUILD_ONLY_NO_BLOBS option.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-25 03:37:53 +01:00