From: Erik Beck <xunil@tahomasoft.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Chukun Pan <amadeus@jmu.edu.cn>, Heiko Stuebner <heiko@sntech.de>,
Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 3/4] arm64: dts: rockchip: Add HINLINK H68K
Date: Sun, 31 Aug 2025 12:28:00 -0400 [thread overview]
Message-ID: <20250831122800.330c9ab3.xunil@tahomasoft.com> (raw)
In-Reply-To: <6238650e-7a3c-4dd9-adad-cd2a5e925500@lunn.ch>
On Sun, 31 Aug 2025 17:53:19 +0200
Andrew Lunn <andrew@lunn.ch> wrote:
> > > > Rockchip by default do bad things with RGMII delays.
> > > >
> > > > tx_delay:
> > > > description: Delay value for TXD timing.
> > > > $ref: /schemas/types.yaml#/definitions/uint32
> > > > minimum: 0
> > > > maximum: 0x7F
> > > > default: 0x30
> > > >
> > > > rx_delay:
> > > > description: Delay value for RXD timing.
> > > > $ref: /schemas/types.yaml#/definitions/uint32
> > > > minimum: 0
> > > > maximum: 0x7F
> > > > default: 0x10
> > > >
> > > > Try setting both of these to 0. And then use 'rgmii-id'.
> > > >
> > > > Andrew
> > Setting both gmac0 and gmac1 to phy-mode=rgmii-id with tx/rx delay set to
> > <0x0> yields about a 7x improvement from ~6 Mbs (with phy-mode=rgmii-id
> > and tx/rx delay unset) to about 43 Mbps, which is still well below the
> > ~950 Mbs with phy-mode=rgmii and tx/rx delay unset.
>
> You need to split the problem into two. Rx delays and Tx delays. Use
> something like iperf in UDP mode, to send a stream of UDP packets, or
> receive a stream of UDP packets. TCP is bad for this sort of testing
> because Rx and Tx are interconnected due to flow control and
> retransmissions.
>
> Try small values of rx_delay to see if you can improve the Rx
> performance. Try small values to tx_delay, to see if you can improve
> the Tx performance.
>
OK, thanks.
Just so I am clear, the units are tenths of nanoseconds? So <0x02> is .2
nanoseconds?
> One problem we have with rx_delay and tx_delay is that they are
> magic. We have no idea what they mean. The RGMII standard says there
> should be a 2ns delay between data and clock. A poorly designed board
> could mean the MAC/PHY pair needs to insert say 1.8ns or 2.2ns, not
> 2ns as defined by the RGMiI standard. Rockchip also seem to encourage
> using rx_delay and tx_delay, so i would not be surprised to find
> Rockchip boards are often poorly designed and don't follow the RGMII
> standard.
>
> rx_delay/tx_delay can probably insert 0.2ns of delay, but it probably
> cannot insert -0.2ns of delay. So it could be, you cannot improve
> it. If that is the case, we need to consider another solution.
>
> Andrew
>
next prev parent reply other threads:[~2025-08-31 16:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 10:00 [PATCH 0/4] arm64: dts: rockchip: Add HINLINK H66K/H68K Chukun Pan
2025-08-18 10:00 ` [PATCH 1/4] dt-bindings: vendor-prefixes: Add HINLINK Chukun Pan
2025-08-18 10:00 ` [PATCH 2/4] dt-bindings: arm: rockchip: Add HINLINK H66K / H68K Chukun Pan
2025-08-18 10:00 ` [PATCH 3/4] arm64: dts: rockchip: Add HINLINK H68K Chukun Pan
2025-08-30 21:14 ` Erik Beck
2025-08-30 21:30 ` Andrew Lunn
2025-08-30 22:21 ` Erik Beck
2025-08-31 14:48 ` Erik Beck
2025-08-31 15:53 ` Andrew Lunn
2025-08-31 16:28 ` Erik Beck [this message]
2025-09-01 0:47 ` Andrew Lunn
2025-09-01 7:00 ` Chukun Pan
2025-09-01 10:24 ` Erik Beck
2025-09-01 14:06 ` Erik Beck
2025-09-02 7:00 ` Chukun Pan
2025-09-02 12:10 ` Erik Beck
2025-09-01 16:25 ` Erik Beck
2025-08-18 10:00 ` [PATCH 4/4] arm64: dts: rockchip: Add HINLINK H66K Chukun Pan
2025-08-18 17:27 ` [PATCH 0/4] arm64: dts: rockchip: Add HINLINK H66K/H68K Conor Dooley
2025-08-24 10:54 ` Heiko Stuebner
2025-08-30 21:11 ` Erik Beck
2025-08-30 21:26 ` Andrew Lunn
2025-08-30 22:20 ` Erik Beck
2025-08-31 13:55 ` Erik Beck
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=20250831122800.330c9ab3.xunil@tahomasoft.com \
--to=xunil@tahomasoft.com \
--cc=amadeus@jmu.edu.cn \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
/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
all inboxes | Powered by JetHome®