Commit graph

28,390 commits

Author SHA1 Message Date
Lin Yu-Cheng
dd5f8c483b drivers: spi: spi_rts5912_spi: Add clock-frequency setting from dtsi
The clock-frequency value in dtsi can be used to change
the bus frequency for rts5912 driver and
it support in the range between 15000 to 50000000.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-12-16 10:10:35 +01:00
Aiden Hu
f3e7cde40b drivers: uhc: set right value for pipe by xfer's mps
maxPacketSize and numberPerUframe of pipe should
be set considering additional transactions.

Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
2025-12-16 10:08:55 +01:00
Aiden Hu
53e3cf281f drivers: uhc: add mcux_eps_interval to save ep interval
mcux_eps_interval is added as the new member of
uhc_mcux_data. It is used to save endpoint's
original interval value and can be compared
with xfer->interval.

Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
2025-12-16 10:08:55 +01:00
Aiden Hu
b3a6b4d405 drivers: uhc: use correct endpoint type and interval
In the USB transfer allocation, set endpoint type and interval
from the appropriate endpoint descriptor.

Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
2025-12-16 10:08:55 +01:00
Mathieu Choplain
98e98be846 drivers: display: stm32_ltdc: remove unnecessary depends on in Kconfig
`choice STM32_LTDC_PIXEL_FORMAT` is already enclosed in an `if STM32_LTDC`
block - there is no need to add a `depends on` on this option.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-15 17:10:41 +00:00
Guillaume Gautier
cec2702012 drivers: adc: stm32: fix init issue when 2 adc are enabled
If several ADCs are used and share a common clock property (for example
ADC1/2 prescaler value on STM32U5), none of them should be enabled when
the clock is set.
To that end, make sure to disable ADC at the end of the initialization,
it will be enabled later when necessary anyway.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-12-15 17:10:20 +00:00
Julien Racki
f8ffcbde17 drivers: i2c: stm32: Fix hang on read log position
Ensure that data is transmitted before logging
as it could cause lockups in some setups.

Also update i2c_stm32_v2_rtio.c to match
this behavior to always send data in order to avoid
the I2C to lockup.

Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2025-12-15 17:10:11 +00:00
Tim Pambor
9399183944 drivers: rtc: rv3028: add calibration support
Add support for RTC calibration API by implementing set_calibration
and get_calibration functions. RV3028 RTC supports calibration to
adjust for errors from +243.2 ppm to -244.1 ppm in steps of 0.9537 ppm.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-12-15 17:10:01 +00:00
Tim Pambor
92365ed4b7 drivers: clock_control: stm32{h5,u5}: fix PLL rate with fractional PLL
When calculating the PLL output rate, take into account the fractional part
of the PLL multiplier N. This ensures that the calculated output frequency
is correct.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-12-15 17:09:46 +00:00
Trond F. Christiansen
049d368524 sensor: bmm350: Fix I2C register write to use single transaction
The bmm350_prep_reg_write_rtio_async() function was incorrectly using two
separate SQEs for register writes, creating two distinct I2C transactions:
Before: [START][ADDR+W][REG][RESTART] + [START][ADDR+W][DATA][STOP]

Change to use a single SQE for the entire write:
After: [START][ADDR+W][REG][DATA][STOP]

Signed-off-by: Trond F. Christiansen <trond.christiansen@nordicsemi.no>
2025-12-15 17:09:32 +00:00
Xavier Razavet
aef5728e57 drivers: ieee802154: mcxw ieee802154 driver updated
To support the SSED attachment, the IEEE802154_MCXW_CSL_ACCURACY
default value shall be 50.

Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
2025-12-15 17:09:20 +00:00
Xavier Razavet
91079cf825 drivers: ieee802154: SSED attachment management
Few functions have been corrected to the SSED attachment for the
MCXW72 as leader :
- mcxw_tx():
  tx_frame.tx_delay corrected.
  Adjusts the scheduled transmission start time to account for the SHR
  duration (160us) as requested by the OpenThread radio API.

- mcxw_rx_thread():
  Stores the frame counter and key ID from a
  security-enabled enhanced ACK into the received packet's metadata
  for cryptographic verification.

- mcxw_tx_started() added:
  Notifies the registered event handler that a frame transmission has
  started, passing the frame buffer as context.

- pd_mac_sap_handler(): timestamp corrected

