Commit graph

25,525 commits

Author SHA1 Message Date
Fin Maaß
db6b1782c2 drivers: ethernet: phy: ar8031: use default speeds
use default speeds from dt to configure phy on init.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-24 16:57:04 +01:00
Fin Maaß
d8711bba5a drivers: ethernet: phy: ksz8081: use default speeds
use default speeds from dt to configure phy on init.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-24 16:57:04 +01:00
Fin Maaß
e0587ada7f drivers: ethernet: phy: put shared macro in shared header
put the macro to get the default speeds into a
shared header for the phys.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-24 16:57:04 +01:00
Fin Maaß
c069fb0961 drivers: ethernet: remove phy_configure_link() usage
remove the use of phy_configure_link() in the ethernet drivers.
The user can now select the default speeds via DT prop, doing
another phy_configure_link() in the eth driver would overwrite
that.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-24 16:57:04 +01:00
Fin Maaß
f473806777 drivers: ethernet: phy: ar8031: remove fixed link mode
fixed link mode is a mode where we don't comunicate with the phy,
therefore we don't need it in other phys as the generic phy_mii one.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-24 16:57:04 +01:00
Zhaoxiang Jin
1564438d17 drivers: acmp: Updated driver to be compatible with nxp_rt7xx
1. Fixed the bug that DAC value was set incorrectly.
2. The MIMXRT700 does not have windowed mode and
'enableSample' controls, code added for compatibility
on this platform.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-07-24 16:56:55 +01:00
Jordan Yates
2a88cb50f5 spi: stm32: initialise according to zephyr,pm-device-runtime-auto
Don't automatically enable device runtime PM on the SPI port just
because `PM_DEVICE_RUNTIME` is enabled. Require the user to explicitly
call `pm_device_runtime_enable` on the port, or add
`zephyr,pm-device-runtime-auto` to the devicetree node.

Through the usage of `pm_device_driver_init`, the default clock control
and pinctrl handling can all be contained in `spi_stm32_pm_action`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-07-24 06:14:20 -04:00
Jordan Yates
d8f87a6d09 spi: stm32: move PM handler above init
Move the PM handler above the `init` function so that the later can
refer to the former.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-07-24 06:14:20 -04:00
Vytautas Virvičius
e1eaa0e39e drivers: serial: native_tty: config_get support
This commit adds config_get support for native_tty. This is helpful as
some driver code (e.g. u_blox m8) will error out if they can't read the
current configuration.

Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
2025-07-24 02:47:59 -04:00
Peter van der Perk
9c9dc0dfb4 drivers: mdio_nxp_enet_qos: Add Clause 45 support.
Adds handler for C45 read/write phy transactions.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-07-24 02:46:32 -04:00
Peter van der Perk
3510fda674 boards: nxp: vmu_rt1170: Fix TJA1103 phy config
Also increase regulator init priority so that ethernet vdd is
turned before PHY initialization

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-07-23 17:31:55 +01:00
Peter van der Perk
7fbf146af2 drivers: eth: phy: tja1103: Remove ISR thread and add auto mode.
Re-use the workqueue instead of having dedicated thread for handling
interrupts. This reduces memory usage and complexity.

Furthermore adds an auto mode for 100BASE-T1 negotiation.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-07-23 17:31:55 +01:00
Bjarki Arge Andreasen
638bf6b03d modem: cmux: Decouple modem cmux and cellular driver
The modem modules cmux module is currently directly coupled to the
presence of specific modems, rather than being selected by drivers
for whatever hardware wants to request the default MTU of 127 bytes.

This commit the makes the device drivers (for now, modem_cellular)
select the symbol, thus decoupling the modem modules from the
presence of any specific device.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-23 17:31:22 +01:00
Tahsin Mutlugun
94a962e87e drivers: flash: max32: Wrap flash read to utilize ECC workaround
Use wrapper function for read operations to allow using the new HAL
function that handles ECC checks and erased page detection.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-07-23 17:30:44 +01:00
Furkan Akkiz
0d1088875c drivers: flash: Add wrap version of flash write function
To fix MAX32690 flash problems, I created a wrap version of
MXC_FLC_Write(...) function which disables ICC before calling write
function and enables ICC after this function.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-07-23 17:30:44 +01:00
Tahsin Mutlugun
41f2be9e5f drivers: flash: max32: Disable interrupts before accessing flash
Disable interrupts during flash operations to prevent unintended jumps.

