Commit graph

24538 commits

Author SHA1 Message Date
Sreeram Tatapudi
02f2beab29 drivers: timer: Add support for IFX Low power timer
Adding support for low power timer to enable low power modes

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-05-29 20:19:18 -04:00
Daniel Leung
069cd4b861 i3c: rtio: deal with rtio_cqe_consume() returning NULL
rtio_cqe_consume() may return NULL so we need to check before
using any members of the returned struct.

Fixes #90473
Fixes #90489
Fixes #90497

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-05-29 20:18:43 -04:00
Daniel Leung
157bea57c8 i3c: set default return for i3c_device_adv_info_get()
Coverity flagged that the return variable ret may not be
initialized when returning. So give it a default value.

Fixes #90509

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-05-29 20:18:43 -04:00
Camille BAUD
f81e7559bf drivers: spi: introduce basic spi driver for wch
introduces a basic SPI driver for CH32 series

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-05-29 23:25:49 +02:00
Vincent van der Locht
a06ded8db6 drivers: ieee802154: added raw mode to mcxw ieee802154 driver
Add support for raw mode of mcxw ieee802154 driver.

Signed-off-by: Vincent van der Locht <vincent@synchronicit.nl>
2025-05-29 23:25:41 +02:00
jhan bo chao
a95d413128 driver: espi: add espi peripheral channel driver for rts5912
add espi peripheral channel driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
da767376ca driver: espi: add espi peripheral channel 8042_KBC driver for rts5912
add espi peripheral channel 8042_KBC driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
805b213424 driver: espi: add espi peripheral channel acpi shd mem driver for rts5912
add espi peripheral channel acpi shd mem driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
4320fb5249 driver: espi: add espi peripheral channel acpi driver for rts5912
add espi peripheral channel acpi driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
8ceb0d0f11 driver: espi: add espi peripheral channel HOST_CMD driver for rts5912
espi: add espi peripheral channel HOST_CMD driver for rts5912

Unlike other chips using IO port 0x800-0x8ff, we utilize shared memory to
transfer host command parameters. The AP firmware must have corresponding
settings for this configuration.

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
1bc30251a6 driver: espi: add espi peripheral channel port 80 driver for rts5912
add espi peripheral channel port 80 driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
1c461e38ca driver: espi: add espi vw channel driver for rts5912
add espi vw channel driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
9d41eac7ac driver: espi: add espi oob channel driver for rts5912
add espi oob channel driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
00fac713ea driver: espi: add espi flash channel driver for rts5912
add espi flash channel driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
537791facf driver: espi: add espi driver for rts5912
add espi driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
Raffael Rostagno
3780f9d817 drivers: spi: esp32: Fix NULL buffers condition
Fix condition in which both TX and RX buffers are NULL inside
spi_buf_set structures.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-05-29 20:17:33 +02:00
Titan Chen
13a024218e drivers: i2c: add i2c dw support error checks.
support errors check for
1. tx_abrt: nack and sda stuck low
2. scl stuck low

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-05-29 20:17:05 +02:00
Titan Chen
748789eadf drivers: i2c: rts5912 i2c dirver
base on DesignWare I2C driver to implement RTS5912 I2C driver.

1. support customize bus recovery function.
2. fix isr timing issue by enable tx empty control.
3. support stuck at low handle by enable bus clear feature.
4. support custom stuck at low timeout set from dts
5. disable block mode in rts5912 i2c.
6. support I2C_ALLOW_NO_STOP_TRANSACTIONS

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-05-29 20:17:05 +02:00
Marcin Szymczyk
b9d97aba21 drivers: misc: nordic_vpr_launcher: move SoC-specific config to DT
Targets that require setting secure attribute to VPR should specify
it in devicetree.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-05-29 15:16:52 +01:00
Chaitanya Tata
5601af34b7 drivers: nrf_wifi: Rejig the statistics
Separate out host(local) and FW(remote) statistics and in case of a
FW statistics timeout, return success with a magic value in the FW
statistics, this way atleast host statistics would be handy for
debugging instead of sending failure up.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-05-29 12:07:09 +02:00
Loic Domaigne
a8eace10b3 drivers: sensor: bme280: fix "config" register intialization issue
A write to the "ctrl_meas" register can cause the sensor to transition
from sleep to normal mode (which is default Kconfig settings). As per
BME280 datasheet, writes to the "config" register in normal mode may be
ignored. This can lead to use BME280_STANDBY_05MS and BME280_FILTER_OFF
instead of the values set by the application. To fix this, write to the
"config" register before "ctrl_meas" in the sensor init function.

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-05-29 12:06:39 +02:00
Tim Lin
e1b5b8b5f9 drivers/i2c: ite: Add handling for read operation with 0-byte length
The current I2C driver assumes that at least one byte will be read in CQ
(command queue) mode. However, when a 0-byte read is issued
(e.g., by cmd_i2c_scan),
The read handler uses (len - 1) to set the command queue length.
When len is 0, this underflows to 0xFF, leading to an incorrect transfer
length and possible crash.

