Commit graph

24538 commits

Author SHA1 Message Date
Robert Hancock
07f45204cb drivers: ethernet: phy: vsc8541: Use 16-bit values for MDIO access
The internal register read/write functions used uint32_t for the values
even though the registers are only 16 bits wide, resulting in a bunch of
casting. Change the internal functions to use uint16_t and wrap them for
the external read/write API which uses uint32_t.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-07-23 09:31:17 +02:00
Robert Hancock
ee5a71911a drivers: ethernet: phy: vsc8541: add MDIO enable/disable
The driver was not enabling the MDIO bus before trying to access
registers. Added enabling and disabling the bus around PHY register
accesses.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-07-23 09:31:17 +02:00
Robert Hancock
c20d197c97 drivers: ethernet: phy: vsc8541: fixed build warnings
Fixed some build warnings in the driver from previous changes by
removing an unused variable and hooking up the cfg_link function. Also
removes some implicit boolean conversions.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-07-23 09:31:17 +02:00
Fin Maaß
62745596b4 drivers: ethernet: phy: microchip_vsc8541: use mutex
use mutex to protect page register

phy_mc_vsc8541_get_link got removed from
phy_mc_vsc8541_link_cb_set so, that
phy_mc_vsc8541_link_monitor (own thread)
is the only one to change data->state

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-23 09:31:17 +02:00
Fin Maaß
74d62a0903 drivers: ethernet: phy: microchip_vsc8541: improve driver
- implement configure link
- support half duplex
- use defines from mii.h
- fix check ret vals

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-23 09:31:17 +02:00
Dawid Niedzwiecki
6d5cdbb13e drivers: flash: add andes qspi xip flash driver
Add a flash driver that is used to perform flash operations on a flash
chip that is connected to an Andes QSPI controller and is used for XIP
mode.

The driver is as small as possible, because necessary code has to be
placed in RAM. It is not possible to fetch code from flash while
performing erase/write operations.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-07-23 09:30:33 +02:00
Sabrina Simkhovich
b591d141a2 drivers: sensor: mb7040: add support for MB7040 ultrasonic sensor
This commit adds a new driver for the MaxBotix MB7040 ultrasonic
rangefinder. The driver uses I2C communication to read range data
from the sensor and exposes it via the Zephyr sensor API.

Tested on an esp32-s3 board using I2C bus. Verified readings at multiple
distances to confirm accuracy.

Signed-off-by: Sabrina Simkhovich <sabrinasimkhovich@gmail.com>
2025-07-22 19:37:18 -04:00
Kapil Bhatt
0d4472ae44 drivers: nrf_wifi: Remove station mode from monitor mode
Monitor mode doesn't require station mode. Disabling station mode
require necessary changes to work monitor mode.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-07-22 19:36:37 -04:00
Xiaolu Sun
b623663ffc drivers: i2c_sedi: Apply DTS clock_frequency to I2C during initialization
Previously, the clock_frequency property defined in the Device Tree was
not applied to the I2C controller, causing the controller to ignore the
specified bitrate configuration if no other config for speed. When using
default hardware settings, the lack of an explicit timing or frequency
config may result in the controller ignoring bitrate settings. This change
ensures that the clock_frequency value from DTS is now correctly mapped
and set during controller initialization, allowing the bitrate to take
effect as intended. This improves hardware configurability and ensures
the I2C bus operates at the desired speed specified in the Device Tree.

Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
2025-07-22 19:32:08 -04:00
Hake Huang
8add9219a7 drivers: timer : cortex_m_systick MAX_TICKS protection
when CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC set to 960M
and CONFIG_SYS_CLOCK_TICKS_PER_SEC set to 100
the MAX_TICKS will be zero or even negative value, which is not
expected.
so need add a protection here downgrading the accuracy to
its as high as possible

also add build message to show that tickless has no effect

fixes: #36766