- mcxw_configure(): IEEE802154_CONFIG_EVENT_HANDLER case updated

Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
2025-12-15 17:09:20 +00:00
Muhammed Asif
20d7d23d53 drivers: pwm: microchip: add support for pwm tc g1
Add pwm driver using tc g1 peripheral.
Adds the support for generating pwm output.
Supports 8-bit, 16-bit and 32-bit mode of tc peripheral

Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
2025-12-15 17:07:24 +00:00
Jordan Yates
08f74a2638 lora: add lora_airtime
Add a simple function that exposes the airtime of a packet of a given
length.

Use the new internal implementations of the airtime function when
calculating TX durations inside the send functions to reduce code
duplication on a complex function.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-12-15 17:06:49 +00:00
Jordan Yates
fab5f57455 lora: optional disable CRC
Add the option to disable the builtin 16 bit CRC on the LoRa payload.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-12-15 17:06:49 +00:00
zjian zhang
e788c98af6 drivers: gpio: add amebadplus gpio driver
GPIO driver for amebadplus

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
2025-12-15 17:06:38 +00:00
zjian zhang
53bba6df01 drivers: serial: add amebadplus loguart driver
loguart driver for amebadplus

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
2025-12-15 17:06:38 +00:00
zjian zhang
d21b2aa15d drivers: pinctrl: add amebadplus pin controller driver
add amebadplus pin controller driver

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
2025-12-15 17:06:38 +00:00
CHEN Xing
14b2a1dfa2 drivers: counter: add support for sama7g54 PIT64B
Add driver for sama7g54 PIT64B
Use PIT64B as a zephyr counter device

Signed-off-by: CHEN Xing <xing.chen@microchip.com>
2025-12-15 07:30:40 -05:00
TOKITA Hiroshi
11d3fc4143 drivers: display: display_sdl: Reimplementing tile rendering
The current implementation has a bug in the calculation of
tile offsets, causing them to be calculated incorrectly.
This is particularly evident when there are fractional rows or columns.
Also, there was an assertion that assumed vtiled.

The logic has become too complicated,
so we'll reimplement to simplify this.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-12-15 07:30:31 -05:00
Josia Strack
287ca5b9eb drivers: gpio: pcf857x: ensure input pins default high for open-drain
Ensure that pins configured as inputs are driven high in the port
output register, consistent with open-drain operation. This prevents
inputs from being driven low unintentionally and aligns behavior
with hardware expectations.

Signed-off-by: Josia Strack <j.strack98@gmail.com>
2025-12-15 07:30:23 -05:00
William Tang
4f152eeb37 drivers: can: mcux: flexcan: fix prop_seg for enhanced bit timing
Move the no propagation segment configuration and prop_seg must be 0
logic from the general timing configuration to only apply within the
CAN FD specific sections.

This ensures that for classic CAN mode or platfrom without enhanced
bit timing, prop_seg is always decremented by 1.

The previous implementation incorrectly applied the enhanced bit timing
logic to classic CAN mode, which could cause timing misconfiguration
on devices with enhanced bit timing register support when operating in
classic CAN mode.

Fixes #99746

Signed-off-by: William Tang <william.tang@nxp.com>
2025-12-15 07:30:06 -05:00
Jason Yu
184e031163 drivers: timer: ostimer: Fix run fail when no deep_sleep_counter
Only access deep_sleep_counter when it is available.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-12-15 07:29:59 -05:00
Jason Yu
c9a1e0fd91 drivers: timer: ostimer: Change to use reset API
Use reset API to reset OSTIMER for better portability.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-12-15 07:29:59 -05:00
Valerio Setti
d76477f9eb drivers: crypto: mbedtls_shim: fix crash in AES-ECB for RISCV 64 bits
Using "pkt->out_len" as the output length of "psa_cipher_[en|de]crypt"
caused a crash in RISCV 64 bits platforms due to misaligned address
access.
The solution is to add a temporary value on the stack to store this lenght
and only after the [en|de]cryption copy it to "pkt->out_len".

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-12-15 07:29:29 -05:00
Fabio Baltieri
318e43503f drivers: ksz8081: fix reset pin polarity
The reset pin, like most reset pins, is active low. Fix the driver to
treat it as active low and simplify the pin control logic while at it.
Fix all current boards using the wrong pin definition and add a note for
out of tree users.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-12-15 07:29:21 -05:00
Zhaoxiang Jin
bd65e115fa drivers: comparator: add NXP ACOMP driver support
Add NXP ACOMP comparator driver support.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-15 07:29:01 -05:00
Holt Sun
45e9fe3eb2 drivers: crc: nxp: add CRC driver
Support CRC16 and CRC32 variants; return -ENOTSUP for unsupported types.
Use kCrcBits16/kCrcBits32 and complementChecksum for IEEE CRC-32.
Stream data via CRC_WriteData() and fetch results via
CRC_Get16bitResult()/CRC_Get32bitResult().
Provide simple thread-safety with a semaphore.

