[PATCH net v1 0/2] net: stmmac: eic7700: fix delay calculation and initialization ordering
From: lizhi2
Date: Thu May 07 2026 - 04:36:56 EST
From: Zhi Li <lizhi2@xxxxxxxxxxxxxxxxxx>
This series fixes several issues in the EIC7700 DWMAC glue driver
affecting existing eth0 functionality due to incorrect delay programming
and initialization ordering.
The previous implementation used an incorrect delay step (100 ps),
while the hardware operates with 20 ps granularity. This resulted in
incorrect programming of RX/TX delay values relative to the actual
hardware timing model.
In addition, the driver did not guarantee that clocks were enabled
before accessing HSP CSR registers, and did not explicitly clear
TXD/RXD delay registers, which may leave residual configuration from
the bootloader and affect RGMII timing determinism.
The device tree binding is updated to reflect the actual hardware delay
model and to clarify the semantics of MAC-side delay configuration,
aligning it with the real programming model without changing the
intended semantic meaning of the properties.
Changes in this series:
- Correct delay step from 100 ps to 20 ps and validate input range
- Ensure clocks are enabled before CSR access
- Clear TXD/RXD delay registers during initialization
- Update dt-binding to use range-based constraints (0-2540 ps, 20 ps step)
- Make delay properties optional depending on RGMII mode
- Clarify MAC-side delay semantics in binding documentation
These changes correct eth0 behavior and hardware programming correctness
for existing usage.
The previous revisions (v1-v7) mixed bug fixes and new functionality.
Based on review feedback, the changes are now split, and this series
contains only fixes targeting the net tree. Eth1 enablement will be
submitted separately to net-next.
Previous discussion:
https://lore.kernel.org/lkml/20260427072353.1114-1-lizhi2@xxxxxxxxxxxxxxxxxx/
This binding update is safe as there are currently no in-tree users
relying on the previous enum-based representation.
Zhi Li (2):
dt-bindings: ethernet: eswin: refine delay model and HSP register
description
net: stmmac: eic7700: fix delay step calculation and ensure safe
register initialization
.../bindings/net/eswin,eic7700-eth.yaml | 50 ++++--
.../ethernet/stmicro/stmmac/dwmac-eic7700.c | 154 +++++++++++++-----
2 files changed, 148 insertions(+), 56 deletions(-)
--
2.25.1