there used to be a workaround, not a fix,
either change the CONFIG_SYS_CLOCK_TICKS_PER_SEC=200
or
CONFIG_PM to set the CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
to 32678

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-07-22 08:19:55 -04:00
Benjamin Cabé
5c95ff509f drivers: sensor: paj7620: use LOG_MODULE_DECLARE across driver files
paj7620 log module was being registered twice ; use LOG_MODULE_DECLARE
instead in paj7620_trigger.c

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-22 08:16:06 -04:00
Parthiban Veerasooran
61095cd78e drivers: ethernet: phy: microchip_t1s: always reschedule phy_monitor_work
Previously, phy_monitor_work_handler() would return early without
rescheduling the delayed work if the callback (cb) was not set,
causing the periodic monitoring to stop. This change ensures that
k_work_reschedule() is always called, even when cb is NULL, so
monitoring of the PHY state continues.

This prevents the monitor from being inadvertently stopped and
ensures consistent behavior regardless of callback registration.

This issue was observed during testing with the evb-lan8670-rmii
(an external LAN8670 PHY) connected to the SAME54 Curiosity Ultra
platform.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-07-22 08:13:01 -04:00
Parthiban Veerasooran
893eea6cda drivers: ethernet: phy: microchip_t1s: fix missing MDIO bus enable/disable
Call mdio_bus_enable() and mdio_bus_disable() during clause 22 register
read/write operations. Previously, these APIs were not invoked, which
could lead to improper MDIO bus handling.

This issue was observed during testing with the evb-lan8670-rmii
(an external LAN8670 PHY) connected to the SAME54 Curiosity Ultra
platform.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-07-22 08:13:01 -04:00
Parthiban Veerasooran
c41cde799d drivers: ethernet: phy: microchip_t1s: fix C45 registers direct access
C45 direct registers access is only supported by the LAN865x internal PHY,
not by the LAN867x external PHY, even though the MAC supports it. Restrict
C45 direct register access to the LAN865x internal PHY. The LAN867x
external PHY supports C45 registers only via indirect access through C22
registers.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-07-22 08:13:01 -04:00
Parthiban Veerasooran
5e6e8da495 drivers: ethernet: lan865x: fix module init priority
Align the LAN865x driver module initialization priority with the default
priorities of MDIO and PHY drivers. The microchip_t1s PHY driver supports
both LAN865x internal PHY and LAN867x external PHY. It was observed that
the microchip_t1s driver initialization priority did not match the
priority sequence used by the GMAC driver when the evb-lan8670-rmii (an
external LAN8670 PHY) was connected to the SAME54 Curiosity Ultra
platform, leading to potential initialization order issues. This change
ensures the correct initialization sequence for reliable operation.

The initialization priorities of the microchip_t1s and mdio_lan865x
drivers are now set to the default values used in Zephyr. The LAN865x
driver init priority is updated to the most appropriate value so that the
microchip_t1s init priority aligns with all MAC drivers, maintaining the
correct initialization sequence.

Since the microchip_t1s driver can be used by many MAC drivers, keeping
the default priority provided by Zephyr is a good approach. Instead,
setting a specific priority for the eth_lan865x driver is more appropriate
to ensure proper initialization order.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-07-22 08:13:01 -04:00
IBEN EL HADJ MESSAOUD Marwa
8b355e9306 drivers: usb: udc: prevent USB clock disable in sleep mode
Prevent disabling OTG HS and USBPHY clocks
during sleep on STM32U5 series

Disabling these clocks during sleep mode
was causing USB device initialization issues

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-07-22 08:11:49 -04:00
IBEN EL HADJ MESSAOUD Marwa
d4b2808b68 drivers: usb: device: prevent USB clock disable in sleep mode
Prevent disabling OTG HS and USBPHY clocks
during sleep on STM32U5 series

Disabling these clocks during sleep mode
was causing USB device initialization issues

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-07-22 08:11:49 -04:00
Mike J. Chen
1f69b91e90 drivers: audio: dmic_mcux: remove arbitrary mapping of pdm to dmic channel
The dmic_mcux driver required a mapping of paired dmics to
specify the same pdm number, and would arbitrarily assign the left
channel of the pair to even dmic channel number and the right
to an odd dmic channel number.

