devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/4] Add AST2600 RGMII delay into ftgmac100
@ 2025-11-10 11:09 Jacky Chou
  2025-11-10 11:09 ` [PATCH net-next v4 1/4] dt-bindings: net: ftgmac100: Add delay properties for AST2600 Jacky Chou
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Jacky Chou @ 2025-11-10 11:09 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery
  Cc: netdev, devicetree, linux-kernel, linux-arm-kernel, linux-aspeed,
	taoren, Jacky Chou

This patch series adds support for configuring RGMII internal delays for the
Aspeed AST2600 FTGMAC100 Ethernet MACs. It introduces new compatible strings to
distinguish between MAC0/1 and MAC2/3, as their delay chains and configuration
units differ.
The device tree bindings are updated to restrict the allowed phy-mode and delay
properties for each MAC type. Corresponding changes are made to the device tree
source files and the FTGMAC100 driver to support the new delay configuration.

Summary of changes:
- dt-bindings: net: ftgmac100: Add conditional schema for AST2600 MAC0/1 and
  MAC2/3.
- ARM: dts: aspeed-g6: Add aspeed,rgmii-delay-ps and aspeed,scu
  properties.
- ARM: dts: aspeed-ast2600-evb: Add rx/tx-internal-delay-ps properties and 
  update phy-mode for MACs.
- net: ftgmac100: Add driver support for configuring RGMII delay for AST2600
  MACs via SCU.

This enables precise RGMII timing configuration for AST2600-based platforms,
improving interoperability with various PHYs

To: Andrew Lunn <andrew+netdev@lunn.ch>
To: David S. Miller <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Po-Yu Chuang <ratbert@faraday-tech.com>
To: Joel Stanley <joel@jms.id.au>
To: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-aspeed@lists.ozlabs.org
Cc: taoren@meta.com

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
---
Changes in v4:
- Remove the compatible "aspeed,ast2600-mac01" and
  "aspeed,ast2600-mac23"
- Add new property to specify the RGMII delay step for each MACs
- Add default value of rx/tx-internal-delay-ps
- For legacy dts, a warning message reminds users to update phy-mode
- If lack rx/tx-internal-delay-ps, driver will use default value to
  configure the RGMII delay
- Link to v3: https://lore.kernel.org/r/20251103-rgmii_delay_2600-v3-0-e2af2656f7d7@aspeedtech.com

Changes in v3:
- Add new item on compatible property for new compatible strings
- Remove the new compatible and scu handle of MAC from aspeed-g6.dtsi
- Add new compatible and scu handle to MAC node in
  aspeed-ast2600-evb.dts
- Change all phy-mode of MACs to "rgmii-id"
- Keep "aspeed,ast2600-mac" compatible in ftgmac100.c and configure the
  rgmii delay with "aspeed,ast2600-mac01" and "aspeed,ast2600-mac23"
- Link to v2: https://lore.kernel.org/r/20250813063301.338851-1-jacky_chou@aspeedtech.com

Changes in v2:
- added new compatible strings for MAC0/1 and MAC2/3
- updated device tree bindings to restrict phy-mode and delay properties
- refactored driver code to handle rgmii delay configuration
- Link to v1: https://lore.kernel.org/r/20250317025922.1526937-1-jacky_chou@aspeedtech.com

---
Jacky Chou (4):
      dt-bindings: net: ftgmac100: Add delay properties for AST2600
      ARM: dts: aspeed-g6: Add scu and rgmii delay value per step for MAC
      ARM: dts: aspeed: ast2600-evb: Configure RGMII delay for MAC
      net: ftgmac100: Add RGMII delay support for AST2600

 .../devicetree/bindings/net/faraday,ftgmac100.yaml |  35 +++++
 arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dts    |  20 ++-
 arch/arm/boot/dts/aspeed/aspeed-g6.dtsi            |   8 ++
 drivers/net/ethernet/faraday/ftgmac100.c           | 148 +++++++++++++++++++++
 drivers/net/ethernet/faraday/ftgmac100.h           |  20 +++
 5 files changed, 227 insertions(+), 4 deletions(-)
---
base-commit: a0c3aefb08cd81864b17c23c25b388dba90b9dad
change-id: 20251031-rgmii_delay_2600-a00b0248c7e6

Best regards,
-- 
Jacky Chou <jacky_chou@aspeedtech.com>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 1/4] dt-bindings: net: ftgmac100: Add delay properties for AST2600
  2025-11-10 11:09 [PATCH net-next v4 0/4] Add AST2600 RGMII delay into ftgmac100 Jacky Chou
@ 2025-11-10 11:09 ` Jacky Chou
  2025-11-10 12:29   ` Rob Herring (Arm)
  2025-11-10 15:21   ` Andrew Lunn
  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
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 15+ messages in thread
From: Jacky Chou @ 2025-11-10 11:09 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery
  Cc: netdev, devicetree, linux-kernel, linux-arm-kernel, linux-aspeed,
	taoren, Jacky Chou

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.

Add the new property, "aspeed,rgmii-delay-ps", to specify per step of
RGMII delay in different MACs. And for Aspeed platform, the total steps
of RGMII delay configuraion is 32 steps, so the total delay is
"apseed,rgmii-delay-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, aspeed,rgmii-delay-ps property is 45 ps
- For MAC2/3, aspeed,rgmii-delay-ps property 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 | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
index d14410018bcf..66377cff737f 100644
--- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
+++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
@@ -69,6 +69,36 @@ 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.
+
+  aspeed,rgmii-delay-ps:
+    description:
+      Speccify the one step for RGMII delay. In AST2600, MAC0 and MAC1 are 45 ps,
+      MAC2 and MAC3 are 250 ps.
+    type: integer
+
+  rx-internal-delay-ps:
+    description:
+      RGMII Receive Clock Delay defined in pico seconds. There are 32
+      steps of RGMII delay for Aspeed platform. According to the
+      aspeed,delay-ps to specify the one step delay, the total delay is
+      calculated by aspeed,delay-ps * 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. According to the
+      aspeed,delay-ps to specify the one step delay, the total delay is
+      calculated by aspeed,delay-ps * 32. A value of 0 ps will disable any
+      delay. The Default is no delay.
+    default: 0
+
 required:
   - compatible
   - reg
