Commit graph

1,620 commits

Author SHA1 Message Date
Fin Maaß
0038b34ff2 net: slip: move dev init into iface init
move dev init into iface init. By registering the
uart pipe at the end of the iface init, we also no longer
need to check in the callback if the iface init was done.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-27 14:17:31 +02:00
Robert Khanafiev
23748dd517 drivers: ethernet: phy: vsc8541: added interrupt mode support
Added support for the MDINT interrupt pin, through which the PHY signals
the MCU when certain link events occur.

Signed-off-by: Robert Khanafiev <robert.khanafiev@fischer-electronic.com>
2026-04-27 14:16:31 +02:00
Robert Khanafiev
18a9f5a4bf drivers: ethernet: phy: vsc8541: replace monitor thread with workqueue
The link was monitored in a separate thread that was initialized with
an incorrectly defined stack. This caused an exception on some systems.
The thread has been replaced with a dedicated workqueue.

Signed-off-by: Robert Khanafiev <robert.khanafiev@fischer-electronic.com>
2026-04-27 14:16:31 +02:00
Fin Maaß
a551f2fac2 drivers: ethernet: mdio: stm32: use k_mutex
use k_mutex instead of the k_sem

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-24 19:05:49 +02:00
Fin Maaß
c29fb364ed drivers: ethernet: mdio: stm32: refactor driver
now that the ethernet mac is the parent of
the mdio node, we can improve the mdio
driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-24 19:05:49 +02:00
Fin Maaß
747adf26e7 drivers: ethernet: stm32: remove parent child structure
remove parent child structure in the dt,.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-24 19:05:49 +02:00
Khai Cao
6168031e21 drivers: ethernet: recover stuck mode transition using MIOC
When switching ETHA operating modes, the transition may fail to
complete if the PHY-derived clock is unexpectedly stopped, leaving
RMAC in an indeterminate state.

If the requested mode is not reached within the timeout, enable
RMAC emergency clock recovery (MIOC0) to flush internal RMAC state
and temporarily switch to a free‑running clock. Wait for the ETHA
mode transition to complete, then restore normal PHY clocking.

This improves robustness of RMAC/ETHA mode transitions without
requiring a full device reset.

Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
2026-04-24 13:02:27 +02:00
Aiman Mazlan
25648ff085 drivers: ethernet: w5500: add polling mode
For devices that does not have interrupt pin, default to polling mode
instead.

Polling period can be configured through
CONFIG_ETH_W5500_POLL_PERIOD.

Signed-off-by: Aiman Mazlan <mohammad.aiman@stratusauto.com>
2026-04-24 10:55:11 +02:00
Yangbo Lu
8dc7d1ddd6 drivers: eth_nxp_enet: drop redundant Kconfig and compatible for 1G support
There is no need to have extra Kconfig and compatible for just
1G speed support. Let's remove them.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-04-23 07:07:40 -04:00
Fin Maaß
cd62463267 drivers: ethernet: litex: add support for lldp and promisc
add support for lldp and promiscous mode for the
LiteX LiteEth driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-22 08:07:51 -05:00
Mario Paja
db13c4f3cb drivers: ethernet: lan865x enable vlan
These changes enable vlan support on LAN865x T1S MAC-PHY

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2026-04-22 10:08:16 +02:00
Fin Maaß
fad67c8364 drivers: ethernet: litex: move net_eth_mac_load into iface init
move net_eth_mac_load into iface init, that way we don't
need to save the mac address in the data struct.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-21 17:46:18 +01:00
Mario Paja
dab07ba429 drivers: ethernet: lan9250 add vlan support
These changes enable VLAN support on LAN9250

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2026-04-21 17:45:13 +01:00
Fin Maaß
8938faa8d3 drivers: ethernet: intel: add missing net_if_carrier_off
add missing net_if_carrier_off before setting the phy callback.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-20 17:48:51 -05:00
Fin Maaß
41b1d20bb4 drivers: ethernet: intel: use iface as user_data for phy callback
use iface as user_data for phy callback,
as we only need that in the phy callback.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-20 17:48:51 -05:00
Fin Maaß
76bdf61668 drivers: ethernet: xilinx: use iface as user_data for phy callback
use iface as user_data for phy callback,
as we only need that in the phy callback.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-20 17:48:51 -05:00
Fin Maaß
9f3c8e0e8a drivers: ethernet: esp32: use iface as user_data for phy callback
use iface as user_data for phy callback,
as we only need that in the phy callback.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-20 17:48:51 -05:00
Fin Maaß
f7cfb9f843 drivers: ethernet: litex: use iface as user_data for phy callback
use iface as user_data for phy callback,
as we only need that in the phy callback.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-20 17:48:51 -05:00
Krisztian Szilvasi
d739e447fa drivers: ethernet: eth_w5550: increase rx thread stack size
The boards and shield using W5500 chip on latest release (v4.4)
require higher stack size to function

