devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@cherry.de>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>
Cc: jjm2473 <jjm2473@gmail.com>,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	heiko@sntech.de, kever.yang@rock-chips.com, naoki@radxa.com,
	honyuenkwun@gmail.com, inindev@gmail.com,
	ivan8215145640@gmail.com, neil.armstrong@linaro.org,
	mani@kernel.org, dsimic@manjaro.org, pbrobinson@gmail.com,
	alchark@gmail.com, didi.debian@cknow.org, jbx6244@gmail.com,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] arm64: dts: rockchip: add LinkEase EasePi R1
Date: Tue, 7 Oct 2025 18:32:15 +0200	[thread overview]
Message-ID: <88c6c40e-8c19-429d-a7d8-c8f2755f515c@cherry.de> (raw)
In-Reply-To: <aOU-_tPOmkyuw_kx@shell.armlinux.org.uk>

Hi Russel,

On 10/7/25 6:25 PM, Russell King (Oracle) wrote:
> On Tue, Oct 07, 2025 at 04:57:32PM +0200, Andrew Lunn wrote:
>> On Tue, Oct 07, 2025 at 10:32:26PM +0800, jjm2473 wrote:
>>> Andrew Lunn <andrew@lunn.ch> 于2025年10月6日周一 23:51写道:
>>>> Please change it to rgmii-id, and smaller tx/rx_delay values. Or show
>>>> us the schematics which clearly show extra long clock lines.
>>>
>>> In fact, the RTL8211F's RXDLY and TXDLY signals are both pulled low,
>>> just like the Banana Pi BPI-R2 Pro, so the configuration is also referenced:
>>> https://elixir.bootlin.com/linux/v6.15/source/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts#L237
>>
>> Pull low makes no difference to the 2ns RGMII delays.
> 
> To be clear, while the RXDLY and TXDLY are hardware strapping controls
> the hardware configuration of the 2ns RGMII clock delays, the realtek
> driver can (and does) override this according to the phy-mode property.
> Thus hardware strapping makes no difference to Linux.
> 
> So, what we get at the RTL8211F PHY is:
> 
> 	phy-mode	receive clock delay	transmit clock delay
> 	"rgmii"		0ns			0ns
> 	"rgmii-rxid"	2ns			0ns
> 	"rgmii-txid"	0ns			2ns
> 	"rgmii-id"	2ns			2ns
> 
> irrespective of RXDLY / TXDLY hardware strapping.
> 
>>> The tx_delay and rx_delay values were obtained using Rockchip's
>>> automatic scanning tool:
>>> https://github.com/istoreos/istoreos/blob/54746dfdb5bd34d1f281cf41d1d1620d0c3ee686/target/linux/rockchip/files/drivers/net/ethernet/stmicro/stmmac/dwmac-rk-tool.c
>>> https://gitlab.com/firefly-linux/docs/-/blob/rk356x/firefly/Common/GMAC/Rockchip_Developer_Guide_Linux_GMAC_RGMII_Delayline_EN.pdf
>>> https://github.com/axlrose/rkdocs/blob/main/Common/GMAC/Rockchip_Developer_Guide_Linux_GMAC_RGMII_Delayline_EN.pdf
>>
>> Vendors get things wrong, including this. 'rgmii' means the PCB adds
>> the 2ns delay. Nearly every Rockchip board follows Rockchip broken
>> vendor recommendations, and then i come along, point out how it is
>> wrong, and ask for it to be fixed, before being merged to Mainline.
> 
> Can we at least get the "tx_delay" and "rx_delay" DT properties (which
> are register values) properly documented in the DT binding document?
> I know from the driver code that a value of 0 means "no delay". Other
> values add an unspecified delay - it is not obvious what any non-zero
> value means, or what the default means.
> 
> This would help us understand what values such as:
> 
> 	tx_delay = 0x3c or 0x4f
> 
> and
> 
> 	rx_delay = 0x2f or 0x26
> 
> actually mean in terms of the resulting delay at the MAC.
> 

I couldn't figure out what they actually mean empirically, see 
https://lore.kernel.org/linux-rockchip/96d32ce8-394b-4454-8910-a66be2813588@cherry.de/

Without Rockchip's explanation on what this actually does, I'm not sure 
there's something we can do on this side.

Cheers,
Quentin

  reply	other threads:[~2025-10-07 16:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-29  6:57 [PATCH v3 0/3] arm64: dts: rockchip: introduce LinkEase EasePi R1 Liangbin Lian
2025-09-29  6:57 ` [PATCH v3 1/3] dt-bindings: vendor-prefixes: Document LinkEase Liangbin Lian
2025-09-29 12:27   ` Heiko Stuebner
2025-09-29  6:57 ` [PATCH v3 2/3] dt-bindings: arm: rockchip: Add LinkEase EasePi R1 Liangbin Lian
2025-09-29 12:28   ` Heiko Stuebner
2025-09-29 18:20     ` jjm2473
2025-10-06 15:43       ` Andrew Lunn
2025-10-07 14:56         ` jjm2473
2025-09-29  6:57 ` [PATCH v3 3/3] arm64: dts: rockchip: add " Liangbin Lian
2025-10-06 15:51   ` Andrew Lunn
2025-10-07 14:32     ` jjm2473
2025-10-07 14:57       ` Andrew Lunn
2025-10-07 16:25         ` Russell King (Oracle)
2025-10-07 16:32           ` Quentin Schulz [this message]
2025-10-07 17:29         ` jjm2473
2025-10-07 18:32           ` Andrew Lunn
2025-10-09  8:47             ` Alexey Charkov
2025-10-09 13:04               ` Andrew Lunn
2025-10-07 18:48           ` Russell King (Oracle)
2025-10-09  5:16             ` jjm2473
2025-09-29 10:20 ` [PATCH v3 0/3] arm64: dts: rockchip: introduce " Diederik de Haas
2025-09-29 18:09   ` jjm2473
2025-09-30 11:19     ` Diederik de Haas
2025-09-30 17:52       ` jjm2473
2025-10-07 16:27       ` Russell King (Oracle)

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=88c6c40e-8c19-429d-a7d8-c8f2755f515c@cherry.de \
    --to=quentin.schulz@cherry.de \
    --cc=alchark@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=didi.debian@cknow.org \
    --cc=dsimic@manjaro.org \
    --cc=heiko@sntech.de \
    --cc=honyuenkwun@gmail.com \
    --cc=inindev@gmail.com \
    --cc=ivan8215145640@gmail.com \
    --cc=jbx6244@gmail.com \
    --cc=jjm2473@gmail.com \
    --cc=kever.yang@rock-chips.com \
    --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=linux@armlinux.org.uk \
    --cc=mani@kernel.org \
    --cc=naoki@radxa.com \
    --cc=neil.armstrong@linaro.org \
    --cc=pbrobinson@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).