@@ -85,6 +115,11 @@ allOf:
     then:
       properties:
         resets: true
+        rx-internal-delay-ps: true
+        tx-internal-delay-ps: true
+      required:
+        - aspeed,rgmii-delay-ps
+        - aspeed,scu
     else:
       properties:
         resets: false

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 2/4] ARM: dts: aspeed-g6: Add scu and rgmii delay value per step for MAC
  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 11:09 ` Jacky Chou
  2025-11-10 11:09 ` [PATCH net-next v4 3/4] ARM: dts: aspeed: ast2600-evb: Configure RGMII delay " Jacky Chou
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Jacky Chou @ 2025-11-10 11:09 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery
  Cc: netdev, devicetree, linux-kernel, linux-arm-kernel, linux-aspeed,
	taoren, Jacky Chou

The RGMII delay is configured in SCU region in Aspeed AST2600,
therefore, add aspeed,scu property in dtsi for rgmii delay.
And the RGMII delay value in each MAC is different.
List below:
MAC0 and MAC1 -> 45 ps
MAC2 and MAC3 -> 250 ps
Add "aspeed,rgmii-delay-ps" property for each MAC to specify the
corresponding delay value.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
---
 arch/arm/boot/dts/aspeed/aspeed-g6.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
index f8662c8ac089..2c71e691c547 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
+++ b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
@@ -236,6 +236,8 @@ mac0: ethernet@1e660000 {
 			reg = <0x1e660000 0x180>;
 			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>;
+			aspeed,scu = <&syscon>;
+			aspeed,rgmii-delay-ps = <45>;
 			status = "disabled";
 		};
 
@@ -244,6 +246,8 @@ mac1: ethernet@1e680000 {
 			reg = <0x1e680000 0x180>;
 			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&syscon ASPEED_CLK_GATE_MAC2CLK>;
+			aspeed,scu = <&syscon>;
+			aspeed,rgmii-delay-ps = <45>;
 			status = "disabled";
 		};
 
@@ -252,6 +256,8 @@ mac2: ethernet@1e670000 {
 			reg = <0x1e670000 0x180>;
 			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>;
+			aspeed,scu = <&syscon>;
+			aspeed,rgmii-delay-ps = <250>;
 			status = "disabled";
 		};
 
@@ -260,6 +266,8 @@ mac3: ethernet@1e690000 {
 			reg = <0x1e690000 0x180>;
 			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&syscon ASPEED_CLK_GATE_MAC4CLK>;
+			aspeed,scu = <&syscon>;
+			aspeed,rgmii-delay-ps = <250>;
 			status = "disabled";
 		};
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 3/4] ARM: dts: aspeed: ast2600-evb: Configure RGMII delay for MAC
  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 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 ` 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 14:34 ` [PATCH net-next v4 0/4] Add AST2600 RGMII delay into ftgmac100 Rob Herring (Arm)
  4 siblings, 0 replies; 15+ messages in thread
From: Jacky Chou @ 2025-11-10 11:09 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery
  Cc: netdev, devicetree, linux-kernel, linux-arm-kernel, linux-aspeed,
	taoren, Jacky Chou

This change sets the rx-internal-delay-ps and tx-internal-delay-ps
properties to control the RGMII signal delay.
The phy-mode for MAC0–MAC3 is updated to "rgmii-id" to enable TX/RX
internal delay on the PHY and disable the corresponding delay
on the MAC.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
---
 arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dts | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dts b/arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dts
