From: Andrew Lunn <andrew@lunn.ch>
To: 李志 <lizhi2@eswincomputing.com>
Cc: weishangjuan@eswincomputing.com, 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, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, rmk+kernel@armlinux.org.uk,
yong.liang.choong@linux.intel.com, vladimir.oltean@nxp.com,
jszhang@kernel.org, jan.petrous@oss.nxp.com,
prabhakar.mahadev-lad.rj@bp.renesas.com, inochiama@gmail.com,
boon.khai.ng@altera.com, dfustini@tenstorrent.com,
0x1207@gmail.com, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, ningyu@eswincomputing.com,
linmin@eswincomputing.com, pinkesh.vaghela@einfochips.com
Subject: Re: Re: Re: Re: Re: [PATCH v3 2/2] ethernet: eswin: Add eic7700 ethernet driver
Date: Thu, 31 Jul 2025 15:31:52 +0200 [thread overview]
Message-ID: <bad83fec-afca-4c41-bee4-e4e4f9ced57a@lunn.ch> (raw)
In-Reply-To: <2b4deeba.3f61.1985fb2e8d4.Coremail.lizhi2@eswincomputing.com>
> > You hardware has a lot of flexibility, but none of if should actually
> > be needed, if you follow the standard.
> >
> > So phy-mode = "rgmii-id"; should be all you need for most boards.
> > Everything else should be optional, with sensible defaults.
> >
>
> On our platform, the vendor-specific attributes eswin,dly-param-* were
> initially introduced to compensate for board-specific variations in RGMII
> signal timing, primarily due to differences in PCB trace lengths.
So it seems like, because you have the flexibility in the hardware,
you designed your PCB poorly, breaking the standard, so now must have
these properties. It would of been much better if you had stuck to
the standard...
Please ensure your default values, when nothing is specified in DT,
correspond to a board which actually fulfils the standard. The next
board which is made using this device can then avoid having anything
special in there DT blob.
> These attributes allow fine-grained, per-signal delay control for RXD, TXD,
> TXEN, RXDV, RXCLK, and TXCLK, based on empirically derived optimal phase
> settings.
> In our experience, setting phy-mode = "rgmii-id" alone, along with only
> the standard properties rx-internal-delay-ps and tx-internal-delay-ps,
> has proven insufficient to meet our hardware's timing requirements.
You don't need vendor properties for RXCLK and TXCLK, that is what
tx-internal-delay-ps and rx-internal-delay-ps do. They change the
clock signal relative to TX and RX data. So you only need properties
for TXEN and RXDV. You should probably call these
eswin,txen-internal-delay-ps and eswin,rxdv-internal-delay-ps. In the
binding you need to clearly define what these mean, for your hardware,
i.e. what is the delay relative to?
> 1. Setting all delay parameters (RXD, TXD, TXEN, RXDV, RXCLK, and TXCLK)
> using vendor-specific attributes eswin,dly-param-*.
> e.g.
> eswin,dly-param-1000m = <0x20202020 0x96205A20 0x20202020>;
> 2. Setting delay parameters (RXD, TXD, TXEN, RXDV) using vendor-specific
> attributes eswin,dly-param-* , RXCLK using rx-internal-delay-ps and
> TXCLK using tx-internal-delay-ps.
> e.g
> eswin,dly-param-1000m = <0x20202020 0x80200020 0x20202020>;
> rx-internal-delay-ps = <9000>;
> tx-internal-delay-ps = <2200>;
Neither. DT should not contain HW values you poke into registers. They
should be SI using, in this case, pico seconds. From these delays in
picoseconds, have the driver calculate what values should be written
into the registers.
And these delay values are unlikely to be correct. You are using
rgmii-id, so the PHY is adding 2ns. You want the MAC to make small
tuning adjustments, so 200 could be reasonable, but 9000ps is way too
big.
Andrew
next prev parent reply other threads:[~2025-07-31 14:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 9:18 [PATCH v3 0/2] Add driver support for Eswin eic7700 SoC ethernet controller weishangjuan
2025-07-03 9:19 ` [PATCH v3 1/2] dt-bindings: ethernet: eswin: Document for EIC7700 SoC weishangjuan
2025-07-03 9:51 ` Krzysztof Kozlowski
2025-07-06 12:56 ` 韦尚娟
2025-07-15 8:54 ` 韦尚娟
2025-07-15 9:00 ` Krzysztof Kozlowski
2025-07-03 10:49 ` Rob Herring (Arm)
2025-07-03 10:49 ` Rob Herring (Arm)
2025-07-03 16:02 ` Andrew Lunn
2025-07-03 9:20 ` [PATCH v3 2/2] ethernet: eswin: Add eic7700 ethernet driver weishangjuan
2025-07-03 9:53 ` Krzysztof Kozlowski
2025-07-03 12:02 ` Russell King (Oracle)
2025-07-03 16:12 ` Andrew Lunn
2025-07-07 10:09 ` 李志
2025-07-15 9:28 ` 李志
2025-07-15 13:09 ` Andrew Lunn
2025-07-21 2:40 ` 李志
2025-07-21 13:10 ` Andrew Lunn
2025-07-22 11:24 ` 李志
2025-07-22 14:07 ` Andrew Lunn
2025-07-31 8:56 ` 李志
2025-07-31 13:31 ` Andrew Lunn [this message]
2025-08-22 2:37 ` 李志
2025-08-22 3:17 ` Andrew Lunn
2025-08-22 3:26 ` 李志
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=bad83fec-afca-4c41-bee4-e4e4f9ced57a@lunn.ch \
--to=andrew@lunn.ch \
--cc=0x1207@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=boon.khai.ng@altera.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dfustini@tenstorrent.com \
--cc=edumazet@google.com \
--cc=inochiama@gmail.com \
--cc=jan.petrous@oss.nxp.com \
--cc=jszhang@kernel.org \
--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=lizhi2@eswincomputing.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ningyu@eswincomputing.com \
--cc=pinkesh.vaghela@einfochips.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh@kernel.org \
--cc=vladimir.oltean@nxp.com \
--cc=weishangjuan@eswincomputing.com \
--cc=yong.liang.choong@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.