Change this so that the pdm number in the mapping is
used as the dmic channel number, and paired dmics are checked to
specify consecutive pdm numbers (instead of the
same pdm number).

This allows users to control explicitly which dmic
channel to use and whether that dmic channel is left or right,
without this arbitrary indirect mapping. This is important
in case they want a dmic that is wired to be right channel
to be assigned to dmic channel 0, which is the only channel
that supports hwvad.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-07-21 21:36:44 -04:00
Yishai Jaffe
ee7834997b drivers: led: shell: add blink cmd
Add blink command to led shell module

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-07-21 13:07:07 -04:00
Travis Lam
f94a45c276 drivers: flash: nordic: Introduce nrf_mramc driver
Add SHIM layer for nrfx_mramc driver for zephyr

Signed-off-by: Travis Lam <travis.lam@nordicsemi.no>
2025-07-21 09:19:45 -04:00
Luis Ubieda
25b4e868a9 gnss: u-blox f9p: Add RTK integration to driver
Enable driver to consume RTK data-correction messages published
in order to enhance GNSS Navigation results.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-21 09:19:14 -04:00
Luis Ubieda
2418612421 modem: ubx: Change request buffer to be void
So this API can be used to send frames with a different encoding than
UBX. This enables UBX drivers to send RTCM3 correction frames using UBX
API, without having to switch over modem pipes.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-21 09:19:14 -04:00
Stoyan Bogdanov
ff2328522a drivers: pwm: Add support for cc23x0 LGPT PWM
Add PWM support for LGPT0, LGPT1, LGPT2 and LGPT3 for cc23x0 SoC.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2025-07-21 07:26:18 -04:00
Parthiban Nallathambi
455e76f68f drivers: gpio: fix pincm lut size
LUT sizes directly reflects the global data when enabled in dts
(even if no or few pins are really consumed). Also the PINCM
numbering across the series (g, l and c) is within 255, so fix
to use uint8_t to save the global space.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2025-07-21 07:25:50 -04:00
Parthiban Nallathambi
7a70fab29b drivers: gpio: add support for mspm0L series banks
All the HAL API/wrapper depends on PINCM indexing, which cannot
be derived from neither pin number nor the address offset.

With current approach, update the LUT table of possible PINCM's
for L series with GPIO A, B and C banks.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2025-07-21 07:25:50 -04:00
Parthiban Nallathambi
6bef297052 drivers: clock: conditional compile ulpclk udiv divider
although udiv is represented in clock tree of L series, this is
not really present or controllable from SYSCTL registers. Enable
udiv only if present in dts.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2025-07-21 07:25:50 -04:00
Matt Rodgers
56621fa1de drivers: adc: stm32: add support for differential mode
Differential mode support consists of:
- If differential mode is supported by the underlying hardware AND at
  least one differential channel is enabled in the devicetree for this
  ADC instance, then perform a differential mode calibration in addition
  to the usual single ended calibration during initialisation.
- Set channels to the appropriate differential or single ended mode
  during channel setup.

