public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: lizhi2@eswincomputing.com
To: devicetree@vger.kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	netdev@vger.kernel.org, pabeni@redhat.com,
	mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
	rmk+kernel@armlinux.org.uk,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: ningyu@eswincomputing.com, linmin@eswincomputing.com,
	pinkesh.vaghela@einfochips.com, weishangjuan@eswincomputing.com,
	Zhi Li <lizhi2@eswincomputing.com>
Subject: [PATCH v1 0/2] net: stmmac: eic7700: fix EIC7700 eth1 RX sampling timing
Date: Fri,  9 Jan 2026 16:06:01 +0800	[thread overview]
Message-ID: <20260109080601.1262-1-lizhi2@eswincomputing.com> (raw)

From: Zhi Li <lizhi2@eswincomputing.com>

This series addresses an RX data sampling timing issue observed on the
second Ethernet controller (eth1) of the Eswin EIC7700 SoC.

On the EIC7700 SoC, the hardware introduces a receive clock to data skew
on eth1 that is not strictly fixed, but remains within a bounded range
under normal operating conditions. At Gigabit speed, this skew causes
the receive clock edge to occur later than the corresponding RX data at
the MAC input, which can result in incorrect RX data sampling.

The existing internal RX delay mechanisms, including the use of rgmii-id
mode and rx-internal-delay-ps adjustment, provide only a limited amount
of additional delay on the receive path, which does not offer sufficient
adjustment range to compensate for this condition. To address this, the
EIC7700 MAC provides an EIC7700-specific clock sampling inversion control,
which effectively shifts the sampling edge earlier and restores a valid
RX sampling window for Gigabit operation.

In addition, this series updates the enum values of the
rx-internal-delay-ps and tx-internal-delay-ps properties in the device
tree binding to reflect the actual delay step resolution implemented by
the EIC7700 hardware. The hardware applies delay in 20 ps increments,
while the previous enum values were based on an incorrect 100 ps per
step mapping.

The binding enum values and the driver conversion logic are updated
together so that the specified delay in picoseconds maps correctly to
the underlying hardware delay steps. This change corrects the DT-to-
hardware mapping and does not change the meaning or intended usage of
the delay properties.

The first patch updates the device tree binding to describe optional
clock sampling inversion control and the required HSP CSR registers.

The second patch updates the EIC7700 DWMAC glue driver to apply the
sampling correction at Gigabit speed, clear residual delay settings
left by the bootloader, and ensure all register accesses are performed
only after clocks are enabled.

These changes restore reliable RX operation on eth1 and ensure the
hardware is initialized into a known and consistent state.

Zhi Li (2):
  dt-bindings: ethernet: eswin: add clock sampling control
  net: stmmac: eic7700: enable clocks before syscon access and correct
    RX sampling timing

 .../bindings/net/eswin,eic7700-eth.yaml       |  57 +++++++-
 .../ethernet/stmicro/stmmac/dwmac-eic7700.c   | 132 +++++++++++++-----
 2 files changed, 148 insertions(+), 41 deletions(-)

-- 
2.25.1


             reply	other threads:[~2026-01-09  8:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09  8:06 lizhi2 [this message]
2026-01-09  8:08 ` [PATCH v1 1/2] dt-bindings: ethernet: eswin: add clock sampling control lizhi2
2026-01-09 18:27   ` Andrew Lunn
2026-01-10 18:26     ` Russell King (Oracle)
2026-01-11  4:05       ` Bo Gan
2026-01-12  7:05         ` 李志
2026-01-22 13:27           ` Andrew Lunn
2026-01-22 16:03             ` Russell King (Oracle)
2026-01-27  7:05             ` Min Lin
2026-01-27 13:40               ` Andrew Lunn
2026-01-12  6:00     ` 李志
2026-01-22 13:32       ` Andrew Lunn
2026-01-23  3:00         ` 李志
2026-01-23  3:19           ` Andrew Lunn
2026-01-23  7:39             ` Bo Gan
2026-01-23  9:52               ` 李志
2026-01-23 10:07               ` Krzysztof Kozlowski
2026-01-23 10:47                 ` Bo Gan
2026-01-23 19:43                   ` Andrew Lunn
2026-01-24  4:57                     ` Bo Gan
2026-01-26  3:10                       ` Min Lin
2026-01-26 18:29                         ` Russell King (Oracle)
2026-01-27  6:14                           ` Min Lin
2026-01-28  2:38                             ` Bo Gan
2026-01-28  5:48                               ` Min Lin
2026-02-03  6:06                                 ` Min Lin
2026-02-03 13:16                                   ` Andrew Lunn
2026-01-28 10:05                   ` Krzysztof Kozlowski
2026-01-29  2:01                     ` Bo Gan
2026-01-09  8:09 ` [PATCH v1 2/2] net: stmmac: eic7700: enable clocks before syscon access and correct RX sampling timing lizhi2
2026-01-09 18:31   ` Andrew Lunn
2026-01-12  6:55     ` 李志

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260109080601.1262-1-lizhi2@eswincomputing.com \
    --to=lizhi2@eswincomputing.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linmin@eswincomputing.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=ningyu@eswincomputing.com \
    --cc=pabeni@redhat.com \
    --cc=pinkesh.vaghela@einfochips.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=robh@kernel.org \
    --cc=weishangjuan@eswincomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox