From: Andrew Lunn <andrew@lunn.ch>
To: Quentin Schulz <quentin.schulz@cherry.de>
Cc: Jakob Unterwurzacher <jakobunt@gmail.com>,
foss+kernel@0leil.net, conor+dt@kernel.org,
devicetree@vger.kernel.org, heiko@sntech.de,
jakob.unterwurzacher@cherry.de, krzk+dt@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
robh@kernel.org, Kever Yang <kever.yang@rock-chips.com>
Subject: Re: [PATCH v2] arm64: dts: rockchip: support Ethernet Switch adapter for RK3588 Jaguar
Date: Wed, 28 May 2025 15:09:10 +0200 [thread overview]
Message-ID: <3303d8d4-ec5a-4cdc-8391-ab6e35d76b33@lunn.ch> (raw)
In-Reply-To: <380ba32b-bb9a-411e-8006-127461cac08a@cherry.de>
On Wed, May 28, 2025 at 09:56:51AM +0200, Quentin Schulz wrote:
> Hi Andrew,
>
> On 5/27/25 6:18 PM, Andrew Lunn wrote:
> > On Tue, May 27, 2025 at 03:11:42PM +0200, Jakob Unterwurzacher wrote:
> > > > @Jakob, is this something you could check? devmem2 0xfd58c31c w 0x3c0000
> > > > should do the trick to disable the circuitry according to the TRM?
> > >
> > > I measured TXCLK vs TXD3 on an oscilloscope on gmac1:
> > >
> > > Setting Decimal Actual TXCLK delay (ps)
> > > 00 0 47
> > > 0a 10 283
> > > 10 16 440
> > > 20 32 893
> > > 30 48 1385
> > > 40 64 1913
> > > 50 80 2514
> > > 60 96 3077
> > > 70 112 3565
> > > 7f 127 4009
> > >
> > > off x -315
> > >
> > > Setting = tx_delay (hex)
> > > Decimal = tx_delay (dec)
> > > Actual TXCLK delay (ps) = Measurement from oscilloscope
> > >
> > > Plotting this we can deduce that one tx_delay unit is about 31ps.
> >
> > Nice to see somebody actually do the measurements. Based on this, it
> > would be good to implement:
> >
> > tx-internal-delay-ps:
> > description:
> > RGMII Transmit Clock Delay defined in pico seconds. This is used for
> > controllers that have configurable TX internal delays. If this
> > property is present then the MAC applies the TX delay.
> >
> > For the moment, please limit it to just the device you measured it on.
> >
>
> What exactly do you mean with "limit it to just the device you measured it
> on"?
Nobody seems to know if rx_delay & tx_delay operate the same across
the whole range of SoCs. I don't particularly care if these properties
are difference between SoC, they are vendor properties, with
undocumented magic values. However 'tx-internal-delay-ps' is
standardised, and has a very clear meaning. I don't want it used
unless somebody has performed a measurement and we know that 2000
produces a 2ns delay.
> I'll need to implement reading the delay from the stmmac driver to use this
> property, do I need to restrict reading this property to the SoC we tested
> (RK3588)?
Yes, please only allow it to be used on RK3588, and any other SoC you
can test and verify its behaviour.
> I assume you're then expecting tx-internal-delay-ps only on this new DTSO's
> gmac1?
I would like rx_delay and tx_delay to be marked deprecated, with the
end goal they are no longer used, the standard properties take there
place. But to get there, we need more measurements from real hardware,
or some other way to be sure what we have the correct delay.
> Would you still want rx_delay/tx_delay to be set to 0x00? Maybe only
> rx_delay since we won't have a companion rx-internal-delay-ps for now (until
> someone from Rockchip answers :); adding Kever back to the Cc for that)? Or
> should I remove both of them?
rx-internal-delay-ps and rx_delay should be mutually exclusive. If
both are present -EINVAL. We have to keep supporting rx_delay for
rk3588 otherwise we break backwards compatibility, but ideally no more
instances of it should be added once rx-internal-delay-ps is added.
Andrew
next prev parent reply other threads:[~2025-05-28 13:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 16:48 Quentin Schulz
2025-05-27 9:58 ` Heiko Stübner
2025-05-27 13:11 ` Jakob Unterwurzacher
2025-05-27 16:18 ` Andrew Lunn
2025-05-28 7:56 ` Quentin Schulz
2025-05-28 13:09 ` Andrew Lunn [this message]
2025-06-13 14:27 ` Quentin Schulz
2025-06-15 14:53 ` Andrew Lunn
2025-06-16 9:14 ` Quentin Schulz
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=3303d8d4-ec5a-4cdc-8391-ab6e35d76b33@lunn.ch \
--to=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=foss+kernel@0leil.net \
--cc=heiko@sntech.de \
--cc=jakob.unterwurzacher@cherry.de \
--cc=jakobunt@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=quentin.schulz@cherry.de \
--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®