From nobody Tue Dec 16 06:08:55 2025 Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FCA02D29AC; Wed, 13 Aug 2025 06:33:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755066790; cv=none; b=Uratg1Wz/APnCYXBJ5AVgYVuXMqXvgf8H64dC7p8c39lz/GeP6Lv50GYCbV6IruZUC62PUD9JbSxS5LmulCA7OxgB69ZiUeWepYEJTeyqJo4MhjMUoU/vE/JdqWMPvydREhUTiuaRcLv0lV6etHiigySL/RaJLrP3QjO1xzXdII= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755066790; c=relaxed/simple; bh=xaVW3Re5wTG0RgIX+rnnhBCvng3HCXcONcdAxXFE71o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dRniAIp/F1Fi4t9RFuyr41y0h/d+bBVgxEO6IYciI5zYJfE5D1S/ZrEeUhf3p82PbTyZe+djQiDh3O2NbjUAk0xqRQchjkxGNfmPDKvF0oIHG6aN5XfHjWk2W1CksLb0xHXFdviN+e+JkeiAKI+cfLTTtdUYk8hMBKhJxCIKI44= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 13 Aug 2025 14:33:01 +0800 Received: from mail.aspeedtech.com (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Wed, 13 Aug 2025 14:33:01 +0800 From: Jacky Chou To: Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joel Stanley , Andrew Jeffery CC: Simon Horman , Heiner Kallweit , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Po-Yu Chuang , , , , , , , Subject: [net-next v2 1/4] dt-bindings: net: ftgmac100: Restrict phy-mode and delay properties for AST2600 Date: Wed, 13 Aug 2025 14:32:58 +0800 Message-ID: <20250813063301.338851-2-jacky_chou@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250813063301.338851-1-jacky_chou@aspeedtech.com> References: <20250813063301.338851-1-jacky_chou@aspeedtech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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", restrict phy-mode to "rgmii-id" and "rgmii-rxid", and 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. Because the RGMII delay on AST2600 MAC0/1 is 45ps and its total delay step is 32, cannot cover 2ns delay for RGMII to meet center. We need the PHY side enables RX internal delay and the phy_mode must be "rgmii-id" or "rgmii-rxid". Signed-off-by: Jacky Chou --- .../bindings/net/faraday,ftgmac100.yaml | 50 +++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b= /Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml index 55d6a8379025..82c7c81eab10 100644 --- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml +++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml @@ -6,9 +6,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# =20 title: Faraday Technology FTGMAC100 gigabit ethernet controller =20 -allOf: - - $ref: ethernet-controller.yaml# - maintainers: - Po-Yu Chuang =20 @@ -21,6 +18,8 @@ properties: - aspeed,ast2400-mac - aspeed,ast2500-mac - aspeed,ast2600-mac + - aspeed,ast2600-mac01 + - aspeed,ast2600-mac23 - const: faraday,ftgmac100 =20 reg: @@ -69,6 +68,12 @@ properties: mdio: $ref: /schemas/net/mdio.yaml# =20 + scu: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the SCU (System Control Unit) syscon node for Aspeed plat= form. + This reference is used by the MAC controller to configure the RGMII = delays. + required: - compatible - reg @@ -76,6 +81,45 @@ required: =20 unevaluatedProperties: false =20 +allOf: + - $ref: ethernet-controller.yaml# + - if: + properties: + compatible: + contains: + const: aspeed,ast2600-mac01 + then: + properties: + phy-mode: + enum: [rgmii-id, rgmii-rxid] + rx-internal-delay-ps: + minimum: 0 + maximum: 1395 + multipleOf: 45 + tx-internal-delay-ps: + minimum: 0 + maximum: 1395 + multipleOf: 45 + required: + - scu + - 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 + examples: - | ethernet@1e660000 { --=20 2.43.0