Interrupts are now disabled before read, erase, and write operations to
avoid accidental jumps to other flash sections while working on a
specific section.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-07-23 17:30:44 +01:00
Tahsin Mutlugun
cb0f951f3d drivers: counter: max32_rtc: Add clock source selection support
Add clock source selection support by applying changes introduced in
41a0ba7.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-07-23 17:29:34 +01:00
Tim Lin
2d18c7ec81 drivers/i2c: it51xxx: Avoid entering power policy during PIO transfers
Avoid entering low-power state during I2C host transfers in PIO mode.
Entering a low-power state during an active PIO transfer may prevent
the peripheral from generating the clock signal correctly,
resulting in transmission errors.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-07-23 17:29:18 +01:00
Tim Lin
f0af5be2b4 drivers/i2c: it8xxx2: Avoid entering power policy during PIO transfers
Avoid entering low-power state during I2C host transfers in PIO mode.
Entering a low-power state during an active PIO transfer may prevent
the peripheral from generating the clock signal correctly,
resulting in transmission errors.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-07-23 17:29:18 +01:00
Tim Lin
7cf9a58b7b drivers/i2c: it81xx2: Avoid entering power policy during PIO transfers
Avoid entering low-power state during I2C host transfers in PIO mode.
Entering a low-power state during an active PIO transfer may prevent
the peripheral from generating the clock signal correctly,
resulting in transmission errors.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-07-23 17:29:18 +01:00
Tomáš Juřena
0f760ed64c drivers: clock: stm32c0: Add an option to enable CRS for HSI48
Allows enabling the Clock Recovery System (CRS) for HSI48 to achieve
the expected accuracy for USB transfers. Uses USB SOF packet by default.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2025-07-23 17:27:24 +01:00
Vijayakannan Ayyathurai
8a32bd7cd0 drivers: ethernet: intel: Add i226 Ethernet MAC device driver
The Intel i226 Ethernet Controller is a PCIe Gen 2 one-lane modular
endpoint device that integrates a GbE Media Access Control (MAC) and
Physical Layer (PHY) port. This driver provides support for MAC and
DMA-specific initialization and runtime TX/RX operations.

Key features:
- MSI-X interrupts for TX/RX DMA channels.
- Multiple TX/RX DMA channel support with exclusive bottom-half.
- Implements a circular descriptor ring architechture with
  producer-consumer semantics for high performance pkt processing.
- Full duplex support for 10/100/1000 Mbps.
- Half duplex support for 10/100 Mbps.
- Auto-negotiation for 10/100/1000 Mbps.
- MTU customization for flexible packet sizes.
- MAC address filtering based on:
  - Random MAC generation.
  - Local-mac-address mentioned in device tree.
  - EEPROM pre-programmed mac address.
  - Setting mac address via net shell.
- Support for multiple Ethernet interface instances.

Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
Signed-off-by: Ling Pei Lee <pei.lee.ling@intel.com>
2025-07-23 17:17:24 +01:00
Vijayakannan Ayyathurai
c62b3d9637 drivers: mdio: Add Intel i226 MDIO driver support
Intel i226 MAC supports MDIO C22 and MDIO C45. Standard PHY registers
are accessible through MDIO C22, whereas PMAPMD and PCS are accssible
through MDIO C45.

Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
2025-07-23 17:17:24 +01:00
Vijayakannan Ayyathurai
affecd1839 drivers: ethernet: Add platform driver for MMIO mapping reuse
The Ethernet device model consists of multiple subsystem components, such
as MDIO, PHY, MAC and PTP_CLOCK. These components are mapped into a single
PCIe BAR location with same base address.

This platform driver retrieves the MMIO mapping details and provides a
framework to share it with all the child subsystem components. This
approach avoid the duplicate remapping, ensures efficient re-use of
MMIO mappings across related devices.

Example device tree structure for first ethernet instance:

parent0: parent0 {
        compatible = "intel,eth-plat";
        interrupt-parent = <&intc>;
        vendor-id  = <0x8086>;
        device-id  = <0xXXXX>;

        igc0: igc0 {
                compatible = "intel,igc-mac";

                /*
                 * MAC specific properties.
                 */

                status = "okay";
        };

        mdio0: mdio0 {
                compatible = "intel,igc-mdio";
                #address-cells = <1>;
                #size-cells = <0>;

                ethphy0: ethernet-phy@0 {
                        compatible = "ethernet-phy";
                        /*
                         * PHY specific properties.
                         */
                        reg = <0x0>;
                };
        };
};

This framework is modular and re-usable for other PCIe based Ethernet
devices. It can also be extended to support additional platform specific
information shared across child nodes.

Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
2025-07-23 17:17:24 +01:00
Fabio Baltieri
ad998d6f36 Revert "driver: serial: uart_ns16550: Add pm support for uart_ns16550 driver"
This reverts commit fd88386a9f, it breaks
uart support on ITE platforms when PM is enabled but PM_RUNTIME is not,
possibly others as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-07-23 17:16:40 +01:00
Tim Lin
648919f6df drivers/i2c: it51xxx: Refactor ISR to reduce clock stretch in PIO mode
Move handling of write-to-clear status and stop detect to the
beginning of the ISR for PIO mode to reduce unnecessary clock
stretching and improve responsiveness during transfers.