To fix this, add a check in cq_mode_allowed() for reads with length 0:

-Fallback to PIO mode in such cases.
-Properly handle 0-byte reads by issuing STOP (E_FINISH) when the slave
 address is acknowledged.
-Add appropriate handling for NACK conditions when the slave address is
 not acknowledged.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-05-29 10:46:47 +02:00
Joel Guittet
9d4530fb79 drivers: counter: introduce counter node in esp32 timers
Add counter device tree node to the esp32 timers.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2025-05-29 08:41:59 +02:00
The Nguyen
bd87dbc368 driver: can: renesas: remove first can bus starting at init
Remove can bus starting at initial function

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-05-29 06:31:47 +02:00
The Nguyen
990b000e31 drivers: can: renesas: avoid breaking driver instance access
Keep data instance inside of data structure.
Avoid accessing global data or using pointers to out of
data instance.

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-05-29 06:31:47 +02:00
Sreeram Tatapudi
33e5748a4f drivers: gpio: Update GPIO driver to support XMC7200
Update GPIO driver to support XMC7200

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-05-28 21:29:20 +02:00
Sreeram Tatapudi
774a62e67b drivers: serial: Update UART driver to support XMC7200
Update UART driver to support XMC7200

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-05-28 21:29:20 +02:00
Sreeram Tatapudi
1fe5cb5982 drivers: clock_control: update clock control driver to support XMC7200
update clock control driver to support XMC7200

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-05-28 21:29:20 +02:00
Luis Ubieda
5cd3a7e79c sensor: afbr_s50: Add DTS configuration bindings
The following parameters are exposed through DTS bindings:
- ODR.
- Dual Frequency Mode.
- Measurement Mode.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-28 21:29:13 +02:00
Luis Ubieda
820975a409 sensor: afbr_s50: Add private channel to obtain pixel matrix
Each time this sensor gets a reading, it contains a matrix of 4 x 32
pixels containing distance readings, from which the 1-D result is
calculated. The private channel would expose this array through
Sensor APIs.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-28 21:29:13 +02:00
Luis Ubieda
f9d9e5bb6d modules: afbr: Add basic functionality
- Add AFBR module as a HAL.
- Platform layer to support running AFBR API using Zephyr.
- Ability to instantiate on device-tree.
- Samples in the module proving foundations works.
- Zephyr Sensor API support, by introducing:
    - Read/Decode for SENSOR_CHAN_DISTANCE (1-D results).
    - Streaming mode for DATA_READY (1-D results).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-28 21:29:13 +02:00
Daniel Baluta
85b6ff0b0b drivers: dma: sdma: Make access to DMA channel stats atomic
DMA channel stats like pending_length or free is not protected
and can be modified in parallel by a consumer and a producer.

This can result in non-atomic updates which in turn will result
in using stale data.

Fix this by making regions of code accessing dma stats atomic.

Fixes: e94c86f395 ("drivers: dma: Add initial support for NXP SDMA")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2025-05-28 20:02:31 +02:00
Daniel Baluta
312ff1c904 drivers: dma: sdma: Fix noise issue with pause/resume
Each time we configure an SDMA channel we also compute the total
allocated DMA buffer length but we assume is initialized with zero.

This is true each time a channel is requested. But if there are
multiple calls to configure without releasing the channel the buffer
length is not correctly computed.

So, we need to initialize it with zero each time we reconfigure the dma
channel.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2025-05-28 20:02:31 +02:00
Benjamin Cabé
fdf713ab51 drivers: sensor: icp101xx: update channel check condition
Removed a logically dead else by doing sensor channel check
in a way that's more aligned with how other drivers do it.

Fixes: CID 505949
Fixes: zephyrproject-rtos/zephyr#90558
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-05-28 17:49:50 +02:00
Bjarki Arge Andreasen
b668e9de40 drivers: clock_control: nrf: adapt NRF_HFINT_CALIBRATION option
CLOCK_CONTROL_NRF_HFINT_CALIBRATION depended on the renamed
nordic,nrf-hfxo -> nordic,nrf54l-hfxo. Update config to depend on
DT_HAS_NORDIC_NRF54L_HFXO_ENABLED to match new compat name.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-05-28 17:49:41 +02:00
Bjarki Arge Andreasen
400c038008 drivers: clock_control: z_nrf_clock: add get_startup_time API
Implement vendor specific
z_nrf_clock_bt_ctlr_hf_get_startup_time_us() which gets the startup
time of the high frequency clock used for Bluetooth.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-05-28 17:49:41 +02:00
Fin Maaß
f7153012ef dts: enum_macros: make sure that they are lowercase
DT_ENUM_HAS_VALUE_BY_IDX states, that the value
must be lowercase-and-underscores, this makes sure,
that they can match.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-05-28 17:48:57 +02:00
Brandon Allen
979933cfb4 drivers: current_sense_amplifier: add zero-current-voltage binding
some current sense amplifiers have a non zero offset voltage
that correlates to zero current. adding this offset voltage binding
allows the driver to be used with this type of circuitry.