Signed-off-by: Krisztian Szilvasi <krisztian@atym.io>
2026-04-20 18:09:23 +02:00
Philipp Steiner
a7cdc70c64 net: fix PTP TX timestamping on native_tap and AF_PACKET
native_tap only queued TX timestamp callbacks for gPTP packets, which
left PTP SO_TIMESTAMPING socket traffic without TX timestamps.

Add host-clock packet timestamp updates in native_tap TX/RX paths, queue
TX timestamp callbacks when net_pkt_is_tx_timestamping() is set (while
preserving gPTP behavior without double-queueing), and propagate
SO_TIMESTAMPING TX/RX flags for AF_PACKET packets in net_context.

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
2026-04-20 13:22:07 +02:00
Philipp Steiner
5bbef54237 drivers: ethernet: stm32: use PLL1_Q as the H5 PTP reference clock
RM0481 Rev 4 documents the Ethernet PTP timestamp clock as a dedicated
reference clock (`clk_ptp_ref_i`), not the `eth_hclk` bus clock.
Table 115 ("Kernel clock distribution overview", p. 470/3154) lists
`ETH (ptp)` on `pll1_q_ck`, and the IEEE 1588 section states that the
64-bit PTP time is updated from `clk_ptp_ref_i`.

Add an explicit `mac-clk-ptp` clock for STM32H5 sourced from
`STM32_SRC_PLL1_Q`, use that clock rate for PTP addend programming.

Because this change introduces source-clock configuration for STM32
Ethernet clocks, update the STM32H7 DWMAC path as well: use
`clock_control_configure()` for source clocks such as `eth-ker`, while
keeping `clock_control_on()` for gated clocks.

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
2026-04-20 13:22:07 +02:00
Tim Pambor
0fe8f5541c ethernet: dwmac: fix multicast reception
By default the DWMAC ethernet controller is configured
to drop all multicast packets. Currently, HW filtering is
not supported, so we need to configure the controller to
pass all multicast packets.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-04-17 12:36:21 +01:00
Venkatesh Odela
50e3ffe7a8 drivers: ethernet: eth_xilinx_axienet: fix missing start/stop support
Add ethernet_api start() and stop() callbacks to support the Zephyr
net iface down/up workflow.

stop() disables MAC RX, stops DMA RX and TX channels,disables MAC TX,
and resets all descriptor ring indices.

start() seeds the RX DMA ring and enables MAC RX and TX.

Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
2026-04-17 10:37:43 +02:00
Venkatesh Odela
bdb7b85cc7 drivers: ethernet: eth_xilinx_axienet: fix TX enable bit position
The Transmitter Configuration register (offset 0x408) TX enable bit is
bit 28 as per the AXI Ethernet Subsystem product guide (PG138), not bit 11.

Fixes: 4342d7108b ("drivers: ethernet: Add Xilinx AXI Enet driver")
Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
2026-04-17 10:37:33 +02:00
Adib Taraben
39e3d29774 drivers: eth_nxp_enet_qos: support PTP timestamping
Added PTP timestamping support.

Signed-off-by: Adib Taraben <theadib@gmail.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-04-16 11:39:45 -05:00
Yangbo Lu
56bfdab49b drivers: eth_nxp_enet_qos: drop wrong hw capability
Dropped ENET_MAC_PACKET_FILTER_PM_MASK in hw capabilities,
which was added by mistake.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-04-16 11:39:45 -05:00
Adib Taraben
7e06ea552f drivers: eth_nxp_enet_qos: use buffer2 DMA feature
Implemented the use of buffer2 DMA descriptor feature.

Signed-off-by: Adib Taraben <theadib@gmail.com>
2026-04-16 11:39:45 -05:00
Johannes Berndorfer
2764de5c7d drivers: ethernet: esp32: Fix bug in DMA buffer read copy logic.
Fixed a logic bug in the ESP32 Ethernet DMA RX datapath.

See #107201.