Work around the name clash between Zephyr's typedef crc_result_t and the
MCUX enum name by temporarily redefining crc_result_t around fsl_crc.h
include in this TU.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-12-15 07:27:48 -05:00
Sylvio Alves
b7b32944fc drivers: espressif: move ISRs into IRAM area
Most of Espressif drivers ISRs are already running in IRAM area, except
those in this PR. Move ISRs accordingly so we avoid any
interrupt miss when cache is disabled.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-15 07:27:10 -05:00
Jason Yu
5ce1df22fa drivers: counter: nxp_mrt: Support power device constraint
Call pm_policy_device_power_lock_put/pm_policy_device_power_lock_get
to coordinate with system level power modes.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-12-14 11:14:35 +00:00
Marek Maškarinec
5741f3ee6b drivers: tmag5273: Add mag gain property
Adds mag-gain-correction DT property, which sets the magnetic gain
correction value. Previously a property to select the channel for gain
correction existed, but there was no way to configure the correction
value itself.

Signed-off-by: Marek Maškarinec <marek.maskarinec@hardwario.com>
2025-12-12 09:58:56 -05:00
Jony Zhang
ddb3acfb74 drivers: usb: mcux_ehci: add MMIO configuration for i.MX 93 family
The original driver is only feasible for M-Core, but for Cortex-A Core,
it need to do MMU mapping to map physical address to virtual address,
to the main update is to add MMIO mapping in this driver, and all the
register access should use virtual address.

Replace direct base address access with DEVICE_MMIO_NAMED_* macros
to provide better memory mapping abstraction and improve platform
portability.

This change:
- Adds DEVICE_MMIO_NAMED_ROM/RAM to config and data structures
- Maps the register base address during driver pre-initialization
- Updates all base address references to use DEVICE_MMIO_NAMED_GET
- Maintains backward compatibility with existing functionality

The DEVICE_MMIO API provides a standardized way to handle memory-mapped
registers across different platforms and memory protection schemes.

Signed-off-by: Jason He <jason.he_1@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Jony Zhang <jony.zhang@nxp.com>
2025-12-12 09:58:32 -05:00
Jason He
c2b7ae10e6 drivers: usb: mcux_ehci: add clock control for i.MX 93 family
Support device tree specified clock rates for USB controller and PHY.

Signed-off-by: Jason He <jason.he_1@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Jony Zhang <jony.zhang@nxp.com>
2025-12-12 09:58:32 -05:00
Jason He
24c510ec54 drivers: clock: mcux_ccm: add USB clock control support
Add USB_CLK and USB_PHY_CLK support for NXP EHCI controller on MIMX9352.

Signed-off-by: Jason He <jason.he_1@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Jony Zhang <jony.zhang@nxp.com>
2025-12-12 09:58:32 -05:00
Tomas Gudelevičius
b2d7055de9 drivers: modem: cellular: reinit modem after script failures
If the modem reboots or stops responding to AT commands while in
RUN_DIAL, AWAIT_REGISTERED, or CARRIER_ON, the modem_cellular state
machine could previously dead-end. Applications had to recover by
manually issuing device PM suspend/resume.

This change adds an internal recovery path: after repeated chat/script
failures in the states above, the driver resets the state to INIT, and
posts an immediate RESUME event. This allows the initialization sequence
to run again and restores connectivity, including after unexpected modem
reboots.

No API changes; behavior only differs in failure scenarios.