Signed-off-by: Brandon Allen <brandon.allen@exacttechnology.com>
2025-05-28 17:48:47 +02:00
Olivier Lalonde
afc481ab31 modem_cellular: Add support for the simcom a76xx modem
Add support for the simcom a76xx modem which is similar to the simcom 7080
but has a few key differences. Tested with a simcom A7672SA module but as
there is a single simcom A76XX AT commands manual, the driver should work
with other modems of the series.

Signed-off-by: Olivier Lalonde <o@syskall.com>
2025-05-28 16:37:53 +02:00
Mathieu Choplain
5e9a10cb5b drivers: clock_control: stm32: don't enable RUNTIME_NMI all the time
The Clock Security System (CSS) feature signals failure of an external
oscillator by triggering an NMI. As such, when this feature is enabled,
RUNTIME_NMI must also be enabled such that the NMI handler can be modified
to point to the appropriate function.

The STM32 clock control Kconfig checks whether the CSS has been enabled in
Device Tree, and forcefully selects RUNTIME_NMI if enabled since the driver
code will require it. However, the check has been implemented improperly:
"dt_nodelabel_has_prop" was used instead of "dt_nodelabel_bool_prop", an
error similar to using DT_NODE_HAS_PROP() instead of DT_PROP() in C code.

Since the property always exists, as long as the HSE is enabled, the
RUNTIME_NMI option is always select'ed, even if not actually required.

Use the correct Kconfig function to ensure RUNTIME_NMI is select'ed only
when it is required, instead of whenever HSE is enabled regardless of CSS.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-05-28 15:38:31 +02:00
Andrzej Głąbek
a9405d005c drivers: adc_ad4130|adc_7124: Add ret initialization in *_perform_read()
Add initialization of `ret` to avoid reports of uninitialized variable
being returned. This variable normally gets initialized while the loop
iterates over channels, but potentially it could be left uninitialized
if the loop finished in its first iteration because of no channels to
be processed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-05-28 15:33:14 +02:00
Ricardo Rivera-Matos
2bb7fcc5df charger: axp2101: Guards against out-of-bounds read
Corrects the out-of-bounds check when reading
constant_charge_voltage_lut

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2025-05-28 12:22:21 +02:00
Henrik Brix Andersen
18aa6c8901 drivers: can: mcan: merge nested if-statements into one
Merge two nested if-statements into one.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-28 12:22:11 +02:00
Henrik Brix Andersen
45511fe634 drivers: can: mcan: declare the loop condition variables inside the loops
Declare the loop condition variable inside the loops to limit their scope.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-28 12:22:11 +02:00
Henrik Brix Andersen
40ec42e26f drivers: can: rcar: merge nested if-statements into one
Merge two nested if-statements into one.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-28 11:18:23 +02:00
Henrik Brix Andersen
09f54c98a7 drivers: can: rcar: declare the loop condition variables inside the loops
Declare the loop condition variable inside the loops to limit their scope.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-28 11:18:23 +02:00
Henrik Brix Andersen
24a46a597c drivers: can: rcar: always initialize return value variable
Always initialize the return value variable to avoid returning garbage.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-28 11:18:23 +02:00
Ricardo Rivera-Matos
68f300dc31 charger: bq25713: Corrects unsigned int comparison
Removes an unnecessary comparison of an unsigned int against the value
zero.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2025-05-28 11:10:43 +02:00
Ricardo Rivera-Matos
48854a8bcf charger: axp2101: Corrects unsigned int comparison
Removes an unnecessary comparison of an unsigned int against the value
zero.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2025-05-28 11:10:10 +02:00
Andrzej Głąbek
ec8632dcd1 drivers: adc_ad4130: Fix out-of-bounds accesses to channel_setup_cfg
Correct the size of the channel_setup_cfg array, as it should contain
entries for all available channels (AD4130_MAX_CHANNELS), not for the
available configuration slots (AD4130_MAX_SETUPS).
Move also checking of the channel index to the very beginning of
adc_ad4130_channel_setup(), to avoid potential writes to .live_cfg
beyond the channel_setup_cfg array.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-05-28 10:05:02 +02:00