Currently the N6 series is not supported even though the underlying
hardware supports differential mode, due to complications in the
calibration procedure.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
Co-authored-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-07-21 07:25:30 -04:00
Saravanan Sekar
e051ec23ca drivers: pwm: Add a support for TI MSPM0 PWM capture
TI MSPM0 timer module has capture block used to capture timings of input
signal. Add a support for TI MSPM0 PWM capture.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2025-07-21 07:25:10 -04:00
Jordan Yates
365774246a spi: nrfx_spim: initial pin state to SLEEP, not DEFAULT
Configure the initial pin state of the SPIM peripheral to SLEEP, not
DEFAULT. This fixes the pins being configured in DEFAULT until the first
time the interface is used if `zephyr,pm-device-runtime-auto` is
enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-07-21 07:23:06 -04:00
Jun Lin
f1f7ca459b drivers: input: npcx: init semaphore before interrupt enable
A kernel panic was observed on a platform when k_sem_give() was called
in npcx_kbd_ksi_isr(). From the panic information, it appears that
the semaphore was used before it was initialized. This commit prevents
the potential issue by enabling the interrupt only after
the input_kbd_matrix_common_init() function is called
(where the semaphore is initialized).

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-07-21 07:22:53 -04:00
Jordan Yates
69acc016eb serial: nrfx_uarte: initial pin state to SLEEP
Configure the initial pin state of the UARTE peripheral to SLEEP, not
left uninitialised. This fixes the pin configuration not being set until
the interface is used if `zephyr,pm-device-runtime-auto` is enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-07-21 07:22:38 -04:00
Luis Ubieda
ef41627f81 i3c: stm32: Prevent mutex deadlock on DAA failure
Make sure this function always unlocks bus_mutex.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-20 23:24:58 -04:00
Dmitrii Sharshakov
4044e0e75c drivers: hwinfo: rpi_pico: use bootrom method on RP2350
RP2350 provides a function to get OTP-backed chip ID. Prefer using this
on supported platforms for these reasons:
- a secure internal identifier, same as read by picotool
- works on flashless boards
- does not conflict with code running in XIP mode (e.g. when the other
 core tries to access device ID)
- when used with USB HWID serial number will match one BootROM has

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Co-authored-by: Alexander Wachter <alexander@wachter.cloud>
2025-07-20 18:49:09 -04:00
Lidor T
b68058787e counter: cmsdk_apb_dualtimer: Use clock freq from DT clocks
Previously, the CMSDK APB dual timer driver hardcoded the counter
clock frequency to 24 MHz, which limits reuse across SoCs and
boards with different timer clock sources.

This patch replaces the hardcoded frequency with a value derived
from the device tree's `clocks` phandle, using the
`clock-frequency` property of the referenced clock controller node.

If the property is missing, it falls back to a default 24 MHz.

Signed-off-by: Lidor T <lidor@exibit-iot.com>
2025-07-19 15:50:31 -04:00
Pieter De Gendt
c5a2542ad9 drivers: wifi: esp_hosted: select NANOPB_ENABLE_MALLOC
Use Kconfig symbol instead of the manual definition.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-07-19 15:46:08 -04:00
Mark Geiger
edbce504b0 sensor: nrf-qdec: Allow sampleper register configurable through dts
Allow for users to define the sampling period via the sampleper
register on a per instance basis through device-tree properties.
The previous value was hard coded. The same value is now the default
value.

Signed-off-by: Mark Geiger <MarkGeiger@posteo.de>
2025-07-19 15:45:27 -04:00
Armando Visconti
0d38a88666 drivers/sensor/: lis2dux12: fix ODR setting
In lis2dux12_freq_to_odr_val, the loop through the array of possible ODR
frequencies can break sooner than expected if power-mode is
set to High Performance mode and the requested ODR is less than or
equal to 25Hz.

Moreover, move the "odr |= 0x10" statement used for HP mode in the
chip_api set_odr_raw() API, so that we enter the HP mode even when the
ODR is set from DT only.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-07-19 15:44:26 -04:00
Ren Chen
0b9095e9a2 drivers: spi: it51xxx: fifo mode support
This commit adds shared/group fifo mode support.

Tested with: samples/drivers/spi_flash

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2025-07-19 15:43:28 -04:00
S Mohamed Fiaz
fd88386a9f driver: serial: uart_ns16550: Add pm support for uart_ns16550 driver
This commit enables the pm device runtime driver support
for the uart_ns16550 driver.

