mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacky Chou <jacky_chou@aspeedtech.com>
To: 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>
Cc: <netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-aspeed@lists.ozlabs.org>, <taoren@meta.com>,
	Jacky Chou <jacky_chou@aspeedtech.com>
Subject: [PATCH net-next v6 1/5] dt-bindings: net: ftgmac100: Add delay properties for AST2600
Date: Mon, 2 Mar 2026 18:24:28 +0800	[thread overview]
Message-ID: <20260302-rgmii_delay_2600-v6-1-68319a4c4110@aspeedtech.com> (raw)
In-Reply-To: <20260302-rgmii_delay_2600-v6-0-68319a4c4110@aspeedtech.com>

The AST2600 contains two dies, each with its own MAC, and these MACs
require different delay configurations.
Previously, these delay values were configured during the bootloader
stage rather than in the driver. This change introduces the use of the
standard properties defined in ethernet-controller.yaml to configure
the delay values directly in the driver.

Each Aspeed platform has its own delay step value. And for Aspeed platform,
the total steps of RGMII delay configuraion is 32 steps, so the total delay
is delay-step-ps * 32.
Default delay values are declared so that tx-internal-delay-ps and
rx-internal-delay-ps become optional. If these properties are not present,
the driver will use the default values instead.
Add conditional schema constraints for Aspeed AST2600 MAC controllers:
- For MAC0/1, per delay step for rgmii is 45 ps
- For MAC2/3, per delay step for rgmii is 250 ps
- Both require the "aspeed,scu" and "aspeed,rgmii-delay-ps" properties.
Other compatible values remain unrestricted.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
---
 .../devicetree/bindings/net/faraday,ftgmac100.yaml | 42 +++++++++++++++++-----
 1 file changed, 33 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
index d14410018bcf..4cac216f7339 100644
--- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
+++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
@@ -69,6 +69,30 @@ properties:
   mdio:
     $ref: /schemas/net/mdio.yaml#
 
+  aspeed,scu:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Phandle to the SCU (System Control Unit) syscon node for Aspeed platform.
+      This reference is used by the MAC controller to configure the RGMII delays.
+
+  rx-internal-delay-ps:
+    description:
+      RGMII Receive Clock Delay defined in pico seconds. There are 32
+      steps of RGMII delay for Aspeed platform. Each Aspeed platform has its
+      own delay step value, it is fixed by hardware design. Total delay is
+      calculated by delay-step * 32. A value of 0 ps will disable any
+      delay. The Default is no delay.
+    default: 0
+
+  tx-internal-delay-ps:
+    description:
+      RGMII Transmit Clock Delay defined in pico seconds. There are 32
+      steps of RGMII delay for Aspeed platform. Each Aspeed platform has its
+      own delay step value, it is fixed by hardware design. Total delay is
+      calculated by delay-step * 32. A value of 0 ps will disable any
+      delay. The Default is no delay.
+    default: 0
+
 required:
   - compatible
   - reg
@@ -77,17 +101,17 @@ required:
 allOf:
   - $ref: ethernet-controller.yaml#
   - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - aspeed,ast2600-mac
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - aspeed,ast2600-mac
     then:
       properties:
-        resets: true
-    else:
-      properties:
-        resets: false
+        aspeed,scu: false
+        rx-internal-delay-ps: false
+        tx-internal-delay-ps: false
 
 unevaluatedProperties: false
 

-- 
2.34.1


  reply	other threads:[~2026-03-02 10:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 10:24 [PATCH net-next v6 0/5] Add AST2600 RGMII delay into ftgmac100 Jacky Chou
2026-03-02 10:24 ` Jacky Chou [this message]
2026-03-02 10:24 ` [PATCH net-next v6 2/5] ARM: dts: aspeed-g6: add aspeed,scu property for MAC Jacky Chou
2026-03-02 10:24 ` [PATCH net-next v6 3/5] net: ftgmac100: Add RGMII delay support for AST2600 Jacky Chou
2026-03-02 17:47   ` Andrew Lunn
2026-03-04  3:31     ` 回覆: " Jacky Chou
2026-03-04 20:15       ` Andrew Lunn
2026-03-05  4:45         ` Jacky Chou
2026-03-02 10:24 ` [PATCH net-next v6 4/5] net: ftgmac100: Support rgmii delay in old dts with AST2600 Jacky Chou
2026-03-02 18:01   ` Andrew Lunn
2026-03-04  3:32     ` 回覆: " Jacky Chou
2026-03-02 10:24 ` [PATCH net-next v6 5/5] ARM: dts: aspeed: ast2600-evb: Configure RGMII delay for MAC Jacky Chou
2026-03-02 18:04   ` Andrew Lunn
2026-03-05  5:05     ` Jacky Chou
2026-03-05 13:16       ` Andrew Lunn
2026-03-06  5:24         ` Jacky Chou
2026-03-06 14:01           ` Andrew Lunn
2026-03-10  6:14             ` Jacky Chou
2026-03-02 18:08 ` [PATCH net-next v6 0/5] Add AST2600 RGMII delay into ftgmac100 Andrew Lunn
2026-03-03  1:30 ` Andrew Lunn
2026-03-03  2:44   ` 回覆: " Jacky Chou

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=20260302-rgmii_delay_2600-v6-1-68319a4c4110@aspeedtech.com \
    --to=jacky_chou@aspeedtech.com \
    --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=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®