From: Andrew Lunn <andrew@lunn.ch>
To: Jacky Chou <jacky_chou@aspeedtech.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Po-Yu Chuang <ratbert@faraday-tech.com>,
Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@codeconstruct.com.au>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"taoren@meta.com" <taoren@meta.com>
Subject: Re: [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600
Date: Sat, 15 Nov 2025 22:46:12 +0100 [thread overview]
Message-ID: <041e23a2-67e6-4ebb-aee5-14400491f99c@lunn.ch> (raw)
In-Reply-To: <SEYPR06MB51342977EC2246163D14BDC19DCDA@SEYPR06MB5134.apcprd06.prod.outlook.com>
> Based on the above information, I have attempted to outline my understanding.
> 1. 'rgmii' + MAC delay:
> Add warming, keep MAC delay and pass "rgmii-id" to PHY driver.
Think about that. What delays do you get as a result?
> 2. 'rgmii-id' + MAC delay:
> disable MAC delay and pass "rgmii-id" to PHY driver
>
> 3. 'rgmii-id' + no MAC delay:
> Keep disabling MAC delay and pass "rgmii-id" to PHY driver
>
> 4. 'rgmii-txid' or 'rgmii-rxid':
> Keep original setting
> I have some idea to discuss with you.
> 1. On 'rgmii', I want to add warming and directly disable MAC delay and pass 'rgmii-id'
> to PHY driver.
Yep.
>
> 2. On 'rgmii-id', ignore if enabling MAC delay, all disable MAC delay and pass ' rgmii-id'
> to PHY driver.
>
> 3. On 'rgmii-txid' or 'rgmii-rxid', keep the above item 4.
>
> Actually, it's difficult for the driver to determine whether the MAC delay is enabled or not.
> Our design doesn't use a single bit to indicate the delay state. Instead, the delay setting is
> derived from the user's configured delay value.
But you can turn it back to ps. I would say, if it is > 1000, the
intention is it provides the 2ns delay. If it is < 1000 it is just a
minor tuning value because of bad board design.
Do you have experience from the field, what do real boards use? Are
they all inserting the same 2ns? Or is each customer tuning their
bootloader to configure the hardware differently per board design?
You might even need a more complex solution. If the bootloader is
adding a delay between say 200ps and 1600ps, it suggests a poorly
designed board, and the PHY adding 2ns is not going to work. There is
a need for rx-internal-delay-ps or tx-internal-delay-ps in DT. You can
give a warning, and indicate what values are needed, but leave the
hardware alone. If the bootloader is setting the delay > 1600, passing
_RGMII_ID to the PHY, and disabling MAC delays is likely to work, so
you just need to warn about phy-mode being wrong. If the bootloader is
inserting < 200ps, and phy-mode is rgmii-id, that is just fine
tuning. Maybe suggest rx-internal-delay-ps or tx-internal-delay-ps be
added in DT, but leave it alone.
Whatever you do, you need a lot of comments in the code and the commit
message to help developers understand why they are seeing warnings and
what they need to do.
Andrew
next prev parent reply other threads:[~2025-11-15 21:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 11:09 [PATCH net-next v4 0/4] Add AST2600 RGMII delay into ftgmac100 Jacky Chou
2025-11-10 11:09 ` [PATCH net-next v4 1/4] dt-bindings: net: ftgmac100: Add delay properties for AST2600 Jacky Chou
2025-11-10 12:29 ` Rob Herring (Arm)
2025-11-10 15:21 ` Andrew Lunn
2025-11-11 3:09 ` Jacky Chou
2025-11-10 11:09 ` [PATCH net-next v4 2/4] ARM: dts: aspeed-g6: Add scu and rgmii delay value per step for MAC Jacky Chou
2025-11-10 11:09 ` [PATCH net-next v4 3/4] ARM: dts: aspeed: ast2600-evb: Configure RGMII delay " Jacky Chou
2025-11-10 11:09 ` [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600 Jacky Chou
2025-11-10 15:35 ` Andrew Lunn
2025-11-12 3:45 ` Jacky Chou
2025-11-12 13:19 ` Andrew Lunn
2025-11-13 10:40 ` Jacky Chou
2025-11-15 21:46 ` Andrew Lunn [this message]
2025-11-25 2:58 ` Jacky Chou
2025-11-25 23:49 ` Andrew Lunn
2025-11-26 8:57 ` Tao Ren
2025-11-27 8:47 ` Jacky Chou
2025-12-02 6:53 ` Jacky Chou
2025-12-02 13:36 ` Andrew Lunn
2025-12-03 5:30 ` Jacky Chou
2025-11-10 15:45 ` Andrew Lunn
2025-11-10 14:34 ` [PATCH net-next v4 0/4] Add AST2600 RGMII delay into ftgmac100 Rob Herring (Arm)
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=041e23a2-67e6-4ebb-aee5-14400491f99c@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@codeconstruct.com.au \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=jacky_chou@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ratbert@faraday-tech.com \
--cc=robh@kernel.org \
--cc=taoren@meta.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 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®