Signed-off-by: S Mohamed Fiaz <fiaz.mohamed@silabs.com>
2025-07-19 15:40:59 -04:00
Phi Tran
529a11057e drivers: gpio: renesas_rx: Refactor macros for conditional generation
This change introduces GPIO_RX_PORT_IRQ_DECL() and GPIO_RX_PORT_IRQ_ELEM()
macros to conditionally generate GPIO port IRQ declarations and elements
only when the 'port_irq_names' property exists in the device tree node.
This improves code clarity and avoids generating unused code for ports
that do not have IRQ support for Renesas RX

Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-07-19 15:40:18 -04:00
Scott Worley
ef4ec43e63 drivers: timer: microchip: xec: Microchip MEC one kernel timer driver
We want to simplify the maintenance burden and confusion of having
more than one driver for the same kernel timer peripheral used on
all Microchip MEC parts. The XEC version of the driver was converted
register definitions in the driver. Register access is performed using
Zephyr sys_read/write architecture specific inline routines. Driver DT
YAML was updated to use phandle for the 32-bit basic timer used for
ARCH_HAS_CUSTOM_BUSY_WAIT support, basic timer max value property,
and GIRQ interrtup aggregator hardware information.
SoC part Kconfigs, chip level/board level DTSI updated to use the
unified driver.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2025-07-19 15:39:40 -04:00
Simon Guinot
ec0fb2c92c drivers: led: add leds-group-multicolor driver
This driver supports multi-color LEDs built with several monochromatic
LEDs. ->set_color is the only LED driver API method implemented.

Instead of calling led_set_brightness() for each monochromatic LED,
led_set_color() can be called on the leds-group-multicolor device to
set all colors at once.

See the leds-group-multicolor DT binding for details.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2025-07-19 15:39:29 -04:00
Simon Guinot
e1aaf8761e drivers: led: pwm: automatically select PWM
For all LED drivers, the underlying subsystem is automatically selected
in Kconfig if their compatible node is found in DT.

The only exception is the PWM LED driver which depends on PWM instead
of selecting it. The PWM Kconfig option must be explicitely selected in
order to have LED_PWM enabled.

This patch updates the Kconfig of the PWM LED driver to have the same
behavior as other LED drivers: PWM is now automatically selected if a
"pwm-leds" compatible node is found in DT.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2025-07-19 15:39:29 -04:00
Michal Frankiewicz
1b014bab64 drivers: spi: nrfx_spim: Add support for non standard frequencies
Disabled frequency set approximation algorithm for spim's with prescaler.

Signed-off-by: Michal Frankiewicz <michal.frankiewicz@nordicsemi.no>
2025-07-19 15:38:04 -04:00
Luis Ubieda
d35d199253 sensor: adxl345: Add ability to use Streaming and Trigger with INT1
Prioritized over INT2 if both are defined.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 15:37:24 -04:00
Venkatesh Odela
873b05f39c drivers: ethernet: eth_xilinx_axienet : Add runtime MAC address generation
Add support to generate the random MAC if 'zephyr,random-mac-address'
is set,uses 'local-mac-address' from DT if available, or falls back
to a default Xilinx OUI-based MAC with zeroed bytes

Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
2025-07-19 15:37:14 -04:00
Alvis Sun
5b1d16dd6f drivers: wdt: npcx: add wdt driver support for npck3
Enables the extended Watchdog Timer driver for npck3.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2025-07-19 15:36:47 -04:00
Jordan Yates
79edfc0128 wifi: nrf_wifi: ignore interface if TX disabled
Automatically hide the nRF7x interface from the connection manager if
the TX path is disabled (scan only mode). This prevents function calls
like `conn_mgr_all_if_up(true)` from bringing up the interface which
can never result in a connection.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-07-19 15:35:31 -04:00
Julien Panis
afc5b6cb0d drivers: adc: cc23x0: Add power management
Add PM support to cc23x0 ADC module.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
2025-07-19 15:31:37 -04:00
Hao Luo
4b3565d958 drivers: pwm: Add support for Apollo510 pwm
This commit adds support for Apollo510 pwm driver

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-07-19 15:31:08 -04:00