Signed-off-by: Johannes Berndorfer <johannes@berndorfer.com>
2026-04-15 17:17:45 -04:00
Fin Maaß
494f99b25c drivers: ethernet: litex: use mem_addr_t
use mem_addr_t for register addresses.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-15 17:15:46 -04:00
Fin Maaß
8ee6844036 drivers: ethernet: call net_if_carrier_off first
net_if_carrier_off() should be called before
phy_link_callback_set(), as itside it, the carrier could be
already changed.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-14 22:23:41 -04:00
Yangbo Lu
1be0d9a58b drivers: ethernet: dsa_tag_netc: validate RX tag before using
The RX tag length and port index in the tag should be validated
before using.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-03-31 10:25:39 -05:00
Fin Maaß
511a50d831 drivers: ethernet: nxp: correct net_if_carrier use
net_if_carrier is to be used independently of the
administrative state (start and stop of the ethernet_api).

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-30 09:55:50 -05:00
Pisit Sawangvonganan
edae0e7e30 drivers: fix typo in (ethernet, flash, fpga, fuel_gauge, gpio, i2c)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/ethernet`
- `drivers/flash`
- `drivers/fpga`
- `drivers/fuel_gauge`
- `drivers/gpio`
- `drivers/i2c`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Nikhil Namjoshi
4d2950a694 drivers: ksz8081: Add PHY readiness check after PHY reset
Some systems can have board layout that can cause PHY
reset to be slower. So add more checkes to make sure
PHY is completely out of reset. We basically check
1) Power down bit from BMCR register
2) Reset bit from BMCR register
3) Factory Bit in OMSO register

Tested:

Verified that on a system with slow PHY
reset, the bit verification logic helps
ensure PHY is out of reset.

If the PHY takes longer thann 0.5s, then the
PHY bit checking logic helps surface the problem.

Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
2026-03-26 19:28:25 -04:00
Fin Maaß
ff422cd6c8 drivers: ethernet: wifi: remove now redundant net_if_set_link_addr()
As net_if_set_link_addr() is now already done by the
overlaying net_mgmt, we no longer need to do it
in the drivers

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-24 10:49:59 -05:00
Paolo Bazzanella
1863204eda drivers: ethernet: eth_renesas_ra: Fix for link up
In a board I am trying to bring up(RA6M3 + LAN9370),
the phy callback got executed before net_if_carrier_off(),
which meant the OS thought permanently the interface was down.
Moving the net_if_carrier_off() before the callback registration
seems to fix the issue.

Signed-off-by: Paolo Bazzanella <pbbazzanella@gmail.com>
2026-03-23 19:26:51 -05:00
Tim Pambor
1bf22717ed ethernet: dwmac: configure MAC based on PHY link state
Add support for configuring the MAC based on the PHY link state.
This allows the driver to properly set the speed and duplex
settings of the MAC when the link state changes.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-03-23 17:39:06 -05:00
Fin Maaß
062facbab2 net: dsa: remove NET_DSA_DEPRECATED
remove the deprecated NET_DSA_DEPRECATED.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-23 15:01:57 -05:00
Fin Maaß
e02f974244 drivers: ethernet: native_tap: remove wrong vlan_setup
this is a leftover from when the vlan ifaces were not
virtual ifaces. With this currently in we would deactive lldp
on the main iface everytime a vlan is deactivated.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-23 15:00:38 -05:00
Fin Maaß
911ce665c9 drivers: ethernet: w5500: only start thread in iface init
start rx and link status thread in iface init,
as only then the iface pointer in the data
struct is set.

ALso simplify link status update logic.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-20 09:52:48 -05:00
Andrei-Edward Popa
3abb23cd85 drivers: ethernet: add dm9051 driver
Added ethernet driver for DM9051 Ethernet Controller

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
2026-03-20 13:32:33 +09:00
Fin Maaß
9cc679b81b drivers: ethernet: remove redundant net_pkt_set_iface()
remove redundant net_pkt_set_iface() it is already set in
net_recv_data() and net_pkt_rx_alloc_with_buffer().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-19 14:55:52 -05:00
Fin Maaß
4148fcb78d drivers: ethernet: lan9250: only start thread in iface init
start rx and link status thread in iface init,
as only then the iface pointer in the data
struct is set.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-19 17:01:01 +01:00
Fin Maaß
cd93ce5c3a drivers: ethernet: enc424j600: only start thread in iface init
start rx and link status thread in iface init,
as only then the iface pointer in the data
struct is set.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-19 17:01:01 +01:00
Fin Maaß
5c1f567a57 drivers: ethernet: enc28j60: only start thread in iface init
start rx and link status thread in iface init,
as only then the iface pointer in the data
struct is set.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-19 17:01:01 +01:00
Fin Maaß
60577493c6 drivers: ethernet: w6100: only start thread in iface init
start rx and link status thread in iface init,
as only then the iface pointer in the data
struct is set.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-19 17:01:01 +01:00
Khai Cao
a2ba59830c board: renesas: Add ethernet support for Renesas ek_ra8t2
Add Ethernet support including:
- Board initialization code with PHY reset handling
- Device tree definitions for ethernet
- PHY link state tracking fixes in ethernet driver

Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
2026-03-19 16:59:26 +01:00
Lucien Zhao
f70eecc201 drivers: ethernet: phy: motorcomm: Add YT8531 support to YT8521 driver
Track success explicitly and only report timeout when no matching PHY ID
was found after all retries.

Extend the Motorcomm YT8521 PHY driver to support YT8531 chip.
The YT8531 is compatible with YT8521 and shares the same register
layout and configuration interface.
- "motorcomm,yt8521" for YT8521
- "motorcomm,yt8531" for YT8531

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2026-03-19 11:41:44 +00:00
Fin Maaß
6fef8582ce drivers: ethernet: lan865x: use phy-handle
use the dt prop `phy-handle' to get the phy.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-19 11:37:05 +00:00
Fin Maaß
6c9f402c0f drivers: net: wifi: ethernet: use net_if_get_device()
use the provided net_if_get_device() function
to get the device.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-18 15:27:24 -05:00