From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Chaoyi Chen <kernel@airkyi.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Alexey Charkov <alchark@gmail.com>,
Shawn Lin <shawn.lin@rock-chips.com>,
Chaoyi Chen <chaoyi.chen@rock-chips.com>,
Andy Yan <andy.yan@rock-chips.com>,
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,
Detlev Casanova <detlev.casanova@collabora.com>,
Stephen Chen <stephen@radxa.com>,
devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] arm64: dts: rockchip: Change gmac phy-mode to rgmii-id for rk3576 board
Date: Wed, 21 Jan 2026 06:51:14 +0100 [thread overview]
Message-ID: <aXBlBHZIPQ6xhykE@venus> (raw)
In-Reply-To: <20260121031548.402-1-kernel@airkyi.com>
[-- Attachment #1: Type: text/plain, Size: 1873 bytes --]
Hi,
On Wed, Jan 21, 2026 at 11:15:45AM +0800, Chaoyi Chen wrote:
> From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
>
> According to the description in the net documentation, PHY modes
> "rgmii", "rgmii-rxid" and "rgmii-txid" modes require the clock signal
> to be delayed on the PCB.
>
> The Rockchip platform has long used the above mentioned PHY modes and
> private delay prop to describe the internal IO delay settings of the
> chip, which is inconsistent with what is described in the documentation.
>
> Some background, for RK3576, you can assume that:
>
> tx_delay_time(ns) = 0.0579 * delay_line_count + 0.105
>
> For example, tx_delay = <0x20> means:
>
> time = 0.0579 * 0x20 + 0.105 ns = 1.9578 ns
>
> Recently, Andrew has often mentioned the problem of phy mode in board
> level configuration. So let's start with the RK3576 to modify this.
>
> Please test this series of patches, thanks.
The RTL8211F PHY driver does not use the "tx-internal-delay-ps"
property, which would require using phy_get_internal_delay(). Also
the hardware only seems to support enabling/disabling a fixed delay
of 2ns, so it cannot be implemented as far as I can tell. So unless
I missed something, this series makes no sense as-is.
My suggestion would be to add support for <rx/tx>-internal-delay-ps
to the Rockchip GMAC driver by introducing a new rk_gmac_ops
entry to translate the standard properties into register values:
int rk3576_delay_conversion(unsigned int delay_ps) {
return (delay_ps*10 - 1050) / 579;
}
That allows using standard properties in DT instead of vendor
specific "rx_delay"/"tx_delay". This results in a much better board
description and shows how far boards derive from the the standard
2ns (which can use rgmii-id without any extra delay specification).
Greetings,
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Chaoyi Chen <kernel@airkyi.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Alexey Charkov <alchark@gmail.com>,
Shawn Lin <shawn.lin@rock-chips.com>,
Chaoyi Chen <chaoyi.chen@rock-chips.com>,
Andy Yan <andy.yan@rock-chips.com>,
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,
Detlev Casanova <detlev.casanova@collabora.com>,
Stephen Chen <stephen@radxa.com>,
devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] arm64: dts: rockchip: Change gmac phy-mode to rgmii-id for rk3576 board
Date: Wed, 21 Jan 2026 06:51:14 +0100 [thread overview]
Message-ID: <aXBlBHZIPQ6xhykE@venus> (raw)
In-Reply-To: <20260121031548.402-1-kernel@airkyi.com>
[-- Attachment #1.1: Type: text/plain, Size: 1873 bytes --]
Hi,
On Wed, Jan 21, 2026 at 11:15:45AM +0800, Chaoyi Chen wrote:
> From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
>
> According to the description in the net documentation, PHY modes
> "rgmii", "rgmii-rxid" and "rgmii-txid" modes require the clock signal
> to be delayed on the PCB.
>
> The Rockchip platform has long used the above mentioned PHY modes and
> private delay prop to describe the internal IO delay settings of the
> chip, which is inconsistent with what is described in the documentation.
>
> Some background, for RK3576, you can assume that:
>
> tx_delay_time(ns) = 0.0579 * delay_line_count + 0.105
>
> For example, tx_delay = <0x20> means:
>
> time = 0.0579 * 0x20 + 0.105 ns = 1.9578 ns
>
> Recently, Andrew has often mentioned the problem of phy mode in board
> level configuration. So let's start with the RK3576 to modify this.
>
> Please test this series of patches, thanks.
The RTL8211F PHY driver does not use the "tx-internal-delay-ps"
property, which would require using phy_get_internal_delay(). Also
the hardware only seems to support enabling/disabling a fixed delay
of 2ns, so it cannot be implemented as far as I can tell. So unless
I missed something, this series makes no sense as-is.
My suggestion would be to add support for <rx/tx>-internal-delay-ps
to the Rockchip GMAC driver by introducing a new rk_gmac_ops
entry to translate the standard properties into register values:
int rk3576_delay_conversion(unsigned int delay_ps) {
return (delay_ps*10 - 1050) / 579;
}
That allows using standard properties in DT instead of vendor
specific "rx_delay"/"tx_delay". This results in a much better board
description and shows how far boards derive from the the standard
2ns (which can use rgmii-id without any extra delay specification).
Greetings,
-- Sebastian
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2026-01-21 5:51 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 3:15 [PATCH 0/3] arm64: dts: rockchip: Change gmac phy-mode to rgmii-id for rk3576 board Chaoyi Chen
2026-01-21 3:15 ` Chaoyi Chen
2026-01-21 3:15 ` [PATCH 1/3] arm64: dts: rockchip: Change gmac phy-mode to rgmii-id for rk3576 evb1 Chaoyi Chen
2026-01-21 3:15 ` Chaoyi Chen
2026-01-21 8:14 ` Diederik de Haas
2026-01-21 8:14 ` Diederik de Haas
2026-01-21 12:55 ` Andrew Lunn
2026-01-21 12:55 ` Andrew Lunn
2026-01-22 1:38 ` Chaoyi Chen
2026-01-22 1:38 ` Chaoyi Chen
2026-01-22 2:40 ` Andrew Lunn
2026-01-22 2:40 ` Andrew Lunn
2026-01-22 3:16 ` Chaoyi Chen
2026-01-22 3:16 ` Chaoyi Chen
2026-01-31 6:26 ` Chaoyi Chen
2026-01-31 6:26 ` Chaoyi Chen
2026-01-21 3:15 ` [PATCH 2/3] arm64: dts: rockchip: Change gmac phy-mode to rgmii-id for roc-rk3576-pc Chaoyi Chen
2026-01-21 3:15 ` Chaoyi Chen
2026-01-21 3:15 ` [PATCH 3/3] arm64: dts: rockchip: Change gmac phy-mode to rgmii-id for ROCK 4D Chaoyi Chen
2026-01-21 3:15 ` Chaoyi Chen
2026-01-21 5:51 ` Sebastian Reichel [this message]
2026-01-21 5:51 ` [PATCH 0/3] arm64: dts: rockchip: Change gmac phy-mode to rgmii-id for rk3576 board Sebastian Reichel
2026-01-21 6:54 ` Chaoyi Chen
2026-01-21 6:54 ` Chaoyi Chen
2026-01-21 13:02 ` Andrew Lunn
2026-01-21 13:02 ` Andrew Lunn
2026-01-21 12:57 ` Andrew Lunn
2026-01-21 12:57 ` Andrew Lunn
2026-01-22 1:44 ` Chaoyi Chen
2026-01-22 1:44 ` Chaoyi Chen
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=aXBlBHZIPQ6xhykE@venus \
--to=sebastian.reichel@collabora.com \
--cc=alchark@gmail.com \
--cc=andrew@lunn.ch \
--cc=andy.yan@rock-chips.com \
--cc=chaoyi.chen@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=detlev.casanova@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=kernel@airkyi.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=nicolas.frattaroli@collabora.com \
--cc=robh@kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=stephen@radxa.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.