This patch also separates status clearing for shared FIFO mode,
ensuring it is done at the appropriate point after data handling
completes, maintaining correct transfer behavior.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-07-23 09:36:37 +02:00
Georgij Černyšiov
54e16c4ad2 drivers: mipi_dbi: stm32: get fmc frequency correctly
Use clock api to get correct FMC clock frequency.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2025-07-23 09:34:08 +02:00
Nick Ward
38c3225af6 drivers: sensor: bmi323: use sensor_value_from_micro()
Use sensor_value_from_micro() helper.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2025-07-23 09:33:59 +02:00
Thomas Altenbach
513073b598 drivers: flash: stm32_qspi: Fix erase size for dual-flash
When dual-flash mode is enabled, any erase operation is executed on both
flash memories in parallel. This means from the flash driver's point of
view, the size of a given sector/block is twice the size of a
sector/block on a single flash memory.

For example, assuming 4-KiB sectors for each flash memory, if the flash
driver is asked to erase at address 0x0000, the erase size must be a
multiple of 8 KiB since each sector erase operation will cause a 4-KiB
sector to erased in each flash memory.

Before this commit, the doubled erase size was only considered in
'setup_pages_layout'. Now, the actual sizes of the erase operations are
properly set in the flash driver's data and are used everywhere in the
driver.

Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
2025-07-23 09:32:22 +02:00
Thomas Altenbach
8c638f29fd drivers: flash: stm32_qspi: Fix page size for dual-flash
When dual-flash mode is enabled, even bytes are written to the first
flash memory and odd bytes to the second flash memory. This means, from
the flash driver's point of view, the size of a flash page is twice the
size of a single flash memory's page.

So if each flash memory has 256-byte pages, 512 bytes should be used as
page size by the flash driver. Using 256 bytes was working fine but is
suboptimal.

Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
2025-07-23 09:32:22 +02:00
Thomas Altenbach
c4afaaacf6 drivers: flash: stm32_qspi: Fix status register access for dual-flash
When dual-flash mode is enabled, two identical flash memories are
connected to the QUADSPI peripheral, each having its own set of
registers. This means that when reading or writing a flash register,
this has to be made for both flash memories.

For example, when reading a status register (1 byte), the QUADSPI
peripheral must be configured to read two bytes of data, which
correspond respectively to the value of the register in the first and
second flash memory. Same thing when writing.

Before this commit, when dual-flash mode was enabled, only the register
of the first flash memory was considered, which means the second flash
memory could be incorrectly configured and that any write/erase
operation could be considered as completed too early, if the operation
takes more time to complete for the second flash memory.

Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
2025-07-23 09:32:22 +02:00
Thomas Altenbach
f9f6b24166 drivers: flash: stm32_qspi: Factorize all status register reads
The 'qspi_read_status_register' routine implements the reading of a
flash memory's status register. This routine is used anytime reading a
status register is needed, except in 'qspi_wait_until_ready'. This
commit moves the read routine to be able to use it in
'qspi_wait_until_ready'. The 'qspi_write_status_register' is also moved
to keep it close to the read routine.

Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
2025-07-23 09:32:22 +02:00
Thomas Altenbach
20beb3eb74 drivers: flash: stm32_qspi: Simplify #ifdef for dual-flash
In multiple places, "#if DT_PROP(DT_NODELABEL(quadspi), dual_flash) &&
defined(QUADSPI_CR_DFM)" was used to guard sections specific to
the dual-flash feature. This is quite long and "#ifdef
STM32_QSPI_DOUBLE_FLASH" is now used instead.

Note the presence of QUADSPI_CR_DFM is no more checked. This is not
considered as an issue since when QUADSPI_CR_DFM is not available, the
QSPI hardware doesn't support dual-flash mode so this mode must not be
enabled in the devicetree. With that change, enabling dual-flash mode
when not available causes a compile-time error.

Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
2025-07-23 09:32:22 +02:00
Mike Szczys
5f1e9a3523 drivers: uart_mcumgr: log warning when smp drops data
Add warning logs when data is dropped on the serial transport by the smp
system due to buffer overrun.

Signed-off-by: Mike Szczys <mike@golioth.io>
2025-07-23 09:32:06 +02:00
Robert Hancock
45eedaa614 drivers: ethernet: phy: vsc8541: allow disabling autonegotiation
Add support for disabling autonegotiation to the cfg_link callback, as
with the phy_mii driver.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-07-23 09:31:17 +02:00
Robert Hancock
aab1f68d08 drivers: ethernet: phy: vsc8541: Add timeout on SW reset
The driver previously could enter an infinite loop if the PHY software
reset failed to complete, which could happen due to hardware reset
issues or MDIO bus problems. Add a timeout of 1000 iterations so we
report an error in this scenario rather than causing a lockup.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-07-23 09:31:17 +02:00
Robert Hancock
211e9ea6bd drivers: ethernet: vsc8541: Fixed inverted reset GPIO
For GPIOs driving active-low signals, such as the VSC8541's reset pin,
they are supposed to be declared as active low in the device tree, and
set to 1 to assert and 0 to clear. Change the driver as such so that it
does not leave the PHY stuck in reset when so configured.

Also changed all in-tree board DTS files for this PHY to properly
declare the reset GPIO as active low.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-07-23 09:31:17 +02:00
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