Update the name of the version register to match the naming convention
used for other registers in the driver and locate based on its address.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
For PTP clocks which are explicitly part of Ethernet device
to provide PTP timestamping. We can select NET_L2_PTP_TIMESTAMPING
to provide Ethernet device driver complete dependency for PTP
timestamping support.
User doesn't have to take care of NET_L2_PTP_TIMESTAMPING enablement
in other places, and Ethernet device driver can control PTP
timestamping enablement via its PTP clock Kconfig option.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Renamed NET_L2_PTP Kconfig option to NET_L2_PTP_TIMESTAMPING,
to make its function clear to user. Also made it depend on
PTP_CLOCK which was more reasonable.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
save rx_pkt and bytes, like in the qos mac, in case
we got already got fragments of later packets.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The March-2026 Ethernet API migration (commit db984ee196) added
struct net_if *iface to the net_if_api start/stop declarations but
the eth_xlnx_gem_start_device and eth_xlnx_gem_stop_device definitions
were not updated, causing a build failure for any target that enables
the GEM driver (e.g. Zynq-7000 with zperf).
Add the missing parameter to both definitions.
Signed-off-by: Iustin Stolniceanu <iustin.stolniceanu@analog.com>
Use NET_ETH_ADDR_LEN instead of raw 6 value to define MAC address
byte array size in STM32 ethernet drivers.
Assert at build time that the MAC address array size in HAL do match
those in Zephyr.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
use DT_INST_ENUM_HAS_VALUE for
phy_connection_type, that way we don't have to do
string operations.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
We changed the return type of
sy1xx_mac_set_mac_addr, but forgot to change
the prorotype, but instead of fixing that we can
remove the prototype, as the function is only used
after it is been implemented.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
remove setting tx stats, that are already handled
by ethernet_send. It will already call
eth_stats_update_errors_tx on failiure
and on success via ethernet_update_tx_stats
it calls eth_stats_update_bytes_tx,
eth_stats_update_pkts_tx,
eth_stats_update_broadcast_tx and
eth_stats_update_multicast_tx.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
add a net_eth_carrier_set function, that
uses atomic_test_and_set_bit_to.
make net_eth_carrier_on and
net_eth_carrier_off inline and
based on net_eth_carrier_set.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add build-time validation of buffer constraints for the DWMAC driver.
This ensures that the configured buffer sizes and counts meet the
hardware requirements, preventing potential runtime issues due to
misconfiguration.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
add support for the stm32 f series in the
dwmac driver.
Assisted-by: Github Copilot:Claude Haiku 4.5
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
add support for the dwc_ether_mac10_100_1000_universal,
that is used, f.e. on the stm32 f series.
Assisted-by: Github Copilot:Claude Haiku 4.5
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Inside the work that is scheduled by net_eth_carrier_on
and net_eth_carrier_off there is already a log message,
when the carrier changes, we don't need to log the same
info in the ethernet drivers.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Adopt the new HAL/LL interfaces: ADC_LL_* macros,
esp_clk_tree_* clock helpers, and rng_ll_* entropy reads
across the adc, i2c, pwm, mdio and entropy drivers.
Update the Radio blobs to latest version.
Update linkers to include new sleep cache calls.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Replace the two-line pattern:
net_buf_unref(buf);
buf = NULL;
with net_buf_drop(&buf) which performs both operations
atomically in a single step.
Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Previously, not all of the SPI return values are verified.
Here we add checks after calling the SPI functions.
Signed-off-by: Ching Ping Sun <tom_sun@davicom.com.tw>
the ``void *user_data`` in port_phylink_change contains the
dsa port device. make this more explicit, so that we no longer
need to cast this.
This is now possible as this function
is no longer directly passed to phy_link_callback_set.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
remove log for link up, as it would already be logged by the networking
subsystem, when
CONFIG_NET_L2_ETHERNET_LOG_LEVEL_DBG=y.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
the dsa subsystem now sets the carrier,
therefore setting it in the nxp dsa port driver is redundant
and it can be removed.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Reset the semaphore before each MDIO transfer to discard any stale
k_sem_give() from the ISR that may have arrived after a previous
timeout. Without this, the next transfer would consume the stale
semaphore immediately and return incorrect data.
Signed-off-by: Martin Oliver Pitoňák <martin.pitonak@nxp.com>
The nxp_enet_mdio_wait_xfer() function ignores the return value of
k_sem_take(), causing it to always return 0 (success) even when the
MDIO transaction times out. This leads to callers receiving stale
data (0x0000) as a successful read result.
Fixes#99905
Signed-off-by: Martin Oliver Pitoňák <martin.pitonak@nxp.com>
Wire the on-chip Ethernet MAC and MDIO controller on the ESP32-P4
into the eth_esp32 driver. Includes the DT nodes (eth, mdio),
espressif,esp32-eth binding refresh, board pinctrl entries for
RMII and SMI, board defconfig and Kconfig fragment enabling
NET_L2_ETHERNET, and the SoC P4 Kconfig options for buffer count
and size. Adds the related pinctrl table entries and GPIO signal
map values.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Move RMII data plane pin selection to the pinctrl-0 property using
the RMII_* macros from the SoC pinctrl header. The pads use dedicated
EMAC IOMUX, so the driver reads the (slot, GPIO) pairs and routes them
directly instead of through pinctrl_apply_state(). Update the esp32
ethernet kit board to use the new rmii_default group.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Set the Interrupt Mask Register (IMR) before the RX Control Register (RCR)
when initializing the DM9051 ethernet controller. This prevents potential
race conditions where the receiver is enabled before interrupt masking
is properly configured.
According to the DM9051A datasheet, IMR bit 7 (PAR - Pointer Auto-Return
Mode) affects memory read/write pointer behavior. Setting IMR first ensures
the memory pointer configuration is ready before RX is enabled.
Signed-off-by: Ching Ping Sun <tom_sun@davicom.com.tw>
GPR bit 0 is Write-Only (WO per DM9051A spec), reading returns
undefined values (default XXh). The previous code read GPR and only
powered on the PHY if bit 0 was set to 1. If the read returned 0x00
(random undefined value), the PHY would never be powered on.
Fix by unconditionally writing GPR = 0x00 to power up the PHY,
ensuring it is always enabled regardless of any prior state.
Signed-off-by: Ching Ping Sun <tom_sun@davicom.com.tw>
Enabling the driver while QEMU is configured to use SLIP driver (which
is the default) causes crash on boot, making any networking sample
defunct in default configuration when running on qemu_x86.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Update all drivers to use "flags" instead of "sense" when accessing
interrupt properties from device tree. This aligns with the updated
interrupt controller bindings that now consistently use "flags" as
the cell name for the IRQ type field.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
Use RCR.ALL to enable reception of all multicast frames. MAR[7] is set
to 0x80 for broadcast only. This follows Zephyr driver convention
where a simple multicast-enable flag is preferred.
Signed-off-by: Ching Ping Sun <tom_sun@davicom.com.tw>
The MAC_CONFIGURATION register was unconditionally OR'ed with the FES
(speed) and DM (duplex) bits, forcing 100 Mbps full-duplex during MAC
initialization. The PHY link callback later updates these bits to match
the actual link state, but on 10BASE-T1S (PLCA) links the temporary
100 Mbps/full-duplex setting causes the MAC to ignore the COL signal
from the internal TENBASET_PHY block. As a result the MAC transmits
during another node's transmit opportunity, producing collisions and
lost data.
Initialize MAC_CONFIGURATION with FES and DM cleared (10 Mbps,
half-duplex, which is also the register's reset value) and let the PHY
callback set the correct speed/duplex once the link is up. Read-modify-
write is done via a local variable so both the set and clear masks are
applied in a single register write.
Fixes#109682
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Remove the driver-local struct ring_buffer in favour of sys_ringq.
Pointers are stored directly in the ring queues, which removes the need
for the POINTER_TO_UINT casts and fixes a potential platform-specific
pointer truncation issue on 64-bit architectures.
gmac_desc_list rings are unchanged as they require
in-place DMA descriptor access.
closes: #21155
Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
Convert the ENC424J600 Ethernet driver from a single hardcoded
devicetree instance to the standard Zephyr multi-instance pattern using
DT_INST_FOREACH_STATUS_OKAY().
Before this change, only instance 0 was registered, so boards with
multiple microchip,enc424j600 nodes could only create one Ethernet
interface.
This allows all status = "okay" ENC424J600 devicetree instances to be
registered.
Fixes#109849
Signed-off-by: Arayik Gharibyan <arayik.gharibyan.1999@gmail.com>