index de83c0eb1d6e..f8f0d5c98514 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dts
@@ -123,42 +123,54 @@ ethphy3: ethernet-phy@0 {
 &mac0 {
 	status = "okay";
 
-	phy-mode = "rgmii-rxid";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ethphy0>;
 
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_rgmii1_default>;
+
+	rx-internal-delay-ps = <0>;
+	tx-internal-delay-ps = <0>;
 };
 
 
 &mac1 {
 	status = "okay";
 
-	phy-mode = "rgmii-rxid";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ethphy1>;
 
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_rgmii2_default>;
+
+	rx-internal-delay-ps = <0>;
+	tx-internal-delay-ps = <0>;
 };
 
 &mac2 {
 	status = "okay";
 
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ethphy2>;
 
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_rgmii3_default>;
+
+	rx-internal-delay-ps = <0>;
+	tx-internal-delay-ps = <0>;
 };
 
 &mac3 {
 	status = "okay";
 
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ethphy3>;
 
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_rgmii4_default>;
+
+	rx-internal-delay-ps = <0>;
+	tx-internal-delay-ps = <0>;
 };
 
 &emmc_controller {

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600
  2025-11-10 11:09 [PATCH net-next v4 0/4] Add AST2600 RGMII delay into ftgmac100 Jacky Chou
                   ` (2 preceding siblings ...)
  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 ` Jacky Chou
  2025-11-10 15:35   ` Andrew Lunn
  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)
  4 siblings, 2 replies; 15+ messages in thread
From: Jacky Chou @ 2025-11-10 11:09 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery
  Cc: netdev, devicetree, linux-kernel, linux-arm-kernel, linux-aspeed,
	taoren, Jacky Chou

On the AST2600 platform, the RGMII delay is controlled via the
SCU registers. The delay chain configuration differs between MAC0/1
and MAC2/3, even though all four MACs use a 32-stage delay chain.
+------+----------+-----------+-------------+-------------+
|      |Delay Unit|Delay Stage|TX Edge Stage|RX Edge Stage|
+------+----------+-----------+-------------+-------------+
|MAC0/1|     45 ps|        32 |           0 |           0 |
+------+----------+-----------+-------------+-------------+
|MAC2/3|    250 ps|        32 |           0 |          26 |
+------+----------+-----------+-------------+-------------+
For MAC2/3, the "no delay" condition starts from stage 26.
Setting the RX delay stage to 26 means that no additional RX
delay is applied.
Here lists the RX delay setting of MAC2/3 below.
26 -> 0   ns, 27 -> 0.25 ns, ... , 31 -> 1.25 ns,
0  -> 1.5 ns, 1  -> 1.75 ns, ... , 25 -> 7.75 ns

Therefore, we calculate the delay stage from the
rx-internal-delay-ps of MAC2/3 to add 26. If the stage is equel
to or bigger than 32, the delay stage will be mask 0x1f to get
the correct setting.
The delay chain is like a ring for configuration.
Example for the rx-internal-delay-ps of MAC2/3 is 2000 ps,
we will get the delay stage is 2.

Strating to this patch, driver will remind the legacy dts to update the
"phy-mode" to "rgmii-id, and add the corresponding rgmii delay with
"rx-internal-delay-id" and "tx-internal-delay-id".
If lack these properties, driver will configure the default rgmii delay,
that means driver will disable the TX and RX delay in MAC side.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
---
 drivers/net/ethernet/faraday/ftgmac100.c | 148 +++++++++++++++++++++++++++++++
 drivers/net/ethernet/faraday/ftgmac100.h |  20 +++++
 2 files changed, 168 insertions(+)

diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index a863f7841210..5cecdd4583f6 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -26,6 +26,9 @@
 #include <linux/if_vlan.h>
 #include <linux/of_net.h>
 #include <linux/phy_fixed.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
+#include <linux/bitfield.h>
 #include <net/ip.h>
 #include <net/ncsi.h>
 
@@ -1833,6 +1836,146 @@ static bool ftgmac100_has_child_node(struct device_node *np, const char *name)
 	return ret;
 }
 
+static int ftgmac100_set_ast2600_rgmii_delay(struct ftgmac100 *priv,
+					     u32 rgmii_tx_delay,
+					     u32 rgmii_rx_delay)
+{
+	struct device *dev = priv->dev;
+	struct device_node *np;
+	u32 rgmii_delay_unit;
+	u32 rx_delay_index;
+	u32 tx_delay_index;
+	struct regmap *scu;
+	int dly_mask;
+	int dly_reg;
+	int mac_id;
+	int ret;
+
+	np = dev->of_node;
+
+	/* Add a warning to notify the existed dts based on AST2600. It is
+	 * recommended to update the dts to add the rx/tx-internal-delay-ps to
+	 * specify the RGMII delay and we recommend using the "rgmii-id" for
+	 * phy-mode property to tell the PHY enables TX/RX internal delay and
+	 * add the corresponding rx/tx-internal-delay-ps properties.
+	 */
+	if (priv->netdev->phydev->interface != PHY_INTERFACE_MODE_RGMII_ID)
+		dev_warn(dev, "Update the phy-mode to 'rgmii-id'.\n");
+
+	scu = syscon_regmap_lookup_by_phandle(np, "aspeed,scu");
+	if (IS_ERR(scu)) {
+		dev_err(dev, "failed to get aspeed,scu");
+		return PTR_ERR(scu);
+	}
+
+	ret = of_property_read_u32(np, "aspeed,rgmii-delay-ps",
+				   &rgmii_delay_unit);
+	if (ret) {
+		dev_err(dev, "failed to get aspeed,rgmii-delay-ps value\n");
+		return -EINVAL;
+	}
+
+	/* According to the register base address to specify the corresponding
+	 * values.
+	 */
+	switch (priv->res->start) {
+	case AST2600_MAC0_BASE_ADDR:
+		mac_id = 0;
+		break;
+	case AST2600_MAC1_BASE_ADDR:
+		mac_id = 1;
+		break;
+	case AST2600_MAC2_BASE_ADDR:
+		mac_id = 2;
+		break;
+	case AST2600_MAC3_BASE_ADDR:
+		mac_id = 3;
+		break;
+	default:
+		dev_err(dev, "Invalid mac base address");
+		return -EINVAL;
+	}
+
+	if (mac_id == 0 || mac_id == 1) {
+		if (rgmii_delay_unit != AST2600_MAC01_CLK_DLY_UNIT) {
+			dev_err(dev, "aspeed,rgmii-delay-ps %u is invalid\n",
+				rgmii_delay_unit);
+			return -EINVAL;
+		}
+		dly_reg = AST2600_MAC01_CLK_DLY;
+	} else {
+		if (rgmii_delay_unit != AST2600_MAC23_CLK_DLY_UNIT) {
+			dev_err(dev, "aspeed,rgmii-delay-ps %u is invalid\n",
+				rgmii_delay_unit);
+			return -EINVAL;
+		}
+		dly_reg = AST2600_MAC23_CLK_DLY;
+	}
+
+	tx_delay_index = DIV_ROUND_CLOSEST(rgmii_tx_delay, rgmii_delay_unit);
+	if (tx_delay_index >= 32) {
+		dev_err(dev, "The %u ps of TX delay is out of range\n",
+			rgmii_tx_delay);
+		return -EINVAL;
+	}
+
+	rx_delay_index = DIV_ROUND_CLOSEST(rgmii_rx_delay, rgmii_delay_unit);
+	if (rx_delay_index >= 32) {
+		dev_err(dev, "The %u ps of RX delay is out of range\n",
+			rgmii_rx_delay);
+		return -EINVAL;
+	}
+
+	/* Due to the hardware design reason, for MAC2/3 on AST2600, the zero
+	 * delay ns on RX is configured by setting value 0x1a.
+	 * List as below:
+	 * 0x1a -> 0   ns, 0x1b -> 0.25 ns, ... , 0x1f -> 1.25 ns,
+	 * 0x00 -> 1.5 ns, 0x01 -> 1.75 ns, ... , 0x19 -> 7.75 ns, 0x1a -> 0 ns
+	 */
+	if (mac_id == 2 || mac_id == 3)
+		rx_delay_index = (AST2600_MAC23_RX_DLY_0_NS + rx_delay_index) &
+				 AST2600_MAC_TX_RX_DLY_MASK;
+
+	if (mac_id == 0 || mac_id == 2) {
+		dly_mask = ASPEED_MAC0_2_TX_DLY | ASPEED_MAC0_2_RX_DLY;
+		tx_delay_index = FIELD_PREP(ASPEED_MAC0_2_TX_DLY, tx_delay_index);
+		rx_delay_index = FIELD_PREP(ASPEED_MAC0_2_RX_DLY, rx_delay_index);
+	} else {
+		dly_mask = ASPEED_MAC1_3_TX_DLY | ASPEED_MAC1_3_RX_DLY;
+		tx_delay_index = FIELD_PREP(ASPEED_MAC1_3_TX_DLY, tx_delay_index);
+		rx_delay_index = FIELD_PREP(ASPEED_MAC1_3_RX_DLY, rx_delay_index);
+	}
+
+	regmap_update_bits(scu, dly_reg, dly_mask, tx_delay_index | rx_delay_index);
+
+	return 0;
+}
+
+static int ftgmac100_set_internal_delay(struct ftgmac100 *priv)
+{
+	struct device_node *np = priv->dev->of_node;
+	u32 rgmii_tx_delay;
+	u32 rgmii_rx_delay;
+	int err;
+
+	if (!(of_device_is_compatible(np, "aspeed,ast2600-mac")))
+		return 0;
+
+	if (of_property_read_u32(np, "tx-internal-delay-ps", &rgmii_tx_delay))
+		/* Default to 0 ps delay */
+		rgmii_tx_delay = 0;
+
+	if (of_property_read_u32(np, "rx-internal-delay-ps", &rgmii_rx_delay))
+		/* Default to 0 ps delay */
+		rgmii_rx_delay = 0;
+
+	err = ftgmac100_set_ast2600_rgmii_delay(priv,
+						rgmii_tx_delay,
+						rgmii_rx_delay);
+
+	return err;
+}
+
 static int ftgmac100_probe(struct platform_device *pdev)
 {
 	struct resource *res;
@@ -2004,6 +2147,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
 		if (of_device_is_compatible(np, "aspeed,ast2600-mac"))
 			iowrite32(FTGMAC100_TM_DEFAULT,
 				  priv->base + FTGMAC100_OFFSET_TM);
+
+		/* Configure RGMII delay if there are the corresponding compatibles */
+		err = ftgmac100_set_internal_delay(priv);
+		if (err)
+			goto err_phy_connect;
 	}
 
 	/* Default ring sizes */
diff --git a/drivers/net/ethernet/faraday/ftgmac100.h b/drivers/net/ethernet/faraday/ftgmac100.h
index 4968f6f0bdbc..d19d44d1b8e0 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.h
+++ b/drivers/net/ethernet/faraday/ftgmac100.h
@@ -271,4 +271,24 @@ struct ftgmac100_rxdes {
 #define FTGMAC100_RXDES1_UDP_CHKSUM_ERR	(1 << 26)
 #define FTGMAC100_RXDES1_IP_CHKSUM_ERR	(1 << 27)
 
+/* Aspeed SCU */
+#define AST2600_MAC01_CLK_DLY	0x340
+#define AST2600_MAC23_CLK_DLY	0x350
+#define AST2600_MAC01_CLK_DLY_UNIT	45	/* ps */
+#define AST2600_MAC01_TX_DLY_0_NS	0
+#define AST2600_MAC01_RX_DLY_0_NS	0
+#define AST2600_MAC23_CLK_DLY_UNIT	250	/* ps */
+#define AST2600_MAC23_TX_DLY_0_NS	0
+#define AST2600_MAC23_RX_DLY_0_NS	0x1a
+#define AST2600_MAC_TX_RX_DLY_MASK	0x1f
+#define ASPEED_MAC0_2_TX_DLY		GENMASK(5, 0)
+#define ASPEED_MAC0_2_RX_DLY		GENMASK(17, 12)
+#define ASPEED_MAC1_3_TX_DLY		GENMASK(11, 6)
+#define ASPEED_MAC1_3_RX_DLY		GENMASK(23, 18)
+
+#define AST2600_MAC0_BASE_ADDR		0x1e660000
+#define AST2600_MAC1_BASE_ADDR		0x1e680000
+#define AST2600_MAC2_BASE_ADDR		0x1e670000
+#define AST2600_MAC3_BASE_ADDR		0x1e690000
+
 #endif /* __FTGMAC100_H */

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next v4 1/4] dt-bindings: net: ftgmac100: Add delay properties for AST2600
  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
  1 sibling, 0 replies; 15+ messages in thread
From: Rob Herring (Arm) @ 2025-11-10 12:29 UTC (permalink / raw)
  To: Jacky Chou
  Cc: Andrew Jeffery, netdev, Andrew Lunn, devicetree, linux-arm-kernel,
	linux-kernel, taoren, Po-Yu Chuang, Eric Dumazet, Paolo Abeni,
	Conor Dooley, Joel Stanley, David S. Miller, Jakub Kicinski,
	Krzysztof Kozlowski, linux-aspeed


On Mon, 10 Nov 2025 19:09:25 +0800, Jacky Chou wrote:
> 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.
> 
> Add the new property, "aspeed,rgmii-delay-ps", to specify per step of
> RGMII delay in different MACs. And for Aspeed platform, the total steps
> of RGMII delay configuraion is 32 steps, so the total delay is
> "apseed,rgmii-delay-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, aspeed,rgmii-delay-ps property is 45 ps
> - For MAC2/3, aspeed,rgmii-delay-ps property 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 | 35 ++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml: properties:aspeed,rgmii-delay-ps: 'anyOf' conditional failed, one must be fixed:
	'maxItems' is a required property
		hint: Only "maxItems" is required for a single entry if there are no constraints defined for the values.
	'type' is not one of ['maxItems', 'description', 'deprecated']
		hint: Only "maxItems" is required for a single entry if there are no constraints defined for the values.
	Additional properties are not allowed ('type' was unexpected)
		hint: Arrays must be described with a combination of minItems/maxItems/items
	'type' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref', 'oneOf']
	hint: cell array properties must define how many entries and what the entries are when there is more than one entry.
	from schema $id: http://devicetree.org/meta-schemas/cell.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml: properties:aspeed,rgmii-delay-ps:type: 'integer' is not one of ['boolean', 'object']
	from schema $id: http://devicetree.org/meta-schemas/core.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20251110-rgmii_delay_2600-v4-1-5cad32c766f7@aspeedtech.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next v4 0/4] Add AST2600 RGMII delay into ftgmac100
  2025-11-10 11:09 [PATCH net-next v4 0/4] Add AST2600 RGMII delay into ftgmac100 Jacky Chou
                   ` (3 preceding siblings ...)
  2025-11-10 11:09 ` [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600 Jacky Chou
@ 2025-11-10 14:34 ` Rob Herring (Arm)
  4 siblings, 0 replies; 15+ messages in thread
From: Rob Herring (Arm) @ 2025-11-10 14:34 UTC (permalink / raw)
  To: Jacky Chou
  Cc: Conor Dooley, Jakub Kicinski, Eric Dumazet, Andrew Jeffery,
	Krzysztof Kozlowski, Joel Stanley, linux-kernel, linux-arm-kernel,
	taoren, Paolo Abeni, linux-aspeed, devicetree, Andrew Lunn,
	David S. Miller, netdev, Po-Yu Chuang


On Mon, 10 Nov 2025 19:09:24 +0800, Jacky Chou wrote:
> This patch series adds support for configuring RGMII internal delays for the
> Aspeed AST2600 FTGMAC100 Ethernet MACs. It introduces new compatible strings to
> distinguish between MAC0/1 and MAC2/3, as their delay chains and configuration
> units differ.
> The device tree bindings are updated to restrict the allowed phy-mode and delay
> properties for each MAC type. Corresponding changes are made to the device tree
> source files and the FTGMAC100 driver to support the new delay configuration.
> 
> Summary of changes:
> - dt-bindings: net: ftgmac100: Add conditional schema for AST2600 MAC0/1 and
>   MAC2/3.
> - ARM: dts: aspeed-g6: Add aspeed,rgmii-delay-ps and aspeed,scu
>   properties.
> - ARM: dts: aspeed-ast2600-evb: Add rx/tx-internal-delay-ps properties and
>   update phy-mode for MACs.
> - net: ftgmac100: Add driver support for configuring RGMII delay for AST2600
>   MACs via SCU.
> 
> This enables precise RGMII timing configuration for AST2600-based platforms,
> improving interoperability with various PHYs
> 
> To: Andrew Lunn <andrew+netdev@lunn.ch>
> To: David S. Miller <davem@davemloft.net>
> To: Eric Dumazet <edumazet@google.com>
> To: Jakub Kicinski <kuba@kernel.org>
> To: Paolo Abeni <pabeni@redhat.com>
> To: Rob Herring <robh@kernel.org>
> To: Krzysztof Kozlowski <krzk+dt@kernel.org>
> To: Conor Dooley <conor+dt@kernel.org>
> To: Po-Yu Chuang <ratbert@faraday-tech.com>
> To: Joel Stanley <joel@jms.id.au>
> To: Andrew Jeffery <andrew@codeconstruct.com.au>
> Cc: netdev@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-aspeed@lists.ozlabs.org
> Cc: taoren@meta.com
> 
> Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
> ---
> Changes in v4:
> - Remove the compatible "aspeed,ast2600-mac01" and
>   "aspeed,ast2600-mac23"
> - Add new property to specify the RGMII delay step for each MACs
> - Add default value of rx/tx-internal-delay-ps
> - For legacy dts, a warning message reminds users to update phy-mode
> - If lack rx/tx-internal-delay-ps, driver will use default value to
>   configure the RGMII delay
> - Link to v3: https://lore.kernel.org/r/20251103-rgmii_delay_2600-v3-0-e2af2656f7d7@aspeedtech.com
> 
> Changes in v3:
> - Add new item on compatible property for new compatible strings
> - Remove the new compatible and scu handle of MAC from aspeed-g6.dtsi
> - Add new compatible and scu handle to MAC node in
>   aspeed-ast2600-evb.dts
> - Change all phy-mode of MACs to "rgmii-id"
> - Keep "aspeed,ast2600-mac" compatible in ftgmac100.c and configure the
>   rgmii delay with "aspeed,ast2600-mac01" and "aspeed,ast2600-mac23"
> - Link to v2: https://lore.kernel.org/r/20250813063301.338851-1-jacky_chou@aspeedtech.com
> 
> Changes in v2:
> - added new compatible strings for MAC0/1 and MAC2/3
> - updated device tree bindings to restrict phy-mode and delay properties
> - refactored driver code to handle rgmii delay configuration
> - Link to v1: https://lore.kernel.org/r/20250317025922.1526937-1-jacky_chou@aspeedtech.com
> 
> ---
> Jacky Chou (4):
>       dt-bindings: net: ftgmac100: Add delay properties for AST2600
>       ARM: dts: aspeed-g6: Add scu and rgmii delay value per step for MAC
>       ARM: dts: aspeed: ast2600-evb: Configure RGMII delay for MAC
>       net: ftgmac100: Add RGMII delay support for AST2600
> 
>  .../devicetree/bindings/net/faraday,ftgmac100.yaml |  35 +++++
>  arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dts    |  20 ++-
>  arch/arm/boot/dts/aspeed/aspeed-g6.dtsi            |   8 ++
>  drivers/net/ethernet/faraday/ftgmac100.c           | 148 +++++++++++++++++++++
>  drivers/net/ethernet/faraday/ftgmac100.h           |  20 +++
>  5 files changed, 227 insertions(+), 4 deletions(-)
> ---
> base-commit: a0c3aefb08cd81864b17c23c25b388dba90b9dad
> change-id: 20251031-rgmii_delay_2600-a00b0248c7e6
> 
> Best regards,
> --
> Jacky Chou <jacky_chou@aspeedtech.com>
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


This patch series was applied (using b4) to base:
 Base: a0c3aefb08cd81864b17c23c25b388dba90b9dad (use --merge-base to override)

If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm/boot/dts/aspeed/' for 20251110-rgmii_delay_2600-v4-0-5cad32c766f7@aspeedtech.com:

arch/arm/boot/dts/aspeed/aspeed-bmc-quanta-s6q.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-quanta-s6q.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-quanta-s6q.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-quanta-s6q.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-sbp1.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-sbp1.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-sbp1.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-sbp1.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200nvl-bmc.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200nvl-bmc.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200nvl-bmc.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200nvl-bmc.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-opp-tacoma.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-opp-tacoma.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-opp-tacoma.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-opp-tacoma.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-fuji.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-fuji.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-fuji.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-fuji.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge-4u.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge-4u.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge-4u.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge-4u.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-ast2600-evb-a1.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-ast2600-evb-a1.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-ast2600-evb-a1.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-ast2600-evb-a1.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-inventec-transformers.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-inventec-transformers.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-inventec-transformers.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-inventec-transformers.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-bletchley.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-bletchley.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-bletchley.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-bletchley.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-inventec-starscream.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-inventec-starscream.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-inventec-starscream.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-inventec-starscream.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji-data64.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji-data64.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji-data64.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji-data64.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier-1s4u.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier-1s4u.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier-1s4u.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier-1s4u.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier-4u.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier-4u.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier-4u.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier-4u.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-catalina.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-catalina.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-catalina.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-catalina.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtjefferson.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtjefferson.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtjefferson.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtjefferson.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-asus-x4tf.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-asus-x4tf.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-asus-x4tf.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-asus-x4tf.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-clemente.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-clemente.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-clemente.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-clemente.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-tyan-s7106.dtb: fan@2: aspeed,fan-tach-ch: b'\x02' is not of type 'object', 'integer', 'array', 'boolean', 'null'
	from schema $id: http://devicetree.org/schemas/dt-core.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-elbert.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-elbert.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-elbert.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-elbert.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-qcom-dc-scm-v1.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-qcom-dc-scm-v1.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-qcom-dc-scm-v1.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-qcom-dc-scm-v1.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ufispace-ncplite.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ufispace-ncplite.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ufispace-ncplite.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ufispace-ncplite.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-darwin.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-darwin.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-darwin.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-darwin.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-greatlakes.dtb: ethernet@1e660000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-greatlakes.dtb: ethernet@1e680000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [45] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-greatlakes.dtb: ethernet@1e670000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-greatlakes.dtb: ethernet@1e690000 (aspeed,ast2600-mac): aspeed,rgmii-delay-ps: [250] is not of type 'integer'
	from schema $id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml






^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next v4 1/4] dt-bindings: net: ftgmac100: Add delay properties for AST2600
  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
  1 sibling, 1 reply; 15+ messages in thread
From: Andrew Lunn @ 2025-11-10 15:21 UTC (permalink / raw)
  To: Jacky Chou
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-aspeed, taoren

> Add the new property, "aspeed,rgmii-delay-ps", to specify per step of
> RGMII delay in different MACs. And for Aspeed platform, the total steps
> of RGMII delay configuraion is 32 steps, so the total delay is
> "apseed,rgmii-delay-ps' * 32.

You already have hard coded base addresses to identify the MAC
instances. So i don't see the need for this in DT. Just extend the
switch statement with the delay step.

    Andrew

---
pw-bot: cr

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600
  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-10 15:45   ` Andrew Lunn
  1 sibling, 1 reply; 15+ messages in thread
From: Andrew Lunn @ 2025-11-10 15:35 UTC (permalink / raw)
  To: Jacky Chou
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-aspeed, taoren

> +	/* Add a warning to notify the existed dts based on AST2600. It is
> +	 * recommended to update the dts to add the rx/tx-internal-delay-ps to
> +	 * specify the RGMII delay and we recommend using the "rgmii-id" for
> +	 * phy-mode property to tell the PHY enables TX/RX internal delay and
> +	 * add the corresponding rx/tx-internal-delay-ps properties.
> +	 */

I would not say that exactly. Normally you don't need
rx/tx-internal-delay-ps. It is only requires for badly designed boards
where the designer did not correctly balance the line lengths.  So i
would word this such that it is recommended to use "rgmii-id", and if
necessary, add small "rx/tx-internal-delay-ps" values.

> +	scu = syscon_regmap_lookup_by_phandle(np, "aspeed,scu");
> +	if (IS_ERR(scu)) {
> +		dev_err(dev, "failed to get aspeed,scu");
> +		return PTR_ERR(scu);
> +	}

This is an optional property. If it does not exist, you have an old DT
blob. It is not an error. So you need to do different things depending
on what the error code is. If it does not exist, just return 0 and
leave the hardware alone. If it is some other error report it, and
abort the probe.

> +
> +	ret = of_property_read_u32(np, "aspeed,rgmii-delay-ps",
> +				   &rgmii_delay_unit);
> +	if (ret) {
> +		dev_err(dev, "failed to get aspeed,rgmii-delay-ps value\n");
> +		return -EINVAL;
> +	}

Again, optional.

	Andrew

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600
  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-10 15:45   ` Andrew Lunn
  1 sibling, 0 replies; 15+ messages in thread
From: Andrew Lunn @ 2025-11-10 15:45 UTC (permalink / raw)
  To: Jacky Chou
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-aspeed, taoren

On Mon, Nov 10, 2025 at 07:09:28PM +0800, Jacky Chou wrote:
> On the AST2600 platform, the RGMII delay is controlled via the
> SCU registers. The delay chain configuration differs between MAC0/1
> and MAC2/3, even though all four MACs use a 32-stage delay chain.
> +------+----------+-----------+-------------+-------------+
> |      |Delay Unit|Delay Stage|TX Edge Stage|RX Edge Stage|
> +------+----------+-----------+-------------+-------------+
> |MAC0/1|     45 ps|        32 |           0 |           0 |
> +------+----------+-----------+-------------+-------------+
> |MAC2/3|    250 ps|        32 |           0 |          26 |
> +------+----------+-----------+-------------+-------------+
> For MAC2/3, the "no delay" condition starts from stage 26.
> Setting the RX delay stage to 26 means that no additional RX
> delay is applied.
> Here lists the RX delay setting of MAC2/3 below.
> 26 -> 0   ns, 27 -> 0.25 ns, ... , 31 -> 1.25 ns,
> 0  -> 1.5 ns, 1  -> 1.75 ns, ... , 25 -> 7.75 ns
> 
> Therefore, we calculate the delay stage from the
> rx-internal-delay-ps of MAC2/3 to add 26. If the stage is equel
> to or bigger than 32, the delay stage will be mask 0x1f to get
> the correct setting.
> The delay chain is like a ring for configuration.
> Example for the rx-internal-delay-ps of MAC2/3 is 2000 ps,
> we will get the delay stage is 2.
> 
> Strating to this patch, driver will remind the legacy dts to update the
> "phy-mode" to "rgmii-id, and add the corresponding rgmii delay with
> "rx-internal-delay-id" and "tx-internal-delay-id".
> If lack these properties, driver will configure the default rgmii delay,
> that means driver will disable the TX and RX delay in MAC side.
> 
> Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
> ---
>  drivers/net/ethernet/faraday/ftgmac100.c | 148 +++++++++++++++++++++++++++++++
>  drivers/net/ethernet/faraday/ftgmac100.h |  20 +++++
>  2 files changed, 168 insertions(+)
> 
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index a863f7841210..5cecdd4583f6 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +static int ftgmac100_set_ast2600_rgmii_delay(struct ftgmac100 *priv,
> +					     u32 rgmii_tx_delay,
> +					     u32 rgmii_rx_delay)
> +{
> +	struct device *dev = priv->dev;
> +	struct device_node *np;
> +	u32 rgmii_delay_unit;
> +	u32 rx_delay_index;
> +	u32 tx_delay_index;
> +	struct regmap *scu;
> +	int dly_mask;
> +	int dly_reg;
> +	int mac_id;
> +	int ret;
> +
> +	np = dev->of_node;
> +
> +	/* Add a warning to notify the existed dts based on AST2600. It is
> +	 * recommended to update the dts to add the rx/tx-internal-delay-ps to
> +	 * specify the RGMII delay and we recommend using the "rgmii-id" for
> +	 * phy-mode property to tell the PHY enables TX/RX internal delay and
> +	 * add the corresponding rx/tx-internal-delay-ps properties.
> +	 */
> +	if (priv->netdev->phydev->interface != PHY_INTERFACE_MODE_RGMII_ID)
> +		dev_warn(dev, "Update the phy-mode to 'rgmii-id'.\n");
> +
> +	scu = syscon_regmap_lookup_by_phandle(np, "aspeed,scu");
> +	if (IS_ERR(scu)) {
> +		dev_err(dev, "failed to get aspeed,scu");
> +		return PTR_ERR(scu);
> +	}

You are adding the scu to the dtsi.

> +
> +	ret = of_property_read_u32(np, "aspeed,rgmii-delay-ps",
> +				   &rgmii_delay_unit);
> +	if (ret) {
> +		dev_err(dev, "failed to get aspeed,rgmii-delay-ps value\n");
> +		return -EINVAL;
> +	}

This is probably going away, replaced by hard coded values.

> +	tx_delay_index = DIV_ROUND_CLOSEST(rgmii_tx_delay, rgmii_delay_unit);
> +	if (tx_delay_index >= 32) {
> +		dev_err(dev, "The %u ps of TX delay is out of range\n",
> +			rgmii_tx_delay);
> +		return -EINVAL;
> +	}
> +
> +	rx_delay_index = DIV_ROUND_CLOSEST(rgmii_rx_delay, rgmii_delay_unit);
> +	if (rx_delay_index >= 32) {
> +		dev_err(dev, "The %u ps of RX delay is out of range\n",
> +			rgmii_rx_delay);
> +		return -EINVAL;
> +	}

> +	regmap_update_bits(scu, dly_reg, dly_mask, tx_delay_index | rx_delay_index);

How does backwards compatibility work? rgmii_rx_delay and
rgmii_tx_delay default to zero? So by default, todays working DT blobs
will have 'rgmii', so end up turning off delays here. And then they
pass _RGMII to the PHY, and have no delays. And networking is broken.

I think you actually need to be reading the current SCU settings and
then deciding if you want to override it or not.

I suggest you change the order of the patches in this series. Move
this patch before you update your RDK .dts file. That way, you get to
test both an old and new blob.

	Andrew

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 1/4] dt-bindings: net: ftgmac100: Add delay properties for AST2600
  2025-11-10 15:21   ` Andrew Lunn
@ 2025-11-11  3:09     ` Jacky Chou
  0 siblings, 0 replies; 15+ messages in thread
From: Jacky Chou @ 2025-11-11  3:09 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery,
	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

Hi Andrew,

Thank you for your reply.

> > Add the new property, "aspeed,rgmii-delay-ps", to specify per step of
> > RGMII delay in different MACs. And for Aspeed platform, the total
> > steps of RGMII delay configuraion is 32 steps, so the total delay is
> > "apseed,rgmii-delay-ps' * 32.
> 
> You already have hard coded base addresses to identify the MAC instances. So i
> don't see the need for this in DT. Just extend the switch statement with the
> delay step.
> 

Agreed.
Indeed, no additional property is needed to specify this.
I will remove this property in next version.

Thanks,
Jacky


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600
  2025-11-10 15:35   ` Andrew Lunn
@ 2025-11-12  3:45     ` Jacky Chou
  2025-11-12 13:19       ` Andrew Lunn
  0 siblings, 1 reply; 15+ messages in thread
From: Jacky Chou @ 2025-11-12  3:45 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery,
	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

Hi Andrew,

Thank you for your reply.

> > +	/* Add a warning to notify the existed dts based on AST2600. It is
> > +	 * recommended to update the dts to add the rx/tx-internal-delay-ps to
> > +	 * specify the RGMII delay and we recommend using the "rgmii-id" for
> > +	 * phy-mode property to tell the PHY enables TX/RX internal delay and
> > +	 * add the corresponding rx/tx-internal-delay-ps properties.
> > +	 */
> 
> I would not say that exactly. Normally you don't need rx/tx-internal-delay-ps. It
> is only requires for badly designed boards where the designer did not correctly
> balance the line lengths.  So i would word this such that it is recommended to
> use "rgmii-id", and if necessary, add small "rx/tx-internal-delay-ps" values.
> 

Agreed.
I will update this comment in next version.

> > +	scu = syscon_regmap_lookup_by_phandle(np, "aspeed,scu");
> > +	if (IS_ERR(scu)) {
> > +		dev_err(dev, "failed to get aspeed,scu");
> > +		return PTR_ERR(scu);
> > +	}
> 
> This is an optional property. If it does not exist, you have an old DT blob. It is
> not an error. So you need to do different things depending on what the error
> code is. If it does not exist, just return 0 and leave the hardware alone. If it is
> some other error report it, and abort the probe.
> 

Based on this for next version, I want to move the "aspeed,scu" from dtsi to dts.
Change it to optional and accord it whether existed to decide it is old or new DT 
blob.

Thanks,
Jacky


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600
  2025-11-12  3:45     ` Jacky Chou
@ 2025-11-12 13:19       ` Andrew Lunn
  2025-11-13 10:40         ` Jacky Chou
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew Lunn @ 2025-11-12 13:19 UTC (permalink / raw)
  To: Jacky Chou
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery,
	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

> > This is an optional property. If it does not exist, you have an old DT blob. It is
> > not an error. So you need to do different things depending on what the error
> > code is. If it does not exist, just return 0 and leave the hardware alone. If it is
> > some other error report it, and abort the probe.
> > 
> 
> Based on this for next version, I want to move the "aspeed,scu" from dtsi to dts.
> Change it to optional and accord it whether existed to decide it is old or new DT 
> blob.

I think that is the easy way out, not necessarily the correct way.

All systems have the aspeed,scu, so it should really be in the .dtsi
file.

What are you really trying to solve? That the DT blob says "rgmii",
but the bootloader has configured the MAC to add delays? You should be
able to test for that condition. If it is found, issue as warning, and
treat phy-mode as 'rgmii-id'. If the DT blob says 'rgmii-id' and the
MAC is configured to add the delays, the system is at least
consistent, no need for a warning, disable the MAC delays and pass
_RGMII_ID to the PHY. And if the blob says 'rgmii-id' and the MAC is
not adding delays, no need to touch the MAC delay, and pass _RGMII_ID
to the PHY.

Are there any mainline DT .dts files which say rgmii-txid, or
rgmii-rxid? They would be rather odd, but occasionally you see them.
Assuming there are not lots of them, i would probably just leave
everything as is.

	Andrew

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600
  2025-11-12 13:19       ` Andrew Lunn
@ 2025-11-13 10:40         ` Jacky Chou
  2025-11-15 21:46           ` Andrew Lunn
  0 siblings, 1 reply; 15+ messages in thread
From: Jacky Chou @ 2025-11-13 10:40 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery,
	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

> > > This is an optional property. If it does not exist, you have an old
> > > DT blob. It is not an error. So you need to do different things
> > > depending on what the error code is. If it does not exist, just
> > > return 0 and leave the hardware alone. If it is some other error report it,
> and abort the probe.
> > >
> >
> > Based on this for next version, I want to move the "aspeed,scu" from dtsi to
> dts.
> > Change it to optional and accord it whether existed to decide it is
> > old or new DT blob.
> 
> I think that is the easy way out, not necessarily the correct way.
> 

Agreed.
That's easy to implement adding support RGMII delay configuration for AST2600.
According to aspeed,scu property if it is a new dts.
If it is old dts, ignore delay setting flow.
If new one, configure the corresponding value from tx/rx-internal-delay-ps
properties.

At first, I would just like to support for new dts based on AST2600.
The existed dts in kernel is as legacy dts for AST2600 and try to bypass
them. Therefore, I tried to use new compatible or aspeed,scu property to identify
which new dts is.

> All systems have the aspeed,scu, so it should really be in the .dtsi file.
> 
> What are you really trying to solve? That the DT blob says "rgmii", but the
> bootloader has configured the MAC to add delays? You should be able to test
> for that condition. If it is found, issue as warning, and treat phy-mode as
> 'rgmii-id'. If the DT blob says 'rgmii-id' and the MAC is configured to add the
> delays, the system is at least consistent, no need for a warning, disable the
> MAC delays and pass _RGMII_ID to the PHY. And if the blob says 'rgmii-id' and
> the MAC is not adding delays, no need to touch the MAC delay, and pass
> _RGMII_ID to the PHY.
> 
> Are there any mainline DT .dts files which say rgmii-txid, or rgmii-rxid? They
> would be rather odd, but occasionally you see them.
> Assuming there are not lots of them, i would probably just leave everything as
> is.
> 

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.

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.

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.

From what I understand, when the TX delay value is set to zero, the data and clock signals 
are almost aligned to the edge - which likely means the MAC TX delay is disabled.

Therefore, I'd prefer the driver to simply configure the MAC delay based on the phy-mode 
and the tx/rx-internal-delay-ps properties.

As you mentioned before, the v4 behavior results in a network interface that can successfully 
probe but does not actually work.
So, I'm also considering another approach on the AST2600:
to not support rgmii, rgmii-txid, or rgmii-rxid modes directly.
If any of these are encountered, the driver could automatically treat them as rgmii-id and issue 
a warning.

Thanks,
Jacky

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next v4 4/4] net: ftgmac100: Add RGMII delay support for AST2600
  2025-11-13 10:40         ` Jacky Chou
@ 2025-11-15 21:46           ` Andrew Lunn
  0 siblings, 0 replies; 15+ messages in thread
From: Andrew Lunn @ 2025-11-15 21:46 UTC (permalink / raw)
  To: Jacky Chou
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Po-Yu Chuang, Joel Stanley, Andrew Jeffery,
	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

> 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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-11-15 21:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).