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 v3 1/4] dt-bindings: net: ftgmac100: Add delay properties for AST2600
Date: Mon, 3 Nov 2025 15:39:16 +0800	[thread overview]
Message-ID: <20251103-rgmii_delay_2600-v3-1-e2af2656f7d7@aspeedtech.com> (raw)
In-Reply-To: <20251103-rgmii_delay_2600-v3-0-e2af2656f7d7@aspeedtech.com>

Create the new compatibles to identify AST2600 MAC0/1 and MAC3/4.
Add conditional schema constraints for Aspeed AST2600 MAC controllers:
- For "aspeed,ast2600-mac01", require rx/tx-internal-delay-ps properties
  with 45ps step.
- For "aspeed,ast2600-mac23", require rx/tx-internal-delay-ps properties
  with 250ps step.
- Both require the "scu" property.
Other compatible values remain unrestricted.

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

diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
index d14410018bcf..de646e7e3bca 100644
--- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
+++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
@@ -19,6 +19,12 @@ properties:
               - aspeed,ast2500-mac
               - aspeed,ast2600-mac
           - const: faraday,ftgmac100
+      - items:
+          - enum:
+              - aspeed,ast2600-mac01
+              - aspeed,ast2600-mac23
+          - const: aspeed,ast2600-mac
+          - const: faraday,ftgmac100
 
   reg:
     maxItems: 1
@@ -69,6 +75,12 @@ properties:
   mdio:
     $ref: /schemas/net/mdio.yaml#
 
+  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.
+
 required:
   - compatible
   - reg
@@ -88,6 +100,44 @@ allOf:
     else:
       properties:
         resets: false
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: aspeed,ast2600-mac01
+    then:
+      properties:
+        rx-internal-delay-ps:
+          minimum: 0
+          maximum: 1395
+          multipleOf: 45
+        tx-internal-delay-ps:
+          minimum: 0
+          maximum: 1395
+          multipleOf: 45
+      required:
+        - scu
+        - rx-internal-delay-ps
+        - tx-internal-delay-ps
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: aspeed,ast2600-mac23
+    then:
+      properties:
+        rx-internal-delay-ps:
+          minimum: 0
+          maximum: 7750
+          multipleOf: 250
+        tx-internal-delay-ps:
+          minimum: 0
+          maximum: 7750
+          multipleOf: 250
+      required:
+        - scu
+        - rx-internal-delay-ps
+        - tx-internal-delay-ps
 
 unevaluatedProperties: false
 

-- 
2.34.1


  reply	other threads:[~2025-11-03  7:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03  7:39 [PATCH net-next v3 0/4] Add AST2600 RGMII delay into ftgmac100 Jacky Chou
2025-11-03  7:39 ` Jacky Chou [this message]
2025-11-04  2:38   ` [PATCH net-next v3 1/4] dt-bindings: net: ftgmac100: Add delay properties for AST2600 Andrew Lunn
2025-11-04  5:14     ` Jacky Chou
2025-11-04 13:40       ` Andrew Lunn
2025-11-06  5:25         ` Jacky Chou
2025-11-04  4:07   ` Andrew Lunn
2025-11-04  5:22     ` 回覆: " Jacky Chou
2025-11-04 13:50       ` Andrew Lunn
2025-11-04  8:19   ` Krzysztof Kozlowski
2025-11-04  9:54     ` Jacky Chou
2025-11-04 10:07       ` Krzysztof Kozlowski
2025-11-06  5:41         ` Jacky Chou
2025-11-06  8:25           ` Krzysztof Kozlowski
2025-11-07  0:15             ` Jacky Chou
2025-11-07  0:46               ` Andrew Lunn
2025-11-07  1:12                 ` Jacky Chou
2025-11-07  2:01                   ` Andrew Lunn
2025-11-07  3:28                     ` Jacky Chou
2025-11-03  7:39 ` [PATCH net-next v3 2/4] ARM: dts: aspeed-g6: Add ethernet alise Jacky Chou
2025-11-03  7:39 ` [PATCH net-next v3 3/4] ARM: dts: aspeed: ast2600-evb: Configure RGMII delay for MAC Jacky Chou
2025-11-04  3:49   ` Andrew Lunn
2025-11-04  4:00   ` Andrew Lunn
2025-11-04  4:54     ` 回覆: " Jacky Chou
2025-11-03  7:39 ` [PATCH net-next v3 4/4] net: ftgmac100: Add RGMII delay support for AST2600 Jacky Chou
2025-11-04  3:07   ` kernel test robot
2025-11-04  3:55   ` Andrew Lunn
2025-11-04  4:47     ` Jacky Chou
2025-11-04  8:20 ` [PATCH net-next v3 0/4] Add AST2600 RGMII delay into ftgmac100 Krzysztof Kozlowski
2025-11-04  8:35   ` 回覆: " 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=20251103-rgmii_delay_2600-v3-1-e2af2656f7d7@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®