Signed-off-by: Tomas Gudelevičius <tomas.gudelevicius@draeger.com>
2025-12-12 09:58:23 -05:00
Camille BAUD
7a1e2d7509 drivers: lora: Add explicit support for variants
Add explicit support for sx1268, sx1278, llcc68

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-12-12 09:57:09 -05:00
Camille BAUD
287f40edbe drivers: lora: Add regulator-ldo for sx126x
Adds ability to set usage of LDO instead of DCDC

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-12-12 09:57:09 -05:00
Damian Krolik
1a6ff4f8e4 drivers: ieee802154: remove unused IEEE802154_CSL_DEBUG
The Kconfig option is not used anywhere for a while.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2025-12-12 09:57:00 -05:00
Matthias Alleman
158ec0384b drivers: input: input_chsc5x: configurable ic type verification
Add Kconfig option to skip or execute the verification of the ic
type. This adds a delay of 100ms to the initialization.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2025-12-12 09:56:30 -05:00
Matthias Alleman
7a662cac8b drivers: input: input_chsc5x: add delay after reset
The sensor requires at least 94ms of delay before starting
communication after a reset. This is not mentioned in the
datasheet but is arbitrarily defined.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2025-12-12 09:56:30 -05:00
Anuj Pathak
4409ba8655 drivers: i2s: add i2s driver for max32 mcu
add necessary build files and i2s driver with tx/rx support

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2025-12-12 05:01:31 -05:00
Bjarki Arge Andreasen
7c2ab76a70 drivers: timer: nrf_grtc: Decouple clock source from CLOCK_CONTROL
The GRTC timer, typically used as sys clock on newer nordic chips,
is currently tightly coupled to the CLOCK_CONTROL_NRF drivers though
not being dependent on it. The GRTC and its device driver is
independent from CLOCK_CONTROL, its clock requirements are managed
by hardware, based on its clock source selection.

This commit moves the clock source selection to the GRTC driver, and
removes the hard coupling to the CLOCK_CONTROL drivers. To preserve
backwards compatibility, if CLOCK_CONTROL_NRF_K32SRC_RC is selected,
GRTC will default to LFLPRC.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-12-12 04:59:53 -05:00
Ruibin Chang
d26ffeba9d drivers/pwm/it8xxx2: add pwm init output level property
When EC reboot, pwm pins go back to default GPI mode.
After we set pin mode to pwm mode at init(), it would
output low, so LED will be light (LED is low-activated).
And until set_cycles() is called to set output high,
then LED will be turn off the light (PWM-LED flicker).
So add the property to set PWM channel init output level.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2025-12-12 04:56:42 -05:00
Qingsong Gou
de66e05602 drivers: watchdog: sf32lb: fix return errors
Fix watchdog driver return error

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-12-12 10:30:15 +01:00
Jérôme Pouiller
3fbaa29bba drivers: spi: siwx91x: Drop GSPI_MAX_BAUDRATE_FOR_DYNAMIC_CLOCK
Currently, clk_div_factor is force to 1 if user request more than 110MHz.
However, in this case, gspi_siwx91x_get_divider() will never return 2 or
more, unless the input clock is >= 220MHz. The si91x is not designed for
such high clock frequency. So, this case has never been tested.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
0623e6f390 drivers: spi: siwx91x: Simplify gspi_siwx91x_pick_lower_freq()
Since actual_hz is no more needed, we can simplify
gspi_siwx91x_pick_lower_freq().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
918426ff30 drivers: spi: siwx91x: clk_div_factor can't be 0
In gspi_siwx91x_config(), clk_div_factor can't be < 1. Therefore, we can
remove the dead code.

This code has been tested with tests/drivers/spi/spi_loopback, with a PLL
clock configured to 160MHz and a bus clock to 80MHz with success. I have
not found the case where change in GSPI_CLK_CONFIG are required.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
1c356d0ed1 drivers: spi: siwx91x: Fix use of GSPI_DATA_SAMPLE_EDGE
Until now, GSPI_DATA_SAMPLE_EDGE was enabled as soon as the user requested
> 40Mhz (even if the actual frequency was in fact 40Mhz). However, at 40MHz
and at 80MHz, use of GSPI_DATA_SAMPLE_EDGE generated read errors on the
last bit of the transaction:

    Buffer contents are different:
     [...],0xaa,0xaa,0xaa,0xaa,
    vs:
     [...],0xaa,0xaa,0xaa,0xab,

I have not found any case where GSPI_DATA_SAMPLE_EDGE is useful, so this
patch just remove this parameter.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
115241c645 drivers: spi: siwx91x: Simplify error management
In functions requiring to lock/release resources, it is less error prone to
have only one exit point and user goto to manage errors.

The behavior of the new code is exactly identical to the initial one.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
88b39fd6f9 drivers: spi: siwx91x: Simplify gspi_siwx91x_config()
The bit_rate variable does not bring any benefit.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00